805 lines
2.8 MiB
805 lines
2.8 MiB
/*!-----------------------------------------------------------
|
||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||
* Version: 0.32.1(8ad5e3bceab16a4d0856c43a374b511dffb1e795)
|
||
* Released under the MIT license
|
||
* https://github.com/microsoft/vscode/blob/main/LICENSE.txt
|
||
*-----------------------------------------------------------*/(function(){var te=["exports","require","vs/base/common/lifecycle","vs/editor/common/core/range","vs/base/common/event","vs/nls","vs/nls!vs/editor/editor.main","vs/base/browser/dom","vs/base/common/strings","vs/platform/instantiation/common/instantiation","vs/base/common/async","vs/editor/common/core/position","vs/css!vs/editor/editor.main","vs/base/common/errors","vs/platform/theme/common/themeService","vs/editor/browser/editorExtensions","vs/platform/contextkey/common/contextkey","vs/base/common/platform","vs/editor/common/languages","vs/base/common/arrays","vs/base/common/types","vs/base/common/cancellation","vs/editor/common/core/selection","vs/platform/theme/common/colorRegistry","vs/editor/common/editorContextKeys","vs/base/common/uri","vs/platform/commands/common/commands","vs/base/common/codicons","vs/editor/browser/services/codeEditorService","vs/base/common/color","vs/base/browser/fastDomNode","vs/editor/common/config/editorOptions","vs/editor/common/languages/languageConfigurationRegistry","vs/editor/common/model/textModel","vs/base/browser/browser","vs/editor/common/services/language","vs/platform/registry/common/platform","vs/platform/actions/common/actions","vs/platform/notification/common/notification","vs/base/common/objects","vs/platform/configuration/common/configuration","vs/base/common/resources","vs/platform/keybinding/common/keybinding","vs/base/browser/ui/aria/aria","vs/base/common/actions","vs/editor/common/services/model","vs/base/browser/keyboardEvent","vs/base/common/map","vs/base/common/network","vs/editor/common/model","vs/editor/browser/view/viewPart","vs/platform/opener/common/opener","vs/editor/common/core/editorColorRegistry","vs/platform/instantiation/common/extensions","vs/base/common/iterator","vs/base/common/keyCodes","vs/base/browser/mouseEvent","vs/base/browser/touch","vs/editor/common/services/resolverService","vs/editor/common/cursor/cursorCommon","vs/base/browser/ui/widget","vs/editor/common/core/editOperation","vs/editor/browser/config/domFontInfo","vs/platform/accessibility/common/accessibility","vs/platform/log/common/log","vs/base/common/stopwatch","vs/base/common/htmlContent","vs/base/browser/ui/scrollbar/scrollableElement","vs/editor/common/core/cursorColumns","vs/editor/common/viewModel/viewModel","vs/editor/common/standaloneStrings","vs/platform/progress/common/progress","vs/platform/theme/common/iconRegistry","vs/base/common/filters","vs/base/common/severity","vs/editor/common/tokens/lineTokens","vs/platform/contextview/browser/contextView","vs/platform/markers/common/markers","vs/platform/quickinput/common/quickInput","vs/editor/common/languages/modesRegistry","vs/platform/storage/common/storage","vs/base/common/linkedList","vs/base/common/path","vs/editor/common/model/bracketPairsTextModelPart/bracketPairsTree/length","vs/base/browser/ui/actionbar/actionbar","vs/editor/common/services/editorWorker","vs/platform/keybinding/common/keybindingsRegistry","vs/platform/telemetry/common/telemetry","vs/base/common/functional","vs/base/browser/event","vs/editor/common/core/stringBuilder","vs/editor/common/textModelEvents","vs/editor/common/services/languageFeatureDebounce","vs/base/common/decorators","vs/base/common/keybindings","vs/base/common/iconLabels","vs/base/browser/globalMouseMoveMonitor","vs/editor/common/core/characterClassifier","vs/editor/common/commands/replaceCommand","vs/editor/common/model/bracketPairsTextModelPart/bracketPairsTree/smallImmutableSet","vs/editor/browser/view/dynamicViewOverlay","vs/editor/standalone/common/standaloneTheme","vs/platform/clipboard/common/clipboardService","vs/platform/configuration/common/configurationRegistry","vs/editor/contrib/markdownRenderer/browser/markdownRenderer","vs/platform/quickinput/common/quickAccess","vs/editor/contrib/editorState/browser/editorState","vs/editor/contrib/suggest/browser/suggest","vs/editor/contrib/peekView/browser/peekView","vs/base/browser/ui/tree/tree","vs/base/common/buffer","vs/base/common/numbers","vs/base/common/hash","vs/base/browser/ui/iconLabel/iconLabels","vs/base/browser/ui/sash/sash","vs/base/browser/ui/list/listWidget","vs/editor/browser/view/renderingContext","vs/editor/common/core/eolCounter","vs/editor/common/core/wordCharacterClassifier","vs/editor/common/languages/languageConfiguration","vs/editor/common/languages/supports","vs/editor/common/languages/nullMode","vs/editor/common/viewLayout/viewLineRenderer","vs/editor/common/viewModel/viewEventHandler","vs/editor/contrib/snippet/browser/snippetParser","vs/base/browser/ui/actionbar/actionViewItems","vs/editor/contrib/gotoSymbol/browser/referencesModel","vs/platform/dialogs/common/dialogs","vs/platform/label/common/label","vs/platform/layout/browser/layoutService","vs/editor/browser/editorDom","vs/platform/theme/common/styler","vs/platform/theme/common/theme","vs/base/common/idGenerator","vs/base/common/lazy","vs/base/common/mime","vs/base/common/range","vs/base/common/scrollable","vs/base/common/diff/diff","vs/base/common/uint","vs/base/browser/ui/codicons/codiconStyles","vs/base/browser/ui/mouseCursor/mouseCursor","vs/css!vs/base/parts/quickinput/browser/media/quickInput","vs/editor/browser/stableEditorScroll","vs/editor/common/config/editorZoom","vs/editor/common/core/textModelDefaults","vs/editor/common/core/wordHelper","vs/editor/common/editorCommon","vs/editor/browser/editorBrowser","vs/editor/common/model/bracketPairsTextModelPart/bracketPairsTree/ast","vs/editor/common/model/textModelSearch","vs/editor/common/viewLayout/lineDecorations","vs/editor/contrib/codeAction/browser/types","vs/editor/common/services/textResourceConfiguration","vs/platform/instantiation/common/serviceCollection","vs/editor/contrib/codeAction/browser/codeAction","vs/editor/contrib/message/browser/messageController","vs/platform/list/browser/listService","vs/platform/undoRedo/common/undoRedo","vs/editor/common/cursor/cursorWordOperations","vs/editor/browser/controller/coreCommands","vs/editor/browser/widget/codeEditorWidget","vs/editor/browser/widget/embeddedCodeEditorWidget","vs/editor/contrib/find/browser/findModel","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/browser/formattedTextRenderer","vs/base/browser/ui/scrollbar/scrollbarArrow","vs/base/common/labels","vs/base/browser/ui/checkbox/checkbox","vs/base/browser/ui/list/listView","vs/editor/common/config/fontInfo","vs/editor/browser/controller/textAreaInput","vs/editor/browser/view/viewLayer","vs/editor/common/languages/supports/richEditBrackets","vs/editor/common/model/utils","vs/editor/common/standalone/standaloneEnums","vs/editor/common/textModelGuides","vs/editor/common/model/bracketPairsTextModelPart/bracketPairsTree/tokenizer","vs/editor/browser/viewParts/glyphMargin/glyphMargin","vs/editor/common/viewModel/viewEvents","vs/editor/common/viewModel/viewModelEventDispatcher","vs/editor/contrib/folding/browser/foldingRanges","vs/editor/contrib/gotoSymbol/browser/link/clickLinkGesture","vs/editor/contrib/hover/browser/hoverTypes","vs/editor/contrib/inlineCompletions/browser/ghostText","vs/editor/contrib/inlineCompletions/browser/inlineCompletionToGhostText","vs/base/browser/ui/iconLabel/iconLabel","vs/base/browser/ui/tree/abstractTree","vs/base/browser/ui/inputbox/inputBox","vs/base/common/keybindingLabels","vs/platform/instantiation/common/descriptors","vs/editor/browser/services/bulkEditService","vs/editor/common/services/markerDecorations","vs/editor/common/commands/shiftCommand","vs/editor/contrib/parameterHints/browser/provideSignatureHelp","vs/editor/contrib/documentSymbols/browser/outlineModel","vs/platform/jsonschemas/common/jsonContributionRegistry","vs/editor/contrib/hover/browser/markdownHoverParticipant","vs/platform/actions/browser/menuEntryActionViewItem","vs/editor/common/cursor/cursorMoveOperations","vs/editor/common/cursor/cursorDeleteOperations","vs/editor/common/cursor/cursorTypeOperations","vs/editor/common/cursor/cursorMoveCommands","vs/editor/contrib/inlineCompletions/browser/inlineCompletionsModel","vs/editor/contrib/gotoSymbol/browser/goToCommands","vs/editor/standalone/browser/standaloneServices","vs/editor/contrib/snippet/browser/snippetController2","vs/base/browser/iframe","vs/base/browser/ui/scrollbar/scrollbarState","vs/base/common/assert","vs/base/common/collections","vs/base/common/glob","vs/base/common/marshalling","vs/base/browser/ui/highlightedlabel/highlightedLabel","vs/base/browser/ui/scrollbar/abstractScrollbar","vs/base/common/worker/simpleWorker","vs/base/parts/quickinput/common/quickInput","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/hover/hoverWidget","vs/base/browser/ui/splitview/splitview","vs/base/parts/quickinput/browser/quickInputUtils","vs/editor/browser/config/elementSizeObserver","vs/editor/browser/config/tabFocus","vs/editor/browser/view/viewUserInputEvents","vs/editor/browser/viewParts/minimap/minimapCharSheet","vs/editor/browser/controller/textAreaState","vs/editor/browser/widget/diffNavigator","vs/editor/common/core/rgba","vs/editor/common/core/textChange","vs/editor/common/cursor/cursorAtomicMoveOperations","vs/editor/common/editorAction","vs/editor/common/model/bracketPairsTextModelPart/bracketPairsTree/beforeEditPositionMapper","vs/editor/common/model/bracketPairsTextModelPart/bracketPairsTree/parser","vs/editor/common/model/prefixSumComputer","vs/editor/common/languages/unicodeTextModelHighlighter","vs/editor/common/model/pieceTreeTextBuffer/pieceTreeBase","vs/editor/common/model/pieceTreeTextBuffer/pieceTreeTextBuffer","vs/editor/common/model/guidesTextModelPart","vs/editor/common/model/bracketPairsTextModelPart/bracketPairsTree/brackets","vs/editor/common/services/editorBaseApi","vs/editor/common/languages/textToHtmlTokenizer","vs/editor/common/viewModel/minimapTokensColorTracker","vs/editor/common/viewModel/modelLineProjectionData","vs/editor/common/viewModel/overviewZoneManager","vs/editor/browser/viewParts/margin/margin","vs/editor/contrib/comment/browser/blockCommentCommand","vs/editor/contrib/folding/browser/syntaxRangeProvider","vs/editor/contrib/format/browser/formattingEdit","vs/editor/contrib/hover/browser/hoverOperation","vs/editor/contrib/indentation/browser/indentUtils","vs/editor/contrib/inlineCompletions/browser/consts","vs/editor/contrib/smartSelect/browser/bracketSelections","vs/editor/contrib/suggest/browser/resizable","vs/editor/standalone/common/monarch/monarchCommon","vs/editor/standalone/common/monarch/monarchLexer","vs/base/browser/ui/findinput/findInputCheckboxes","vs/base/browser/ui/tree/objectTree","vs/editor/browser/config/fontMeasurements","vs/editor/common/viewModel/viewModelDecorations","vs/editor/common/model/editStack","vs/platform/files/common/files","vs/editor/common/services/getSemanticTokens","vs/editor/contrib/codelens/browser/codelens","vs/editor/contrib/colorPicker/browser/color","vs/platform/contextkey/common/contextkeys","vs/platform/keybinding/common/resolvedKeybindingItem","vs/editor/standalone/browser/standaloneLayoutService","vs/editor/browser/services/editorWorkerService","vs/editor/contrib/suggest/browser/suggestWidgetDetails","vs/editor/browser/viewParts/lines/viewLine","vs/editor/browser/controller/mouseTarget","vs/editor/browser/viewParts/lineNumbers/lineNumbers","vs/editor/common/services/semanticTokensProviderStyling","vs/editor/contrib/quickAccess/browser/editorNavigationQuickAccess","vs/editor/contrib/symbolIcons/browser/symbolIcons","vs/editor/standalone/browser/standaloneCodeEditorService","vs/editor/contrib/format/browser/format","vs/editor/contrib/gotoSymbol/browser/goToSymbol","vs/editor/contrib/hover/browser/getHover","vs/editor/contrib/codeAction/browser/codeActionCommands","vs/editor/contrib/toggleTabFocusMode/browser/toggleTabFocusMode","vs/editor/common/cursor/cursor","vs/editor/common/services/modelService","vs/editor/browser/widget/diffEditorWidget","vs/editor/contrib/colorPicker/browser/colorDetector","vs/editor/contrib/find/browser/findController","vs/editor/contrib/wordOperations/browser/wordOperations","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/inlayHintsController","vs/platform/workspace/common/workspace","vs/platform/workspace/common/workspaceTrust","vs/editor/contrib/unicodeHighlighter/browser/unicodeHighlighter","vs/editor/contrib/snippet/browser/snippetSession","vs/editor/contrib/suggest/browser/suggestController","vs/editor/contrib/inlineCompletions/browser/ghostTextController","vs/editor/contrib/hover/browser/hover","vs/base/browser/ui/list/list","vs/base/browser/ui/list/splice","vs/base/common/cache","vs/base/common/diff/diffChange","vs/base/common/marked/marked","vs/base/common/navigator","vs/base/common/history","vs/base/common/process","vs/base/browser/ui/list/rangeMap","vs/base/browser/ui/scrollbar/scrollbarVisibilityController","vs/base/common/comparers","vs/base/browser/ui/tree/compressedObjectTreeModel","vs/base/common/fuzzyScorer","vs/base/common/search","vs/base/browser/ui/list/rowCache","vs/base/browser/ui/scrollbar/horizontalScrollbar","vs/base/browser/ui/scrollbar/verticalScrollbar","vs/base/browser/markdownRenderer","vs/base/common/uuid","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/base/browser/ui/button/button","vs/css!vs/base/browser/ui/checkbox/checkbox","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/hover","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/splitview/splitview","vs/css!vs/base/browser/ui/table/table","vs/base/browser/ui/table/tableWidget","vs/css!vs/base/browser/ui/tree/media/tree","vs/css!vs/editor/browser/controller/textAreaHandler","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/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/widget/media/diffEditor","vs/css!vs/editor/browser/widget/media/diffReview","vs/css!vs/editor/browser/widget/media/editor","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/colorPicker/browser/colorPicker","vs/css!vs/editor/contrib/dnd/browser/dnd","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/inlineCompletions/browser/ghostText","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/rename/browser/renameInputField","vs/css!vs/editor/contrib/snippet/browser/snippetSession","vs/css!vs/editor/contrib/suggest/browser/media/suggest","vs/css!vs/editor/contrib/unicodeHighlighter/browser/bannerController","vs/css!vs/editor/contrib/unicodeHighlighter/browser/unicodeHighlighter","vs/css!vs/editor/contrib/zoneWidget/browser/zoneWidget","vs/css!vs/editor/standalone/browser/accessibilityHelp/accessibilityHelp","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/contextview/browser/contextMenuHandler","vs/editor/browser/config/migrateOptions","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/common/commands/trimTrailingWhitespaceCommand","vs/editor/common/commands/surroundSelectionCommand","vs/editor/common/diff/diffComputer","vs/editor/common/languageSelector","vs/editor/common/languages/linkComputer","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/tokenization","vs/editor/common/languageFeatureRegistry","vs/editor/common/model/bracketPairsTextModelPart/bracketPairsTree/nodeReader","vs/editor/common/model/bracketPairsTextModelPart/bracketPairsTree/concat23Trees","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/textModelPart","vs/editor/common/model/pieceTreeTextBuffer/pieceTreeTextBufferBuilder","vs/editor/common/services/languagesAssociations","vs/editor/common/services/semanticTokensDto","vs/editor/common/textModelBracketPairs","vs/editor/common/tokenizationRegistry","vs/editor/common/model/bracketPairsTextModelPart/bracketPairsTree/bracketPairsTree","vs/editor/common/model/bracketPairsTextModelPart/bracketPairsImpl","vs/editor/common/model/bracketPairsTextModelPart/fixBrackets","vs/editor/common/services/editorSimpleWorker","vs/editor/common/tokens/contiguousMultilineTokens","vs/editor/common/tokens/contiguousMultilineTokensBuilder","vs/editor/common/model/textModelTokens","vs/editor/common/tokens/contiguousTokensEditing","vs/editor/common/tokens/contiguousTokensStore","vs/editor/common/tokens/sparseMultilineTokens","vs/editor/common/tokens/sparseTokensStore","vs/editor/common/viewLayout/linesLayout","vs/editor/common/viewLayout/viewLinesViewportData","vs/editor/common/viewModel/monospaceLineBreaksComputer","vs/editor/common/viewModel/viewContext","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/overviewRuler/overviewRuler","vs/editor/browser/viewParts/viewZones/viewZones","vs/editor/common/viewModel/modelLineProjection","vs/editor/common/viewLayout/viewLayout","vs/editor/contrib/caretOperations/browser/moveCaretCommand","vs/editor/contrib/colorPicker/browser/colorPickerModel","vs/editor/contrib/dnd/browser/dragAndDropCommand","vs/editor/contrib/find/browser/replaceAllCommand","vs/editor/contrib/find/browser/replacePattern","vs/editor/contrib/folding/browser/foldingModel","vs/editor/contrib/folding/browser/hiddenRangeModel","vs/editor/contrib/folding/browser/indentRangeProvider","vs/editor/contrib/folding/browser/intializingRangeProvider","vs/editor/contrib/inPlaceReplace/browser/inPlaceReplaceCommand","vs/editor/contrib/inlayHints/browser/inlayHints","vs/editor/contrib/inlineCompletions/browser/utils","vs/editor/contrib/linesOperations/browser/copyLinesCommand","vs/editor/contrib/linesOperations/browser/sortLinesCommand","vs/editor/contrib/smartSelect/browser/wordSelections","vs/editor/contrib/suggest/browser/completionModel","vs/editor/contrib/suggest/browser/suggestCommitCharacters","vs/editor/contrib/suggest/browser/suggestOvertypingCapturer","vs/editor/contrib/suggest/browser/wordDistance","vs/editor/standalone/common/monarch/monarchCompile","vs/editor/standalone/browser/colorizer","vs/nls!vs/base/browser/ui/actionbar/actionViewItems","vs/nls!vs/base/browser/ui/findinput/findInput","vs/nls!vs/base/browser/ui/findinput/findInputCheckboxes","vs/nls!vs/base/browser/ui/findinput/replaceInput","vs/nls!vs/base/browser/ui/iconLabel/iconLabelHover","vs/base/browser/ui/iconLabel/iconLabelHover","vs/nls!vs/base/browser/ui/inputbox/inputBox","vs/nls!vs/base/browser/ui/keybindingLabel/keybindingLabel","vs/nls!vs/base/browser/ui/tree/abstractTree","vs/base/browser/ui/tree/dataTree","vs/base/browser/ui/tree/asyncDataTree","vs/nls!vs/base/common/actions","vs/base/browser/ui/dropdown/dropdown","vs/base/browser/ui/dropdown/dropdownActionViewItem","vs/base/browser/ui/findinput/findInput","vs/base/browser/ui/findinput/replaceInput","vs/base/browser/ui/menu/menu","vs/base/parts/quickinput/browser/quickInputBox","vs/nls!vs/base/common/errorMessage","vs/base/common/errorMessage","vs/nls!vs/base/common/keybindingLabels","vs/base/browser/ui/keybindingLabel/keybindingLabel","vs/nls!vs/base/parts/quickinput/browser/quickInput","vs/nls!vs/base/parts/quickinput/browser/quickInputList","vs/base/parts/quickinput/browser/quickInputList","vs/base/parts/quickinput/browser/quickInput","vs/nls!vs/editor/browser/controller/coreCommands","vs/nls!vs/editor/browser/controller/textAreaHandler","vs/nls!vs/editor/browser/editorExtensions","vs/nls!vs/editor/browser/widget/codeEditorWidget","vs/nls!vs/editor/browser/widget/diffEditorWidget","vs/nls!vs/editor/browser/widget/diffReview","vs/nls!vs/editor/browser/widget/inlineDiffMargin","vs/editor/browser/widget/inlineDiffMargin","vs/nls!vs/editor/common/config/editorConfigurationSchema","vs/nls!vs/editor/common/config/editorOptions","vs/editor/browser/config/charWidthReader","vs/editor/browser/view/domLineBreaksComputer","vs/editor/browser/view/viewOverlays","vs/editor/browser/viewParts/viewCursors/viewCursor","vs/nls!vs/editor/common/core/editorColorRegistry","vs/nls!vs/editor/common/editorContextKeys","vs/nls!vs/editor/common/languages/modesRegistry","vs/nls!vs/editor/common/model/editStack","vs/nls!vs/editor/common/standaloneStrings","vs/nls!vs/editor/contrib/anchorSelect/browser/anchorSelect","vs/nls!vs/editor/contrib/bracketMatching/browser/bracketMatching","vs/nls!vs/editor/contrib/caretOperations/browser/caretOperations","vs/nls!vs/editor/contrib/caretOperations/browser/transpose","vs/nls!vs/editor/contrib/clipboard/browser/clipboard","vs/nls!vs/editor/contrib/codeAction/browser/codeActionCommands","vs/nls!vs/editor/contrib/codeAction/browser/lightBulbWidget","vs/nls!vs/editor/contrib/codelens/browser/codelensController","vs/nls!vs/editor/contrib/colorPicker/browser/colorPickerWidget","vs/nls!vs/editor/contrib/comment/browser/comment","vs/nls!vs/editor/contrib/contextmenu/browser/contextmenu","vs/nls!vs/editor/contrib/cursorUndo/browser/cursorUndo","vs/nls!vs/editor/contrib/editorState/browser/keybindingCancellation","vs/nls!vs/editor/contrib/find/browser/findController","vs/nls!vs/editor/contrib/find/browser/findWidget","vs/nls!vs/editor/contrib/folding/browser/folding","vs/nls!vs/editor/contrib/folding/browser/foldingDecorations","vs/nls!vs/editor/contrib/fontZoom/browser/fontZoom","vs/nls!vs/editor/contrib/format/browser/format","vs/nls!vs/editor/contrib/format/browser/formatActions","vs/nls!vs/editor/contrib/gotoError/browser/gotoError","vs/nls!vs/editor/contrib/gotoError/browser/gotoErrorWidget","vs/nls!vs/editor/contrib/gotoSymbol/browser/goToCommands","vs/nls!vs/editor/contrib/gotoSymbol/browser/link/goToDefinitionAtPosition","vs/nls!vs/editor/contrib/gotoSymbol/browser/peek/referencesController","vs/nls!vs/editor/contrib/gotoSymbol/browser/peek/referencesTree","vs/nls!vs/editor/contrib/gotoSymbol/browser/peek/referencesWidget","vs/nls!vs/editor/contrib/gotoSymbol/browser/referencesModel","vs/nls!vs/editor/contrib/gotoSymbol/browser/symbolNavigation","vs/nls!vs/editor/contrib/hover/browser/hover","vs/nls!vs/editor/contrib/hover/browser/markdownHoverParticipant","vs/nls!vs/editor/contrib/hover/browser/markerHoverParticipant","vs/nls!vs/editor/contrib/inPlaceReplace/browser/inPlaceReplace","vs/nls!vs/editor/contrib/indentation/browser/indentation","vs/nls!vs/editor/contrib/inlineCompletions/browser/ghostTextController","vs/nls!vs/editor/contrib/inlineCompletions/browser/inlineCompletionsHoverParticipant","vs/nls!vs/editor/contrib/lineSelection/browser/lineSelection","vs/nls!vs/editor/contrib/linesOperations/browser/linesOperations","vs/nls!vs/editor/contrib/linkedEditing/browser/linkedEditing","vs/nls!vs/editor/contrib/links/browser/links","vs/nls!vs/editor/contrib/message/browser/messageController","vs/nls!vs/editor/contrib/multicursor/browser/multicursor","vs/nls!vs/editor/contrib/parameterHints/browser/parameterHints","vs/nls!vs/editor/contrib/parameterHints/browser/parameterHintsWidget","vs/nls!vs/editor/contrib/peekView/browser/peekView","vs/nls!vs/editor/contrib/quickAccess/browser/gotoLineQuickAccess","vs/nls!vs/editor/contrib/quickAccess/browser/gotoSymbolQuickAccess","vs/nls!vs/editor/contrib/rename/browser/rename","vs/nls!vs/editor/contrib/rename/browser/renameInputField","vs/nls!vs/editor/contrib/smartSelect/browser/smartSelect","vs/nls!vs/editor/contrib/snippet/browser/snippetController2","vs/nls!vs/editor/contrib/snippet/browser/snippetVariables","vs/nls!vs/editor/contrib/suggest/browser/suggest","vs/nls!vs/editor/contrib/suggest/browser/suggestController","vs/nls!vs/editor/contrib/suggest/browser/suggestWidget","vs/nls!vs/editor/contrib/suggest/browser/suggestWidgetDetails","vs/nls!vs/editor/contrib/suggest/browser/suggestWidgetRenderer","vs/nls!vs/editor/contrib/suggest/browser/suggestWidgetStatus","vs/nls!vs/editor/contrib/symbolIcons/browser/symbolIcons","vs/nls!vs/editor/contrib/toggleTabFocusMode/browser/toggleTabFocusMode","vs/nls!vs/editor/contrib/tokenization/browser/tokenization","vs/nls!vs/editor/contrib/unicodeHighlighter/browser/unicodeHighlighter","vs/nls!vs/editor/contrib/unusualLineTerminators/browser/unusualLineTerminators","vs/nls!vs/editor/contrib/wordHighlighter/browser/wordHighlighter","vs/nls!vs/editor/contrib/wordOperations/browser/wordOperations","vs/nls!vs/platform/actions/browser/menuEntryActionViewItem","vs/nls!vs/platform/configuration/common/configurationRegistry","vs/nls!vs/platform/contextkey/browser/contextKeyService","vs/nls!vs/platform/contextkey/common/contextkeys","vs/nls!vs/platform/keybinding/common/abstractKeybindingService","vs/nls!vs/platform/list/browser/listService","vs/nls!vs/platform/markers/common/markers","vs/nls!vs/platform/quickinput/browser/commandsQuickAccess","vs/nls!vs/platform/quickinput/browser/helpQuickAccess","vs/nls!vs/platform/theme/common/colorRegistry","vs/nls!vs/platform/theme/common/iconRegistry","vs/nls!vs/platform/undoRedo/common/undoRedoService","vs/nls!vs/platform/workspaces/common/workspaces","vs/platform/editor/common/editor","vs/platform/extensions/common/extensions","vs/platform/history/browser/historyWidgetKeybindingHint","vs/platform/instantiation/common/graph","vs/editor/contrib/links/browser/getLinks","vs/editor/contrib/comment/browser/lineCommentCommand","vs/editor/contrib/linesOperations/browser/moveLinesCommand","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/accessibility/browser/accessibilityService","vs/platform/contextkey/browser/contextKeyService","vs/platform/instantiation/common/instantiationService","vs/platform/keybinding/common/abstractKeybindingService","vs/platform/keybinding/common/baseResolvedKeybinding","vs/platform/keybinding/common/keybindingResolver","vs/platform/keybinding/common/usLayoutResolvedKeybinding","vs/platform/contextview/browser/contextViewService","vs/editor/browser/services/webWorker","vs/editor/contrib/documentSymbols/browser/documentSymbols","vs/platform/clipboard/browser/clipboardService","vs/editor/contrib/gotoError/browser/markerNavigationService","vs/platform/markers/common/markerService","vs/editor/browser/services/openerService","vs/platform/quickinput/browser/pickerQuickAccess","vs/editor/common/config/editorConfigurationSchema","vs/editor/common/services/getIconClasses","vs/editor/common/services/languagesRegistry","vs/editor/common/services/languageService","vs/editor/contrib/hover/browser/marginHover","vs/platform/configuration/common/configurationModels","vs/platform/history/browser/contextScopedHistoryWidget","vs/platform/quickinput/browser/helpQuickAccess","vs/editor/standalone/browser/quickAccess/standaloneHelpQuickAccess","vs/platform/quickinput/browser/quickAccess","vs/editor/contrib/codelens/browser/codeLensCache","vs/editor/contrib/suggest/browser/suggestMemory","vs/platform/quickinput/browser/commandsQuickAccess","vs/editor/contrib/quickAccess/browser/commandsQuickAccess","vs/platform/contextview/browser/contextMenuHandler","vs/editor/browser/controller/mouseHandler","vs/editor/browser/controller/pointerHandler","vs/editor/browser/viewParts/lines/viewLines","vs/editor/browser/services/abstractCodeEditorService","vs/editor/browser/viewParts/editorScrollbar/editorScrollbar","vs/editor/browser/viewParts/minimap/minimap","vs/editor/browser/viewParts/scrollDecoration/scrollDecoration","vs/editor/browser/viewParts/selections/selections","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/rulers/rulers","vs/editor/browser/viewParts/viewCursors/viewCursors","vs/editor/common/model/bracketPairsTextModelPart/colorizedBracketPairsDecorationProvider","vs/editor/common/services/markerDecorationsService","vs/editor/contrib/codeAction/browser/lightBulbWidget","vs/editor/contrib/colorPicker/browser/colorPickerWidget","vs/editor/contrib/gotoSymbol/browser/peek/referencesTree","vs/editor/contrib/inlineCompletions/browser/ghostTextWidget","vs/editor/contrib/quickAccess/browser/gotoLineQuickAccess","vs/editor/contrib/quickAccess/browser/gotoSymbolQuickAccess","vs/editor/contrib/rename/browser/renameInputField","vs/editor/standalone/common/themes","vs/editor/browser/services/markerDecorations","vs/editor/contrib/anchorSelect/browser/anchorSelect","vs/editor/contrib/caretOperations/browser/caretOperations","vs/editor/contrib/clipboard/browser/clipboard","vs/editor/contrib/comment/browser/comment","vs/editor/contrib/contextmenu/browser/contextmenu","vs/editor/contrib/cursorUndo/browser/cursorUndo","vs/editor/contrib/editorState/browser/keybindingCancellation","vs/editor/contrib/codeAction/browser/codeActionMenu","vs/editor/contrib/codeAction/browser/codeActionModel","vs/editor/contrib/fontZoom/browser/fontZoom","vs/editor/contrib/format/browser/formatActions","vs/editor/contrib/gotoSymbol/browser/symbolNavigation","vs/editor/contrib/codeAction/browser/codeActionUi","vs/editor/contrib/codeAction/browser/codeActionContributions","vs/editor/contrib/rename/browser/rename","vs/editor/contrib/smartSelect/browser/smartSelect","vs/editor/contrib/tokenization/browser/tokenization","vs/editor/contrib/unusualLineTerminators/browser/unusualLineTerminators","vs/editor/standalone/browser/accessibilityHelp/accessibilityHelp","vs/editor/standalone/browser/iPadShowKeyboard/iPadShowKeyboard","vs/editor/standalone/browser/inspectTokens/inspectTokens","vs/editor/standalone/browser/quickAccess/standaloneCommandsQuickAccess","vs/editor/standalone/browser/quickAccess/standaloneGotoLineQuickAccess","vs/editor/standalone/browser/quickAccess/standaloneGotoSymbolQuickAccess","vs/editor/standalone/browser/toggleHighContrast/toggleHighContrast","vs/editor/contrib/suggest/browser/suggestWidgetStatus","vs/platform/actions/common/menuService","vs/platform/contextview/browser/contextMenuService","vs/platform/opener/browser/link","vs/platform/quickinput/browser/quickInput","vs/editor/standalone/browser/quickInput/standaloneQuickInputService","vs/platform/severityIcon/common/severityIcon","vs/editor/browser/widget/diffReview","vs/editor/contrib/parameterHints/browser/parameterHintsWidget","vs/editor/contrib/parameterHints/browser/parameterHints","vs/editor/contrib/suggest/browser/suggestWidgetRenderer","vs/editor/contrib/unicodeHighlighter/browser/bannerController","vs/platform/theme/browser/iconsStyleSheet","vs/editor/standalone/browser/standaloneThemeService","vs/editor/common/cursor/cursorColumnSelection","vs/editor/browser/view/viewController","vs/editor/browser/view/view","vs/editor/common/cursor/oneCursor","vs/editor/common/cursor/cursorCollection","vs/editor/common/viewModel/viewModelLines","vs/editor/common/viewModel/viewModelImpl","vs/editor/contrib/bracketMatching/browser/bracketMatching","vs/editor/contrib/caretOperations/browser/transpose","vs/editor/contrib/codelens/browser/codelensWidget","vs/editor/contrib/codelens/browser/codelensController","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/folding/browser/foldingDecorations","vs/editor/contrib/folding/browser/folding","vs/editor/contrib/hover/browser/colorHoverParticipant","vs/editor/contrib/inPlaceReplace/browser/inPlaceReplace","vs/editor/contrib/indentation/browser/indentation","vs/editor/contrib/lineSelection/browser/lineSelection","vs/editor/contrib/linesOperations/browser/linesOperations","vs/editor/contrib/linkedEditing/browser/linkedEditing","vs/editor/contrib/links/browser/links","vs/editor/contrib/multicursor/browser/multicursor","vs/editor/contrib/suggest/browser/suggestWidget","vs/editor/contrib/viewportSemanticTokens/browser/viewportSemanticTokens","vs/editor/contrib/wordHighlighter/browser/wordHighlighter","vs/editor/contrib/wordPartOperations/browser/wordPartOperations","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/inlayHints/browser/inlayHintsLocations","vs/editor/contrib/inlayHints/browser/inlayHintsHover","vs/editor/standalone/browser/referenceSearch/standaloneReferenceSearch","vs/platform/undoRedo/common/undoRedoService","vs/editor/standalone/browser/standaloneCodeEditor","vs/editor/standalone/browser/standaloneEditor","vs/editor/standalone/browser/standaloneLanguages","vs/editor/editor.api","vs/platform/workspaces/common/workspaces","vs/editor/contrib/snippet/browser/snippetVariables","vs/editor/contrib/suggest/browser/suggestModel","vs/editor/contrib/inlineCompletions/browser/suggestWidgetInlineCompletionProvider","vs/editor/contrib/inlineCompletions/browser/suggestWidgetPreviewModel","vs/editor/contrib/inlineCompletions/browser/ghostTextModel","vs/editor/contrib/inlineCompletions/browser/inlineCompletionsHoverParticipant","vs/editor/contrib/hover/browser/contentHover","vs/editor/contrib/colorPicker/browser/colorContributions","vs/editor/editor.all","vs/base/browser/dompurify/dompurify","vs/editor/edcore.main"],ie=function(j){for(var e=[],y=0,m=j.length;y<m;y++)e[y]=te[j[y]];return e},li;(function(j){var e=function(){function m(){this._pendingLoads=0}return m.prototype.attachListeners=function(D,I,w,b){var p=function(){I.removeEventListener("load",h),I.removeEventListener("error",g)},h=function(t){p(),w()},g=function(t){p(),b(t)};I.addEventListener("load",h),I.addEventListener("error",g)},m.prototype._onLoad=function(D,I){this._pendingLoads--,I()},m.prototype._onLoadError=function(D,I,w){this._pendingLoads--,I(w)},m.prototype._insertLinkNode=function(D){this._pendingLoads++;var I=document.head||document.getElementsByTagName("head")[0];I.appendChild(D)},m.prototype.createLinkTag=function(D,I,w,b){var p=this,h=document.createElement("link");h.setAttribute("rel","stylesheet"),h.setAttribute("type","text/css"),h.setAttribute("data-name",D);var g=function(){return p._onLoad(D,w)},t=function(i){return p._onLoadError(D,b,i)};return this.attachListeners(D,h,g,t),h.setAttribute("href",I),h},m.prototype._linkTagExists=function(D,I){var w,b,p,h,g=document.getElementsByTagName("link");for(w=0,b=g.length;w<b;w++)if(p=g[w].getAttribute("data-name"),h=g[w].getAttribute("href"),p===D||h===I)return!0;return!1},m.prototype.load=function(D,I,w,b){if(this._linkTagExists(D,I)){w();return}var p=this.createLinkTag(D,I,w,b);this._insertLinkNode(p)},m}(),y=function(){function m(){this._cssLoader=new e}return m.prototype.load=function(D,I,w,b){b=b||{};var p=b["vs/css"]||{};if(p.disabled){w({});return}var h=I.toUrl(D+".css");this._cssLoader.load(D,h,function(g){w({})},function(g){typeof w.error=="function"&&w.error("Could not find "+h+" or it was empty")})},m}();j.CSSPlugin=y,define("vs/css",new y)})(li||(li={}));var Zi=this&&this.__spreadArrays||function(){for(var j=0,e=0,y=arguments.length;e<y;e++)j+=arguments[e].length;for(var m=Array(j),D=0,e=0;e<y;e++)for(var I=arguments[e],w=0,b=I.length;w<b;w++,D++)m[D]=I[w];return m},di;(function(j){var e=function(){function b(){this._detected=!1,this._isPseudo=!1}return Object.defineProperty(b.prototype,"isPseudo",{get:function(){return this._detect(),this._isPseudo},enumerable:!1,configurable:!0}),b.prototype._detect=function(){this._detected||(this._detected=!0,this._isPseudo=typeof document!="undefined"&&document.location&&document.location.hash.indexOf("pseudo=true")>=0)},b}();function y(b,p,h){var g;return p.length===0?g=b:g=b.replace(/\{(\d+)\}/g,function(t,i){var n=i[0],l=p[n],c=t;return typeof l=="string"?c=l:(typeof l=="number"||typeof l=="boolean"||l===void 0||l===null)&&(c=String(l)),c}),h.isPseudo&&(g="\uFF3B"+g.replace(/[aouei]/g,"$&$&")+"\uFF3D"),g}function m(b,p){var h=b[p];return h||(h=b["*"],h)?h:null}function D(b,p,h){for(var g=[],t=3;t<arguments.length;t++)g[t-3]=arguments[t];return y(h,g,b)}function I(b,p){return function(h,g){var t=Array.prototype.slice.call(arguments,2);return y(b[h],t,p)}}var w=function(){function b(p){var h=this;this._env=p,this.localize=function(g,t){for(var i=[],n=2;n<arguments.length;n++)i[n-2]=arguments[n];return D.apply(void 0,Zi([h._env,g,t],i))}}return b.prototype.setPseudoTranslation=function(p){this._env._isPseudo=p},b.prototype.create=function(p,h){return{localize:I(h[p],this._env)}},b.prototype.load=function(p,h,g,t){var i=this;if(t=t||{},!p||p.length===0)g({localize:this.localize});else{var n=t["vs/nls"]||{},l=n.availableLanguages?m(n.availableLanguages,p):null,c=".nls";l!==null&&l!==b.DEFAULT_TAG&&(c=c+"."+l);var r=function(s){Array.isArray(s)?s.localize=I(s,i._env):s.localize=I(s[p],i._env),g(s)};typeof n.loadBundle=="function"?n.loadBundle(p,l,function(s,o){s?h([p+".nls"],r):r(o)}):h([p+c],r)}},b.DEFAULT_TAG="i-default",b}();j.NLSPlugin=w,define("vs/nls",new w(new e))})(di||(di={}));/*! @license DOMPurify 2.3.1 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/2.3.1/LICENSE */function Yi(j){if(Array.isArray(j)){for(var e=0,y=Array(j.length);e<j.length;e++)y[e]=j[e];return y}else return Array.from(j)}var Xi=Object.hasOwnProperty,ci=Object.setPrototypeOf,Qi=Object.isFrozen,Ji=Object.getPrototypeOf,en=Object.getOwnPropertyDescriptor,rt=Object.freeze,ft=Object.seal,tn=Object.create,ui=typeof Reflect!="undefined"&&Reflect,At=ui.apply,Ut=ui.construct;At||(At=function(e,y,m){return e.apply(y,m)}),rt||(rt=function(e){return e}),ft||(ft=function(e){return e}),Ut||(Ut=function(e,y){return new(Function.prototype.bind.apply(e,[null].concat(Yi(y))))});var nn=ut(Array.prototype.forEach),hi=ut(Array.prototype.pop),It=ut(Array.prototype.push),St=ut(String.prototype.toLowerCase),gi=ut(String.prototype.match),bt=ut(String.prototype.replace),sn=ut(String.prototype.indexOf),on=ut(String.prototype.trim),mt=ut(RegExp.prototype.test),fi=rn(TypeError);function ut(j){return function(e){for(var y=arguments.length,m=Array(y>1?y-1:0),D=1;D<y;D++)m[D-1]=arguments[D];return At(j,e,m)}}function rn(j){return function(){for(var e=arguments.length,y=Array(e),m=0;m<e;m++)y[m]=arguments[m];return Ut(j,y)}}function Qe(j,e){ci&&ci(j,null);for(var y=e.length;y--;){var m=e[y];if(typeof m=="string"){var D=St(m);D!==m&&(Qi(e)||(e[y]=D),m=D)}j[m]=!0}return j}function wt(j){var e=tn(null),y=void 0;for(y in j)At(Xi,j,[y])&&(e[y]=j[y]);return e}function Rt(j,e){for(;j!==null;){var y=en(j,e);if(y){if(y.get)return ut(y.get);if(typeof y.value=="function")return ut(y.value)}j=Ji(j)}function m(D){return console.warn("fallback value for",D),null}return m}var mi=rt(["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"]),Kt=rt(["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"]),jt=rt(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),an=rt(["animate","color-profile","cursor","discard","fedropshadow","feimage","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"]),qt=rt(["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"]),ln=rt(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),pi=rt(["#text"]),Ci=rt(["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","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"]),$t=rt(["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","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"]),vi=rt(["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"]),Pt=rt(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),dn=ft(/\{\{[\s\S]*|[\s\S]*\}\}/gm),cn=ft(/<%[\s\S]*|[\s\S]*%>/gm),un=ft(/^data-[\-\w.\u00B7-\uFFFF]/),hn=ft(/^aria-[\-\w]+$/),gn=ft(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),fn=ft(/^(?:\w+script|data):/i),mn=ft(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),Dt=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(j){return typeof j}:function(j){return j&&typeof Symbol=="function"&&j.constructor===Symbol&&j!==Symbol.prototype?"symbol":typeof j};function gt(j){if(Array.isArray(j)){for(var e=0,y=Array(j.length);e<j.length;e++)y[e]=j[e];return y}else return Array.from(j)}var pn=function(){return typeof window=="undefined"?null:window},Cn=function(e,y){if((typeof e=="undefined"?"undefined":Dt(e))!=="object"||typeof e.createPolicy!="function")return null;var m=null,D="data-tt-policy-suffix";y.currentScript&&y.currentScript.hasAttribute(D)&&(m=y.currentScript.getAttribute(D));var I="dompurify"+(m?"#"+m:"");try{return e.createPolicy(I,{createHTML:function(b){return b}})}catch{return console.warn("TrustedTypes policy "+I+" could not be created."),null}};function bi(){var j=arguments.length>0&&arguments[0]!==void 0?arguments[0]:pn(),e=function(Ee){return bi(Ee)};if(e.version="2.3.1",e.removed=[],!j||!j.document||j.document.nodeType!==9)return e.isSupported=!1,e;var y=j.document,m=j.document,D=j.DocumentFragment,I=j.HTMLTemplateElement,w=j.Node,b=j.Element,p=j.NodeFilter,h=j.NamedNodeMap,g=h===void 0?j.NamedNodeMap||j.MozNamedAttrMap:h,t=j.Text,i=j.Comment,n=j.DOMParser,l=j.trustedTypes,c=b.prototype,r=Rt(c,"cloneNode"),s=Rt(c,"nextSibling"),o=Rt(c,"childNodes"),a=Rt(c,"parentNode");if(typeof I=="function"){var d=m.createElement("template");d.content&&d.content.ownerDocument&&(m=d.content.ownerDocument)}var u=Cn(l,y),f=u&&ue?u.createHTML(""):"",S=m,v=S.implementation,C=S.createNodeIterator,_=S.createDocumentFragment,L=S.getElementsByTagName,E=y.importNode,N={};try{N=wt(m).documentMode?m.documentMode:{}}catch{}var k={};e.isSupported=typeof a=="function"&&v&&typeof v.createHTMLDocument!="undefined"&&N!==9;var M=dn,O=cn,B=un,T=hn,R=fn,P=mn,F=gn,W=null,A=Qe({},[].concat(gt(mi),gt(Kt),gt(jt),gt(qt),gt(pi))),H=null,q=Qe({},[].concat(gt(Ci),gt($t),gt(vi),gt(Pt))),X=null,G=null,re=!0,ae=!0,oe=!1,Z=!1,x=!1,U=!1,Q=!1,ne=!1,ce=!1,ee=!0,ue=!1,z=!0,V=!0,$=!1,K={},J=null,Y=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"]),se=null,ge=Qe({},["audio","video","img","source","image","track"]),me=null,le=Qe({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),he="http://www.w3.org/1998/Math/MathML",ve="http://www.w3.org/2000/svg",pe="http://www.w3.org/1999/xhtml",be=pe,de=!1,fe=null,_e=m.createElement("form"),Le=function(Ee){fe&&fe===Ee||((!Ee||(typeof Ee=="undefined"?"undefined":Dt(Ee))!=="object")&&(Ee={}),Ee=wt(Ee),W="ALLOWED_TAGS"in Ee?Qe({},Ee.ALLOWED_TAGS):A,H="ALLOWED_ATTR"in Ee?Qe({},Ee.ALLOWED_ATTR):q,me="ADD_URI_SAFE_ATTR"in Ee?Qe(wt(le),Ee.ADD_URI_SAFE_ATTR):le,se="ADD_DATA_URI_TAGS"in Ee?Qe(wt(ge),Ee.ADD_DATA_URI_TAGS):ge,J="FORBID_CONTENTS"in Ee?Qe({},Ee.FORBID_CONTENTS):Y,X="FORBID_TAGS"in Ee?Qe({},Ee.FORBID_TAGS):{},G="FORBID_ATTR"in Ee?Qe({},Ee.FORBID_ATTR):{},K="USE_PROFILES"in Ee?Ee.USE_PROFILES:!1,re=Ee.ALLOW_ARIA_ATTR!==!1,ae=Ee.ALLOW_DATA_ATTR!==!1,oe=Ee.ALLOW_UNKNOWN_PROTOCOLS||!1,Z=Ee.SAFE_FOR_TEMPLATES||!1,x=Ee.WHOLE_DOCUMENT||!1,ne=Ee.RETURN_DOM||!1,ce=Ee.RETURN_DOM_FRAGMENT||!1,ee=Ee.RETURN_DOM_IMPORT!==!1,ue=Ee.RETURN_TRUSTED_TYPE||!1,Q=Ee.FORCE_BODY||!1,z=Ee.SANITIZE_DOM!==!1,V=Ee.KEEP_CONTENT!==!1,$=Ee.IN_PLACE||!1,F=Ee.ALLOWED_URI_REGEXP||F,be=Ee.NAMESPACE||pe,Z&&(ae=!1),ce&&(ne=!0),K&&(W=Qe({},[].concat(gt(pi))),H=[],K.html===!0&&(Qe(W,mi),Qe(H,Ci)),K.svg===!0&&(Qe(W,Kt),Qe(H,$t),Qe(H,Pt)),K.svgFilters===!0&&(Qe(W,jt),Qe(H,$t),Qe(H,Pt)),K.mathMl===!0&&(Qe(W,qt),Qe(H,vi),Qe(H,Pt))),Ee.ADD_TAGS&&(W===A&&(W=wt(W)),Qe(W,Ee.ADD_TAGS)),Ee.ADD_ATTR&&(H===q&&(H=wt(H)),Qe(H,Ee.ADD_ATTR)),Ee.ADD_URI_SAFE_ATTR&&Qe(me,Ee.ADD_URI_SAFE_ATTR),Ee.FORBID_CONTENTS&&(J===Y&&(J=wt(J)),Qe(J,Ee.FORBID_CONTENTS)),V&&(W["#text"]=!0),x&&Qe(W,["html","head","body"]),W.table&&(Qe(W,["tbody"]),delete X.tbody),rt&&rt(Ee),fe=Ee)},Te=Qe({},["mi","mo","mn","ms","mtext"]),ke=Qe({},["foreignobject","desc","title","annotation-xml"]),Me=Qe({},Kt);Qe(Me,jt),Qe(Me,an);var $e=Qe({},qt);Qe($e,ln);var He=function(Ee){var Re=a(Ee);(!Re||!Re.tagName)&&(Re={namespaceURI:pe,tagName:"template"});var Ae=St(Ee.tagName),Ue=St(Re.tagName);if(Ee.namespaceURI===ve)return Re.namespaceURI===pe?Ae==="svg":Re.namespaceURI===he?Ae==="svg"&&(Ue==="annotation-xml"||Te[Ue]):Boolean(Me[Ae]);if(Ee.namespaceURI===he)return Re.namespaceURI===pe?Ae==="math":Re.namespaceURI===ve?Ae==="math"&&ke[Ue]:Boolean($e[Ae]);if(Ee.namespaceURI===pe){if(Re.namespaceURI===ve&&!ke[Ue]||Re.namespaceURI===he&&!Te[Ue])return!1;var et=Qe({},["title","style","font","a","script"]);return!$e[Ae]&&(et[Ae]||!Me[Ae])}return!1},Ge=function(Ee){It(e.removed,{element:Ee});try{Ee.parentNode.removeChild(Ee)}catch{try{Ee.outerHTML=f}catch{Ee.remove()}}},we=function(Ee,Re){try{It(e.removed,{attribute:Re.getAttributeNode(Ee),from:Re})}catch{It(e.removed,{attribute:null,from:Re})}if(Re.removeAttribute(Ee),Ee==="is"&&!H[Ee])if(ne||ce)try{Ge(Re)}catch{}else try{Re.setAttribute(Ee,"")}catch{}},Se=function(Ee){var Re=void 0,Ae=void 0;if(Q)Ee="<remove></remove>"+Ee;else{var Ue=gi(Ee,/^[\r\n\t ]+/);Ae=Ue&&Ue[0]}var et=u?u.createHTML(Ee):Ee;if(be===pe)try{Re=new n().parseFromString(et,"text/html")}catch{}if(!Re||!Re.documentElement){Re=v.createDocument(be,"template",null);try{Re.documentElement.innerHTML=de?"":et}catch{}}var Ze=Re.body||Re.documentElement;return Ee&&Ae&&Ze.insertBefore(m.createTextNode(Ae),Ze.childNodes[0]||null),be===pe?L.call(Re,x?"html":"body")[0]:x?Re.documentElement:Ze},De=function(Ee){return C.call(Ee.ownerDocument||Ee,Ee,p.SHOW_ELEMENT|p.SHOW_COMMENT|p.SHOW_TEXT,null,!1)},Pe=function(Ee){return Ee instanceof t||Ee instanceof i?!1:typeof Ee.nodeName!="string"||typeof Ee.textContent!="string"||typeof Ee.removeChild!="function"||!(Ee.attributes instanceof g)||typeof Ee.removeAttribute!="function"||typeof Ee.setAttribute!="function"||typeof Ee.namespaceURI!="string"||typeof Ee.insertBefore!="function"},Fe=function(Ee){return(typeof w=="undefined"?"undefined":Dt(w))==="object"?Ee instanceof w:Ee&&(typeof Ee=="undefined"?"undefined":Dt(Ee))==="object"&&typeof Ee.nodeType=="number"&&typeof Ee.nodeName=="string"},xe=function(Ee,Re,Ae){!k[Ee]||nn(k[Ee],function(Ue){Ue.call(e,Re,Ae,fe)})},Ve=function(Ee){var Re=void 0;if(xe("beforeSanitizeElements",Ee,null),Pe(Ee)||gi(Ee.nodeName,/[\u0080-\uFFFF]/))return Ge(Ee),!0;var Ae=St(Ee.nodeName);if(xe("uponSanitizeElement",Ee,{tagName:Ae,allowedTags:W}),!Fe(Ee.firstElementChild)&&(!Fe(Ee.content)||!Fe(Ee.content.firstElementChild))&&mt(/<[/\w]/g,Ee.innerHTML)&&mt(/<[/\w]/g,Ee.textContent)||Ae==="select"&&mt(/<template/i,Ee.innerHTML))return Ge(Ee),!0;if(!W[Ae]||X[Ae]){if(V&&!J[Ae]){var Ue=a(Ee)||Ee.parentNode,et=o(Ee)||Ee.childNodes;if(et&&Ue)for(var Ze=et.length,Ke=Ze-1;Ke>=0;--Ke)Ue.insertBefore(r(et[Ke],!0),s(Ee))}return Ge(Ee),!0}return Ee instanceof b&&!He(Ee)||(Ae==="noscript"||Ae==="noembed")&&mt(/<\/no(script|embed)/i,Ee.innerHTML)?(Ge(Ee),!0):(Z&&Ee.nodeType===3&&(Re=Ee.textContent,Re=bt(Re,M," "),Re=bt(Re,O," "),Ee.textContent!==Re&&(It(e.removed,{element:Ee.cloneNode()}),Ee.textContent=Re)),xe("afterSanitizeElements",Ee,null),!1)},qe=function(Ee,Re,Ae){if(z&&(Re==="id"||Re==="name")&&(Ae in m||Ae in _e))return!1;if(!(ae&&!G[Re]&&mt(B,Re))){if(!(re&&mt(T,Re))){if(!H[Re]||G[Re])return!1;if(!me[Re]){if(!mt(F,bt(Ae,P,""))){if(!((Re==="src"||Re==="xlink:href"||Re==="href")&&Ee!=="script"&&sn(Ae,"data:")===0&&se[Ee])){if(!(oe&&!mt(R,bt(Ae,P,"")))){if(Ae)return!1}}}}}}return!0},We=function(Ee){var Re=void 0,Ae=void 0,Ue=void 0,et=void 0;xe("beforeSanitizeAttributes",Ee,null);var Ze=Ee.attributes;if(!!Ze){var Ke={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:H};for(et=Ze.length;et--;){Re=Ze[et];var Ne=Re,Oe=Ne.name,ze=Ne.namespaceURI;if(Ae=on(Re.value),Ue=St(Oe),Ke.attrName=Ue,Ke.attrValue=Ae,Ke.keepAttr=!0,Ke.forceKeepAttr=void 0,xe("uponSanitizeAttribute",Ee,Ke),Ae=Ke.attrValue,!Ke.forceKeepAttr&&(we(Oe,Ee),!!Ke.keepAttr)){if(mt(/\/>/i,Ae)){we(Oe,Ee);continue}Z&&(Ae=bt(Ae,M," "),Ae=bt(Ae,O," "));var je=Ee.nodeName.toLowerCase();if(!!qe(je,Ue,Ae))try{ze?Ee.setAttributeNS(ze,Oe,Ae):Ee.setAttribute(Oe,Ae),hi(e.removed)}catch{}}}xe("afterSanitizeAttributes",Ee,null)}},tt=function Be(Ee){var Re=void 0,Ae=De(Ee);for(xe("beforeSanitizeShadowDOM",Ee,null);Re=Ae.nextNode();)xe("uponSanitizeShadowNode",Re,null),!Ve(Re)&&(Re.content instanceof D&&Be(Re.content),We(Re));xe("afterSanitizeShadowDOM",Ee,null)};return e.sanitize=function(Be,Ee){var Re=void 0,Ae=void 0,Ue=void 0,et=void 0,Ze=void 0;if(de=!Be,de&&(Be="<!-->"),typeof Be!="string"&&!Fe(Be)){if(typeof Be.toString!="function")throw fi("toString is not a function");if(Be=Be.toString(),typeof Be!="string")throw fi("dirty is not a string, aborting")}if(!e.isSupported){if(Dt(j.toStaticHTML)==="object"||typeof j.toStaticHTML=="function"){if(typeof Be=="string")return j.toStaticHTML(Be);if(Fe(Be))return j.toStaticHTML(Be.outerHTML)}return Be}if(U||Le(Ee),e.removed=[],typeof Be=="string"&&($=!1),!$)if(Be instanceof w)Re=Se("<!---->"),Ae=Re.ownerDocument.importNode(Be,!0),Ae.nodeType===1&&Ae.nodeName==="BODY"||Ae.nodeName==="HTML"?Re=Ae:Re.appendChild(Ae);else{if(!ne&&!Z&&!x&&Be.indexOf("<")===-1)return u&&ue?u.createHTML(Be):Be;if(Re=Se(Be),!Re)return ne?null:f}Re&&Q&&Ge(Re.firstChild);for(var Ke=De($?Be:Re);Ue=Ke.nextNode();)Ue.nodeType===3&&Ue===et||Ve(Ue)||(Ue.content instanceof D&&tt(Ue.content),We(Ue),et=Ue);if(et=null,$)return Be;if(ne){if(ce)for(Ze=_.call(Re.ownerDocument);Re.firstChild;)Ze.appendChild(Re.firstChild);else Ze=Re;return ee&&(Ze=E.call(y,Ze,!0)),Ze}var Ne=x?Re.outerHTML:Re.innerHTML;return Z&&(Ne=bt(Ne,M," "),Ne=bt(Ne,O," ")),u&&ue?u.createHTML(Ne):Ne},e.setConfig=function(Be){Le(Be),U=!0},e.clearConfig=function(){fe=null,U=!1},e.isValidAttribute=function(Be,Ee,Re){fe||Le({});var Ae=St(Be),Ue=St(Ee);return qe(Ae,Ue,Re)},e.addHook=function(Be,Ee){typeof Ee=="function"&&(k[Be]=k[Be]||[],It(k[Be],Ee))},e.removeHook=function(Be){k[Be]&&hi(k[Be])},e.removeHooks=function(Be){k[Be]&&(k[Be]=[])},e.removeAllHooks=function(){k={}},e}var vn=bi();define("vs/base/browser/dompurify/dompurify",function(){return vn}),define(te[30],ie([1,0]),function(j,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.createFastDomNode=e.FastDomNode=void 0;class y{constructor(I){this.domNode=I,this._maxWidth=-1,this._width=-1,this._height=-1,this._top=-1,this._left=-1,this._bottom=-1,this._right=-1,this._fontFamily="",this._fontWeight="",this._fontSize=-1,this._fontFeatureSettings="",this._lineHeight=-1,this._letterSpacing=-100,this._className="",this._display="",this._position="",this._visibility="",this._backgroundColor="",this._layerHint=!1,this._contain="none",this._boxShadow=""}setMaxWidth(I){this._maxWidth!==I&&(this._maxWidth=I,this.domNode.style.maxWidth=this._maxWidth+"px")}setWidth(I){this._width!==I&&(this._width=I,this.domNode.style.width=this._width+"px")}setHeight(I){this._height!==I&&(this._height=I,this.domNode.style.height=this._height+"px")}setTop(I){this._top!==I&&(this._top=I,this.domNode.style.top=this._top+"px")}unsetTop(){this._top!==-1&&(this._top=-1,this.domNode.style.top="")}setLeft(I){this._left!==I&&(this._left=I,this.domNode.style.left=this._left+"px")}setBottom(I){this._bottom!==I&&(this._bottom=I,this.domNode.style.bottom=this._bottom+"px")}setRight(I){this._right!==I&&(this._right=I,this.domNode.style.right=this._right+"px")}setFontFamily(I){this._fontFamily!==I&&(this._fontFamily=I,this.domNode.style.fontFamily=this._fontFamily)}setFontWeight(I){this._fontWeight!==I&&(this._fontWeight=I,this.domNode.style.fontWeight=this._fontWeight)}setFontSize(I){this._fontSize!==I&&(this._fontSize=I,this.domNode.style.fontSize=this._fontSize+"px")}setFontFeatureSettings(I){this._fontFeatureSettings!==I&&(this._fontFeatureSettings=I,this.domNode.style.fontFeatureSettings=this._fontFeatureSettings)}setLineHeight(I){this._lineHeight!==I&&(this._lineHeight=I,this.domNode.style.lineHeight=this._lineHeight+"px")}setLetterSpacing(I){this._letterSpacing!==I&&(this._letterSpacing=I,this.domNode.style.letterSpacing=this._letterSpacing+"px")}setClassName(I){this._className!==I&&(this._className=I,this.domNode.className=this._className)}toggleClassName(I,w){this.domNode.classList.toggle(I,w),this._className=this.domNode.className}setDisplay(I){this._display!==I&&(this._display=I,this.domNode.style.display=this._display)}setPosition(I){this._position!==I&&(this._position=I,this.domNode.style.position=this._position)}setVisibility(I){this._visibility!==I&&(this._visibility=I,this.domNode.style.visibility=this._visibility)}setBackgroundColor(I){this._backgroundColor!==I&&(this._backgroundColor=I,this.domNode.style.backgroundColor=this._backgroundColor)}setLayerHinting(I){this._layerHint!==I&&(this._layerHint=I,this.domNode.style.transform=this._layerHint?"translate3d(0px, 0px, 0px)":"")}setBoxShadow(I){this._boxShadow!==I&&(this._boxShadow=I,this.domNode.style.boxShadow=I)}setContain(I){this._contain!==I&&(this._contain=I,this.domNode.style.contain=this._contain)}setAttribute(I,w){this.domNode.setAttribute(I,w)}removeAttribute(I){this.domNode.removeAttribute(I)}appendChild(I){this.domNode.appendChild(I.domNode)}removeChild(I){this.domNode.removeChild(I.domNode)}}e.FastDomNode=y;function m(D){return new y(D)}e.createFastDomNode=m}),define(te[211],ie([1,0]),function(j,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IframeUtils=void 0;let y=!1,m=null;function D(w){if(!w.parent||w.parent===w)return null;try{let b=w.location,p=w.parent.location;if(b.origin!=="null"&&p.origin!=="null"&&b.origin!==p.origin)return y=!0,null}catch{return y=!0,null}return w.parent}class I{static getSameOriginWindowChain(){if(!m){m=[];let b=window,p;do p=D(b),p?m.push({window:b,iframeElement:b.frameElement||null}):m.push({window:b,iframeElement:null}),b=p;while(b)}return m.slice(0)}static hasDifferentOriginAncestor(){return m||this.getSameOriginWindowChain(),y}static getPositionOfChildWindowRelativeToAncestorWindow(b,p){if(!p||b===p)return{top:0,left:0};let h=0,g=0,t=this.getSameOriginWindowChain();for(const i of t){if(h+=i.window.scrollY,g+=i.window.scrollX,i.window===p||!i.iframeElement)break;let n=i.iframeElement.getBoundingClientRect();h+=n.top,g+=n.left}return{top:h,left:g}}}e.IframeUtils=I}),define(te[307],ie([1,0]),function(j,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ListError=void 0;class y extends Error{constructor(D,I){super(`ListError [${D}] ${I}`)}}e.ListError=y}),define(te[308],ie([1,0]),function(j,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CombinedSpliceable=void 0;class y{constructor(D){this.spliceables=D}splice(D,I,w){this.spliceables.forEach(b=>b.splice(D,I,w))}}e.CombinedSpliceable=y}),define(te[212],ie([1,0]),function(j,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ScrollbarState=void 0;const y=20;class m{constructor(I,w,b,p,h,g){this._scrollbarSize=Math.round(w),this._oppositeScrollbarSize=Math.round(b),this._arrowSize=Math.round(I),this._visibleSize=p,this._scrollSize=h,this._scrollPosition=g,this._computedAvailableSize=0,this._computedIsNeeded=!1,this._computedSliderSize=0,this._computedSliderRatio=0,this._computedSliderPosition=0,this._refreshComputedValues()}clone(){return new m(this._arrowSize,this._scrollbarSize,this._oppositeScrollbarSize,this._visibleSize,this._scrollSize,this._scrollPosition)}setVisibleSize(I){const w=Math.round(I);return this._visibleSize!==w?(this._visibleSize=w,this._refreshComputedValues(),!0):!1}setScrollSize(I){const w=Math.round(I);return this._scrollSize!==w?(this._scrollSize=w,this._refreshComputedValues(),!0):!1}setScrollPosition(I){const w=Math.round(I);return this._scrollPosition!==w?(this._scrollPosition=w,this._refreshComputedValues(),!0):!1}setScrollbarSize(I){this._scrollbarSize=Math.round(I)}setOppositeScrollbarSize(I){this._oppositeScrollbarSize=Math.round(I)}static _computeValues(I,w,b,p,h){const g=Math.max(0,b-I),t=Math.max(0,g-2*w),i=p>0&&p>b;if(!i)return{computedAvailableSize:Math.round(g),computedIsNeeded:i,computedSliderSize:Math.round(t),computedSliderRatio:0,computedSliderPosition:0};const n=Math.round(Math.max(y,Math.floor(b*t/p))),l=(t-n)/(p-b),c=h*l;return{computedAvailableSize:Math.round(g),computedIsNeeded:i,computedSliderSize:Math.round(n),computedSliderRatio:l,computedSliderPosition:Math.round(c)}}_refreshComputedValues(){const I=m._computeValues(this._oppositeScrollbarSize,this._arrowSize,this._visibleSize,this._scrollSize,this._scrollPosition);this._computedAvailableSize=I.computedAvailableSize,this._computedIsNeeded=I.computedIsNeeded,this._computedSliderSize=I.computedSliderSize,this._computedSliderRatio=I.computedSliderRatio,this._computedSliderPosition=I.computedSliderPosition}getArrowSize(){return this._arrowSize}getScrollPosition(){return this._scrollPosition}getRectangleLargeSize(){return this._computedAvailableSize}getRectangleSmallSize(){return this._scrollbarSize}isNeeded(){return this._computedIsNeeded}getSliderSize(){return this._computedSliderSize}getSliderPosition(){return this._computedSliderPosition}getDesiredScrollPositionFromOffset(I){if(!this._computedIsNeeded)return 0;const w=I-this._arrowSize-this._computedSliderSize/2;return Math.round(w/this._computedSliderRatio)}getDesiredScrollPositionFromOffsetPaged(I){if(!this._computedIsNeeded)return 0;const w=I-this._arrowSize;let b=this._scrollPosition;return w<this._computedSliderPosition?b-=this._visibleSize:b+=this._visibleSize,b}getDesiredScrollPositionFromDelta(I){if(!this._computedIsNeeded)return 0;const w=this._computedSliderPosition+I;return Math.round(w/this._computedSliderRatio)}}e.ScrollbarState=m}),define(te[109],ie([1,0]),function(j,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.WeakMapper=e.TreeError=e.TreeMouseEventTarget=void 0;var y;(function(I){I[I.Unknown=0]="Unknown",I[I.Twistie=1]="Twistie",I[I.Element=2]="Element"})(y=e.TreeMouseEventTarget||(e.TreeMouseEventTarget={}));class m extends Error{constructor(w,b){super(`TreeError [${w}] ${b}`)}}e.TreeError=m;class D{constructor(w){this.fn=w,this._map=new WeakMap}map(w){let b=this._map.get(w);return b||(b=this.fn(w),this._map.set(w,b)),b}}e.WeakMapper=D}),define(te[19],ie([1,0]),function(j,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ArrayQueue=e.findMinBy=e.findLastMaxBy=e.findMaxBy=e.numberComparator=e.compareBy=e.splice=e.insertInto=e.asArray=e.pushToEnd=e.pushToStart=e.arrayInsert=e.range=e.flatten=e.firstOrDefault=e.lastIndex=e.findLast=e.distinct=e.isNonEmptyArray=e.isFalsyOrEmpty=e.coalesce=e.groupBy=e.quickSelect=e.findFirstInSorted=e.binarySearch=e.equals=e.tail2=e.tail=void 0;function y(M,O=0){return M[M.length-(1+O)]}e.tail=y;function m(M){if(M.length===0)throw new Error("Invalid tail call");return[M.slice(0,M.length-1),M[M.length-1]]}e.tail2=m;function D(M,O,B=(T,R)=>T===R){if(M===O)return!0;if(!M||!O||M.length!==O.length)return!1;for(let T=0,R=M.length;T<R;T++)if(!B(M[T],O[T]))return!1;return!0}e.equals=D;function I(M,O,B){let T=0,R=M.length-1;for(;T<=R;){const P=(T+R)/2|0,F=B(M[P],O);if(F<0)T=P+1;else if(F>0)R=P-1;else return P}return-(T+1)}e.binarySearch=I;function w(M,O){let B=0,T=M.length;if(T===0)return 0;for(;B<T;){const R=Math.floor((B+T)/2);O(M[R])?T=R:B=R+1}return B}e.findFirstInSorted=w;function b(M,O,B){if(M=M|0,M>=O.length)throw new TypeError("invalid index");let T=O[Math.floor(O.length*Math.random())],R=[],P=[],F=[];for(let W of O){const A=B(W,T);A<0?R.push(W):A>0?P.push(W):F.push(W)}return M<R.length?b(M,R,B):M<R.length+F.length?F[0]:b(M-(R.length+F.length),P,B)}e.quickSelect=b;function p(M,O){const B=[];let T;for(const R of M.slice(0).sort(O))!T||O(T[0],R)!==0?(T=[R],B.push(T)):T.push(R);return B}e.groupBy=p;function h(M){return M.filter(O=>!!O)}e.coalesce=h;function g(M){return!Array.isArray(M)||M.length===0}e.isFalsyOrEmpty=g;function t(M){return Array.isArray(M)&&M.length>0}e.isNonEmptyArray=t;function i(M,O=B=>B){const B=new Set;return M.filter(T=>{const R=O(T);return B.has(R)?!1:(B.add(R),!0)})}e.distinct=i;function n(M,O){const B=l(M,O);if(B!==-1)return M[B]}e.findLast=n;function l(M,O){for(let B=M.length-1;B>=0;B--){const T=M[B];if(O(T))return B}return-1}e.lastIndex=l;function c(M,O){return M.length>0?M[0]:O}e.firstOrDefault=c;function r(M){return[].concat(...M)}e.flatten=r;function s(M,O){let B=typeof O=="number"?M:0;typeof O=="number"?B=M:(B=0,O=M);const T=[];if(B<=O)for(let R=B;R<O;R++)T.push(R);else for(let R=B;R>O;R--)T.push(R);return T}e.range=s;function o(M,O,B){const T=M.slice(0,O),R=M.slice(O);return T.concat(B,R)}e.arrayInsert=o;function a(M,O){const B=M.indexOf(O);B>-1&&(M.splice(B,1),M.unshift(O))}e.pushToStart=a;function d(M,O){const B=M.indexOf(O);B>-1&&(M.splice(B,1),M.push(O))}e.pushToEnd=d;function u(M){return Array.isArray(M)?M:[M]}e.asArray=u;function f(M,O,B){const T=v(M,O),R=M.length,P=B.length;M.length=R+P;for(let F=R-1;F>=T;F--)M[F+P]=M[F];for(let F=0;F<P;F++)M[F+T]=B[F]}e.insertInto=f;function S(M,O,B,T){const R=v(M,O),P=M.splice(R,B);return f(M,R,T),P}e.splice=S;function v(M,O){return O<0?Math.max(O+M.length,0):Math.min(O,M.length)}function C(M,O){return(B,T)=>O(M(B),M(T))}e.compareBy=C;const _=(M,O)=>M-O;e.numberComparator=_;function L(M,O){if(M.length===0)return;let B=M[0];for(let T=1;T<M.length;T++){const R=M[T];O(R,B)>0&&(B=R)}return B}e.findMaxBy=L;function E(M,O){if(M.length===0)return;let B=M[0];for(let T=1;T<M.length;T++){const R=M[T];O(R,B)>=0&&(B=R)}return B}e.findLastMaxBy=E;function N(M,O){return L(M,(B,T)=>-O(B,T))}e.findMinBy=N;class k{constructor(O){this.items=O,this.firstIdx=0,this.lastIdx=this.items.length-1}takeWhile(O){let B=this.firstIdx;for(;B<this.items.length&&O(this.items[B]);)B++;const T=B===this.firstIdx?null:this.items.slice(this.firstIdx,B);return this.firstIdx=B,T}takeFromEndWhile(O){let B=this.lastIdx;for(;B>=0&&O(this.items[B]);)B--;const T=B===this.lastIdx?null:this.items.slice(B+1,this.lastIdx+1);return this.lastIdx=B,T}peek(){return this.items[this.firstIdx]}dequeue(){const O=this.items[this.firstIdx];return this.firstIdx++,O}takeCount(O){const B=this.items.slice(this.firstIdx,this.firstIdx+O);return this.firstIdx+=O,B}}e.ArrayQueue=k}),define(te[213],ie([1,0]),function(j,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ok=void 0;function y(m,D){if(!m)throw new Error(D?`Assertion failed (${D})`:"Assertion Failed")}e.ok=y}),define(te[110],ie([1,0]),function(j,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.writeUInt8=e.readUInt8=e.writeUInt32BE=e.readUInt32BE=e.writeUInt16LE=e.readUInt16LE=e.VSBuffer=void 0;const y=typeof Buffer!="undefined";let m;class D{constructor(i){this.buffer=i,this.byteLength=this.buffer.byteLength}static wrap(i){return y&&!Buffer.isBuffer(i)&&(i=Buffer.from(i.buffer,i.byteOffset,i.byteLength)),new D(i)}toString(){return y?this.buffer.toString():(m||(m=new TextDecoder),m.decode(this.buffer))}}e.VSBuffer=D;function I(t,i){return t[i+0]<<0>>>0|t[i+1]<<8>>>0}e.readUInt16LE=I;function w(t,i,n){t[n+0]=i&255,i=i>>>8,t[n+1]=i&255}e.writeUInt16LE=w;function b(t,i){return t[i]*Math.pow(2,24)+t[i+1]*Math.pow(2,16)+t[i+2]*Math.pow(2,8)+t[i+3]}e.readUInt32BE=b;function p(t,i,n){t[n+3]=i,i=i>>>8,t[n+2]=i,i=i>>>8,t[n+1]=i,i=i>>>8,t[n]=i}e.writeUInt32BE=p;function h(t,i){return t[i]}e.readUInt8=h;function g(t,i,n){t[n]=i}e.writeUInt8=g}),define(te[309],ie([1,0]),function(j,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.LRUCachedComputed=void 0;class y{constructor(D){this.computeFn=D,this.lastCache=void 0,this.lastArgKey=void 0}get(D){const I=JSON.stringify(D);return this.lastArgKey!==I&&(this.lastArgKey=I,this.lastCache=this.computeFn(D)),this.lastCache}}e.LRUCachedComputed=y}),define(te[27],ie([1,0]),function(j,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CSSIcon=e.Codicon=e.getCodiconAriaLabel=void 0;function y(I){return I?I.replace(/\$\((.*?)\)/g,(w,b)=>` ${b} `).trim():""}e.getCodiconAriaLabel=y;class m{constructor(w,b,p){this.id=w,this.definition=b,this.description=p,m._allCodicons.push(this)}get classNames(){return"codicon codicon-"+this.id}get classNamesArray(){return["codicon","codicon-"+this.id]}get cssSelector(){return".codicon.codicon-"+this.id}static getAll(){return m._allCodicons}}e.Codicon=m,m._allCodicons=[],m.add=new m("add",{fontCharacter:"\\ea60"}),m.plus=new m("plus",m.add.definition),m.gistNew=new m("gist-new",m.add.definition),m.repoCreate=new m("repo-create",m.add.definition),m.lightbulb=new m("lightbulb",{fontCharacter:"\\ea61"}),m.lightBulb=new m("light-bulb",{fontCharacter:"\\ea61"}),m.repo=new m("repo",{fontCharacter:"\\ea62"}),m.repoDelete=new m("repo-delete",{fontCharacter:"\\ea62"}),m.gistFork=new m("gist-fork",{fontCharacter:"\\ea63"}),m.repoForked=new m("repo-forked",{fontCharacter:"\\ea63"}),m.gitPullRequest=new m("git-pull-request",{fontCharacter:"\\ea64"}),m.gitPullRequestAbandoned=new m("git-pull-request-abandoned",{fontCharacter:"\\ea64"}),m.recordKeys=new m("record-keys",{fontCharacter:"\\ea65"}),m.keyboard=new m("keyboard",{fontCharacter:"\\ea65"}),m.tag=new m("tag",{fontCharacter:"\\ea66"}),m.tagAdd=new m("tag-add",{fontCharacter:"\\ea66"}),m.tagRemove=new m("tag-remove",{fontCharacter:"\\ea66"}),m.person=new m("person",{fontCharacter:"\\ea67"}),m.personFollow=new m("person-follow",{fontCharacter:"\\ea67"}),m.personOutline=new m("person-outline",{fontCharacter:"\\ea67"}),m.personFilled=new m("person-filled",{fontCharacter:"\\ea67"}),m.gitBranch=new m("git-branch",{fontCharacter:"\\ea68"}),m.gitBranchCreate=new m("git-branch-create",{fontCharacter:"\\ea68"}),m.gitBranchDelete=new m("git-branch-delete",{fontCharacter:"\\ea68"}),m.sourceControl=new m("source-control",{fontCharacter:"\\ea68"}),m.mirror=new m("mirror",{fontCharacter:"\\ea69"}),m.mirrorPublic=new m("mirror-public",{fontCharacter:"\\ea69"}),m.star=new m("star",{fontCharacter:"\\ea6a"}),m.starAdd=new m("star-add",{fontCharacter:"\\ea6a"}),m.starDelete=new m("star-delete",{fontCharacter:"\\ea6a"}),m.starEmpty=new m("star-empty",{fontCharacter:"\\ea6a"}),m.comment=new m("comment",{fontCharacter:"\\ea6b"}),m.commentAdd=new m("comment-add",{fontCharacter:"\\ea6b"}),m.alert=new m("alert",{fontCharacter:"\\ea6c"}),m.warning=new m("warning",{fontCharacter:"\\ea6c"}),m.search=new m("search",{fontCharacter:"\\ea6d"}),m.searchSave=new m("search-save",{fontCharacter:"\\ea6d"}),m.logOut=new m("log-out",{fontCharacter:"\\ea6e"}),m.signOut=new m("sign-out",{fontCharacter:"\\ea6e"}),m.logIn=new m("log-in",{fontCharacter:"\\ea6f"}),m.signIn=new m("sign-in",{fontCharacter:"\\ea6f"}),m.eye=new m("eye",{fontCharacter:"\\ea70"}),m.eyeUnwatch=new m("eye-unwatch",{fontCharacter:"\\ea70"}),m.eyeWatch=new m("eye-watch",{fontCharacter:"\\ea70"}),m.circleFilled=new m("circle-filled",{fontCharacter:"\\ea71"}),m.primitiveDot=new m("primitive-dot",{fontCharacter:"\\ea71"}),m.closeDirty=new m("close-dirty",{fontCharacter:"\\ea71"}),m.debugBreakpoint=new m("debug-breakpoint",{fontCharacter:"\\ea71"}),m.debugBreakpointDisabled=new m("debug-breakpoint-disabled",{fontCharacter:"\\ea71"}),m.debugHint=new m("debug-hint",{fontCharacter:"\\ea71"}),m.primitiveSquare=new m("primitive-square",{fontCharacter:"\\ea72"}),m.edit=new m("edit",{fontCharacter:"\\ea73"}),m.pencil=new m("pencil",{fontCharacter:"\\ea73"}),m.info=new m("info",{fontCharacter:"\\ea74"}),m.issueOpened=new m("issue-opened",{fontCharacter:"\\ea74"}),m.gistPrivate=new m("gist-private",{fontCharacter:"\\ea75"}),m.gitForkPrivate=new m("git-fork-private",{fontCharacter:"\\ea75"}),m.lock=new m("lock",{fontCharacter:"\\ea75"}),m.mirrorPrivate=new m("mirror-private",{fontCharacter:"\\ea75"}),m.close=new m("close",{fontCharacter:"\\ea76"}),m.removeClose=new m("remove-close",{fontCharacter:"\\ea76"}),m.x=new m("x",{fontCharacter:"\\ea76"}),m.repoSync=new m("repo-sync",{fontCharacter:"\\ea77"}),m.sync=new m("sync",{fontCharacter:"\\ea77"}),m.clone=new m("clone",{fontCharacter:"\\ea78"}),m.desktopDownload=new m("desktop-download",{fontCharacter:"\\ea78"}),m.beaker=new m("beaker",{fontCharacter:"\\ea79"}),m.microscope=new m("microscope",{fontCharacter:"\\ea79"}),m.vm=new m("vm",{fontCharacter:"\\ea7a"}),m.deviceDesktop=new m("device-desktop",{fontCharacter:"\\ea7a"}),m.file=new m("file",{fontCharacter:"\\ea7b"}),m.fileText=new m("file-text",{fontCharacter:"\\ea7b"}),m.more=new m("more",{fontCharacter:"\\ea7c"}),m.ellipsis=new m("ellipsis",{fontCharacter:"\\ea7c"}),m.kebabHorizontal=new m("kebab-horizontal",{fontCharacter:"\\ea7c"}),m.mailReply=new m("mail-reply",{fontCharacter:"\\ea7d"}),m.reply=new m("reply",{fontCharacter:"\\ea7d"}),m.organization=new m("organization",{fontCharacter:"\\ea7e"}),m.organizationFilled=new m("organization-filled",{fontCharacter:"\\ea7e"}),m.organizationOutline=new m("organization-outline",{fontCharacter:"\\ea7e"}),m.newFile=new m("new-file",{fontCharacter:"\\ea7f"}),m.fileAdd=new m("file-add",{fontCharacter:"\\ea7f"}),m.newFolder=new m("new-folder",{fontCharacter:"\\ea80"}),m.fileDirectoryCreate=new m("file-directory-create",{fontCharacter:"\\ea80"}),m.trash=new m("trash",{fontCharacter:"\\ea81"}),m.trashcan=new m("trashcan",{fontCharacter:"\\ea81"}),m.history=new m("history",{fontCharacter:"\\ea82"}),m.clock=new m("clock",{fontCharacter:"\\ea82"}),m.folder=new m("folder",{fontCharacter:"\\ea83"}),m.fileDirectory=new m("file-directory",{fontCharacter:"\\ea83"}),m.symbolFolder=new m("symbol-folder",{fontCharacter:"\\ea83"}),m.logoGithub=new m("logo-github",{fontCharacter:"\\ea84"}),m.markGithub=new m("mark-github",{fontCharacter:"\\ea84"}),m.github=new m("github",{fontCharacter:"\\ea84"}),m.terminal=new m("terminal",{fontCharacter:"\\ea85"}),m.console=new m("console",{fontCharacter:"\\ea85"}),m.repl=new m("repl",{fontCharacter:"\\ea85"}),m.zap=new m("zap",{fontCharacter:"\\ea86"}),m.symbolEvent=new m("symbol-event",{fontCharacter:"\\ea86"}),m.error=new m("error",{fontCharacter:"\\ea87"}),m.stop=new m("stop",{fontCharacter:"\\ea87"}),m.variable=new m("variable",{fontCharacter:"\\ea88"}),m.symbolVariable=new m("symbol-variable",{fontCharacter:"\\ea88"}),m.array=new m("array",{fontCharacter:"\\ea8a"}),m.symbolArray=new m("symbol-array",{fontCharacter:"\\ea8a"}),m.symbolModule=new m("symbol-module",{fontCharacter:"\\ea8b"}),m.symbolPackage=new m("symbol-package",{fontCharacter:"\\ea8b"}),m.symbolNamespace=new m("symbol-namespace",{fontCharacter:"\\ea8b"}),m.symbolObject=new m("symbol-object",{fontCharacter:"\\ea8b"}),m.symbolMethod=new m("symbol-method",{fontCharacter:"\\ea8c"}),m.symbolFunction=new m("symbol-function",{fontCharacter:"\\ea8c"}),m.symbolConstructor=new m("symbol-constructor",{fontCharacter:"\\ea8c"}),m.symbolBoolean=new m("symbol-boolean",{fontCharacter:"\\ea8f"}),m.symbolNull=new m("symbol-null",{fontCharacter:"\\ea8f"}),m.symbolNumeric=new m("symbol-numeric",{fontCharacter:"\\ea90"}),m.symbolNumber=new m("symbol-number",{fontCharacter:"\\ea90"}),m.symbolStructure=new m("symbol-structure",{fontCharacter:"\\ea91"}),m.symbolStruct=new m("symbol-struct",{fontCharacter:"\\ea91"}),m.symbolParameter=new m("symbol-parameter",{fontCharacter:"\\ea92"}),m.symbolTypeParameter=new m("symbol-type-parameter",{fontCharacter:"\\ea92"}),m.symbolKey=new m("symbol-key",{fontCharacter:"\\ea93"}),m.symbolText=new m("symbol-text",{fontCharacter:"\\ea93"}),m.symbolReference=new m("symbol-reference",{fontCharacter:"\\ea94"}),m.goToFile=new m("go-to-file",{fontCharacter:"\\ea94"}),m.symbolEnum=new m("symbol-enum",{fontCharacter:"\\ea95"}),m.symbolValue=new m("symbol-value",{fontCharacter:"\\ea95"}),m.symbolRuler=new m("symbol-ruler",{fontCharacter:"\\ea96"}),m.symbolUnit=new m("symbol-unit",{fontCharacter:"\\ea96"}),m.activateBreakpoints=new m("activate-breakpoints",{fontCharacter:"\\ea97"}),m.archive=new m("archive",{fontCharacter:"\\ea98"}),m.arrowBoth=new m("arrow-both",{fontCharacter:"\\ea99"}),m.arrowDown=new m("arrow-down",{fontCharacter:"\\ea9a"}),m.arrowLeft=new m("arrow-left",{fontCharacter:"\\ea9b"}),m.arrowRight=new m("arrow-right",{fontCharacter:"\\ea9c"}),m.arrowSmallDown=new m("arrow-small-down",{fontCharacter:"\\ea9d"}),m.arrowSmallLeft=new m("arrow-small-left",{fontCharacter:"\\ea9e"}),m.arrowSmallRight=new m("arrow-small-right",{fontCharacter:"\\ea9f"}),m.arrowSmallUp=new m("arrow-small-up",{fontCharacter:"\\eaa0"}),m.arrowUp=new m("arrow-up",{fontCharacter:"\\eaa1"}),m.bell=new m("bell",{fontCharacter:"\\eaa2"}),m.bold=new m("bold",{fontCharacter:"\\eaa3"}),m.book=new m("book",{fontCharacter:"\\eaa4"}),m.bookmark=new m("bookmark",{fontCharacter:"\\eaa5"}),m.debugBreakpointConditionalUnverified=new m("debug-breakpoint-conditional-unverified",{fontCharacter:"\\eaa6"}),m.debugBreakpointConditional=new m("debug-breakpoint-conditional",{fontCharacter:"\\eaa7"}),m.debugBreakpointConditionalDisabled=new m("debug-breakpoint-conditional-disabled",{fontCharacter:"\\eaa7"}),m.debugBreakpointDataUnverified=new m("debug-breakpoint-data-unverified",{fontCharacter:"\\eaa8"}),m.debugBreakpointData=new m("debug-breakpoint-data",{fontCharacter:"\\eaa9"}),m.debugBreakpointDataDisabled=new m("debug-breakpoint-data-disabled",{fontCharacter:"\\eaa9"}),m.debugBreakpointLogUnverified=new m("debug-breakpoint-log-unverified",{fontCharacter:"\\eaaa"}),m.debugBreakpointLog=new m("debug-breakpoint-log",{fontCharacter:"\\eaab"}),m.debugBreakpointLogDisabled=new m("debug-breakpoint-log-disabled",{fontCharacter:"\\eaab"}),m.briefcase=new m("briefcase",{fontCharacter:"\\eaac"}),m.broadcast=new m("broadcast",{fontCharacter:"\\eaad"}),m.browser=new m("browser",{fontCharacter:"\\eaae"}),m.bug=new m("bug",{fontCharacter:"\\eaaf"}),m.calendar=new m("calendar",{fontCharacter:"\\eab0"}),m.caseSensitive=new m("case-sensitive",{fontCharacter:"\\eab1"}),m.check=new m("check",{fontCharacter:"\\eab2"}),m.checklist=new m("checklist",{fontCharacter:"\\eab3"}),m.chevronDown=new m("chevron-down",{fontCharacter:"\\eab4"}),m.dropDownButton=new m("drop-down-button",m.chevronDown.definition),m.chevronLeft=new m("chevron-left",{fontCharacter:"\\eab5"}),m.chevronRight=new m("chevron-right",{fontCharacter:"\\eab6"}),m.chevronUp=new m("chevron-up",{fontCharacter:"\\eab7"}),m.chromeClose=new m("chrome-close",{fontCharacter:"\\eab8"}),m.chromeMaximize=new m("chrome-maximize",{fontCharacter:"\\eab9"}),m.chromeMinimize=new m("chrome-minimize",{fontCharacter:"\\eaba"}),m.chromeRestore=new m("chrome-restore",{fontCharacter:"\\eabb"}),m.circleOutline=new m("circle-outline",{fontCharacter:"\\eabc"}),m.debugBreakpointUnverified=new m("debug-breakpoint-unverified",{fontCharacter:"\\eabc"}),m.circleSlash=new m("circle-slash",{fontCharacter:"\\eabd"}),m.circuitBoard=new m("circuit-board",{fontCharacter:"\\eabe"}),m.clearAll=new m("clear-all",{fontCharacter:"\\eabf"}),m.clippy=new m("clippy",{fontCharacter:"\\eac0"}),m.closeAll=new m("close-all",{fontCharacter:"\\eac1"}),m.cloudDownload=new m("cloud-download",{fontCharacter:"\\eac2"}),m.cloudUpload=new m("cloud-upload",{fontCharacter:"\\eac3"}),m.code=new m("code",{fontCharacter:"\\eac4"}),m.collapseAll=new m("collapse-all",{fontCharacter:"\\eac5"}),m.colorMode=new m("color-mode",{fontCharacter:"\\eac6"}),m.commentDiscussion=new m("comment-discussion",{fontCharacter:"\\eac7"}),m.compareChanges=new m("compare-changes",{fontCharacter:"\\eafd"}),m.creditCard=new m("credit-card",{fontCharacter:"\\eac9"}),m.dash=new m("dash",{fontCharacter:"\\eacc"}),m.dashboard=new m("dashboard",{fontCharacter:"\\eacd"}),m.database=new m("database",{fontCharacter:"\\eace"}),m.debugContinue=new m("debug-continue",{fontCharacter:"\\eacf"}),m.debugDisconnect=new m("debug-disconnect",{fontCharacter:"\\ead0"}),m.debugPause=new m("debug-pause",{fontCharacter:"\\ead1"}),m.debugRestart=new m("debug-restart",{fontCharacter:"\\ead2"}),m.debugStart=new m("debug-start",{fontCharacter:"\\ead3"}),m.debugStepInto=new m("debug-step-into",{fontCharacter:"\\ead4"}),m.debugStepOut=new m("debug-step-out",{fontCharacter:"\\ead5"}),m.debugStepOver=new m("debug-step-over",{fontCharacter:"\\ead6"}),m.debugStop=new m("debug-stop",{fontCharacter:"\\ead7"}),m.debug=new m("debug",{fontCharacter:"\\ead8"}),m.deviceCameraVideo=new m("device-camera-video",{fontCharacter:"\\ead9"}),m.deviceCamera=new m("device-camera",{fontCharacter:"\\eada"}),m.deviceMobile=new m("device-mobile",{fontCharacter:"\\eadb"}),m.diffAdded=new m("diff-added",{fontCharacter:"\\eadc"}),m.diffIgnored=new m("diff-ignored",{fontCharacter:"\\eadd"}),m.diffModified=new m("diff-modified",{fontCharacter:"\\eade"}),m.diffRemoved=new m("diff-removed",{fontCharacter:"\\eadf"}),m.diffRenamed=new m("diff-renamed",{fontCharacter:"\\eae0"}),m.diff=new m("diff",{fontCharacter:"\\eae1"}),m.discard=new m("discard",{fontCharacter:"\\eae2"}),m.editorLayout=new m("editor-layout",{fontCharacter:"\\eae3"}),m.emptyWindow=new m("empty-window",{fontCharacter:"\\eae4"}),m.exclude=new m("exclude",{fontCharacter:"\\eae5"}),m.extensions=new m("extensions",{fontCharacter:"\\eae6"}),m.eyeClosed=new m("eye-closed",{fontCharacter:"\\eae7"}),m.fileBinary=new m("file-binary",{fontCharacter:"\\eae8"}),m.fileCode=new m("file-code",{fontCharacter:"\\eae9"}),m.fileMedia=new m("file-media",{fontCharacter:"\\eaea"}),m.filePdf=new m("file-pdf",{fontCharacter:"\\eaeb"}),m.fileSubmodule=new m("file-submodule",{fontCharacter:"\\eaec"}),m.fileSymlinkDirectory=new m("file-symlink-directory",{fontCharacter:"\\eaed"}),m.fileSymlinkFile=new m("file-symlink-file",{fontCharacter:"\\eaee"}),m.fileZip=new m("file-zip",{fontCharacter:"\\eaef"}),m.files=new m("files",{fontCharacter:"\\eaf0"}),m.filter=new m("filter",{fontCharacter:"\\eaf1"}),m.flame=new m("flame",{fontCharacter:"\\eaf2"}),m.foldDown=new m("fold-down",{fontCharacter:"\\eaf3"}),m.foldUp=new m("fold-up",{fontCharacter:"\\eaf4"}),m.fold=new m("fold",{fontCharacter:"\\eaf5"}),m.folderActive=new m("folder-active",{fontCharacter:"\\eaf6"}),m.folderOpened=new m("folder-opened",{fontCharacter:"\\eaf7"}),m.gear=new m("gear",{fontCharacter:"\\eaf8"}),m.gift=new m("gift",{fontCharacter:"\\eaf9"}),m.gistSecret=new m("gist-secret",{fontCharacter:"\\eafa"}),m.gist=new m("gist",{fontCharacter:"\\eafb"}),m.gitCommit=new m("git-commit",{fontCharacter:"\\eafc"}),m.gitCompare=new m("git-compare",{fontCharacter:"\\eafd"}),m.gitMerge=new m("git-merge",{fontCharacter:"\\eafe"}),m.githubAction=new m("github-action",{fontCharacter:"\\eaff"}),m.githubAlt=new m("github-alt",{fontCharacter:"\\eb00"}),m.globe=new m("globe",{fontCharacter:"\\eb01"}),m.grabber=new m("grabber",{fontCharacter:"\\eb02"}),m.graph=new m("graph",{fontCharacter:"\\eb03"}),m.gripper=new m("gripper",{fontCharacter:"\\eb04"}),m.heart=new m("heart",{fontCharacter:"\\eb05"}),m.home=new m("home",{fontCharacter:"\\eb06"}),m.horizontalRule=new m("horizontal-rule",{fontCharacter:"\\eb07"}),m.hubot=new m("hubot",{fontCharacter:"\\eb08"}),m.inbox=new m("inbox",{fontCharacter:"\\eb09"}),m.issueClosed=new m("issue-closed",{fontCharacter:"\\eba4"}),m.issueReopened=new m("issue-reopened",{fontCharacter:"\\eb0b"}),m.issues=new m("issues",{fontCharacter:"\\eb0c"}),m.italic=new m("italic",{fontCharacter:"\\eb0d"}),m.jersey=new m("jersey",{fontCharacter:"\\eb0e"}),m.json=new m("json",{fontCharacter:"\\eb0f"}),m.kebabVertical=new m("kebab-vertical",{fontCharacter:"\\eb10"}),m.key=new m("key",{fontCharacter:"\\eb11"}),m.law=new m("law",{fontCharacter:"\\eb12"}),m.lightbulbAutofix=new m("lightbulb-autofix",{fontCharacter:"\\eb13"}),m.linkExternal=new m("link-external",{fontCharacter:"\\eb14"}),m.link=new m("link",{fontCharacter:"\\eb15"}),m.listOrdered=new m("list-ordered",{fontCharacter:"\\eb16"}),m.listUnordered=new m("list-unordered",{fontCharacter:"\\eb17"}),m.liveShare=new m("live-share",{fontCharacter:"\\eb18"}),m.loading=new m("loading",{fontCharacter:"\\eb19"}),m.location=new m("location",{fontCharacter:"\\eb1a"}),m.mailRead=new m("mail-read",{fontCharacter:"\\eb1b"}),m.mail=new m("mail",{fontCharacter:"\\eb1c"}),m.markdown=new m("markdown",{fontCharacter:"\\eb1d"}),m.megaphone=new m("megaphone",{fontCharacter:"\\eb1e"}),m.mention=new m("mention",{fontCharacter:"\\eb1f"}),m.milestone=new m("milestone",{fontCharacter:"\\eb20"}),m.mortarBoard=new m("mortar-board",{fontCharacter:"\\eb21"}),m.move=new m("move",{fontCharacter:"\\eb22"}),m.multipleWindows=new m("multiple-windows",{fontCharacter:"\\eb23"}),m.mute=new m("mute",{fontCharacter:"\\eb24"}),m.noNewline=new m("no-newline",{fontCharacter:"\\eb25"}),m.note=new m("note",{fontCharacter:"\\eb26"}),m.octoface=new m("octoface",{fontCharacter:"\\eb27"}),m.openPreview=new m("open-preview",{fontCharacter:"\\eb28"}),m.package_=new m("package",{fontCharacter:"\\eb29"}),m.paintcan=new m("paintcan",{fontCharacter:"\\eb2a"}),m.pin=new m("pin",{fontCharacter:"\\eb2b"}),m.play=new m("play",{fontCharacter:"\\eb2c"}),m.run=new m("run",{fontCharacter:"\\eb2c"}),m.plug=new m("plug",{fontCharacter:"\\eb2d"}),m.preserveCase=new m("preserve-case",{fontCharacter:"\\eb2e"}),m.preview=new m("preview",{fontCharacter:"\\eb2f"}),m.project=new m("project",{fontCharacter:"\\eb30"}),m.pulse=new m("pulse",{fontCharacter:"\\eb31"}),m.question=new m("question",{fontCharacter:"\\eb32"}),m.quote=new m("quote",{fontCharacter:"\\eb33"}),m.radioTower=new m("radio-tower",{fontCharacter:"\\eb34"}),m.reactions=new m("reactions",{fontCharacter:"\\eb35"}),m.references=new m("references",{fontCharacter:"\\eb36"}),m.refresh=new m("refresh",{fontCharacter:"\\eb37"}),m.regex=new m("regex",{fontCharacter:"\\eb38"}),m.remoteExplorer=new m("remote-explorer",{fontCharacter:"\\eb39"}),m.remote=new m("remote",{fontCharacter:"\\eb3a"}),m.remove=new m("remove",{fontCharacter:"\\eb3b"}),m.replaceAll=new m("replace-all",{fontCharacter:"\\eb3c"}),m.replace=new m("replace",{fontCharacter:"\\eb3d"}),m.repoClone=new m("repo-clone",{fontCharacter:"\\eb3e"}),m.repoForcePush=new m("repo-force-push",{fontCharacter:"\\eb3f"}),m.repoPull=new m("repo-pull",{fontCharacter:"\\eb40"}),m.repoPush=new m("repo-push",{fontCharacter:"\\eb41"}),m.report=new m("report",{fontCharacter:"\\eb42"}),m.requestChanges=new m("request-changes",{fontCharacter:"\\eb43"}),m.rocket=new m("rocket",{fontCharacter:"\\eb44"}),m.rootFolderOpened=new m("root-folder-opened",{fontCharacter:"\\eb45"}),m.rootFolder=new m("root-folder",{fontCharacter:"\\eb46"}),m.rss=new m("rss",{fontCharacter:"\\eb47"}),m.ruby=new m("ruby",{fontCharacter:"\\eb48"}),m.saveAll=new m("save-all",{fontCharacter:"\\eb49"}),m.saveAs=new m("save-as",{fontCharacter:"\\eb4a"}),m.save=new m("save",{fontCharacter:"\\eb4b"}),m.screenFull=new m("screen-full",{fontCharacter:"\\eb4c"}),m.screenNormal=new m("screen-normal",{fontCharacter:"\\eb4d"}),m.searchStop=new m("search-stop",{fontCharacter:"\\eb4e"}),m.server=new m("server",{fontCharacter:"\\eb50"}),m.settingsGear=new m("settings-gear",{fontCharacter:"\\eb51"}),m.settings=new m("settings",{fontCharacter:"\\eb52"}),m.shield=new m("shield",{fontCharacter:"\\eb53"}),m.smiley=new m("smiley",{fontCharacter:"\\eb54"}),m.sortPrecedence=new m("sort-precedence",{fontCharacter:"\\eb55"}),m.splitHorizontal=new m("split-horizontal",{fontCharacter:"\\eb56"}),m.splitVertical=new m("split-vertical",{fontCharacter:"\\eb57"}),m.squirrel=new m("squirrel",{fontCharacter:"\\eb58"}),m.starFull=new m("star-full",{fontCharacter:"\\eb59"}),m.starHalf=new m("star-half",{fontCharacter:"\\eb5a"}),m.symbolClass=new m("symbol-class",{fontCharacter:"\\eb5b"}),m.symbolColor=new m("symbol-color",{fontCharacter:"\\eb5c"}),m.symbolCustomColor=new m("symbol-customcolor",{fontCharacter:"\\eb5c"}),m.symbolConstant=new m("symbol-constant",{fontCharacter:"\\eb5d"}),m.symbolEnumMember=new m("symbol-enum-member",{fontCharacter:"\\eb5e"}),m.symbolField=new m("symbol-field",{fontCharacter:"\\eb5f"}),m.symbolFile=new m("symbol-file",{fontCharacter:"\\eb60"}),m.symbolInterface=new m("symbol-interface",{fontCharacter:"\\eb61"}),m.symbolKeyword=new m("symbol-keyword",{fontCharacter:"\\eb62"}),m.symbolMisc=new m("symbol-misc",{fontCharacter:"\\eb63"}),m.symbolOperator=new m("symbol-operator",{fontCharacter:"\\eb64"}),m.symbolProperty=new m("symbol-property",{fontCharacter:"\\eb65"}),m.wrench=new m("wrench",{fontCharacter:"\\eb65"}),m.wrenchSubaction=new m("wrench-subaction",{fontCharacter:"\\eb65"}),m.symbolSnippet=new m("symbol-snippet",{fontCharacter:"\\eb66"}),m.tasklist=new m("tasklist",{fontCharacter:"\\eb67"}),m.telescope=new m("telescope",{fontCharacter:"\\eb68"}),m.textSize=new m("text-size",{fontCharacter:"\\eb69"}),m.threeBars=new m("three-bars",{fontCharacter:"\\eb6a"}),m.thumbsdown=new m("thumbsdown",{fontCharacter:"\\eb6b"}),m.thumbsup=new m("thumbsup",{fontCharacter:"\\eb6c"}),m.tools=new m("tools",{fontCharacter:"\\eb6d"}),m.triangleDown=new m("triangle-down",{fontCharacter:"\\eb6e"}),m.triangleLeft=new m("triangle-left",{fontCharacter:"\\eb6f"}),m.triangleRight=new m("triangle-right",{fontCharacter:"\\eb70"}),m.triangleUp=new m("triangle-up",{fontCharacter:"\\eb71"}),m.twitter=new m("twitter",{fontCharacter:"\\eb72"}),m.unfold=new m("unfold",{fontCharacter:"\\eb73"}),m.unlock=new m("unlock",{fontCharacter:"\\eb74"}),m.unmute=new m("unmute",{fontCharacter:"\\eb75"}),m.unverified=new m("unverified",{fontCharacter:"\\eb76"}),m.verified=new m("verified",{fontCharacter:"\\eb77"}),m.versions=new m("versions",{fontCharacter:"\\eb78"}),m.vmActive=new m("vm-active",{fontCharacter:"\\eb79"}),m.vmOutline=new m("vm-outline",{fontCharacter:"\\eb7a"}),m.vmRunning=new m("vm-running",{fontCharacter:"\\eb7b"}),m.watch=new m("watch",{fontCharacter:"\\eb7c"}),m.whitespace=new m("whitespace",{fontCharacter:"\\eb7d"}),m.wholeWord=new m("whole-word",{fontCharacter:"\\eb7e"}),m.window=new m("window",{fontCharacter:"\\eb7f"}),m.wordWrap=new m("word-wrap",{fontCharacter:"\\eb80"}),m.zoomIn=new m("zoom-in",{fontCharacter:"\\eb81"}),m.zoomOut=new m("zoom-out",{fontCharacter:"\\eb82"}),m.listFilter=new m("list-filter",{fontCharacter:"\\eb83"}),m.listFlat=new m("list-flat",{fontCharacter:"\\eb84"}),m.listSelection=new m("list-selection",{fontCharacter:"\\eb85"}),m.selection=new m("selection",{fontCharacter:"\\eb85"}),m.listTree=new m("list-tree",{fontCharacter:"\\eb86"}),m.debugBreakpointFunctionUnverified=new m("debug-breakpoint-function-unverified",{fontCharacter:"\\eb87"}),m.debugBreakpointFunction=new m("debug-breakpoint-function",{fontCharacter:"\\eb88"}),m.debugBreakpointFunctionDisabled=new m("debug-breakpoint-function-disabled",{fontCharacter:"\\eb88"}),m.debugStackframeActive=new m("debug-stackframe-active",{fontCharacter:"\\eb89"}),m.debugStackframeDot=new m("debug-stackframe-dot",{fontCharacter:"\\eb8a"}),m.debugStackframe=new m("debug-stackframe",{fontCharacter:"\\eb8b"}),m.debugStackframeFocused=new m("debug-stackframe-focused",{fontCharacter:"\\eb8b"}),m.debugBreakpointUnsupported=new m("debug-breakpoint-unsupported",{fontCharacter:"\\eb8c"}),m.symbolString=new m("symbol-string",{fontCharacter:"\\eb8d"}),m.debugReverseContinue=new m("debug-reverse-continue",{fontCharacter:"\\eb8e"}),m.debugStepBack=new m("debug-step-back",{fontCharacter:"\\eb8f"}),m.debugRestartFrame=new m("debug-restart-frame",{fontCharacter:"\\eb90"}),m.callIncoming=new m("call-incoming",{fontCharacter:"\\eb92"}),m.callOutgoing=new m("call-outgoing",{fontCharacter:"\\eb93"}),m.menu=new m("menu",{fontCharacter:"\\eb94"}),m.expandAll=new m("expand-all",{fontCharacter:"\\eb95"}),m.feedback=new m("feedback",{fontCharacter:"\\eb96"}),m.groupByRefType=new m("group-by-ref-type",{fontCharacter:"\\eb97"}),m.ungroupByRefType=new m("ungroup-by-ref-type",{fontCharacter:"\\eb98"}),m.account=new m("account",{fontCharacter:"\\eb99"}),m.bellDot=new m("bell-dot",{fontCharacter:"\\eb9a"}),m.debugConsole=new m("debug-console",{fontCharacter:"\\eb9b"}),m.library=new m("library",{fontCharacter:"\\eb9c"}),m.output=new m("output",{fontCharacter:"\\eb9d"}),m.runAll=new m("run-all",{fontCharacter:"\\eb9e"}),m.syncIgnored=new m("sync-ignored",{fontCharacter:"\\eb9f"}),m.pinned=new m("pinned",{fontCharacter:"\\eba0"}),m.githubInverted=new m("github-inverted",{fontCharacter:"\\eba1"}),m.debugAlt=new m("debug-alt",{fontCharacter:"\\eb91"}),m.serverProcess=new m("server-process",{fontCharacter:"\\eba2"}),m.serverEnvironment=new m("server-environment",{fontCharacter:"\\eba3"}),m.pass=new m("pass",{fontCharacter:"\\eba4"}),m.stopCircle=new m("stop-circle",{fontCharacter:"\\eba5"}),m.playCircle=new m("play-circle",{fontCharacter:"\\eba6"}),m.record=new m("record",{fontCharacter:"\\eba7"}),m.debugAltSmall=new m("debug-alt-small",{fontCharacter:"\\eba8"}),m.vmConnect=new m("vm-connect",{fontCharacter:"\\eba9"}),m.cloud=new m("cloud",{fontCharacter:"\\ebaa"}),m.merge=new m("merge",{fontCharacter:"\\ebab"}),m.exportIcon=new m("export",{fontCharacter:"\\ebac"}),m.graphLeft=new m("graph-left",{fontCharacter:"\\ebad"}),m.magnet=new m("magnet",{fontCharacter:"\\ebae"}),m.notebook=new m("notebook",{fontCharacter:"\\ebaf"}),m.redo=new m("redo",{fontCharacter:"\\ebb0"}),m.checkAll=new m("check-all",{fontCharacter:"\\ebb1"}),m.pinnedDirty=new m("pinned-dirty",{fontCharacter:"\\ebb2"}),m.passFilled=new m("pass-filled",{fontCharacter:"\\ebb3"}),m.circleLargeFilled=new m("circle-large-filled",{fontCharacter:"\\ebb4"}),m.circleLargeOutline=new m("circle-large-outline",{fontCharacter:"\\ebb5"}),m.combine=new m("combine",{fontCharacter:"\\ebb6"}),m.gather=new m("gather",{fontCharacter:"\\ebb6"}),m.table=new m("table",{fontCharacter:"\\ebb7"}),m.variableGroup=new m("variable-group",{fontCharacter:"\\ebb8"}),m.typeHierarchy=new m("type-hierarchy",{fontCharacter:"\\ebb9"}),m.typeHierarchySub=new m("type-hierarchy-sub",{fontCharacter:"\\ebba"}),m.typeHierarchySuper=new m("type-hierarchy-super",{fontCharacter:"\\ebbb"}),m.gitPullRequestCreate=new m("git-pull-request-create",{fontCharacter:"\\ebbc"}),m.runAbove=new m("run-above",{fontCharacter:"\\ebbd"}),m.runBelow=new m("run-below",{fontCharacter:"\\ebbe"}),m.notebookTemplate=new m("notebook-template",{fontCharacter:"\\ebbf"}),m.debugRerun=new m("debug-rerun",{fontCharacter:"\\ebc0"}),m.workspaceTrusted=new m("workspace-trusted",{fontCharacter:"\\ebc1"}),m.workspaceUntrusted=new m("workspace-untrusted",{fontCharacter:"\\ebc2"}),m.workspaceUnspecified=new m("workspace-unspecified",{fontCharacter:"\\ebc3"}),m.terminalCmd=new m("terminal-cmd",{fontCharacter:"\\ebc4"}),m.terminalDebian=new m("terminal-debian",{fontCharacter:"\\ebc5"}),m.terminalLinux=new m("terminal-linux",{fontCharacter:"\\ebc6"}),m.terminalPowershell=new m("terminal-powershell",{fontCharacter:"\\ebc7"}),m.terminalTmux=new m("terminal-tmux",{fontCharacter:"\\ebc8"}),m.terminalUbuntu=new m("terminal-ubuntu",{fontCharacter:"\\ebc9"}),m.terminalBash=new m("terminal-bash",{fontCharacter:"\\ebca"}),m.arrowSwap=new m("arrow-swap",{fontCharacter:"\\ebcb"}),m.copy=new m("copy",{fontCharacter:"\\ebcc"}),m.personAdd=new m("person-add",{fontCharacter:"\\ebcd"}),m.filterFilled=new m("filter-filled",{fontCharacter:"\\ebce"}),m.wand=new m("wand",{fontCharacter:"\\ebcf"}),m.debugLineByLine=new m("debug-line-by-line",{fontCharacter:"\\ebd0"}),m.inspect=new m("inspect",{fontCharacter:"\\ebd1"}),m.layers=new m("layers",{fontCharacter:"\\ebd2"}),m.layersDot=new m("layers-dot",{fontCharacter:"\\ebd3"}),m.layersActive=new m("layers-active",{fontCharacter:"\\ebd4"}),m.compass=new m("compass",{fontCharacter:"\\ebd5"}),m.compassDot=new m("compass-dot",{fontCharacter:"\\ebd6"}),m.compassActive=new m("compass-active",{fontCharacter:"\\ebd7"}),m.azure=new m("azure",{fontCharacter:"\\ebd8"}),m.issueDraft=new m("issue-draft",{fontCharacter:"\\ebd9"}),m.gitPullRequestClosed=new m("git-pull-request-closed",{fontCharacter:"\\ebda"}),m.gitPullRequestDraft=new m("git-pull-request-draft",{fontCharacter:"\\ebdb"}),m.debugAll=new m("debug-all",{fontCharacter:"\\ebdc"}),m.debugCoverage=new m("debug-coverage",{fontCharacter:"\\ebdd"}),m.runErrors=new m("run-errors",{fontCharacter:"\\ebde"}),m.folderLibrary=new m("folder-library",{fontCharacter:"\\ebdf"}),m.debugContinueSmall=new m("debug-continue-small",{fontCharacter:"\\ebe0"}),m.beakerStop=new m("beaker-stop",{fontCharacter:"\\ebe1"}),m.graphLine=new m("graph-line",{fontCharacter:"\\ebe2"}),m.graphScatter=new m("graph-scatter",{fontCharacter:"\\ebe3"}),m.pieChart=new m("pie-chart",{fontCharacter:"\\ebe4"}),m.bracket=new m("bracket",m.json.definition),m.bracketDot=new m("bracket-dot",{fontCharacter:"\\ebe5"}),m.bracketError=new m("bracket-error",{fontCharacter:"\\ebe6"}),m.lockSmall=new m("lock-small",{fontCharacter:"\\ebe7"}),m.azureDevops=new m("azure-devops",{fontCharacter:"\\ebe8"}),m.verifiedFilled=new m("verified-filled",{fontCharacter:"\\ebe9"}),m.newLine=new m("newline",{fontCharacter:"\\ebea"}),m.layout=new m("layout",{fontCharacter:"\\ebeb"}),m.layoutActivitybarLeft=new m("layout-activitybar-left",{fontCharacter:"\\ebec"}),m.layoutActivitybarRight=new m("layout-activitybar-right",{fontCharacter:"\\ebed"}),m.layoutPanelLeft=new m("layout-panel-left",{fontCharacter:"\\ebee"}),m.layoutPanelCenter=new m("layout-panel-center",{fontCharacter:"\\ebef"}),m.layoutPanelJustify=new m("layout-panel-justify",{fontCharacter:"\\ebf0"}),m.layoutPanelRight=new m("layout-panel-right",{fontCharacter:"\\ebf1"}),m.layoutPanel=new m("layout-panel",{fontCharacter:"\\ebf2"}),m.layoutSidebarLeft=new m("layout-sidebar-left",{fontCharacter:"\\ebf3"}),m.layoutSidebarRight=new m("layout-sidebar-right",{fontCharacter:"\\ebf4"}),m.layoutStatusbar=new m("layout-statusbar",{fontCharacter:"\\ebf5"}),m.layoutMenubar=new m("layout-menubar",{fontCharacter:"\\ebf6"}),m.layoutCentered=new m("layout-centered",{fontCharacter:"\\ebf7"}),m.target=new m("target",{fontCharacter:"\\ebf8"}),m.dialogError=new m("dialog-error",m.error.definition),m.dialogWarning=new m("dialog-warning",m.warning.definition),m.dialogInfo=new m("dialog-info",m.info.definition),m.dialogClose=new m("dialog-close",m.close.definition),m.treeItemExpanded=new m("tree-item-expanded",m.chevronDown.definition),m.treeFilterOnTypeOn=new m("tree-filter-on-type-on",m.listFilter.definition),m.treeFilterOnTypeOff=new m("tree-filter-on-type-off",m.listSelection.definition),m.treeFilterClear=new m("tree-filter-clear",m.close.definition),m.treeItemLoading=new m("tree-item-loading",m.loading.definition),m.menuSelection=new m("menu-selection",m.check.definition),m.menuSubmenu=new m("menu-submenu",m.chevronRight.definition),m.menuBarMore=new m("menubar-more",m.more.definition),m.scrollbarButtonLeft=new m("scrollbar-button-left",m.triangleLeft.definition),m.scrollbarButtonRight=new m("scrollbar-button-right",m.triangleRight.definition),m.scrollbarButtonUp=new m("scrollbar-button-up",m.triangleUp.definition),m.scrollbarButtonDown=new m("scrollbar-button-down",m.triangleDown.definition),m.toolBarMore=new m("toolbar-more",m.more.definition),m.quickInputBack=new m("quick-input-back",m.arrowLeft.definition);var D;(function(I){I.iconNameSegment="[A-Za-z0-9]+",I.iconNameExpression="[A-Za-z0-9-]+",I.iconModifierExpression="~[A-Za-z]+",I.iconNameCharacter="[A-Za-z0-9~-]";const w=new RegExp(`^(${I.iconNameExpression})(${I.iconModifierExpression})?$`);function b(g){if(g instanceof m)return["codicon","codicon-"+g.id];const t=w.exec(g.id);if(!t)return b(m.error);let[,i,n]=t;const l=["codicon","codicon-"+i];return n&&l.push("codicon-modifier-"+n.substr(1)),l}I.asClassNameArray=b;function p(g){return b(g).join(" ")}I.asClassName=p;function h(g){return"."+b(g).join(".")}I.asCSSSelector=h})(D=e.CSSIcon||(e.CSSIcon={}))}),define(te[214],ie([1,0]),function(j,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SetMap=e.forEach=void 0;const y=Object.prototype.hasOwnProperty;function m(I,w){for(let b in I)if(y.call(I,b)&&w({key:b,value:I[b]},function(){delete I[b]})===!1)return}e.forEach=m;class D{constructor(){this.map=new Map}add(w,b){let p=this.map.get(w);p||(p=new Set,this.map.set(w,p)),p.add(b)}delete(w,b){const p=this.map.get(w);!p||(p.delete(b),p.size===0&&this.map.delete(w))}forEach(w,b){const p=this.map.get(w);!p||p.forEach(b)}}e.SetMap=D}),define(te[29],ie([1,0]),function(j,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Color=e.HSVA=e.HSLA=e.RGBA=void 0;function y(b,p){const h=Math.pow(10,p);return Math.round(b*h)/h}class m{constructor(p,h,g,t=1){this._rgbaBrand=void 0,this.r=Math.min(255,Math.max(0,p))|0,this.g=Math.min(255,Math.max(0,h))|0,this.b=Math.min(255,Math.max(0,g))|0,this.a=y(Math.max(Math.min(1,t),0),3)}static equals(p,h){return p.r===h.r&&p.g===h.g&&p.b===h.b&&p.a===h.a}}e.RGBA=m;class D{constructor(p,h,g,t){this._hslaBrand=void 0,this.h=Math.max(Math.min(360,p),0)|0,this.s=y(Math.max(Math.min(1,h),0),3),this.l=y(Math.max(Math.min(1,g),0),3),this.a=y(Math.max(Math.min(1,t),0),3)}static equals(p,h){return p.h===h.h&&p.s===h.s&&p.l===h.l&&p.a===h.a}static fromRGBA(p){const h=p.r/255,g=p.g/255,t=p.b/255,i=p.a,n=Math.max(h,g,t),l=Math.min(h,g,t);let c=0,r=0;const s=(l+n)/2,o=n-l;if(o>0){switch(r=Math.min(s<=.5?o/(2*s):o/(2-2*s),1),n){case h:c=(g-t)/o+(g<t?6:0);break;case g:c=(t-h)/o+2;break;case t:c=(h-g)/o+4;break}c*=60,c=Math.round(c)}return new D(c,r,s,i)}static _hue2rgb(p,h,g){return g<0&&(g+=1),g>1&&(g-=1),g<1/6?p+(h-p)*6*g:g<1/2?h:g<2/3?p+(h-p)*(2/3-g)*6:p}static toRGBA(p){const h=p.h/360,{s:g,l:t,a:i}=p;let n,l,c;if(g===0)n=l=c=t;else{const r=t<.5?t*(1+g):t+g-t*g,s=2*t-r;n=D._hue2rgb(s,r,h+1/3),l=D._hue2rgb(s,r,h),c=D._hue2rgb(s,r,h-1/3)}return new m(Math.round(n*255),Math.round(l*255),Math.round(c*255),i)}}e.HSLA=D;class I{constructor(p,h,g,t){this._hsvaBrand=void 0,this.h=Math.max(Math.min(360,p),0)|0,this.s=y(Math.max(Math.min(1,h),0),3),this.v=y(Math.max(Math.min(1,g),0),3),this.a=y(Math.max(Math.min(1,t),0),3)}static equals(p,h){return p.h===h.h&&p.s===h.s&&p.v===h.v&&p.a===h.a}static fromRGBA(p){const h=p.r/255,g=p.g/255,t=p.b/255,i=Math.max(h,g,t),n=Math.min(h,g,t),l=i-n,c=i===0?0:l/i;let r;return l===0?r=0:i===h?r=((g-t)/l%6+6)%6:i===g?r=(t-h)/l+2:r=(h-g)/l+4,new I(Math.round(r*60),c,i,p.a)}static toRGBA(p){const{h,s:g,v:t,a:i}=p,n=t*g,l=n*(1-Math.abs(h/60%2-1)),c=t-n;let[r,s,o]=[0,0,0];return h<60?(r=n,s=l):h<120?(r=l,s=n):h<180?(s=n,o=l):h<240?(s=l,o=n):h<300?(r=l,o=n):h<=360&&(r=n,o=l),r=Math.round((r+c)*255),s=Math.round((s+c)*255),o=Math.round((o+c)*255),new m(r,s,o,i)}}e.HSVA=I;class w{constructor(p){if(p)if(p instanceof m)this.rgba=p;else if(p instanceof D)this._hsla=p,this.rgba=D.toRGBA(p);else if(p instanceof I)this._hsva=p,this.rgba=I.toRGBA(p);else throw new Error("Invalid color ctor argument");else throw new Error("Color needs a value")}static fromHex(p){return w.Format.CSS.parseHex(p)||w.red}get hsla(){return this._hsla?this._hsla:D.fromRGBA(this.rgba)}get hsva(){return this._hsva?this._hsva:I.fromRGBA(this.rgba)}equals(p){return!!p&&m.equals(this.rgba,p.rgba)&&D.equals(this.hsla,p.hsla)&&I.equals(this.hsva,p.hsva)}getRelativeLuminance(){const p=w._relativeLuminanceForComponent(this.rgba.r),h=w._relativeLuminanceForComponent(this.rgba.g),g=w._relativeLuminanceForComponent(this.rgba.b),t=.2126*p+.7152*h+.0722*g;return y(t,4)}static _relativeLuminanceForComponent(p){const h=p/255;return h<=.03928?h/12.92:Math.pow((h+.055)/1.055,2.4)}isLighter(){return(this.rgba.r*299+this.rgba.g*587+this.rgba.b*114)/1e3>=128}isLighterThan(p){const h=this.getRelativeLuminance(),g=p.getRelativeLuminance();return h>g}isDarkerThan(p){const h=this.getRelativeLuminance(),g=p.getRelativeLuminance();return h<g}lighten(p){return new w(new D(this.hsla.h,this.hsla.s,this.hsla.l+this.hsla.l*p,this.hsla.a))}darken(p){return new w(new D(this.hsla.h,this.hsla.s,this.hsla.l-this.hsla.l*p,this.hsla.a))}transparent(p){const{r:h,g,b:t,a:i}=this.rgba;return new w(new m(h,g,t,i*p))}isTransparent(){return this.rgba.a===0}isOpaque(){return this.rgba.a===1}opposite(){return new w(new m(255-this.rgba.r,255-this.rgba.g,255-this.rgba.b,this.rgba.a))}toString(){return this._toString||(this._toString=w.Format.CSS.format(this)),this._toString}static getLighterColor(p,h,g){if(p.isLighterThan(h))return p;g=g||.5;const t=p.getRelativeLuminance(),i=h.getRelativeLuminance();return g=g*(i-t)/i,p.lighten(g)}static getDarkerColor(p,h,g){if(p.isDarkerThan(h))return p;g=g||.5;const t=p.getRelativeLuminance(),i=h.getRelativeLuminance();return g=g*(t-i)/t,p.darken(g)}}e.Color=w,w.white=new w(new m(255,255,255,1)),w.black=new w(new m(0,0,0,1)),w.red=new w(new m(255,0,0,1)),w.blue=new w(new m(0,0,255,1)),w.green=new w(new m(0,255,0,1)),w.cyan=new w(new m(0,255,255,1)),w.lightgrey=new w(new m(211,211,211,1)),w.transparent=new w(new m(0,0,0,0)),function(b){let p;(function(h){let g;(function(t){function i(f){return f.rgba.a===1?`rgb(${f.rgba.r}, ${f.rgba.g}, ${f.rgba.b})`:b.Format.CSS.formatRGBA(f)}t.formatRGB=i;function n(f){return`rgba(${f.rgba.r}, ${f.rgba.g}, ${f.rgba.b}, ${+f.rgba.a.toFixed(2)})`}t.formatRGBA=n;function l(f){return f.hsla.a===1?`hsl(${f.hsla.h}, ${(f.hsla.s*100).toFixed(2)}%, ${(f.hsla.l*100).toFixed(2)}%)`:b.Format.CSS.formatHSLA(f)}t.formatHSL=l;function c(f){return`hsla(${f.hsla.h}, ${(f.hsla.s*100).toFixed(2)}%, ${(f.hsla.l*100).toFixed(2)}%, ${f.hsla.a.toFixed(2)})`}t.formatHSLA=c;function r(f){const S=f.toString(16);return S.length!==2?"0"+S:S}function s(f){return`#${r(f.rgba.r)}${r(f.rgba.g)}${r(f.rgba.b)}`}t.formatHex=s;function o(f,S=!1){return S&&f.rgba.a===1?b.Format.CSS.formatHex(f):`#${r(f.rgba.r)}${r(f.rgba.g)}${r(f.rgba.b)}${r(Math.round(f.rgba.a*255))}`}t.formatHexA=o;function a(f){return f.isOpaque()?b.Format.CSS.formatHex(f):b.Format.CSS.formatRGBA(f)}t.format=a;function d(f){const S=f.length;if(S===0||f.charCodeAt(0)!==35)return null;if(S===7){const v=16*u(f.charCodeAt(1))+u(f.charCodeAt(2)),C=16*u(f.charCodeAt(3))+u(f.charCodeAt(4)),_=16*u(f.charCodeAt(5))+u(f.charCodeAt(6));return new b(new m(v,C,_,1))}if(S===9){const v=16*u(f.charCodeAt(1))+u(f.charCodeAt(2)),C=16*u(f.charCodeAt(3))+u(f.charCodeAt(4)),_=16*u(f.charCodeAt(5))+u(f.charCodeAt(6)),L=16*u(f.charCodeAt(7))+u(f.charCodeAt(8));return new b(new m(v,C,_,L/255))}if(S===4){const v=u(f.charCodeAt(1)),C=u(f.charCodeAt(2)),_=u(f.charCodeAt(3));return new b(new m(16*v+v,16*C+C,16*_+_))}if(S===5){const v=u(f.charCodeAt(1)),C=u(f.charCodeAt(2)),_=u(f.charCodeAt(3)),L=u(f.charCodeAt(4));return new b(new m(16*v+v,16*C+C,16*_+_,(16*L+L)/255))}return null}t.parseHex=d;function u(f){switch(f){case 48:return 0;case 49:return 1;case 50:return 2;case 51:return 3;case 52:return 4;case 53:return 5;case 54:return 6;case 55:return 7;case 56:return 8;case 57:return 9;case 97:return 10;case 65:return 10;case 98:return 11;case 66:return 11;case 99:return 12;case 67:return 12;case 100:return 13;case 68:return 13;case 101:return 14;case 69:return 14;case 102:return 15;case 70:return 15}return 0}})(g=h.CSS||(h.CSS={}))})(p=b.Format||(b.Format={}))}(w=e.Color||(e.Color={}))}),define(te[93],ie([1,0]),function(j,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.memoize=void 0;function y(m,D,I){let w=null,b=null;if(typeof I.value=="function"?(w="value",b=I.value,b.length!==0&&console.warn("Memoize should only be used in functions with zero parameters")):typeof I.get=="function"&&(w="get",b=I.get),!b)throw new Error("not supported");const p=`$memoize$${D}`;I[w]=function(...h){return this.hasOwnProperty(p)||Object.defineProperty(this,p,{configurable:!1,enumerable:!1,writable:!1,value:b.apply(this,h)}),this[p]}}e.memoize=y}),define(te[310],ie([1,0]),function(j,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DiffChange=void 0;class y{constructor(D,I,w,b){this.originalStart=D,this.originalLength=I,this.modifiedStart=w,this.modifiedLength=b}getOriginalEnd(){return this.originalStart+this.originalLength}getModifiedEnd(){return this.modifiedStart+this.modifiedLength}}e.DiffChange=y}),define(te[13],ie([1,0]),function(j,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.NotSupportedError=e.illegalState=e.illegalArgument=e.canceled=e.CancellationError=e.isCancellationError=e.transformErrorForSerialization=e.onUnexpectedExternalError=e.onUnexpectedError=e.errorHandler=e.ErrorHandler=void 0;class y{constructor(){this.listeners=[],this.unexpectedErrorHandler=function(l){setTimeout(()=>{throw l.stack?new Error(l.message+`
|
||
|
||
`+l.stack):l},0)}}emit(l){this.listeners.forEach(c=>{c(l)})}onUnexpectedError(l){this.unexpectedErrorHandler(l),this.emit(l)}onUnexpectedExternalError(l){this.unexpectedErrorHandler(l)}}e.ErrorHandler=y,e.errorHandler=new y;function m(n){b(n)||e.errorHandler.onUnexpectedError(n)}e.onUnexpectedError=m;function D(n){b(n)||e.errorHandler.onUnexpectedExternalError(n)}e.onUnexpectedExternalError=D;function I(n){if(n instanceof Error){let{name:l,message:c}=n;const r=n.stacktrace||n.stack;return{$isError:!0,name:l,message:c,stack:r}}return n}e.transformErrorForSerialization=I;const w="Canceled";function b(n){return n instanceof p?!0:n instanceof Error&&n.name===w&&n.message===w}e.isCancellationError=b;class p extends Error{constructor(){super(w);this.name=this.message}}e.CancellationError=p;function h(){const n=new Error(w);return n.name=n.message,n}e.canceled=h;function g(n){return n?new Error(`Illegal argument: ${n}`):new Error("Illegal argument")}e.illegalArgument=g;function t(n){return n?new Error(`Illegal state: ${n}`):new Error("Illegal state")}e.illegalState=t;class i extends Error{constructor(l){super("NotSupported");l&&(this.message=l)}}e.NotSupportedError=i}),define(te[88],ie([1,0]),function(j,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.once=void 0;function y(m){const D=this;let I=!1,w;return function(){return I||(I=!0,w=m.apply(D,arguments)),w}}e.once=y}),define(te[133],ie([1,0]),function(j,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.defaultGenerator=e.IdGenerator=void 0;class y{constructor(D){this._prefix=D,this._lastId=0}nextId(){return this._prefix+ ++this._lastId}}e.IdGenerator=y,e.defaultGenerator=new y("id#")}),define(te[54],ie([1,0]),function(j,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Iterable=void 0;var y;(function(m){function D(u){return u&&typeof u=="object"&&typeof u[Symbol.iterator]=="function"}m.is=D;const I=Object.freeze([]);function w(){return I}m.empty=w;function*b(u){yield u}m.single=b;function p(u){return u||I}m.from=p;function h(u){return!u||u[Symbol.iterator]().next().done===!0}m.isEmpty=h;function g(u){return u[Symbol.iterator]().next().value}m.first=g;function t(u,f){for(const S of u)if(f(S))return!0;return!1}m.some=t;function i(u,f){for(const S of u)if(f(S))return S}m.find=i;function*n(u,f){for(const S of u)f(S)&&(yield S)}m.filter=n;function*l(u,f){let S=0;for(const v of u)yield f(v,S++)}m.map=l;function*c(...u){for(const f of u)for(const S of f)yield S}m.concat=c;function*r(u){for(const f of u)for(const S of f)yield S}m.concatNested=r;function s(u,f,S){let v=S;for(const C of u)v=f(v,C);return v}m.reduce=s;function*o(u,f,S=u.length){for(f<0&&(f+=u.length),S<0?S+=u.length:S>u.length&&(S=u.length);f<S;f++)yield u[f]}m.slice=o;function a(u,f=Number.POSITIVE_INFINITY){const S=[];if(f===0)return[S,u];const v=u[Symbol.iterator]();for(let C=0;C<f;C++){const _=v.next();if(_.done)return[S,m.empty()];S.push(_.value)}return[S,{[Symbol.iterator](){return v}}]}m.consume=a;function d(u,f,S=(v,C)=>v===C){const v=u[Symbol.iterator](),C=f[Symbol.iterator]();for(;;){const _=v.next(),L=C.next();if(_.done!==L.done)return!1;if(_.done)return!0;if(!S(_.value,L.value))return!1}}m.equals=d})(y=e.Iterable||(e.Iterable={}))}),define(te[55],ie([1,0]),function(j,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.KeyChord=e.KeyCodeUtils=e.IMMUTABLE_KEY_CODE_TO_CODE=e.IMMUTABLE_CODE_TO_KEY_CODE=e.NATIVE_WINDOWS_KEY_CODE_TO_KEY_CODE=e.EVENT_KEY_CODE_MAP=void 0;class y{constructor(){this._keyCodeToStr=[],this._strToKeyCode=Object.create(null)}define(i,n){this._keyCodeToStr[i]=n,this._strToKeyCode[n.toLowerCase()]=i}keyCodeToStr(i){return this._keyCodeToStr[i]}strToKeyCode(i){return this._strToKeyCode[i.toLowerCase()]||0}}const m=new y,D=new y,I=new y;e.EVENT_KEY_CODE_MAP=new Array(230),e.NATIVE_WINDOWS_KEY_CODE_TO_KEY_CODE={};const w=[],b=Object.create(null),p=Object.create(null);e.IMMUTABLE_CODE_TO_KEY_CODE=[],e.IMMUTABLE_KEY_CODE_TO_CODE=[];for(let t=0;t<=193;t++)e.IMMUTABLE_CODE_TO_KEY_CODE[t]=-1;for(let t=0;t<=126;t++)e.IMMUTABLE_KEY_CODE_TO_CODE[t]=-1;(function(){const t="",i=[[0,1,0,"None",0,"unknown",0,"VK_UNKNOWN",t,t],[0,1,1,"Hyper",0,t,0,t,t,t],[0,1,2,"Super",0,t,0,t,t,t],[0,1,3,"Fn",0,t,0,t,t,t],[0,1,4,"FnLock",0,t,0,t,t,t],[0,1,5,"Suspend",0,t,0,t,t,t],[0,1,6,"Resume",0,t,0,t,t,t],[0,1,7,"Turbo",0,t,0,t,t,t],[0,1,8,"Sleep",0,t,0,"VK_SLEEP",t,t],[0,1,9,"WakeUp",0,t,0,t,t,t],[31,0,10,"KeyA",31,"A",65,"VK_A",t,t],[32,0,11,"KeyB",32,"B",66,"VK_B",t,t],[33,0,12,"KeyC",33,"C",67,"VK_C",t,t],[34,0,13,"KeyD",34,"D",68,"VK_D",t,t],[35,0,14,"KeyE",35,"E",69,"VK_E",t,t],[36,0,15,"KeyF",36,"F",70,"VK_F",t,t],[37,0,16,"KeyG",37,"G",71,"VK_G",t,t],[38,0,17,"KeyH",38,"H",72,"VK_H",t,t],[39,0,18,"KeyI",39,"I",73,"VK_I",t,t],[40,0,19,"KeyJ",40,"J",74,"VK_J",t,t],[41,0,20,"KeyK",41,"K",75,"VK_K",t,t],[42,0,21,"KeyL",42,"L",76,"VK_L",t,t],[43,0,22,"KeyM",43,"M",77,"VK_M",t,t],[44,0,23,"KeyN",44,"N",78,"VK_N",t,t],[45,0,24,"KeyO",45,"O",79,"VK_O",t,t],[46,0,25,"KeyP",46,"P",80,"VK_P",t,t],[47,0,26,"KeyQ",47,"Q",81,"VK_Q",t,t],[48,0,27,"KeyR",48,"R",82,"VK_R",t,t],[49,0,28,"KeyS",49,"S",83,"VK_S",t,t],[50,0,29,"KeyT",50,"T",84,"VK_T",t,t],[51,0,30,"KeyU",51,"U",85,"VK_U",t,t],[52,0,31,"KeyV",52,"V",86,"VK_V",t,t],[53,0,32,"KeyW",53,"W",87,"VK_W",t,t],[54,0,33,"KeyX",54,"X",88,"VK_X",t,t],[55,0,34,"KeyY",55,"Y",89,"VK_Y",t,t],[56,0,35,"KeyZ",56,"Z",90,"VK_Z",t,t],[22,0,36,"Digit1",22,"1",49,"VK_1",t,t],[23,0,37,"Digit2",23,"2",50,"VK_2",t,t],[24,0,38,"Digit3",24,"3",51,"VK_3",t,t],[25,0,39,"Digit4",25,"4",52,"VK_4",t,t],[26,0,40,"Digit5",26,"5",53,"VK_5",t,t],[27,0,41,"Digit6",27,"6",54,"VK_6",t,t],[28,0,42,"Digit7",28,"7",55,"VK_7",t,t],[29,0,43,"Digit8",29,"8",56,"VK_8",t,t],[30,0,44,"Digit9",30,"9",57,"VK_9",t,t],[21,0,45,"Digit0",21,"0",48,"VK_0",t,t],[3,1,46,"Enter",3,"Enter",13,"VK_RETURN",t,t],[9,1,47,"Escape",9,"Escape",27,"VK_ESCAPE",t,t],[1,1,48,"Backspace",1,"Backspace",8,"VK_BACK",t,t],[2,1,49,"Tab",2,"Tab",9,"VK_TAB",t,t],[10,1,50,"Space",10,"Space",32,"VK_SPACE",t,t],[83,0,51,"Minus",83,"-",189,"VK_OEM_MINUS","-","OEM_MINUS"],[81,0,52,"Equal",81,"=",187,"VK_OEM_PLUS","=","OEM_PLUS"],[87,0,53,"BracketLeft",87,"[",219,"VK_OEM_4","[","OEM_4"],[89,0,54,"BracketRight",89,"]",221,"VK_OEM_6","]","OEM_6"],[88,0,55,"Backslash",88,"\\",220,"VK_OEM_5","\\","OEM_5"],[0,0,56,"IntlHash",0,t,0,t,t,t],[80,0,57,"Semicolon",80,";",186,"VK_OEM_1",";","OEM_1"],[90,0,58,"Quote",90,"'",222,"VK_OEM_7","'","OEM_7"],[86,0,59,"Backquote",86,"`",192,"VK_OEM_3","`","OEM_3"],[82,0,60,"Comma",82,",",188,"VK_OEM_COMMA",",","OEM_COMMA"],[84,0,61,"Period",84,".",190,"VK_OEM_PERIOD",".","OEM_PERIOD"],[85,0,62,"Slash",85,"/",191,"VK_OEM_2","/","OEM_2"],[8,1,63,"CapsLock",8,"CapsLock",20,"VK_CAPITAL",t,t],[59,1,64,"F1",59,"F1",112,"VK_F1",t,t],[60,1,65,"F2",60,"F2",113,"VK_F2",t,t],[61,1,66,"F3",61,"F3",114,"VK_F3",t,t],[62,1,67,"F4",62,"F4",115,"VK_F4",t,t],[63,1,68,"F5",63,"F5",116,"VK_F5",t,t],[64,1,69,"F6",64,"F6",117,"VK_F6",t,t],[65,1,70,"F7",65,"F7",118,"VK_F7",t,t],[66,1,71,"F8",66,"F8",119,"VK_F8",t,t],[67,1,72,"F9",67,"F9",120,"VK_F9",t,t],[68,1,73,"F10",68,"F10",121,"VK_F10",t,t],[69,1,74,"F11",69,"F11",122,"VK_F11",t,t],[70,1,75,"F12",70,"F12",123,"VK_F12",t,t],[0,1,76,"PrintScreen",0,t,0,t,t,t],[79,1,77,"ScrollLock",79,"ScrollLock",145,"VK_SCROLL",t,t],[7,1,78,"Pause",7,"PauseBreak",19,"VK_PAUSE",t,t],[19,1,79,"Insert",19,"Insert",45,"VK_INSERT",t,t],[14,1,80,"Home",14,"Home",36,"VK_HOME",t,t],[11,1,81,"PageUp",11,"PageUp",33,"VK_PRIOR",t,t],[20,1,82,"Delete",20,"Delete",46,"VK_DELETE",t,t],[13,1,83,"End",13,"End",35,"VK_END",t,t],[12,1,84,"PageDown",12,"PageDown",34,"VK_NEXT",t,t],[17,1,85,"ArrowRight",17,"RightArrow",39,"VK_RIGHT","Right",t],[15,1,86,"ArrowLeft",15,"LeftArrow",37,"VK_LEFT","Left",t],[18,1,87,"ArrowDown",18,"DownArrow",40,"VK_DOWN","Down",t],[16,1,88,"ArrowUp",16,"UpArrow",38,"VK_UP","Up",t],[78,1,89,"NumLock",78,"NumLock",144,"VK_NUMLOCK",t,t],[108,1,90,"NumpadDivide",108,"NumPad_Divide",111,"VK_DIVIDE",t,t],[103,1,91,"NumpadMultiply",103,"NumPad_Multiply",106,"VK_MULTIPLY",t,t],[106,1,92,"NumpadSubtract",106,"NumPad_Subtract",109,"VK_SUBTRACT",t,t],[104,1,93,"NumpadAdd",104,"NumPad_Add",107,"VK_ADD",t,t],[3,1,94,"NumpadEnter",3,t,0,t,t,t],[94,1,95,"Numpad1",94,"NumPad1",97,"VK_NUMPAD1",t,t],[95,1,96,"Numpad2",95,"NumPad2",98,"VK_NUMPAD2",t,t],[96,1,97,"Numpad3",96,"NumPad3",99,"VK_NUMPAD3",t,t],[97,1,98,"Numpad4",97,"NumPad4",100,"VK_NUMPAD4",t,t],[98,1,99,"Numpad5",98,"NumPad5",101,"VK_NUMPAD5",t,t],[99,1,100,"Numpad6",99,"NumPad6",102,"VK_NUMPAD6",t,t],[100,1,101,"Numpad7",100,"NumPad7",103,"VK_NUMPAD7",t,t],[101,1,102,"Numpad8",101,"NumPad8",104,"VK_NUMPAD8",t,t],[102,1,103,"Numpad9",102,"NumPad9",105,"VK_NUMPAD9",t,t],[93,1,104,"Numpad0",93,"NumPad0",96,"VK_NUMPAD0",t,t],[107,1,105,"NumpadDecimal",107,"NumPad_Decimal",110,"VK_DECIMAL",t,t],[92,0,106,"IntlBackslash",92,"OEM_102",226,"VK_OEM_102",t,t],[58,1,107,"ContextMenu",58,"ContextMenu",93,t,t,t],[0,1,108,"Power",0,t,0,t,t,t],[0,1,109,"NumpadEqual",0,t,0,t,t,t],[71,1,110,"F13",71,"F13",124,"VK_F13",t,t],[72,1,111,"F14",72,"F14",125,"VK_F14",t,t],[73,1,112,"F15",73,"F15",126,"VK_F15",t,t],[74,1,113,"F16",74,"F16",127,"VK_F16",t,t],[75,1,114,"F17",75,"F17",128,"VK_F17",t,t],[76,1,115,"F18",76,"F18",129,"VK_F18",t,t],[77,1,116,"F19",77,"F19",130,"VK_F19",t,t],[0,1,117,"F20",0,t,0,"VK_F20",t,t],[0,1,118,"F21",0,t,0,"VK_F21",t,t],[0,1,119,"F22",0,t,0,"VK_F22",t,t],[0,1,120,"F23",0,t,0,"VK_F23",t,t],[0,1,121,"F24",0,t,0,"VK_F24",t,t],[0,1,122,"Open",0,t,0,t,t,t],[0,1,123,"Help",0,t,0,t,t,t],[0,1,124,"Select",0,t,0,t,t,t],[0,1,125,"Again",0,t,0,t,t,t],[0,1,126,"Undo",0,t,0,t,t,t],[0,1,127,"Cut",0,t,0,t,t,t],[0,1,128,"Copy",0,t,0,t,t,t],[0,1,129,"Paste",0,t,0,t,t,t],[0,1,130,"Find",0,t,0,t,t,t],[0,1,131,"AudioVolumeMute",112,"AudioVolumeMute",173,"VK_VOLUME_MUTE",t,t],[0,1,132,"AudioVolumeUp",113,"AudioVolumeUp",175,"VK_VOLUME_UP",t,t],[0,1,133,"AudioVolumeDown",114,"AudioVolumeDown",174,"VK_VOLUME_DOWN",t,t],[105,1,134,"NumpadComma",105,"NumPad_Separator",108,"VK_SEPARATOR",t,t],[110,0,135,"IntlRo",110,"ABNT_C1",193,"VK_ABNT_C1",t,t],[0,1,136,"KanaMode",0,t,0,t,t,t],[0,0,137,"IntlYen",0,t,0,t,t,t],[0,1,138,"Convert",0,t,0,t,t,t],[0,1,139,"NonConvert",0,t,0,t,t,t],[0,1,140,"Lang1",0,t,0,t,t,t],[0,1,141,"Lang2",0,t,0,t,t,t],[0,1,142,"Lang3",0,t,0,t,t,t],[0,1,143,"Lang4",0,t,0,t,t,t],[0,1,144,"Lang5",0,t,0,t,t,t],[0,1,145,"Abort",0,t,0,t,t,t],[0,1,146,"Props",0,t,0,t,t,t],[0,1,147,"NumpadParenLeft",0,t,0,t,t,t],[0,1,148,"NumpadParenRight",0,t,0,t,t,t],[0,1,149,"NumpadBackspace",0,t,0,t,t,t],[0,1,150,"NumpadMemoryStore",0,t,0,t,t,t],[0,1,151,"NumpadMemoryRecall",0,t,0,t,t,t],[0,1,152,"NumpadMemoryClear",0,t,0,t,t,t],[0,1,153,"NumpadMemoryAdd",0,t,0,t,t,t],[0,1,154,"NumpadMemorySubtract",0,t,0,t,t,t],[0,1,155,"NumpadClear",0,t,0,t,t,t],[0,1,156,"NumpadClearEntry",0,t,0,t,t,t],[5,1,0,t,5,"Ctrl",17,"VK_CONTROL",t,t],[4,1,0,t,4,"Shift",16,"VK_SHIFT",t,t],[6,1,0,t,6,"Alt",18,"VK_MENU",t,t],[57,1,0,t,57,"Meta",0,"VK_COMMAND",t,t],[5,1,157,"ControlLeft",5,t,0,"VK_LCONTROL",t,t],[4,1,158,"ShiftLeft",4,t,0,"VK_LSHIFT",t,t],[6,1,159,"AltLeft",6,t,0,"VK_LMENU",t,t],[57,1,160,"MetaLeft",57,t,0,"VK_LWIN",t,t],[5,1,161,"ControlRight",5,t,0,"VK_RCONTROL",t,t],[4,1,162,"ShiftRight",4,t,0,"VK_RSHIFT",t,t],[6,1,163,"AltRight",6,t,0,"VK_RMENU",t,t],[57,1,164,"MetaRight",57,t,0,"VK_RWIN",t,t],[0,1,165,"BrightnessUp",0,t,0,t,t,t],[0,1,166,"BrightnessDown",0,t,0,t,t,t],[0,1,167,"MediaPlay",0,t,0,t,t,t],[0,1,168,"MediaRecord",0,t,0,t,t,t],[0,1,169,"MediaFastForward",0,t,0,t,t,t],[0,1,170,"MediaRewind",0,t,0,t,t,t],[114,1,171,"MediaTrackNext",119,"MediaTrackNext",176,"VK_MEDIA_NEXT_TRACK",t,t],[115,1,172,"MediaTrackPrevious",120,"MediaTrackPrevious",177,"VK_MEDIA_PREV_TRACK",t,t],[116,1,173,"MediaStop",121,"MediaStop",178,"VK_MEDIA_STOP",t,t],[0,1,174,"Eject",0,t,0,t,t,t],[117,1,175,"MediaPlayPause",122,"MediaPlayPause",179,"VK_MEDIA_PLAY_PAUSE",t,t],[0,1,176,"MediaSelect",123,"LaunchMediaPlayer",181,"VK_MEDIA_LAUNCH_MEDIA_SELECT",t,t],[0,1,177,"LaunchMail",124,"LaunchMail",180,"VK_MEDIA_LAUNCH_MAIL",t,t],[0,1,178,"LaunchApp2",125,"LaunchApp2",183,"VK_MEDIA_LAUNCH_APP2",t,t],[0,1,179,"LaunchApp1",0,t,0,"VK_MEDIA_LAUNCH_APP1",t,t],[0,1,180,"SelectTask",0,t,0,t,t,t],[0,1,181,"LaunchScreenSaver",0,t,0,t,t,t],[0,1,182,"BrowserSearch",115,"BrowserSearch",170,"VK_BROWSER_SEARCH",t,t],[0,1,183,"BrowserHome",116,"BrowserHome",172,"VK_BROWSER_HOME",t,t],[112,1,184,"BrowserBack",117,"BrowserBack",166,"VK_BROWSER_BACK",t,t],[113,1,185,"BrowserForward",118,"BrowserForward",167,"VK_BROWSER_FORWARD",t,t],[0,1,186,"BrowserStop",0,t,0,"VK_BROWSER_STOP",t,t],[0,1,187,"BrowserRefresh",0,t,0,"VK_BROWSER_REFRESH",t,t],[0,1,188,"BrowserFavorites",0,t,0,"VK_BROWSER_FAVORITES",t,t],[0,1,189,"ZoomToggle",0,t,0,t,t,t],[0,1,190,"MailReply",0,t,0,t,t,t],[0,1,191,"MailForward",0,t,0,t,t,t],[0,1,192,"MailSend",0,t,0,t,t,t],[109,1,0,t,109,"KeyInComposition",229,t,t,t],[111,1,0,t,111,"ABNT_C2",194,"VK_ABNT_C2",t,t],[91,1,0,t,91,"OEM_8",223,"VK_OEM_8",t,t],[0,1,0,t,0,t,0,"VK_CLEAR",t,t],[0,1,0,t,0,t,0,"VK_KANA",t,t],[0,1,0,t,0,t,0,"VK_HANGUL",t,t],[0,1,0,t,0,t,0,"VK_JUNJA",t,t],[0,1,0,t,0,t,0,"VK_FINAL",t,t],[0,1,0,t,0,t,0,"VK_HANJA",t,t],[0,1,0,t,0,t,0,"VK_KANJI",t,t],[0,1,0,t,0,t,0,"VK_CONVERT",t,t],[0,1,0,t,0,t,0,"VK_NONCONVERT",t,t],[0,1,0,t,0,t,0,"VK_ACCEPT",t,t],[0,1,0,t,0,t,0,"VK_MODECHANGE",t,t],[0,1,0,t,0,t,0,"VK_SELECT",t,t],[0,1,0,t,0,t,0,"VK_PRINT",t,t],[0,1,0,t,0,t,0,"VK_EXECUTE",t,t],[0,1,0,t,0,t,0,"VK_SNAPSHOT",t,t],[0,1,0,t,0,t,0,"VK_HELP",t,t],[0,1,0,t,0,t,0,"VK_APPS",t,t],[0,1,0,t,0,t,0,"VK_PROCESSKEY",t,t],[0,1,0,t,0,t,0,"VK_PACKET",t,t],[0,1,0,t,0,t,0,"VK_DBE_SBCSCHAR",t,t],[0,1,0,t,0,t,0,"VK_DBE_DBCSCHAR",t,t],[0,1,0,t,0,t,0,"VK_ATTN",t,t],[0,1,0,t,0,t,0,"VK_CRSEL",t,t],[0,1,0,t,0,t,0,"VK_EXSEL",t,t],[0,1,0,t,0,t,0,"VK_EREOF",t,t],[0,1,0,t,0,t,0,"VK_PLAY",t,t],[0,1,0,t,0,t,0,"VK_ZOOM",t,t],[0,1,0,t,0,t,0,"VK_NONAME",t,t],[0,1,0,t,0,t,0,"VK_PA1",t,t],[0,1,0,t,0,t,0,"VK_OEM_CLEAR",t,t]];let n=[],l=[];for(const c of i){const[r,s,o,a,d,u,f,S,v,C]=c;if(l[o]||(l[o]=!0,w[o]=a,b[a]=o,p[a.toLowerCase()]=o,s&&(e.IMMUTABLE_CODE_TO_KEY_CODE[o]=d,d!==0&&d!==3&&d!==5&&d!==4&&d!==6&&d!==57&&(e.IMMUTABLE_KEY_CODE_TO_CODE[d]=o))),!n[d]){if(n[d]=!0,!u)throw new Error(`String representation missing for key code ${d} around scan code ${a}`);m.define(d,u),D.define(d,v||u),I.define(d,C||v||u)}f&&(e.EVENT_KEY_CODE_MAP[f]=d),S&&(e.NATIVE_WINDOWS_KEY_CODE_TO_KEY_CODE[S]=d)}e.IMMUTABLE_KEY_CODE_TO_CODE[3]=46})();var h;(function(t){function i(o){return m.keyCodeToStr(o)}t.toString=i;function n(o){return m.strToKeyCode(o)}t.fromString=n;function l(o){return D.keyCodeToStr(o)}t.toUserSettingsUS=l;function c(o){return I.keyCodeToStr(o)}t.toUserSettingsGeneral=c;function r(o){return D.strToKeyCode(o)||I.strToKeyCode(o)}t.fromUserSettings=r;function s(o){if(o>=93&&o<=108)return null;switch(o){case 16:return"Up";case 18:return"Down";case 15:return"Left";case 17:return"Right"}return m.keyCodeToStr(o)}t.toElectronAccelerator=s})(h=e.KeyCodeUtils||(e.KeyCodeUtils={}));function g(t,i){const n=(i&65535)<<16>>>0;return(t|n)>>>0}e.KeyChord=g}),define(te[94],ie([1,0,13]),function(j,e,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ResolvedKeybinding=e.ResolvedKeybindingPart=e.ScanCodeBinding=e.ChordKeybinding=e.SimpleKeybinding=e.createSimpleKeybinding=e.createKeybinding=void 0;function m(g,t){if(g===0)return null;const i=(g&65535)>>>0,n=(g&4294901760)>>>16;return n!==0?new w([D(i,t),D(n,t)]):new w([D(i,t)])}e.createKeybinding=m;function D(g,t){const i=!!(g&2048),n=!!(g&256),l=t===2?n:i,c=!!(g&1024),r=!!(g&512),s=t===2?i:n,o=g&255;return new I(l,c,r,s,o)}e.createSimpleKeybinding=D;class I{constructor(t,i,n,l,c){this.ctrlKey=t,this.shiftKey=i,this.altKey=n,this.metaKey=l,this.keyCode=c}equals(t){return this.ctrlKey===t.ctrlKey&&this.shiftKey===t.shiftKey&&this.altKey===t.altKey&&this.metaKey===t.metaKey&&this.keyCode===t.keyCode}isModifierKey(){return this.keyCode===0||this.keyCode===5||this.keyCode===57||this.keyCode===6||this.keyCode===4}toChord(){return new w([this])}isDuplicateModifierCase(){return this.ctrlKey&&this.keyCode===5||this.shiftKey&&this.keyCode===4||this.altKey&&this.keyCode===6||this.metaKey&&this.keyCode===57}}e.SimpleKeybinding=I;class w{constructor(t){if(t.length===0)throw(0,y.illegalArgument)("parts");this.parts=t}}e.ChordKeybinding=w;class b{constructor(t,i,n,l,c){this.ctrlKey=t,this.shiftKey=i,this.altKey=n,this.metaKey=l,this.scanCode=c}isDuplicateModifierCase(){return this.ctrlKey&&(this.scanCode===157||this.scanCode===161)||this.shiftKey&&(this.scanCode===158||this.scanCode===162)||this.altKey&&(this.scanCode===159||this.scanCode===163)||this.metaKey&&(this.scanCode===160||this.scanCode===164)}}e.ScanCodeBinding=b;class p{constructor(t,i,n,l,c,r){this.ctrlKey=t,this.shiftKey=i,this.altKey=n,this.metaKey=l,this.keyLabel=c,this.keyAriaLabel=r}}e.ResolvedKeybindingPart=p;class h{}e.ResolvedKeybinding=h}),define(te[134],ie([1,0]),function(j,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Lazy=void 0;class y{constructor(D){this.executor=D,this._didRun=!1}getValue(){if(!this._didRun)try{this._value=this.executor()}catch(D){this._error=D}finally{this._didRun=!0}if(this._error)throw this._error;return this._value}get rawValue(){return this._value}}e.Lazy=y}),define(te[2],ie([1,0,88,54]),function(j,e,y,m){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ImmortalReference=e.MutableDisposable=e.Disposable=e.DisposableStore=e.toDisposable=e.combinedDisposable=e.dispose=e.isDisposable=e.MultiDisposeError=e.markAsSingleton=e.setDisposableTracker=void 0;const D=!1;let I=null;function w(u){I=u}if(e.setDisposableTracker=w,D){const u="__is_disposable_tracked__";w(new class{trackDisposable(f){const S=new Error("Potentially leaked disposable").stack;setTimeout(()=>{f[u]||console.log(S)},3e3)}setParent(f,S){if(f&&f!==o.None)try{f[u]=!0}catch{}}markAsDisposed(f){if(f&&f!==o.None)try{f[u]=!0}catch{}}markAsSingleton(f){}})}function b(u){return I==null||I.trackDisposable(u),u}function p(u){I==null||I.markAsDisposed(u)}function h(u,f){I==null||I.setParent(u,f)}function g(u,f){if(!!I)for(const S of u)I.setParent(S,f)}function t(u){return I==null||I.markAsSingleton(u),u}e.markAsSingleton=t;class i extends Error{constructor(f){super(`Encountered errors while disposing of store. Errors: [${f.join(", ")}]`);this.errors=f}}e.MultiDisposeError=i;function n(u){return typeof u.dispose=="function"&&u.dispose.length===0}e.isDisposable=n;function l(u){if(m.Iterable.is(u)){let f=[];for(const S of u)if(S)try{S.dispose()}catch(v){f.push(v)}if(f.length===1)throw f[0];if(f.length>1)throw new i(f);return Array.isArray(u)?[]:u}else if(u)return u.dispose(),u}e.dispose=l;function c(...u){const f=r(()=>l(u));return g(u,f),f}e.combinedDisposable=c;function r(u){const f=b({dispose:(0,y.once)(()=>{p(f),u()})});return f}e.toDisposable=r;class s{constructor(){this._toDispose=new Set,this._isDisposed=!1,b(this)}dispose(){this._isDisposed||(p(this),this._isDisposed=!0,this.clear())}get isDisposed(){return this._isDisposed}clear(){try{l(this._toDispose.values())}finally{this._toDispose.clear()}}add(f){if(!f)return f;if(f===this)throw new Error("Cannot register a disposable on itself!");return h(f,this),this._isDisposed?s.DISABLE_DISPOSED_WARNING||console.warn(new Error("Trying to add a disposable to a DisposableStore that has already been disposed of. The added object will be leaked!").stack):this._toDispose.add(f),f}}e.DisposableStore=s,s.DISABLE_DISPOSED_WARNING=!1;class o{constructor(){this._store=new s,b(this),h(this._store,this)}dispose(){p(this),this._store.dispose()}_register(f){if(f===this)throw new Error("Cannot register a disposable on itself!");return this._store.add(f)}}e.Disposable=o,o.None=Object.freeze({dispose(){}});class a{constructor(){this._isDisposed=!1,b(this)}get value(){return this._isDisposed?void 0:this._value}set value(f){var S;this._isDisposed||f===this._value||((S=this._value)===null||S===void 0||S.dispose(),f&&h(f,this),this._value=f)}clear(){this.value=void 0}dispose(){var f;this._isDisposed=!0,p(this),(f=this._value)===null||f===void 0||f.dispose(),this._value=void 0}clearAndLeak(){const f=this._value;return this._value=void 0,f&&h(f,null),f}}e.MutableDisposable=a;class d{constructor(f){this.object=f}dispose(){}}e.ImmortalReference=d}),define(te[81],ie([1,0]),function(j,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.LinkedList=void 0;class y{constructor(I){this.element=I,this.next=y.Undefined,this.prev=y.Undefined}}y.Undefined=new y(void 0);class m{constructor(){this._first=y.Undefined,this._last=y.Undefined,this._size=0}get size(){return this._size}isEmpty(){return this._first===y.Undefined}clear(){let I=this._first;for(;I!==y.Undefined;){const w=I.next;I.prev=y.Undefined,I.next=y.Undefined,I=w}this._first=y.Undefined,this._last=y.Undefined,this._size=0}unshift(I){return this._insert(I,!1)}push(I){return this._insert(I,!0)}_insert(I,w){const b=new y(I);if(this._first===y.Undefined)this._first=b,this._last=b;else if(w){const h=this._last;this._last=b,b.prev=h,h.next=b}else{const h=this._first;this._first=b,b.next=h,h.prev=b}this._size+=1;let p=!1;return()=>{p||(p=!0,this._remove(b))}}shift(){if(this._first!==y.Undefined){const I=this._first.element;return this._remove(this._first),I}}pop(){if(this._last!==y.Undefined){const I=this._last.element;return this._remove(this._last),I}}_remove(I){if(I.prev!==y.Undefined&&I.next!==y.Undefined){const w=I.prev;w.next=I.next,I.next.prev=w}else I.prev===y.Undefined&&I.next===y.Undefined?(this._first=y.Undefined,this._last=y.Undefined):I.next===y.Undefined?(this._last=this._last.prev,this._last.next=y.Undefined):I.prev===y.Undefined&&(this._first=this._first.next,this._first.prev=y.Undefined);this._size-=1}*[Symbol.iterator](){let I=this._first;for(;I!==y.Undefined;)yield I.element,I=I.next}}e.LinkedList=m}),function(j,e){typeof exports=="object"&&typeof module!="undefined"?e(exports):typeof define=="function"&&define.amd?define(te[311],ie([0]),e):(j=typeof globalThis!="undefined"?globalThis:j||self,e(j.marked={}))}(this,function(j){"use strict";function e(z,V){for(var $=0;$<V.length;$++){var K=V[$];K.enumerable=K.enumerable||!1,K.configurable=!0,"value"in K&&(K.writable=!0),Object.defineProperty(z,K.key,K)}}function y(z,V,$){return V&&e(z.prototype,V),$&&e(z,$),Object.defineProperty(z,"prototype",{writable:!1}),z}function m(z,V){if(!!z){if(typeof z=="string")return D(z,V);var $=Object.prototype.toString.call(z).slice(8,-1);if($==="Object"&&z.constructor&&($=z.constructor.name),$==="Map"||$==="Set")return Array.from(z);if($==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test($))return D(z,V)}}function D(z,V){(V==null||V>z.length)&&(V=z.length);for(var $=0,K=new Array(V);$<V;$++)K[$]=z[$];return K}function I(z,V){var $=typeof Symbol!="undefined"&&z[Symbol.iterator]||z["@@iterator"];if($)return($=$.call(z)).next.bind($);if(Array.isArray(z)||($=m(z))||V&&z&&typeof z.length=="number"){$&&(z=$);var K=0;return function(){return K>=z.length?{done:!0}:{done:!1,value:z[K++]}}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
||
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function w(){return{baseUrl:null,breaks:!1,extensions:null,gfm:!0,headerIds:!0,headerPrefix:"",highlight:null,langPrefix:"language-",mangle:!0,pedantic:!1,renderer:null,sanitize:!1,sanitizer:null,silent:!1,smartLists:!1,smartypants:!1,tokenizer:null,walkTokens:null,xhtml:!1}}j.defaults=w();function b(z){j.defaults=z}var p=/[&<>"']/,h=/[&<>"']/g,g=/[<>"']|&(?!#?\w+;)/,t=/[<>"']|&(?!#?\w+;)/g,i={"&":"&","<":"<",">":">",'"':""","'":"'"},n=function(V){return i[V]};function l(z,V){if(V){if(p.test(z))return z.replace(h,n)}else if(g.test(z))return z.replace(t,n);return z}var c=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function r(z){return z.replace(c,function(V,$){return $=$.toLowerCase(),$==="colon"?":":$.charAt(0)==="#"?$.charAt(1)==="x"?String.fromCharCode(parseInt($.substring(2),16)):String.fromCharCode(+$.substring(1)):""})}var s=/(^|[^\[])\^/g;function o(z,V){z=z.source||z,V=V||"";var $={replace:function(J,Y){return Y=Y.source||Y,Y=Y.replace(s,"$1"),z=z.replace(J,Y),$},getRegex:function(){return new RegExp(z,V)}};return $}var a=/[^\w:]/g,d=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function u(z,V,$){if(z){var K;try{K=decodeURIComponent(r($)).replace(a,"").toLowerCase()}catch{return null}if(K.indexOf("javascript:")===0||K.indexOf("vbscript:")===0||K.indexOf("data:")===0)return null}V&&!d.test($)&&($=_(V,$));try{$=encodeURI($).replace(/%25/g,"%")}catch{return null}return $}var f={},S=/^[^:]+:\/*[^/]*$/,v=/^([^:]+:)[\s\S]*$/,C=/^([^:]+:\/*[^/]*)[\s\S]*$/;function _(z,V){f[" "+z]||(S.test(z)?f[" "+z]=z+"/":f[" "+z]=k(z,"/",!0)),z=f[" "+z];var $=z.indexOf(":")===-1;return V.substring(0,2)==="//"?$?V:z.replace(v,"$1")+V:V.charAt(0)==="/"?$?V:z.replace(C,"$1")+V:z+V}var L={exec:function(){}};function E(z){for(var V=1,$,K;V<arguments.length;V++){$=arguments[V];for(K in $)Object.prototype.hasOwnProperty.call($,K)&&(z[K]=$[K])}return z}function N(z,V){var $=z.replace(/\|/g,function(Y,se,ge){for(var me=!1,le=se;--le>=0&&ge[le]==="\\";)me=!me;return me?"|":" |"}),K=$.split(/ \|/),J=0;if(K[0].trim()||K.shift(),K[K.length-1].trim()||K.pop(),K.length>V)K.splice(V);else for(;K.length<V;)K.push("");for(;J<K.length;J++)K[J]=K[J].trim().replace(/\\\|/g,"|");return K}function k(z,V,$){var K=z.length;if(K===0)return"";for(var J=0;J<K;){var Y=z.charAt(K-J-1);if(Y===V&&!$)J++;else if(Y!==V&&$)J++;else break}return z.substr(0,K-J)}function M(z,V){if(z.indexOf(V[1])===-1)return-1;for(var $=z.length,K=0,J=0;J<$;J++)if(z[J]==="\\")J++;else if(z[J]===V[0])K++;else if(z[J]===V[1]&&(K--,K<0))return J;return-1}function O(z){z&&z.sanitize&&!z.silent&&console.warn("marked(): sanitize and sanitizer parameters are deprecated since version 0.7.0, should not be used and will be removed in the future. Read more here: https://marked.js.org/#/USING_ADVANCED.md#options")}function B(z,V){if(V<1)return"";for(var $="";V>1;)V&1&&($+=z),V>>=1,z+=z;return $+z}function T(z,V,$,K){var J=V.href,Y=V.title?l(V.title):null,se=z[1].replace(/\\([\[\]])/g,"$1");if(z[0].charAt(0)!=="!"){K.state.inLink=!0;var ge={type:"link",raw:$,href:J,title:Y,text:se,tokens:K.inlineTokens(se,[])};return K.state.inLink=!1,ge}else return{type:"image",raw:$,href:J,title:Y,text:l(se)}}function R(z,V){var $=z.match(/^(\s+)(?:```)/);if($===null)return V;var K=$[1];return V.split(`
|
||
`).map(function(J){var Y=J.match(/^\s+/);if(Y===null)return J;var se=Y[0];return se.length>=K.length?J.slice(K.length):J}).join(`
|
||
`)}var P=function(){function z($){this.options=$||j.defaults}var V=z.prototype;return V.space=function(K){var J=this.rules.block.newline.exec(K);if(J&&J[0].length>0)return{type:"space",raw:J[0]}},V.code=function(K){var J=this.rules.block.code.exec(K);if(J){var Y=J[0].replace(/^ {1,4}/gm,"");return{type:"code",raw:J[0],codeBlockStyle:"indented",text:this.options.pedantic?Y:k(Y,`
|
||
`)}}},V.fences=function(K){var J=this.rules.block.fences.exec(K);if(J){var Y=J[0],se=R(Y,J[3]||"");return{type:"code",raw:Y,lang:J[2]?J[2].trim():J[2],text:se}}},V.heading=function(K){var J=this.rules.block.heading.exec(K);if(J){var Y=J[2].trim();if(/#$/.test(Y)){var se=k(Y,"#");(this.options.pedantic||!se||/ $/.test(se))&&(Y=se.trim())}var ge={type:"heading",raw:J[0],depth:J[1].length,text:Y,tokens:[]};return this.lexer.inline(ge.text,ge.tokens),ge}},V.hr=function(K){var J=this.rules.block.hr.exec(K);if(J)return{type:"hr",raw:J[0]}},V.blockquote=function(K){var J=this.rules.block.blockquote.exec(K);if(J){var Y=J[0].replace(/^ *> ?/gm,"");return{type:"blockquote",raw:J[0],tokens:this.lexer.blockTokens(Y,[]),text:Y}}},V.list=function(K){var J=this.rules.block.list.exec(K);if(J){var Y,se,ge,me,le,he,ve,pe,be,de,fe,_e,Le=J[1].trim(),Te=Le.length>1,ke={type:"list",raw:"",ordered:Te,start:Te?+Le.slice(0,-1):"",loose:!1,items:[]};Le=Te?"\\d{1,9}\\"+Le.slice(-1):"\\"+Le,this.options.pedantic&&(Le=Te?Le:"[*+-]");for(var Me=new RegExp("^( {0,3}"+Le+")((?: [^\\n]*)?(?:\\n|$))");K&&(_e=!1,!(!(J=Me.exec(K))||this.rules.block.hr.test(K)));){if(Y=J[0],K=K.substring(Y.length),pe=J[2].split(`
|
||
`,1)[0],be=K.split(`
|
||
`,1)[0],this.options.pedantic?(me=2,fe=pe.trimLeft()):(me=J[2].search(/[^ ]/),me=me>4?1:me,fe=pe.slice(me),me+=J[1].length),he=!1,!pe&&/^ *$/.test(be)&&(Y+=be+`
|
||
`,K=K.substring(be.length+1),_e=!0),!_e)for(var $e=new RegExp("^ {0,"+Math.min(3,me-1)+"}(?:[*+-]|\\d{1,9}[.)])");K&&(de=K.split(`
|
||
`,1)[0],pe=de,this.options.pedantic&&(pe=pe.replace(/^ {1,4}(?=( {4})*[^ ])/g," ")),!$e.test(pe));){if(pe.search(/[^ ]/)>=me||!pe.trim())fe+=`
|
||
`+pe.slice(me);else if(!he)fe+=`
|
||
`+pe;else break;!he&&!pe.trim()&&(he=!0),Y+=de+`
|
||
`,K=K.substring(de.length+1)}ke.loose||(ve?ke.loose=!0:/\n *\n *$/.test(Y)&&(ve=!0)),this.options.gfm&&(se=/^\[[ xX]\] /.exec(fe),se&&(ge=se[0]!=="[ ] ",fe=fe.replace(/^\[[ xX]\] +/,""))),ke.items.push({type:"list_item",raw:Y,task:!!se,checked:ge,loose:!1,text:fe}),ke.raw+=Y}ke.items[ke.items.length-1].raw=Y.trimRight(),ke.items[ke.items.length-1].text=fe.trimRight(),ke.raw=ke.raw.trimRight();var He=ke.items.length;for(le=0;le<He;le++){this.lexer.state.top=!1,ke.items[le].tokens=this.lexer.blockTokens(ke.items[le].text,[]);var Ge=ke.items[le].tokens.filter(function(Se){return Se.type==="space"}),we=Ge.every(function(Se){for(var De=Se.raw.split(""),Pe=0,Fe=I(De),xe;!(xe=Fe()).done;){var Ve=xe.value;if(Ve===`
|
||
`&&(Pe+=1),Pe>1)return!0}return!1});!ke.loose&&Ge.length&&we&&(ke.loose=!0,ke.items[le].loose=!0)}return ke}},V.html=function(K){var J=this.rules.block.html.exec(K);if(J){var Y={type:"html",raw:J[0],pre:!this.options.sanitizer&&(J[1]==="pre"||J[1]==="script"||J[1]==="style"),text:J[0]};return this.options.sanitize&&(Y.type="paragraph",Y.text=this.options.sanitizer?this.options.sanitizer(J[0]):l(J[0]),Y.tokens=[],this.lexer.inline(Y.text,Y.tokens)),Y}},V.def=function(K){var J=this.rules.block.def.exec(K);if(J){J[3]&&(J[3]=J[3].substring(1,J[3].length-1));var Y=J[1].toLowerCase().replace(/\s+/g," ");return{type:"def",tag:Y,raw:J[0],href:J[2],title:J[3]}}},V.table=function(K){var J=this.rules.block.table.exec(K);if(J){var Y={type:"table",header:N(J[1]).map(function(ve){return{text:ve}}),align:J[2].replace(/^ *|\| *$/g,"").split(/ *\| */),rows:J[3]?J[3].replace(/\n[ \t]*$/,"").split(`
|
||
`):[]};if(Y.header.length===Y.align.length){Y.raw=J[0];var se=Y.align.length,ge,me,le,he;for(ge=0;ge<se;ge++)/^ *-+: *$/.test(Y.align[ge])?Y.align[ge]="right":/^ *:-+: *$/.test(Y.align[ge])?Y.align[ge]="center":/^ *:-+ *$/.test(Y.align[ge])?Y.align[ge]="left":Y.align[ge]=null;for(se=Y.rows.length,ge=0;ge<se;ge++)Y.rows[ge]=N(Y.rows[ge],Y.header.length).map(function(ve){return{text:ve}});for(se=Y.header.length,me=0;me<se;me++)Y.header[me].tokens=[],this.lexer.inlineTokens(Y.header[me].text,Y.header[me].tokens);for(se=Y.rows.length,me=0;me<se;me++)for(he=Y.rows[me],le=0;le<he.length;le++)he[le].tokens=[],this.lexer.inlineTokens(he[le].text,he[le].tokens);return Y}}},V.lheading=function(K){var J=this.rules.block.lheading.exec(K);if(J){var Y={type:"heading",raw:J[0],depth:J[2].charAt(0)==="="?1:2,text:J[1],tokens:[]};return this.lexer.inline(Y.text,Y.tokens),Y}},V.paragraph=function(K){var J=this.rules.block.paragraph.exec(K);if(J){var Y={type:"paragraph",raw:J[0],text:J[1].charAt(J[1].length-1)===`
|
||
`?J[1].slice(0,-1):J[1],tokens:[]};return this.lexer.inline(Y.text,Y.tokens),Y}},V.text=function(K){var J=this.rules.block.text.exec(K);if(J){var Y={type:"text",raw:J[0],text:J[0],tokens:[]};return this.lexer.inline(Y.text,Y.tokens),Y}},V.escape=function(K){var J=this.rules.inline.escape.exec(K);if(J)return{type:"escape",raw:J[0],text:l(J[1])}},V.tag=function(K){var J=this.rules.inline.tag.exec(K);if(J)return!this.lexer.state.inLink&&/^<a /i.test(J[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&/^<\/a>/i.test(J[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&/^<(pre|code|kbd|script)(\s|>)/i.test(J[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(J[0])&&(this.lexer.state.inRawBlock=!1),{type:this.options.sanitize?"text":"html",raw:J[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(J[0]):l(J[0]):J[0]}},V.link=function(K){var J=this.rules.inline.link.exec(K);if(J){var Y=J[2].trim();if(!this.options.pedantic&&/^</.test(Y)){if(!/>$/.test(Y))return;var se=k(Y.slice(0,-1),"\\");if((Y.length-se.length)%2==0)return}else{var ge=M(J[2],"()");if(ge>-1){var me=J[0].indexOf("!")===0?5:4,le=me+J[1].length+ge;J[2]=J[2].substring(0,ge),J[0]=J[0].substring(0,le).trim(),J[3]=""}}var he=J[2],ve="";if(this.options.pedantic){var pe=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(he);pe&&(he=pe[1],ve=pe[3])}else ve=J[3]?J[3].slice(1,-1):"";return he=he.trim(),/^</.test(he)&&(this.options.pedantic&&!/>$/.test(Y)?he=he.slice(1):he=he.slice(1,-1)),T(J,{href:he&&he.replace(this.rules.inline._escapes,"$1"),title:ve&&ve.replace(this.rules.inline._escapes,"$1")},J[0],this.lexer)}},V.reflink=function(K,J){var Y;if((Y=this.rules.inline.reflink.exec(K))||(Y=this.rules.inline.nolink.exec(K))){var se=(Y[2]||Y[1]).replace(/\s+/g," ");if(se=J[se.toLowerCase()],!se||!se.href){var ge=Y[0].charAt(0);return{type:"text",raw:ge,text:ge}}return T(Y,se,Y[0],this.lexer)}},V.emStrong=function(K,J,Y){Y===void 0&&(Y="");var se=this.rules.inline.emStrong.lDelim.exec(K);if(!!se&&!(se[3]&&Y.match(/(?:[0-9A-Za-z\xAA\xB2\xB3\xB5\xB9\xBA\xBC-\xBE\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0560-\u0588\u05D0-\u05EA\u05EF-\u05F2\u0620-\u064A\u0660-\u0669\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07C0-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u0870-\u0887\u0889-\u088E\u08A0-\u08C9\u0904-\u0939\u093D\u0950\u0958-\u0961\u0966-\u096F\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09E6-\u09F1\u09F4-\u09F9\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A66-\u0A6F\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AE6-\u0AEF\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B66-\u0B6F\u0B71-\u0B77\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0BE6-\u0BF2\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C5D\u0C60\u0C61\u0C66-\u0C6F\u0C78-\u0C7E\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDD\u0CDE\u0CE0\u0CE1\u0CE6-\u0CEF\u0CF1\u0CF2\u0D04-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D58-\u0D61\u0D66-\u0D78\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DE6-\u0DEF\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F20-\u0F33\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F-\u1049\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u1090-\u1099\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1369-\u137C\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u1711\u171F-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u17E0-\u17E9\u17F0-\u17F9\u1810-\u1819\u1820-\u1878\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19DA\u1A00-\u1A16\u1A20-\u1A54\u1A80-\u1A89\u1A90-\u1A99\u1AA7\u1B05-\u1B33\u1B45-\u1B4C\u1B50-\u1B59\u1B83-\u1BA0\u1BAE-\u1BE5\u1C00-\u1C23\u1C40-\u1C49\u1C4D-\u1C7D\u1C80-\u1C88\u1C90-\u1CBA\u1CBD-\u1CBF\u1CE9-\u1CEC\u1CEE-\u1CF3\u1CF5\u1CF6\u1CFA\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2070\u2071\u2074-\u2079\u207F-\u2089\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2150-\u2189\u2460-\u249B\u24EA-\u24FF\u2776-\u2793\u2C00-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2CFD\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312F\u3131-\u318E\u3192-\u3195\u31A0-\u31BF\u31F0-\u31FF\u3220-\u3229\u3248-\u324F\u3251-\u325F\u3280-\u3289\u32B1-\u32BF\u3400-\u4DBF\u4E00-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7CA\uA7D0\uA7D1\uA7D3\uA7D5-\uA7D9\uA7F2-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA830-\uA835\uA840-\uA873\uA882-\uA8B3\uA8D0-\uA8D9\uA8F2-\uA8F7\uA8FB\uA8FD\uA8FE\uA900-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF-\uA9D9\uA9E0-\uA9E4\uA9E6-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA50-\uAA59\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB69\uAB70-\uABE2\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD07-\uDD33\uDD40-\uDD78\uDD8A\uDD8B\uDE80-\uDE9C\uDEA0-\uDED0\uDEE1-\uDEFB\uDF00-\uDF23\uDF2D-\uDF4A\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCA0-\uDCA9\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDD70-\uDD7A\uDD7C-\uDD8A\uDD8C-\uDD92\uDD94\uDD95\uDD97-\uDDA1\uDDA3-\uDDB1\uDDB3-\uDDB9\uDDBB\uDDBC\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67\uDF80-\uDF85\uDF87-\uDFB0\uDFB2-\uDFBA]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC58-\uDC76\uDC79-\uDC9E\uDCA7-\uDCAF\uDCE0-\uDCF2\uDCF4\uDCF5\uDCFB-\uDD1B\uDD20-\uDD39\uDD80-\uDDB7\uDDBC-\uDDCF\uDDD2-\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE35\uDE40-\uDE48\uDE60-\uDE7E\uDE80-\uDE9F\uDEC0-\uDEC7\uDEC9-\uDEE4\uDEEB-\uDEEF\uDF00-\uDF35\uDF40-\uDF55\uDF58-\uDF72\uDF78-\uDF91\uDFA9-\uDFAF]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2\uDCFA-\uDD23\uDD30-\uDD39\uDE60-\uDE7E\uDE80-\uDEA9\uDEB0\uDEB1\uDF00-\uDF27\uDF30-\uDF45\uDF51-\uDF54\uDF70-\uDF81\uDFB0-\uDFCB\uDFE0-\uDFF6]|\uD804[\uDC03-\uDC37\uDC52-\uDC6F\uDC71\uDC72\uDC75\uDC83-\uDCAF\uDCD0-\uDCE8\uDCF0-\uDCF9\uDD03-\uDD26\uDD36-\uDD3F\uDD44\uDD47\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDD0-\uDDDA\uDDDC\uDDE1-\uDDF4\uDE00-\uDE11\uDE13-\uDE2B\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDEF0-\uDEF9\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC00-\uDC34\uDC47-\uDC4A\uDC50-\uDC59\uDC5F-\uDC61\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDCD0-\uDCD9\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE50-\uDE59\uDE80-\uDEAA\uDEB8\uDEC0-\uDEC9\uDF00-\uDF1A\uDF30-\uDF3B\uDF40-\uDF46]|\uD806[\uDC00-\uDC2B\uDCA0-\uDCF2\uDCFF-\uDD06\uDD09\uDD0C-\uDD13\uDD15\uDD16\uDD18-\uDD2F\uDD3F\uDD41\uDD50-\uDD59\uDDA0-\uDDA7\uDDAA-\uDDD0\uDDE1\uDDE3\uDE00\uDE0B-\uDE32\uDE3A\uDE50\uDE5C-\uDE89\uDE9D\uDEB0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC50-\uDC6C\uDC72-\uDC8F\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD30\uDD46\uDD50-\uDD59\uDD60-\uDD65\uDD67\uDD68\uDD6A-\uDD89\uDD98\uDDA0-\uDDA9\uDEE0-\uDEF2\uDFB0\uDFC0-\uDFD4]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|\uD80B[\uDF90-\uDFF0]|[\uD80C\uD81C-\uD820\uD822\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879\uD880-\uD883][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE60-\uDE69\uDE70-\uDEBE\uDEC0-\uDEC9\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF50-\uDF59\uDF5B-\uDF61\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDE40-\uDE96\uDF00-\uDF4A\uDF50\uDF93-\uDF9F\uDFE0\uDFE1\uDFE3]|\uD821[\uDC00-\uDFF7]|\uD823[\uDC00-\uDCD5\uDD00-\uDD08]|\uD82B[\uDFF0-\uDFF3\uDFF5-\uDFFB\uDFFD\uDFFE]|\uD82C[\uDC00-\uDD22\uDD50-\uDD52\uDD64-\uDD67\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD834[\uDEE0-\uDEF3\uDF60-\uDF78]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB\uDFCE-\uDFFF]|\uD837[\uDF00-\uDF1E]|\uD838[\uDD00-\uDD2C\uDD37-\uDD3D\uDD40-\uDD49\uDD4E\uDE90-\uDEAD\uDEC0-\uDEEB\uDEF0-\uDEF9]|\uD839[\uDFE0-\uDFE6\uDFE8-\uDFEB\uDFED\uDFEE\uDFF0-\uDFFE]|\uD83A[\uDC00-\uDCC4\uDCC7-\uDCCF\uDD00-\uDD43\uDD4B\uDD50-\uDD59]|\uD83B[\uDC71-\uDCAB\uDCAD-\uDCAF\uDCB1-\uDCB4\uDD01-\uDD2D\uDD2F-\uDD3D\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD83C[\uDD00-\uDD0C]|\uD83E[\uDFF0-\uDFF9]|\uD869[\uDC00-\uDEDF\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF38\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]|\uD884[\uDC00-\uDF4A])/))){var ge=se[1]||se[2]||"";if(!ge||ge&&(Y===""||this.rules.inline.punctuation.exec(Y))){var me=se[0].length-1,le,he,ve=me,pe=0,be=se[0][0]==="*"?this.rules.inline.emStrong.rDelimAst:this.rules.inline.emStrong.rDelimUnd;for(be.lastIndex=0,J=J.slice(-1*K.length+me);(se=be.exec(J))!=null;)if(le=se[1]||se[2]||se[3]||se[4]||se[5]||se[6],!!le){if(he=le.length,se[3]||se[4]){ve+=he;continue}else if((se[5]||se[6])&&me%3&&!((me+he)%3)){pe+=he;continue}if(ve-=he,!(ve>0)){if(he=Math.min(he,he+ve+pe),Math.min(me,he)%2){var de=K.slice(1,me+se.index+he);return{type:"em",raw:K.slice(0,me+se.index+he+1),text:de,tokens:this.lexer.inlineTokens(de,[])}}var fe=K.slice(2,me+se.index+he-1);return{type:"strong",raw:K.slice(0,me+se.index+he+1),text:fe,tokens:this.lexer.inlineTokens(fe,[])}}}}}},V.codespan=function(K){var J=this.rules.inline.code.exec(K);if(J){var Y=J[2].replace(/\n/g," "),se=/[^ ]/.test(Y),ge=/^ /.test(Y)&&/ $/.test(Y);return se&&ge&&(Y=Y.substring(1,Y.length-1)),Y=l(Y,!0),{type:"codespan",raw:J[0],text:Y}}},V.br=function(K){var J=this.rules.inline.br.exec(K);if(J)return{type:"br",raw:J[0]}},V.del=function(K){var J=this.rules.inline.del.exec(K);if(J)return{type:"del",raw:J[0],text:J[2],tokens:this.lexer.inlineTokens(J[2],[])}},V.autolink=function(K,J){var Y=this.rules.inline.autolink.exec(K);if(Y){var se,ge;return Y[2]==="@"?(se=l(this.options.mangle?J(Y[1]):Y[1]),ge="mailto:"+se):(se=l(Y[1]),ge=se),{type:"link",raw:Y[0],text:se,href:ge,tokens:[{type:"text",raw:se,text:se}]}}},V.url=function(K,J){var Y;if(Y=this.rules.inline.url.exec(K)){var se,ge;if(Y[2]==="@")se=l(this.options.mangle?J(Y[0]):Y[0]),ge="mailto:"+se;else{var me;do me=Y[0],Y[0]=this.rules.inline._backpedal.exec(Y[0])[0];while(me!==Y[0]);se=l(Y[0]),Y[1]==="www."?ge="http://"+se:ge=se}return{type:"link",raw:Y[0],text:se,href:ge,tokens:[{type:"text",raw:se,text:se}]}}},V.inlineText=function(K,J){var Y=this.rules.inline.text.exec(K);if(Y){var se;return this.lexer.state.inRawBlock?se=this.options.sanitize?this.options.sanitizer?this.options.sanitizer(Y[0]):l(Y[0]):Y[0]:se=l(this.options.smartypants?J(Y[0]):Y[0]),{type:"text",raw:Y[0],text:se}}},z}(),F={newline:/^(?: *(?:\n|$))+/,code:/^( {4}[^\n]+(?:\n(?: *(?:\n|$))*)?)+/,fences:/^ {0,3}(`{3,}(?=[^`\n]*\n)|~{3,})([^\n]*)\n(?:|([\s\S]*?)\n)(?: {0,3}\1[~`]* *(?=\n|$)|$)/,hr:/^ {0,3}((?:- *){3,}|(?:_ *){3,}|(?:\* *){3,})(?:\n+|$)/,heading:/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,blockquote:/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/,list:/^( {0,3}bull)( [^\n]+?)?(?:\n|$)/,html:"^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n *)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$))",def:/^ {0,3}\[(label)\]: *(?:\n *)?<?([^\s>]+)>?(?:(?: +(?:\n *)?| *\n *)(title))? *(?:\n+|$)/,table:L,lheading:/^([^\n]+)\n {0,3}(=+|-+) *(?:\n+|$)/,_paragraph:/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,text:/^[^\n]+/};F._label=/(?!\s*\])(?:\\.|[^\[\]\\])+/,F._title=/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/,F.def=o(F.def).replace("label",F._label).replace("title",F._title).getRegex(),F.bullet=/(?:[*+-]|\d{1,9}[.)])/,F.listItemStart=o(/^( *)(bull) */).replace("bull",F.bullet).getRegex(),F.list=o(F.list).replace(/bull/g,F.bullet).replace("hr","\\n+(?=\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$))").replace("def","\\n+(?="+F.def.source+")").getRegex(),F._tag="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|section|source|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",F._comment=/<!--(?!-?>)[\s\S]*?(?:-->|$)/,F.html=o(F.html,"i").replace("comment",F._comment).replace("tag",F._tag).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),F.paragraph=o(F._paragraph).replace("hr",F.hr).replace("heading"," {0,3}#{1,6} ").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",F._tag).getRegex(),F.blockquote=o(F.blockquote).replace("paragraph",F.paragraph).getRegex(),F.normal=E({},F),F.gfm=E({},F.normal,{table:"^ *([^\\n ].*\\|.*)\\n {0,3}(?:\\| *)?(:?-+:? *(?:\\| *:?-+:? *)*)(?:\\| *)?(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)"}),F.gfm.table=o(F.gfm.table).replace("hr",F.hr).replace("heading"," {0,3}#{1,6} ").replace("blockquote"," {0,3}>").replace("code"," {4}[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",F._tag).getRegex(),F.gfm.paragraph=o(F._paragraph).replace("hr",F.hr).replace("heading"," {0,3}#{1,6} ").replace("|lheading","").replace("table",F.gfm.table).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",F._tag).getRegex(),F.pedantic=E({},F.normal,{html:o(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",F._comment).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:L,paragraph:o(F.normal._paragraph).replace("hr",F.hr).replace("heading",` *#{1,6} *[^
|
||
]`).replace("lheading",F.lheading).replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").getRegex()});var W={escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,autolink:/^<(scheme:[^\s\x00-\x1f<>]*|email)>/,url:L,tag:"^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>",link:/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/,reflink:/^!?\[(label)\]\[(ref)\]/,nolink:/^!?\[(ref)\](?:\[\])?/,reflinkSearch:"reflink|nolink(?!\\()",emStrong:{lDelim:/^(?:\*+(?:([punct_])|[^\s*]))|^_+(?:([punct*])|([^\s_]))/,rDelimAst:/^[^_*]*?\_\_[^_*]*?\*[^_*]*?(?=\_\_)|[punct_](\*+)(?=[\s]|$)|[^punct*_\s](\*+)(?=[punct_\s]|$)|[punct_\s](\*+)(?=[^punct*_\s])|[\s](\*+)(?=[punct_])|[punct_](\*+)(?=[punct_])|[^punct*_\s](\*+)(?=[^punct*_\s])/,rDelimUnd:/^[^_*]*?\*\*[^_*]*?\_[^_*]*?(?=\*\*)|[punct*](\_+)(?=[\s]|$)|[^punct*_\s](\_+)(?=[punct*\s]|$)|[punct*\s](\_+)(?=[^punct*_\s])|[\s](\_+)(?=[punct*])|[punct*](\_+)(?=[punct*])/},code:/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,br:/^( {2,}|\\)\n(?!\s*$)/,del:L,text:/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,punctuation:/^([\spunctuation])/};W._punctuation="!\"#$%&'()+\\-.,/:;<=>?@\\[\\]`^{|}~",W.punctuation=o(W.punctuation).replace(/punctuation/g,W._punctuation).getRegex(),W.blockSkip=/\[[^\]]*?\]\([^\)]*?\)|`[^`]*?`|<[^>]*?>/g,W.escapedEmSt=/\\\*|\\_/g,W._comment=o(F._comment).replace("(?:-->|$)","-->").getRegex(),W.emStrong.lDelim=o(W.emStrong.lDelim).replace(/punct/g,W._punctuation).getRegex(),W.emStrong.rDelimAst=o(W.emStrong.rDelimAst,"g").replace(/punct/g,W._punctuation).getRegex(),W.emStrong.rDelimUnd=o(W.emStrong.rDelimUnd,"g").replace(/punct/g,W._punctuation).getRegex(),W._escapes=/\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/g,W._scheme=/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/,W._email=/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/,W.autolink=o(W.autolink).replace("scheme",W._scheme).replace("email",W._email).getRegex(),W._attribute=/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/,W.tag=o(W.tag).replace("comment",W._comment).replace("attribute",W._attribute).getRegex(),W._label=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,W._href=/<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/,W._title=/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/,W.link=o(W.link).replace("label",W._label).replace("href",W._href).replace("title",W._title).getRegex(),W.reflink=o(W.reflink).replace("label",W._label).replace("ref",F._label).getRegex(),W.nolink=o(W.nolink).replace("ref",F._label).getRegex(),W.reflinkSearch=o(W.reflinkSearch,"g").replace("reflink",W.reflink).replace("nolink",W.nolink).getRegex(),W.normal=E({},W),W.pedantic=E({},W.normal,{strong:{start:/^__|\*\*/,middle:/^__(?=\S)([\s\S]*?\S)__(?!_)|^\*\*(?=\S)([\s\S]*?\S)\*\*(?!\*)/,endAst:/\*\*(?!\*)/g,endUnd:/__(?!_)/g},em:{start:/^_|\*/,middle:/^()\*(?=\S)([\s\S]*?\S)\*(?!\*)|^_(?=\S)([\s\S]*?\S)_(?!_)/,endAst:/\*(?!\*)/g,endUnd:/_(?!_)/g},link:o(/^!?\[(label)\]\((.*?)\)/).replace("label",W._label).getRegex(),reflink:o(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",W._label).getRegex()}),W.gfm=E({},W.normal,{escape:o(W.escape).replace("])","~|])").getRegex(),_extended_email:/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/,url:/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,_backpedal:/(?:[^?!.,:;*_~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])([\s\S]*?[^\s~])\1(?=[^~]|$)/,text:/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|https?:\/\/|ftp:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/}),W.gfm.url=o(W.gfm.url,"i").replace("email",W.gfm._extended_email).getRegex(),W.breaks=E({},W.gfm,{br:o(W.br).replace("{2,}","*").getRegex(),text:o(W.gfm.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()});function A(z){return z.replace(/---/g,"\u2014").replace(/--/g,"\u2013").replace(/(^|[-\u2014/(\[{"\s])'/g,"$1\u2018").replace(/'/g,"\u2019").replace(/(^|[-\u2014/(\[{\u2018\s])"/g,"$1\u201C").replace(/"/g,"\u201D").replace(/\.{3}/g,"\u2026")}function H(z){var V="",$,K,J=z.length;for($=0;$<J;$++)K=z.charCodeAt($),Math.random()>.5&&(K="x"+K.toString(16)),V+="&#"+K+";";return V}var q=function(){function z($){this.tokens=[],this.tokens.links=Object.create(null),this.options=$||j.defaults,this.options.tokenizer=this.options.tokenizer||new P,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};var K={block:F.normal,inline:W.normal};this.options.pedantic?(K.block=F.pedantic,K.inline=W.pedantic):this.options.gfm&&(K.block=F.gfm,this.options.breaks?K.inline=W.breaks:K.inline=W.gfm),this.tokenizer.rules=K}z.lex=function(K,J){var Y=new z(J);return Y.lex(K)},z.lexInline=function(K,J){var Y=new z(J);return Y.inlineTokens(K)};var V=z.prototype;return V.lex=function(K){K=K.replace(/\r\n|\r/g,`
|
||
`).replace(/\t/g," "),this.blockTokens(K,this.tokens);for(var J;J=this.inlineQueue.shift();)this.inlineTokens(J.src,J.tokens);return this.tokens},V.blockTokens=function(K,J){var Y=this;J===void 0&&(J=[]),this.options.pedantic&&(K=K.replace(/^ +$/gm,""));for(var se,ge,me,le;K;)if(!(this.options.extensions&&this.options.extensions.block&&this.options.extensions.block.some(function(ve){return(se=ve.call({lexer:Y},K,J))?(K=K.substring(se.raw.length),J.push(se),!0):!1}))){if(se=this.tokenizer.space(K)){K=K.substring(se.raw.length),se.raw.length===1&&J.length>0?J[J.length-1].raw+=`
|
||
`:J.push(se);continue}if(se=this.tokenizer.code(K)){K=K.substring(se.raw.length),ge=J[J.length-1],ge&&(ge.type==="paragraph"||ge.type==="text")?(ge.raw+=`
|
||
`+se.raw,ge.text+=`
|
||
`+se.text,this.inlineQueue[this.inlineQueue.length-1].src=ge.text):J.push(se);continue}if(se=this.tokenizer.fences(K)){K=K.substring(se.raw.length),J.push(se);continue}if(se=this.tokenizer.heading(K)){K=K.substring(se.raw.length),J.push(se);continue}if(se=this.tokenizer.hr(K)){K=K.substring(se.raw.length),J.push(se);continue}if(se=this.tokenizer.blockquote(K)){K=K.substring(se.raw.length),J.push(se);continue}if(se=this.tokenizer.list(K)){K=K.substring(se.raw.length),J.push(se);continue}if(se=this.tokenizer.html(K)){K=K.substring(se.raw.length),J.push(se);continue}if(se=this.tokenizer.def(K)){K=K.substring(se.raw.length),ge=J[J.length-1],ge&&(ge.type==="paragraph"||ge.type==="text")?(ge.raw+=`
|
||
`+se.raw,ge.text+=`
|
||
`+se.raw,this.inlineQueue[this.inlineQueue.length-1].src=ge.text):this.tokens.links[se.tag]||(this.tokens.links[se.tag]={href:se.href,title:se.title});continue}if(se=this.tokenizer.table(K)){K=K.substring(se.raw.length),J.push(se);continue}if(se=this.tokenizer.lheading(K)){K=K.substring(se.raw.length),J.push(se);continue}if(me=K,this.options.extensions&&this.options.extensions.startBlock&&function(){var ve=1/0,pe=K.slice(1),be=void 0;Y.options.extensions.startBlock.forEach(function(de){be=de.call({lexer:this},pe),typeof be=="number"&&be>=0&&(ve=Math.min(ve,be))}),ve<1/0&&ve>=0&&(me=K.substring(0,ve+1))}(),this.state.top&&(se=this.tokenizer.paragraph(me))){ge=J[J.length-1],le&&ge.type==="paragraph"?(ge.raw+=`
|
||
`+se.raw,ge.text+=`
|
||
`+se.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=ge.text):J.push(se),le=me.length!==K.length,K=K.substring(se.raw.length);continue}if(se=this.tokenizer.text(K)){K=K.substring(se.raw.length),ge=J[J.length-1],ge&&ge.type==="text"?(ge.raw+=`
|
||
`+se.raw,ge.text+=`
|
||
`+se.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=ge.text):J.push(se);continue}if(K){var he="Infinite loop on byte: "+K.charCodeAt(0);if(this.options.silent){console.error(he);break}else throw new Error(he)}}return this.state.top=!0,J},V.inline=function(K,J){this.inlineQueue.push({src:K,tokens:J})},V.inlineTokens=function(K,J){var Y=this;J===void 0&&(J=[]);var se,ge,me,le=K,he,ve,pe;if(this.tokens.links){var be=Object.keys(this.tokens.links);if(be.length>0)for(;(he=this.tokenizer.rules.inline.reflinkSearch.exec(le))!=null;)be.includes(he[0].slice(he[0].lastIndexOf("[")+1,-1))&&(le=le.slice(0,he.index)+"["+B("a",he[0].length-2)+"]"+le.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(he=this.tokenizer.rules.inline.blockSkip.exec(le))!=null;)le=le.slice(0,he.index)+"["+B("a",he[0].length-2)+"]"+le.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;(he=this.tokenizer.rules.inline.escapedEmSt.exec(le))!=null;)le=le.slice(0,he.index)+"++"+le.slice(this.tokenizer.rules.inline.escapedEmSt.lastIndex);for(;K;)if(ve||(pe=""),ve=!1,!(this.options.extensions&&this.options.extensions.inline&&this.options.extensions.inline.some(function(fe){return(se=fe.call({lexer:Y},K,J))?(K=K.substring(se.raw.length),J.push(se),!0):!1}))){if(se=this.tokenizer.escape(K)){K=K.substring(se.raw.length),J.push(se);continue}if(se=this.tokenizer.tag(K)){K=K.substring(se.raw.length),ge=J[J.length-1],ge&&se.type==="text"&&ge.type==="text"?(ge.raw+=se.raw,ge.text+=se.text):J.push(se);continue}if(se=this.tokenizer.link(K)){K=K.substring(se.raw.length),J.push(se);continue}if(se=this.tokenizer.reflink(K,this.tokens.links)){K=K.substring(se.raw.length),ge=J[J.length-1],ge&&se.type==="text"&&ge.type==="text"?(ge.raw+=se.raw,ge.text+=se.text):J.push(se);continue}if(se=this.tokenizer.emStrong(K,le,pe)){K=K.substring(se.raw.length),J.push(se);continue}if(se=this.tokenizer.codespan(K)){K=K.substring(se.raw.length),J.push(se);continue}if(se=this.tokenizer.br(K)){K=K.substring(se.raw.length),J.push(se);continue}if(se=this.tokenizer.del(K)){K=K.substring(se.raw.length),J.push(se);continue}if(se=this.tokenizer.autolink(K,H)){K=K.substring(se.raw.length),J.push(se);continue}if(!this.state.inLink&&(se=this.tokenizer.url(K,H))){K=K.substring(se.raw.length),J.push(se);continue}if(me=K,this.options.extensions&&this.options.extensions.startInline&&function(){var fe=1/0,_e=K.slice(1),Le=void 0;Y.options.extensions.startInline.forEach(function(Te){Le=Te.call({lexer:this},_e),typeof Le=="number"&&Le>=0&&(fe=Math.min(fe,Le))}),fe<1/0&&fe>=0&&(me=K.substring(0,fe+1))}(),se=this.tokenizer.inlineText(me,A)){K=K.substring(se.raw.length),se.raw.slice(-1)!=="_"&&(pe=se.raw.slice(-1)),ve=!0,ge=J[J.length-1],ge&&ge.type==="text"?(ge.raw+=se.raw,ge.text+=se.text):J.push(se);continue}if(K){var de="Infinite loop on byte: "+K.charCodeAt(0);if(this.options.silent){console.error(de);break}else throw new Error(de)}}return J},y(z,null,[{key:"rules",get:function(){return{block:F,inline:W}}}]),z}(),X=function(){function z($){this.options=$||j.defaults}var V=z.prototype;return V.code=function(K,J,Y){var se=(J||"").match(/\S*/)[0];if(this.options.highlight){var ge=this.options.highlight(K,se);ge!=null&&ge!==K&&(Y=!0,K=ge)}return K=K.replace(/\n$/,"")+`
|
||
`,se?'<pre><code class="'+this.options.langPrefix+l(se,!0)+'">'+(Y?K:l(K,!0))+`</code></pre>
|
||
`:"<pre><code>"+(Y?K:l(K,!0))+`</code></pre>
|
||
`},V.blockquote=function(K){return`<blockquote>
|
||
`+K+`</blockquote>
|
||
`},V.html=function(K){return K},V.heading=function(K,J,Y,se){return this.options.headerIds?"<h"+J+' id="'+this.options.headerPrefix+se.slug(Y)+'">'+K+"</h"+J+`>
|
||
`:"<h"+J+">"+K+"</h"+J+`>
|
||
`},V.hr=function(){return this.options.xhtml?`<hr/>
|
||
`:`<hr>
|
||
`},V.list=function(K,J,Y){var se=J?"ol":"ul",ge=J&&Y!==1?' start="'+Y+'"':"";return"<"+se+ge+`>
|
||
`+K+"</"+se+`>
|
||
`},V.listitem=function(K){return"<li>"+K+`</li>
|
||
`},V.checkbox=function(K){return"<input "+(K?'checked="" ':"")+'disabled="" type="checkbox"'+(this.options.xhtml?" /":"")+"> "},V.paragraph=function(K){return"<p>"+K+`</p>
|
||
`},V.table=function(K,J){return J&&(J="<tbody>"+J+"</tbody>"),`<table>
|
||
<thead>
|
||
`+K+`</thead>
|
||
`+J+`</table>
|
||
`},V.tablerow=function(K){return`<tr>
|
||
`+K+`</tr>
|
||
`},V.tablecell=function(K,J){var Y=J.header?"th":"td",se=J.align?"<"+Y+' align="'+J.align+'">':"<"+Y+">";return se+K+"</"+Y+`>
|
||
`},V.strong=function(K){return"<strong>"+K+"</strong>"},V.em=function(K){return"<em>"+K+"</em>"},V.codespan=function(K){return"<code>"+K+"</code>"},V.br=function(){return this.options.xhtml?"<br/>":"<br>"},V.del=function(K){return"<del>"+K+"</del>"},V.link=function(K,J,Y){if(K=u(this.options.sanitize,this.options.baseUrl,K),K===null)return Y;var se='<a href="'+l(K)+'"';return J&&(se+=' title="'+J+'"'),se+=">"+Y+"</a>",se},V.image=function(K,J,Y){if(K=u(this.options.sanitize,this.options.baseUrl,K),K===null)return Y;var se='<img src="'+K+'" alt="'+Y+'"';return J&&(se+=' title="'+J+'"'),se+=this.options.xhtml?"/>":">",se},V.text=function(K){return K},z}(),G=function(){function z(){}var V=z.prototype;return V.strong=function(K){return K},V.em=function(K){return K},V.codespan=function(K){return K},V.del=function(K){return K},V.html=function(K){return K},V.text=function(K){return K},V.link=function(K,J,Y){return""+Y},V.image=function(K,J,Y){return""+Y},V.br=function(){return""},z}(),re=function(){function z(){this.seen={}}var V=z.prototype;return V.serialize=function(K){return K.toLowerCase().trim().replace(/<[!\/a-z].*?>/ig,"").replace(/[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&()*+,./:;<=>?@[\]^`{|}~]/g,"").replace(/\s/g,"-")},V.getNextSafeSlug=function(K,J){var Y=K,se=0;if(this.seen.hasOwnProperty(Y)){se=this.seen[K];do se++,Y=K+"-"+se;while(this.seen.hasOwnProperty(Y))}return J||(this.seen[K]=se,this.seen[Y]=0),Y},V.slug=function(K,J){J===void 0&&(J={});var Y=this.serialize(K);return this.getNextSafeSlug(Y,J.dryrun)},z}(),ae=function(){function z($){this.options=$||j.defaults,this.options.renderer=this.options.renderer||new X,this.renderer=this.options.renderer,this.renderer.options=this.options,this.textRenderer=new G,this.slugger=new re}z.parse=function(K,J){var Y=new z(J);return Y.parse(K)},z.parseInline=function(K,J){var Y=new z(J);return Y.parseInline(K)};var V=z.prototype;return V.parse=function(K,J){J===void 0&&(J=!0);var Y="",se,ge,me,le,he,ve,pe,be,de,fe,_e,Le,Te,ke,Me,$e,He,Ge,we,Se=K.length;for(se=0;se<Se;se++){if(fe=K[se],this.options.extensions&&this.options.extensions.renderers&&this.options.extensions.renderers[fe.type]&&(we=this.options.extensions.renderers[fe.type].call({parser:this},fe),we!==!1||!["space","hr","heading","code","table","blockquote","list","html","paragraph","text"].includes(fe.type))){Y+=we||"";continue}switch(fe.type){case"space":continue;case"hr":{Y+=this.renderer.hr();continue}case"heading":{Y+=this.renderer.heading(this.parseInline(fe.tokens),fe.depth,r(this.parseInline(fe.tokens,this.textRenderer)),this.slugger);continue}case"code":{Y+=this.renderer.code(fe.text,fe.lang,fe.escaped);continue}case"table":{for(be="",pe="",le=fe.header.length,ge=0;ge<le;ge++)pe+=this.renderer.tablecell(this.parseInline(fe.header[ge].tokens),{header:!0,align:fe.align[ge]});for(be+=this.renderer.tablerow(pe),de="",le=fe.rows.length,ge=0;ge<le;ge++){for(ve=fe.rows[ge],pe="",he=ve.length,me=0;me<he;me++)pe+=this.renderer.tablecell(this.parseInline(ve[me].tokens),{header:!1,align:fe.align[me]});de+=this.renderer.tablerow(pe)}Y+=this.renderer.table(be,de);continue}case"blockquote":{de=this.parse(fe.tokens),Y+=this.renderer.blockquote(de);continue}case"list":{for(_e=fe.ordered,Le=fe.start,Te=fe.loose,le=fe.items.length,de="",ge=0;ge<le;ge++)Me=fe.items[ge],$e=Me.checked,He=Me.task,ke="",Me.task&&(Ge=this.renderer.checkbox($e),Te?Me.tokens.length>0&&Me.tokens[0].type==="paragraph"?(Me.tokens[0].text=Ge+" "+Me.tokens[0].text,Me.tokens[0].tokens&&Me.tokens[0].tokens.length>0&&Me.tokens[0].tokens[0].type==="text"&&(Me.tokens[0].tokens[0].text=Ge+" "+Me.tokens[0].tokens[0].text)):Me.tokens.unshift({type:"text",text:Ge}):ke+=Ge),ke+=this.parse(Me.tokens,Te),de+=this.renderer.listitem(ke,He,$e);Y+=this.renderer.list(de,_e,Le);continue}case"html":{Y+=this.renderer.html(fe.text);continue}case"paragraph":{Y+=this.renderer.paragraph(this.parseInline(fe.tokens));continue}case"text":{for(de=fe.tokens?this.parseInline(fe.tokens):fe.text;se+1<Se&&K[se+1].type==="text";)fe=K[++se],de+=`
|
||
`+(fe.tokens?this.parseInline(fe.tokens):fe.text);Y+=J?this.renderer.paragraph(de):de;continue}default:{var De='Token with "'+fe.type+'" type was not found.';if(this.options.silent){console.error(De);return}else throw new Error(De)}}}return Y},V.parseInline=function(K,J){J=J||this.renderer;var Y="",se,ge,me,le=K.length;for(se=0;se<le;se++){if(ge=K[se],this.options.extensions&&this.options.extensions.renderers&&this.options.extensions.renderers[ge.type]&&(me=this.options.extensions.renderers[ge.type].call({parser:this},ge),me!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(ge.type))){Y+=me||"";continue}switch(ge.type){case"escape":{Y+=J.text(ge.text);break}case"html":{Y+=J.html(ge.text);break}case"link":{Y+=J.link(ge.href,ge.title,this.parseInline(ge.tokens,J));break}case"image":{Y+=J.image(ge.href,ge.title,ge.text);break}case"strong":{Y+=J.strong(this.parseInline(ge.tokens,J));break}case"em":{Y+=J.em(this.parseInline(ge.tokens,J));break}case"codespan":{Y+=J.codespan(ge.text);break}case"br":{Y+=J.br();break}case"del":{Y+=J.del(this.parseInline(ge.tokens,J));break}case"text":{Y+=J.text(ge.text);break}default:{var he='Token with "'+ge.type+'" type was not found.';if(this.options.silent){console.error(he);return}else throw new Error(he)}}}return Y},z}();function oe(z,V,$){if(typeof z=="undefined"||z===null)throw new Error("marked(): input parameter is undefined or null");if(typeof z!="string")throw new Error("marked(): input parameter is of type "+Object.prototype.toString.call(z)+", string expected");if(typeof V=="function"&&($=V,V=null),V=E({},oe.defaults,V||{}),O(V),$){var K=V.highlight,J;try{J=q.lex(z,V)}catch(me){return $(me)}var Y=function(le){var he;if(!le)try{V.walkTokens&&oe.walkTokens(J,V.walkTokens),he=ae.parse(J,V)}catch(ve){le=ve}return V.highlight=K,le?$(le):$(null,he)};if(!K||K.length<3||(delete V.highlight,!J.length))return Y();var se=0;oe.walkTokens(J,function(me){me.type==="code"&&(se++,setTimeout(function(){K(me.text,me.lang,function(le,he){if(le)return Y(le);he!=null&&he!==me.text&&(me.text=he,me.escaped=!0),se--,se===0&&Y()})},0))}),se===0&&Y();return}try{var ge=q.lex(z,V);return V.walkTokens&&oe.walkTokens(ge,V.walkTokens),ae.parse(ge,V)}catch(me){if(me.message+=`
|
||
Please report this to https://github.com/markedjs/marked.`,V.silent)return"<p>An error occurred:</p><pre>"+l(me.message+"",!0)+"</pre>";throw me}}oe.options=oe.setOptions=function(z){return E(oe.defaults,z),b(oe.defaults),oe},oe.getDefaults=w,oe.defaults=j.defaults,oe.use=function(){for(var z=arguments.length,V=new Array(z),$=0;$<z;$++)V[$]=arguments[$];var K=E.apply(void 0,[{}].concat(V)),J=oe.defaults.extensions||{renderers:{},childTokens:{}},Y;V.forEach(function(se){if(se.extensions&&(Y=!0,se.extensions.forEach(function(me){if(!me.name)throw new Error("extension name required");if(me.renderer){var le=J.renderers?J.renderers[me.name]:null;le?J.renderers[me.name]=function(){for(var he=arguments.length,ve=new Array(he),pe=0;pe<he;pe++)ve[pe]=arguments[pe];var be=me.renderer.apply(this,ve);return be===!1&&(be=le.apply(this,ve)),be}:J.renderers[me.name]=me.renderer}if(me.tokenizer){if(!me.level||me.level!=="block"&&me.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");J[me.level]?J[me.level].unshift(me.tokenizer):J[me.level]=[me.tokenizer],me.start&&(me.level==="block"?J.startBlock?J.startBlock.push(me.start):J.startBlock=[me.start]:me.level==="inline"&&(J.startInline?J.startInline.push(me.start):J.startInline=[me.start]))}me.childTokens&&(J.childTokens[me.name]=me.childTokens)})),se.renderer&&function(){var me=oe.defaults.renderer||new X,le=function(pe){var be=me[pe];me[pe]=function(){for(var de=arguments.length,fe=new Array(de),_e=0;_e<de;_e++)fe[_e]=arguments[_e];var Le=se.renderer[pe].apply(me,fe);return Le===!1&&(Le=be.apply(me,fe)),Le}};for(var he in se.renderer)le(he);K.renderer=me}(),se.tokenizer&&function(){var me=oe.defaults.tokenizer||new P,le=function(pe){var be=me[pe];me[pe]=function(){for(var de=arguments.length,fe=new Array(de),_e=0;_e<de;_e++)fe[_e]=arguments[_e];var Le=se.tokenizer[pe].apply(me,fe);return Le===!1&&(Le=be.apply(me,fe)),Le}};for(var he in se.tokenizer)le(he);K.tokenizer=me}(),se.walkTokens){var ge=oe.defaults.walkTokens;K.walkTokens=function(me){se.walkTokens.call(this,me),ge&&ge.call(this,me)}}Y&&(K.extensions=J),oe.setOptions(K)})},oe.walkTokens=function(z,V){for(var $=function(){var se=J.value;switch(V.call(oe,se),se.type){case"table":{for(var ge=I(se.header),me;!(me=ge()).done;){var le=me.value;oe.walkTokens(le.tokens,V)}for(var he=I(se.rows),ve;!(ve=he()).done;)for(var pe=ve.value,be=I(pe),de;!(de=be()).done;){var fe=de.value;oe.walkTokens(fe.tokens,V)}break}case"list":{oe.walkTokens(se.items,V);break}default:oe.defaults.extensions&&oe.defaults.extensions.childTokens&&oe.defaults.extensions.childTokens[se.type]?oe.defaults.extensions.childTokens[se.type].forEach(function(_e){oe.walkTokens(se[_e],V)}):se.tokens&&oe.walkTokens(se.tokens,V)}},K=I(z),J;!(J=K()).done;)$()},oe.parseInline=function(z,V){if(typeof z=="undefined"||z===null)throw new Error("marked.parseInline(): input parameter is undefined or null");if(typeof z!="string")throw new Error("marked.parseInline(): input parameter is of type "+Object.prototype.toString.call(z)+", string expected");V=E({},oe.defaults,V||{}),O(V);try{var $=q.lexInline(z,V);return V.walkTokens&&oe.walkTokens($,V.walkTokens),ae.parseInline($,V)}catch(K){if(K.message+=`
|
||
Please report this to https://github.com/markedjs/marked.`,V.silent)return"<p>An error occurred:</p><pre>"+l(K.message+"",!0)+"</pre>";throw K}},oe.Parser=ae,oe.parser=ae.parse,oe.Renderer=X,oe.TextRenderer=G,oe.Lexer=q,oe.lexer=q.lex,oe.Tokenizer=P,oe.Slugger=re,oe.parse=oe;var Z=oe.options,x=oe.setOptions,U=oe.use,Q=oe.walkTokens,ne=oe.parseInline,ce=oe,ee=ae.parse,ue=q.lex;j.Lexer=q,j.Parser=ae,j.Renderer=X,j.Slugger=re,j.TextRenderer=G,j.Tokenizer=P,j.getDefaults=w,j.lexer=ue,j.marked=oe,j.options=Z,j.parse=ce,j.parseInline=ne,j.parser=ee,j.setOptions=x,j.use=U,j.walkTokens=Q,Object.defineProperty(j,"__esModule",{value:!0})}),define(te[135],ie([1,0]),function(j,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Mimes=void 0;var y;(function(m){m.text="text/plain",m.binary="application/octet-stream",m.unknown="application/unknown",m.markdown="text/markdown",m.latex="text/latex"})(y=e.Mimes||(e.Mimes={}))}),define(te[164],ie([1,0,135]),function(j,e,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.StaticDND=e.DragAndDropData=e.DataTransfers=void 0,e.DataTransfers={RESOURCES:"ResourceURLs",DOWNLOAD_URL:"DownloadURL",FILES:"Files",TEXT:y.Mimes.text,TERMINALS:"Terminals"};class m{constructor(I){this.data=I}update(){}getData(){return this.data}}e.DragAndDropData=m,e.StaticDND={CurrentDragAndDropData:void 0}}),define(te[312],ie([1,0]),function(j,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ArrayNavigator=void 0;class y{constructor(D,I=0,w=D.length,b=I-1){this.items=D,this.start=I,this.end=w,this.index=b}current(){return this.index===this.start-1||this.index===this.end?null:this.items[this.index]}next(){return this.index=Math.min(this.index+1,this.end),this.current()}previous(){return this.index=Math.max(this.index-1,this.start-1),this.current()}first(){return this.index=this.start,this.current()}last(){return this.index=this.end-1,this.current()}}e.ArrayNavigator=y}),define(te[313],ie([1,0,312]),function(j,e,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.HistoryNavigator=void 0;class m{constructor(I=[],w=10){this._initialize(I),this._limit=w,this._onChange()}getHistory(){return this._elements}add(I){this._history.delete(I),this._history.add(I),this._onChange()}next(){return this._currentPosition()!==this._elements.length-1?this._navigator.next():null}previous(){return this._currentPosition()!==0?this._navigator.previous():null}current(){return this._navigator.current()}first(){return this._navigator.first()}last(){return this._navigator.last()}has(I){return this._history.has(I)}_onChange(){this._reduceToLimit();const I=this._elements;this._navigator=new y.ArrayNavigator(I,0,I.length,I.length)}_reduceToLimit(){const I=this._elements;I.length>this._limit&&this._initialize(I.slice(I.length-this._limit))}_currentPosition(){const I=this._navigator.current();return I?this._elements.indexOf(I):-1}_initialize(I){this._history=new Set;for(const w of I)this._history.add(w)}get _elements(){const I=[];return this._history.forEach(w=>I.push(w)),I}}e.HistoryNavigator=m}),define(te[111],ie([1,0]),function(j,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SlidingWindowAverage=e.MovingAverage=e.clamp=void 0;function y(I,w,b){return Math.min(Math.max(I,w),b)}e.clamp=y;class m{constructor(){this._n=1,this._val=0}update(w){return this._val=this._val+(w-this._val)/this._n,this._n+=1,this._val}get value(){return this._val}}e.MovingAverage=m;class D{constructor(w){this._n=0,this._val=0,this._values=[],this._index=0,this._sum=0,this._values=new Array(w),this._values.fill(0,0,w)}update(w){const b=this._values[this._index];return this._values[this._index]=w,this._index=(this._index+1)%this._values.length,this._sum-=b,this._sum+=w,this._n<this._values.length&&(this._n+=1),this._val=this._sum/this._n,this._val}get value(){return this._val}}e.SlidingWindowAverage=D}),define(te[17],ie([1,0]),function(j,e){"use strict";var y;Object.defineProperty(e,"__esModule",{value:!0}),e.isAndroid=e.isEdge=e.isSafari=e.isFirefox=e.isChrome=e.isLittleEndian=e.OS=e.setTimeout0=e.language=e.userAgent=e.isIOS=e.isWeb=e.isNative=e.isLinux=e.isMacintosh=e.isWindows=e.globals=void 0;const m="en";let D=!1,I=!1,w=!1,b=!1,p=!1,h=!1,g=!1,t=!1,i,n=m,l,c;e.globals=typeof self=="object"?self:typeof global=="object"?global:{};let r;typeof e.globals.vscode!="undefined"&&typeof e.globals.vscode.process!="undefined"?r=e.globals.vscode.process:typeof process!="undefined"&&(r=process);const s=typeof((y=r==null?void 0:r.versions)===null||y===void 0?void 0:y.electron)=="string",o=s&&(r==null?void 0:r.type)==="renderer";if(typeof navigator=="object"&&!o)c=navigator.userAgent,D=c.indexOf("Windows")>=0,I=c.indexOf("Macintosh")>=0,t=(c.indexOf("Macintosh")>=0||c.indexOf("iPad")>=0||c.indexOf("iPhone")>=0)&&!!navigator.maxTouchPoints&&navigator.maxTouchPoints>0,w=c.indexOf("Linux")>=0,h=!0,i=navigator.language,n=i;else if(typeof r=="object"){D=r.platform==="win32",I=r.platform==="darwin",w=r.platform==="linux",b=w&&!!r.env.SNAP&&!!r.env.SNAP_REVISION,g=s,i=m,n=m;const S=r.env.VSCODE_NLS_CONFIG;if(S)try{const v=JSON.parse(S),C=v.availableLanguages["*"];i=v.locale,n=C||m,l=v._translationsConfigFile}catch{}p=!0}else console.error("Unable to resolve platform.");let a=0;I?a=1:D?a=3:w&&(a=2),e.isWindows=D,e.isMacintosh=I,e.isLinux=w,e.isNative=p,e.isWeb=h,e.isIOS=t,e.userAgent=c,e.language=n,e.setTimeout0=(()=>{if(typeof e.globals.postMessage=="function"&&!e.globals.importScripts){let S=[];e.globals.addEventListener("message",C=>{if(C.data&&C.data.vscodeScheduleAsyncWork)for(let _=0,L=S.length;_<L;_++){const E=S[_];if(E.id===C.data.vscodeScheduleAsyncWork){S.splice(_,1),E.callback();return}}});let v=0;return C=>{const _=++v;S.push({id:_,callback:C}),e.globals.postMessage({vscodeScheduleAsyncWork:_},"*")}}return S=>setTimeout(S)})(),e.OS=I||t?2:D?1:3;let d=!0,u=!1;function f(){if(!u){u=!0;const S=new Uint8Array(2);S[0]=1,S[1]=2,d=new Uint16Array(S.buffer)[0]===(2<<8)+1}return d}e.isLittleEndian=f,e.isChrome=!!(e.userAgent&&e.userAgent.indexOf("Chrome")>=0),e.isFirefox=!!(e.userAgent&&e.userAgent.indexOf("Firefox")>=0),e.isSafari=!!(!e.isChrome&&e.userAgent&&e.userAgent.indexOf("Safari")>=0),e.isEdge=!!(e.userAgent&&e.userAgent.indexOf("Edg/")>=0),e.isAndroid=!!(e.userAgent&&e.userAgent.indexOf("Android")>=0)}),define(te[314],ie([1,0,17]),function(j,e,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.platform=e.env=e.cwd=void 0;let m;if(typeof y.globals.vscode!="undefined"&&typeof y.globals.vscode.process!="undefined"){const D=y.globals.vscode.process;m={get platform(){return D.platform},get arch(){return D.arch},get env(){return D.env},cwd(){return D.cwd()}}}else typeof process!="undefined"?m={get platform(){return process.platform},get arch(){return process.arch},get env(){return process.env},cwd(){return process.env.VSCODE_CWD||process.cwd()}}:m={get platform(){return y.isWindows?"win32":y.isMacintosh?"darwin":"linux"},get arch(){},get env(){return{}},cwd(){return"/"}};e.cwd=m.cwd,e.env=m.env,e.platform=m.platform}),define(te[82],ie([1,0,314]),function(j,e,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.sep=e.extname=e.basename=e.dirname=e.relative=e.resolve=e.normalize=e.posix=e.win32=void 0;const m=65,D=97,I=90,w=122,b=46,p=47,h=92,g=58,t=63;class i extends Error{constructor(d,u,f){let S;typeof u=="string"&&u.indexOf("not ")===0?(S="must not be",u=u.replace(/^not /,"")):S="must be";const v=d.indexOf(".")!==-1?"property":"argument";let C=`The "${d}" ${v} ${S} of type ${u}`;C+=`. Received type ${typeof f}`;super(C);this.code="ERR_INVALID_ARG_TYPE"}}function n(a,d){if(typeof a!="string")throw new i(d,"string",a)}function l(a){return a===p||a===h}function c(a){return a===p}function r(a){return a>=m&&a<=I||a>=D&&a<=w}function s(a,d,u,f){let S="",v=0,C=-1,_=0,L=0;for(let E=0;E<=a.length;++E){if(E<a.length)L=a.charCodeAt(E);else{if(f(L))break;L=p}if(f(L)){if(!(C===E-1||_===1))if(_===2){if(S.length<2||v!==2||S.charCodeAt(S.length-1)!==b||S.charCodeAt(S.length-2)!==b){if(S.length>2){const N=S.lastIndexOf(u);N===-1?(S="",v=0):(S=S.slice(0,N),v=S.length-1-S.lastIndexOf(u)),C=E,_=0;continue}else if(S.length!==0){S="",v=0,C=E,_=0;continue}}d&&(S+=S.length>0?`${u}..`:"..",v=2)}else S.length>0?S+=`${u}${a.slice(C+1,E)}`:S=a.slice(C+1,E),v=E-C-1;C=E,_=0}else L===b&&_!==-1?++_:_=-1}return S}function o(a,d){if(d===null||typeof d!="object")throw new i("pathObject","Object",d);const u=d.dir||d.root,f=d.base||`${d.name||""}${d.ext||""}`;return u?u===d.root?`${u}${f}`:`${u}${a}${f}`:f}e.win32={resolve(...a){let d="",u="",f=!1;for(let S=a.length-1;S>=-1;S--){let v;if(S>=0){if(v=a[S],n(v,"path"),v.length===0)continue}else d.length===0?v=y.cwd():(v=y.env[`=${d}`]||y.cwd(),(v===void 0||v.slice(0,2).toLowerCase()!==d.toLowerCase()&&v.charCodeAt(2)===h)&&(v=`${d}\\`));const C=v.length;let _=0,L="",E=!1;const N=v.charCodeAt(0);if(C===1)l(N)&&(_=1,E=!0);else if(l(N))if(E=!0,l(v.charCodeAt(1))){let k=2,M=k;for(;k<C&&!l(v.charCodeAt(k));)k++;if(k<C&&k!==M){const O=v.slice(M,k);for(M=k;k<C&&l(v.charCodeAt(k));)k++;if(k<C&&k!==M){for(M=k;k<C&&!l(v.charCodeAt(k));)k++;(k===C||k!==M)&&(L=`\\\\${O}\\${v.slice(M,k)}`,_=k)}}}else _=1;else r(N)&&v.charCodeAt(1)===g&&(L=v.slice(0,2),_=2,C>2&&l(v.charCodeAt(2))&&(E=!0,_=3));if(L.length>0)if(d.length>0){if(L.toLowerCase()!==d.toLowerCase())continue}else d=L;if(f){if(d.length>0)break}else if(u=`${v.slice(_)}\\${u}`,f=E,E&&d.length>0)break}return u=s(u,!f,"\\",l),f?`${d}\\${u}`:`${d}${u}`||"."},normalize(a){n(a,"path");const d=a.length;if(d===0)return".";let u=0,f,S=!1;const v=a.charCodeAt(0);if(d===1)return c(v)?"\\":a;if(l(v))if(S=!0,l(a.charCodeAt(1))){let _=2,L=_;for(;_<d&&!l(a.charCodeAt(_));)_++;if(_<d&&_!==L){const E=a.slice(L,_);for(L=_;_<d&&l(a.charCodeAt(_));)_++;if(_<d&&_!==L){for(L=_;_<d&&!l(a.charCodeAt(_));)_++;if(_===d)return`\\\\${E}\\${a.slice(L)}\\`;_!==L&&(f=`\\\\${E}\\${a.slice(L,_)}`,u=_)}}}else u=1;else r(v)&&a.charCodeAt(1)===g&&(f=a.slice(0,2),u=2,d>2&&l(a.charCodeAt(2))&&(S=!0,u=3));let C=u<d?s(a.slice(u),!S,"\\",l):"";return C.length===0&&!S&&(C="."),C.length>0&&l(a.charCodeAt(d-1))&&(C+="\\"),f===void 0?S?`\\${C}`:C:S?`${f}\\${C}`:`${f}${C}`},isAbsolute(a){n(a,"path");const d=a.length;if(d===0)return!1;const u=a.charCodeAt(0);return l(u)||d>2&&r(u)&&a.charCodeAt(1)===g&&l(a.charCodeAt(2))},join(...a){if(a.length===0)return".";let d,u;for(let v=0;v<a.length;++v){const C=a[v];n(C,"path"),C.length>0&&(d===void 0?d=u=C:d+=`\\${C}`)}if(d===void 0)return".";let f=!0,S=0;if(typeof u=="string"&&l(u.charCodeAt(0))){++S;const v=u.length;v>1&&l(u.charCodeAt(1))&&(++S,v>2&&(l(u.charCodeAt(2))?++S:f=!1))}if(f){for(;S<d.length&&l(d.charCodeAt(S));)S++;S>=2&&(d=`\\${d.slice(S)}`)}return e.win32.normalize(d)},relative(a,d){if(n(a,"from"),n(d,"to"),a===d)return"";const u=e.win32.resolve(a),f=e.win32.resolve(d);if(u===f||(a=u.toLowerCase(),d=f.toLowerCase(),a===d))return"";let S=0;for(;S<a.length&&a.charCodeAt(S)===h;)S++;let v=a.length;for(;v-1>S&&a.charCodeAt(v-1)===h;)v--;const C=v-S;let _=0;for(;_<d.length&&d.charCodeAt(_)===h;)_++;let L=d.length;for(;L-1>_&&d.charCodeAt(L-1)===h;)L--;const E=L-_,N=C<E?C:E;let k=-1,M=0;for(;M<N;M++){const B=a.charCodeAt(S+M);if(B!==d.charCodeAt(_+M))break;B===h&&(k=M)}if(M!==N){if(k===-1)return f}else{if(E>N){if(d.charCodeAt(_+M)===h)return f.slice(_+M+1);if(M===2)return f.slice(_+M)}C>N&&(a.charCodeAt(S+M)===h?k=M:M===2&&(k=3)),k===-1&&(k=0)}let O="";for(M=S+k+1;M<=v;++M)(M===v||a.charCodeAt(M)===h)&&(O+=O.length===0?"..":"\\..");return _+=k,O.length>0?`${O}${f.slice(_,L)}`:(f.charCodeAt(_)===h&&++_,f.slice(_,L))},toNamespacedPath(a){if(typeof a!="string")return a;if(a.length===0)return"";const d=e.win32.resolve(a);if(d.length<=2)return a;if(d.charCodeAt(0)===h){if(d.charCodeAt(1)===h){const u=d.charCodeAt(2);if(u!==t&&u!==b)return`\\\\?\\UNC\\${d.slice(2)}`}}else if(r(d.charCodeAt(0))&&d.charCodeAt(1)===g&&d.charCodeAt(2)===h)return`\\\\?\\${d}`;return a},dirname(a){n(a,"path");const d=a.length;if(d===0)return".";let u=-1,f=0;const S=a.charCodeAt(0);if(d===1)return l(S)?a:".";if(l(S)){if(u=f=1,l(a.charCodeAt(1))){let _=2,L=_;for(;_<d&&!l(a.charCodeAt(_));)_++;if(_<d&&_!==L){for(L=_;_<d&&l(a.charCodeAt(_));)_++;if(_<d&&_!==L){for(L=_;_<d&&!l(a.charCodeAt(_));)_++;if(_===d)return a;_!==L&&(u=f=_+1)}}}}else r(S)&&a.charCodeAt(1)===g&&(u=d>2&&l(a.charCodeAt(2))?3:2,f=u);let v=-1,C=!0;for(let _=d-1;_>=f;--_)if(l(a.charCodeAt(_))){if(!C){v=_;break}}else C=!1;if(v===-1){if(u===-1)return".";v=u}return a.slice(0,v)},basename(a,d){d!==void 0&&n(d,"ext"),n(a,"path");let u=0,f=-1,S=!0,v;if(a.length>=2&&r(a.charCodeAt(0))&&a.charCodeAt(1)===g&&(u=2),d!==void 0&&d.length>0&&d.length<=a.length){if(d===a)return"";let C=d.length-1,_=-1;for(v=a.length-1;v>=u;--v){const L=a.charCodeAt(v);if(l(L)){if(!S){u=v+1;break}}else _===-1&&(S=!1,_=v+1),C>=0&&(L===d.charCodeAt(C)?--C==-1&&(f=v):(C=-1,f=_))}return u===f?f=_:f===-1&&(f=a.length),a.slice(u,f)}for(v=a.length-1;v>=u;--v)if(l(a.charCodeAt(v))){if(!S){u=v+1;break}}else f===-1&&(S=!1,f=v+1);return f===-1?"":a.slice(u,f)},extname(a){n(a,"path");let d=0,u=-1,f=0,S=-1,v=!0,C=0;a.length>=2&&a.charCodeAt(1)===g&&r(a.charCodeAt(0))&&(d=f=2);for(let _=a.length-1;_>=d;--_){const L=a.charCodeAt(_);if(l(L)){if(!v){f=_+1;break}continue}S===-1&&(v=!1,S=_+1),L===b?u===-1?u=_:C!==1&&(C=1):u!==-1&&(C=-1)}return u===-1||S===-1||C===0||C===1&&u===S-1&&u===f+1?"":a.slice(u,S)},format:o.bind(null,"\\"),parse(a){n(a,"path");const d={root:"",dir:"",base:"",ext:"",name:""};if(a.length===0)return d;const u=a.length;let f=0,S=a.charCodeAt(0);if(u===1)return l(S)?(d.root=d.dir=a,d):(d.base=d.name=a,d);if(l(S)){if(f=1,l(a.charCodeAt(1))){let k=2,M=k;for(;k<u&&!l(a.charCodeAt(k));)k++;if(k<u&&k!==M){for(M=k;k<u&&l(a.charCodeAt(k));)k++;if(k<u&&k!==M){for(M=k;k<u&&!l(a.charCodeAt(k));)k++;k===u?f=k:k!==M&&(f=k+1)}}}}else if(r(S)&&a.charCodeAt(1)===g){if(u<=2)return d.root=d.dir=a,d;if(f=2,l(a.charCodeAt(2))){if(u===3)return d.root=d.dir=a,d;f=3}}f>0&&(d.root=a.slice(0,f));let v=-1,C=f,_=-1,L=!0,E=a.length-1,N=0;for(;E>=f;--E){if(S=a.charCodeAt(E),l(S)){if(!L){C=E+1;break}continue}_===-1&&(L=!1,_=E+1),S===b?v===-1?v=E:N!==1&&(N=1):v!==-1&&(N=-1)}return _!==-1&&(v===-1||N===0||N===1&&v===_-1&&v===C+1?d.base=d.name=a.slice(C,_):(d.name=a.slice(C,v),d.base=a.slice(C,_),d.ext=a.slice(v,_))),C>0&&C!==f?d.dir=a.slice(0,C-1):d.dir=d.root,d},sep:"\\",delimiter:";",win32:null,posix:null},e.posix={resolve(...a){let d="",u=!1;for(let f=a.length-1;f>=-1&&!u;f--){const S=f>=0?a[f]:y.cwd();n(S,"path"),S.length!==0&&(d=`${S}/${d}`,u=S.charCodeAt(0)===p)}return d=s(d,!u,"/",c),u?`/${d}`:d.length>0?d:"."},normalize(a){if(n(a,"path"),a.length===0)return".";const d=a.charCodeAt(0)===p,u=a.charCodeAt(a.length-1)===p;return a=s(a,!d,"/",c),a.length===0?d?"/":u?"./":".":(u&&(a+="/"),d?`/${a}`:a)},isAbsolute(a){return n(a,"path"),a.length>0&&a.charCodeAt(0)===p},join(...a){if(a.length===0)return".";let d;for(let u=0;u<a.length;++u){const f=a[u];n(f,"path"),f.length>0&&(d===void 0?d=f:d+=`/${f}`)}return d===void 0?".":e.posix.normalize(d)},relative(a,d){if(n(a,"from"),n(d,"to"),a===d||(a=e.posix.resolve(a),d=e.posix.resolve(d),a===d))return"";const u=1,f=a.length,S=f-u,v=1,C=d.length-v,_=S<C?S:C;let L=-1,E=0;for(;E<_;E++){const k=a.charCodeAt(u+E);if(k!==d.charCodeAt(v+E))break;k===p&&(L=E)}if(E===_)if(C>_){if(d.charCodeAt(v+E)===p)return d.slice(v+E+1);if(E===0)return d.slice(v+E)}else S>_&&(a.charCodeAt(u+E)===p?L=E:E===0&&(L=0));let N="";for(E=u+L+1;E<=f;++E)(E===f||a.charCodeAt(E)===p)&&(N+=N.length===0?"..":"/..");return`${N}${d.slice(v+L)}`},toNamespacedPath(a){return a},dirname(a){if(n(a,"path"),a.length===0)return".";const d=a.charCodeAt(0)===p;let u=-1,f=!0;for(let S=a.length-1;S>=1;--S)if(a.charCodeAt(S)===p){if(!f){u=S;break}}else f=!1;return u===-1?d?"/":".":d&&u===1?"//":a.slice(0,u)},basename(a,d){d!==void 0&&n(d,"ext"),n(a,"path");let u=0,f=-1,S=!0,v;if(d!==void 0&&d.length>0&&d.length<=a.length){if(d===a)return"";let C=d.length-1,_=-1;for(v=a.length-1;v>=0;--v){const L=a.charCodeAt(v);if(L===p){if(!S){u=v+1;break}}else _===-1&&(S=!1,_=v+1),C>=0&&(L===d.charCodeAt(C)?--C==-1&&(f=v):(C=-1,f=_))}return u===f?f=_:f===-1&&(f=a.length),a.slice(u,f)}for(v=a.length-1;v>=0;--v)if(a.charCodeAt(v)===p){if(!S){u=v+1;break}}else f===-1&&(S=!1,f=v+1);return f===-1?"":a.slice(u,f)},extname(a){n(a,"path");let d=-1,u=0,f=-1,S=!0,v=0;for(let C=a.length-1;C>=0;--C){const _=a.charCodeAt(C);if(_===p){if(!S){u=C+1;break}continue}f===-1&&(S=!1,f=C+1),_===b?d===-1?d=C:v!==1&&(v=1):d!==-1&&(v=-1)}return d===-1||f===-1||v===0||v===1&&d===f-1&&d===u+1?"":a.slice(d,f)},format:o.bind(null,"/"),parse(a){n(a,"path");const d={root:"",dir:"",base:"",ext:"",name:""};if(a.length===0)return d;const u=a.charCodeAt(0)===p;let f;u?(d.root="/",f=1):f=0;let S=-1,v=0,C=-1,_=!0,L=a.length-1,E=0;for(;L>=f;--L){const N=a.charCodeAt(L);if(N===p){if(!_){v=L+1;break}continue}C===-1&&(_=!1,C=L+1),N===b?S===-1?S=L:E!==1&&(E=1):S!==-1&&(E=-1)}if(C!==-1){const N=v===0&&u?1:v;S===-1||E===0||E===1&&S===C-1&&S===v+1?d.base=d.name=a.slice(N,C):(d.name=a.slice(N,S),d.base=a.slice(N,C),d.ext=a.slice(S,C))}return v>0?d.dir=a.slice(0,v-1):u&&(d.dir="/"),d},sep:"/",delimiter:":",win32:null,posix:null},e.posix.win32=e.win32.win32=e.win32,e.posix.posix=e.win32.posix=e.posix,e.normalize=y.platform==="win32"?e.win32.normalize:e.posix.normalize,e.resolve=y.platform==="win32"?e.win32.resolve:e.posix.resolve,e.relative=y.platform==="win32"?e.win32.relative:e.posix.relative,e.dirname=y.platform==="win32"?e.win32.dirname:e.posix.dirname,e.basename=y.platform==="win32"?e.win32.basename:e.posix.basename,e.extname=y.platform==="win32"?e.win32.extname:e.posix.extname,e.sep=y.platform==="win32"?e.win32.sep:e.posix.sep}),define(te[136],ie([1,0]),function(j,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Range=void 0;var y;(function(m){function D(p,h){if(p.start>=h.end||h.start>=p.end)return{start:0,end:0};const g=Math.max(p.start,h.start),t=Math.min(p.end,h.end);return t-g<=0?{start:0,end:0}:{start:g,end:t}}m.intersect=D;function I(p){return p.end-p.start<=0}m.isEmpty=I;function w(p,h){return!I(D(p,h))}m.intersects=w;function b(p,h){const g=[],t={start:p.start,end:Math.min(h.start,p.end)},i={start:Math.max(h.end,p.start),end:p.end};return I(t)||g.push(t),I(i)||g.push(i),g}m.relativeComplement=b})(y=e.Range||(e.Range={}))}),define(te[315],ie([1,0,136]),function(j,e,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.RangeMap=e.consolidate=e.shift=e.groupIntersect=void 0;function m(p,h){const g=[];for(let t of h){if(p.start>=t.range.end)continue;if(p.end<t.range.start)break;const i=y.Range.intersect(p,t.range);y.Range.isEmpty(i)||g.push({range:i,size:t.size})}return g}e.groupIntersect=m;function D({start:p,end:h},g){return{start:p+g,end:h+g}}e.shift=D;function I(p){const h=[];let g=null;for(let t of p){const i=t.range.start,n=t.range.end,l=t.size;if(g&&l===g.size){g.range.end=n;continue}g={range:{start:i,end:n},size:l},h.push(g)}return h}e.consolidate=I;function w(...p){return I(p.reduce((h,g)=>h.concat(g),[]))}class b{constructor(){this.groups=[],this._size=0}splice(h,g,t=[]){const i=t.length-g,n=m({start:0,end:h},this.groups),l=m({start:h+g,end:Number.POSITIVE_INFINITY},this.groups).map(r=>({range:D(r.range,i),size:r.size})),c=t.map((r,s)=>({range:{start:h+s,end:h+s+1},size:r.size}));this.groups=w(n,c,l),this._size=this.groups.reduce((r,s)=>r+s.size*(s.range.end-s.range.start),0)}get count(){const h=this.groups.length;return h?this.groups[h-1].range.end:0}get size(){return this._size}indexAt(h){if(h<0)return-1;let g=0,t=0;for(let i of this.groups){const n=i.range.end-i.range.start,l=t+n*i.size;if(h<l)return g+Math.floor((h-t)/i.size);g+=n,t=l}return g}indexAfter(h){return Math.min(this.indexAt(h)+1,this.count)}positionAt(h){if(h<0)return-1;let g=0,t=0;for(let i of this.groups){const n=i.range.end-i.range.start,l=t+n;if(h<l)return g+(h-t)*i.size;g+=n*i.size,t=l}return-1}}e.RangeMap=b}),define(te[65],ie([1,0,17]),function(j,e,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.StopWatch=void 0;const m=y.globals.performance&&typeof y.globals.performance.now=="function";class D{constructor(w){this._highResolution=m&&w,this._startTime=this._now(),this._stopTime=-1}static create(w=!0){return new D(w)}stop(){this._stopTime=this._now()}elapsed(){return this._stopTime!==-1?this._stopTime-this._startTime:this._now()-this._startTime}_now(){return this._highResolution?y.globals.performance.now():Date.now()}}e.StopWatch=D}),define(te[4],ie([1,0,13,2,81,65]),function(j,e,y,m,D,I){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Relay=e.EventBufferer=e.DebounceEmitter=e.PauseableEmitter=e.Emitter=e.Event=void 0;var w;(function(c){c.None=()=>m.Disposable.None;function r(P){return(F,W=null,A)=>{let H=!1,q;return q=P(X=>{if(!H)return q?q.dispose():H=!0,F.call(W,X)},null,A),H&&q.dispose(),q}}c.once=r;function s(P,F){return S((W,A=null,H)=>P(q=>W.call(A,F(q)),null,H))}c.map=s;function o(P,F){return S((W,A=null,H)=>P(q=>{F(q),W.call(A,q)},null,H))}c.forEach=o;function a(P,F){return S((W,A=null,H)=>P(q=>F(q)&&W.call(A,q),null,H))}c.filter=a;function d(P){return P}c.signal=d;function u(...P){return(F,W=null,A)=>(0,m.combinedDisposable)(...P.map(H=>H(q=>F.call(W,q),null,A)))}c.any=u;function f(P,F,W){let A=W;return s(P,H=>(A=F(A,H),A))}c.reduce=f;function S(P){let F;const W=new g({onFirstListenerAdd(){F=P(W.fire,W)},onLastListenerRemove(){F.dispose()}});return W.event}function v(P,F,W,A=100,H=!1){let q,X,G=0;return P(re=>{G++,q=W(q,re),H&&!X&&(F(q),q=void 0),clearTimeout(X),X=setTimeout(()=>{const ae=q;q=void 0,X=void 0,(!H||G>1)&&F(ae),G=0},A)})}c.debouncedListener=v;function C(P,F,W=100,A=!1,H){let q,X,G,re=0;const ae=new g({leakWarningThreshold:H,onFirstListenerAdd(){q=P(oe=>{re++,X=F(X,oe),A&&!G&&(ae.fire(X),X=void 0),clearTimeout(G),G=setTimeout(()=>{const Z=X;X=void 0,G=void 0,(!A||re>1)&&ae.fire(Z),re=0},W)})},onLastListenerRemove(){q.dispose()}});return ae.event}c.debounce=C;function _(P,F=(W,A)=>W===A){let W=!0,A;return a(P,H=>{const q=W||!F(H,A);return W=!1,A=H,q})}c.latch=_;function L(P,F){return[c.filter(P,F),c.filter(P,W=>!F(W))]}c.split=L;function E(P,F=!1,W=[]){let A=W.slice(),H=P(G=>{A?A.push(G):X.fire(G)});const q=()=>{A&&A.forEach(G=>X.fire(G)),A=null},X=new g({onFirstListenerAdd(){H||(H=P(G=>X.fire(G)))},onFirstListenerDidAdd(){A&&(F?setTimeout(q):q())},onLastListenerRemove(){H&&H.dispose(),H=null}});return X.event}c.buffer=E;class N{constructor(F){this.event=F}map(F){return new N(s(this.event,F))}forEach(F){return new N(o(this.event,F))}filter(F){return new N(a(this.event,F))}reduce(F,W){return new N(f(this.event,F,W))}latch(){return new N(_(this.event))}debounce(F,W=100,A=!1,H){return new N(C(this.event,F,W,A,H))}on(F,W,A){return this.event(F,W,A)}once(F,W,A){return r(this.event)(F,W,A)}}function k(P){return new N(P)}c.chain=k;function M(P,F,W=A=>A){const A=(...G)=>X.fire(W(...G)),H=()=>P.on(F,A),q=()=>P.removeListener(F,A),X=new g({onFirstListenerAdd:H,onLastListenerRemove:q});return X.event}c.fromNodeEventEmitter=M;function O(P,F,W=A=>A){const A=(...G)=>X.fire(W(...G)),H=()=>P.addEventListener(F,A),q=()=>P.removeEventListener(F,A),X=new g({onFirstListenerAdd:H,onLastListenerRemove:q});return X.event}c.fromDOMEventEmitter=O;function B(P){return new Promise(F=>r(P)(F))}c.toPromise=B;function T(P,F){return F(void 0),P(W=>F(W))}c.runAndSubscribe=T;function R(P,F){let W=null;function A(q){W==null||W.dispose(),W=new m.DisposableStore,F(q,W)}A(void 0);const H=P(q=>A(q));return(0,m.toDisposable)(()=>{H.dispose(),W==null||W.dispose()})}c.runAndSubscribeWithStore=R})(w=e.Event||(e.Event={}));class b{constructor(r){this._listenerCount=0,this._invocationCount=0,this._elapsedOverall=0,this._name=`${r}_${b._idPool++}`}start(r){this._stopWatch=new I.StopWatch(!0),this._listenerCount=r}stop(){if(this._stopWatch){const r=this._stopWatch.elapsed();this._elapsedOverall+=r,this._invocationCount+=1,console.info(`did FIRE ${this._name}: elapsed_ms: ${r.toFixed(5)}, listener: ${this._listenerCount} (elapsed_overall: ${this._elapsedOverall.toFixed(2)}, invocations: ${this._invocationCount})`),this._stopWatch=void 0}}}b._idPool=0;let p=-1;class h{constructor(r,s=Math.random().toString(18).slice(2,5)){this.customThreshold=r,this.name=s,this._warnCountdown=0}dispose(){this._stacks&&this._stacks.clear()}check(r){let s=p;if(typeof this.customThreshold=="number"&&(s=this.customThreshold),s<=0||r<s)return;this._stacks||(this._stacks=new Map);const o=new Error().stack.split(`
|
||
`).slice(3).join(`
|
||
`),a=this._stacks.get(o)||0;if(this._stacks.set(o,a+1),this._warnCountdown-=1,this._warnCountdown<=0){this._warnCountdown=s*.5;let d,u=0;for(const[f,S]of this._stacks)(!d||u<S)&&(d=f,u=S);console.warn(`[${this.name}] potential listener LEAK detected, having ${r} listeners already. MOST frequent listener (${u}):`),console.warn(d)}return()=>{const d=this._stacks.get(o)||0;this._stacks.set(o,d-1)}}}class g{constructor(r){var s;this._disposed=!1,this._options=r,this._leakageMon=p>0?new h(this._options&&this._options.leakWarningThreshold):void 0,this._perfMon=((s=this._options)===null||s===void 0?void 0:s._profName)?new b(this._options._profName):void 0}get event(){return this._event||(this._event=(r,s,o)=>{var a;this._listeners||(this._listeners=new D.LinkedList);const d=this._listeners.isEmpty();d&&this._options&&this._options.onFirstListenerAdd&&this._options.onFirstListenerAdd(this);const u=this._listeners.push(s?[r,s]:r);d&&this._options&&this._options.onFirstListenerDidAdd&&this._options.onFirstListenerDidAdd(this),this._options&&this._options.onListenerDidAdd&&this._options.onListenerDidAdd(this,r,s);const f=(a=this._leakageMon)===null||a===void 0?void 0:a.check(this._listeners.size),S=(0,m.toDisposable)(()=>{f&&f(),this._disposed||(u(),this._options&&this._options.onLastListenerRemove&&(this._listeners&&!this._listeners.isEmpty()||this._options.onLastListenerRemove(this)))});return o instanceof m.DisposableStore?o.add(S):Array.isArray(o)&&o.push(S),S}),this._event}fire(r){var s,o;if(this._listeners){this._deliveryQueue||(this._deliveryQueue=new D.LinkedList);for(let a of this._listeners)this._deliveryQueue.push([a,r]);for((s=this._perfMon)===null||s===void 0||s.start(this._deliveryQueue.size);this._deliveryQueue.size>0;){const[a,d]=this._deliveryQueue.shift();try{typeof a=="function"?a.call(void 0,d):a[0].call(a[1],d)}catch(u){(0,y.onUnexpectedError)(u)}}(o=this._perfMon)===null||o===void 0||o.stop()}}dispose(){var r,s,o,a,d;this._disposed||(this._disposed=!0,(r=this._listeners)===null||r===void 0||r.clear(),(s=this._deliveryQueue)===null||s===void 0||s.clear(),(a=(o=this._options)===null||o===void 0?void 0:o.onLastListenerRemove)===null||a===void 0||a.call(o),(d=this._leakageMon)===null||d===void 0||d.dispose())}}e.Emitter=g;class t extends g{constructor(r){super(r);this._isPaused=0,this._eventQueue=new D.LinkedList,this._mergeFn=r==null?void 0:r.merge}pause(){this._isPaused++}resume(){if(this._isPaused!==0&&--this._isPaused==0)if(this._mergeFn){const r=Array.from(this._eventQueue);this._eventQueue.clear(),super.fire(this._mergeFn(r))}else for(;!this._isPaused&&this._eventQueue.size!==0;)super.fire(this._eventQueue.shift())}fire(r){this._listeners&&(this._isPaused!==0?this._eventQueue.push(r):super.fire(r))}}e.PauseableEmitter=t;class i extends t{constructor(r){var s;super(r);this._delay=(s=r.delay)!==null&&s!==void 0?s:100}fire(r){this._handle||(this.pause(),this._handle=setTimeout(()=>{this._handle=void 0,this.resume()},this._delay)),super.fire(r)}}e.DebounceEmitter=i;class n{constructor(){this.buffers=[]}wrapEvent(r){return(s,o,a)=>r(d=>{const u=this.buffers[this.buffers.length-1];u?u.push(()=>s.call(o,d)):s.call(o,d)},void 0,a)}bufferEvents(r){const s=[];this.buffers.push(s);const o=r();return this.buffers.pop(),s.forEach(a=>a()),o}}e.EventBufferer=n;class l{constructor(){this.listening=!1,this.inputEvent=w.None,this.inputEventListener=m.Disposable.None,this.emitter=new g({onFirstListenerDidAdd:()=>{this.listening=!0,this.inputEventListener=this.inputEvent(this.emitter.fire,this.emitter)},onLastListenerRemove:()=>{this.listening=!1,this.inputEventListener.dispose()}}),this.event=this.emitter.event}set input(r){this.inputEvent=r,this.listening&&(this.inputEventListener.dispose(),this.inputEventListener=r(this.emitter.fire,this.emitter))}dispose(){this.inputEventListener.dispose(),this.emitter.dispose()}}e.Relay=l}),define(te[34],ie([1,0,4,2]),function(j,e,y,m){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.isStandalone=e.isAndroid=e.isElectron=e.isEdgeLegacyWebView=e.isWebkitWebView=e.isSafari=e.isChrome=e.isWebKit=e.isFirefox=e.getZoomFactor=e.PixelRatio=void 0;class D{constructor(){this._zoomFactor=1}getZoomFactor(){return this._zoomFactor}}D.INSTANCE=new D;class I extends m.Disposable{constructor(){super();this._onDidChange=this._register(new y.Emitter),this.onDidChange=this._onDidChange.event,this._value=this._getPixelRatio(),this._removeListener=this._installResolutionListener()}get value(){return this._value}dispose(){this._removeListener(),super.dispose()}_installResolutionListener(){const g=matchMedia(`(resolution: ${window.devicePixelRatio}dppx)`),t=()=>this._updateValue();return g.addEventListener("change",t),()=>{g.removeEventListener("change",t)}}_updateValue(){this._value=this._getPixelRatio(),this._onDidChange.fire(this._value),this._removeListener=this._installResolutionListener()}_getPixelRatio(){const g=document.createElement("canvas").getContext("2d"),t=window.devicePixelRatio||1,i=g.webkitBackingStorePixelRatio||g.mozBackingStorePixelRatio||g.msBackingStorePixelRatio||g.oBackingStorePixelRatio||g.backingStorePixelRatio||1;return t/i}}class w{constructor(){this._pixelRatioMonitor=null}_getOrCreatePixelRatioMonitor(){return this._pixelRatioMonitor||(this._pixelRatioMonitor=new I),this._pixelRatioMonitor}get value(){return this._getOrCreatePixelRatioMonitor().value}get onDidChange(){return this._getOrCreatePixelRatioMonitor().onDidChange}}e.PixelRatio=new w;function b(){return D.INSTANCE.getZoomFactor()}e.getZoomFactor=b;const p=navigator.userAgent;e.isFirefox=p.indexOf("Firefox")>=0,e.isWebKit=p.indexOf("AppleWebKit")>=0,e.isChrome=p.indexOf("Chrome")>=0,e.isSafari=!e.isChrome&&p.indexOf("Safari")>=0,e.isWebkitWebView=!e.isChrome&&!e.isSafari&&e.isWebKit,e.isEdgeLegacyWebView=p.indexOf("Edge/")>=0&&p.indexOf("WebView/")>=0,e.isElectron=p.indexOf("Electron/")>=0,e.isAndroid=p.indexOf("Android")>=0,e.isStandalone=window.matchMedia&&window.matchMedia("(display-mode: standalone)").matches}),define(te[165],ie([1,0,34,17]),function(j,e,y,m){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BrowserFeatures=void 0,e.BrowserFeatures={clipboard:{writeText:m.isNative||document.queryCommandSupported&&document.queryCommandSupported("copy")||!!(navigator&&navigator.clipboard&&navigator.clipboard.writeText),readText:m.isNative||!!(navigator&&navigator.clipboard&&navigator.clipboard.readText)},keyboard:(()=>m.isNative||y.isStandalone?0:navigator.keyboard||y.isSafari?1:2)(),touch:"ontouchstart"in window||navigator.maxTouchPoints>0,pointerEvents:window.PointerEvent&&("ontouchstart"in window||window.navigator.maxTouchPoints>0||navigator.maxTouchPoints>0)}}),define(te[89],ie([1,0,4]),function(j,e,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.stopEvent=e.DomEmitter=void 0;class m{constructor(w,b,p){const h=g=>this.emitter.fire(g);this.emitter=new y.Emitter({onFirstListenerAdd:()=>w.addEventListener(b,h,p),onLastListenerRemove:()=>w.removeEventListener(b,h,p)})}get event(){return this.emitter.event}dispose(){this.emitter.dispose()}}e.DomEmitter=m;function D(I){return I.preventDefault(),I.stopPropagation(),I}e.stopEvent=D}),define(te[46],ie([1,0,34,55,94,17]),function(j,e,y,m,D,I){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.StandardKeyboardEvent=void 0;function w(i){if(i.charCode){let l=String.fromCharCode(i.charCode).toUpperCase();return m.KeyCodeUtils.fromString(l)}const n=i.keyCode;if(n===3)return 7;if(y.isFirefox){if(n===59)return 80;if(n===107)return 81;if(n===109)return 83;if(I.isMacintosh&&n===224)return 57}else if(y.isWebKit){if(n===91)return 57;if(I.isMacintosh&&n===93)return 57;if(!I.isMacintosh&&n===92)return 57}return m.EVENT_KEY_CODE_MAP[n]||0}const b=I.isMacintosh?256:2048,p=512,h=1024,g=I.isMacintosh?2048:256;class t{constructor(n){this._standardKeyboardEventBrand=!0;let l=n;this.browserEvent=l,this.target=l.target,this.ctrlKey=l.ctrlKey,this.shiftKey=l.shiftKey,this.altKey=l.altKey,this.metaKey=l.metaKey,this.keyCode=w(l),this.code=l.code,this.ctrlKey=this.ctrlKey||this.keyCode===5,this.altKey=this.altKey||this.keyCode===6,this.shiftKey=this.shiftKey||this.keyCode===4,this.metaKey=this.metaKey||this.keyCode===57,this._asKeybinding=this._computeKeybinding(),this._asRuntimeKeybinding=this._computeRuntimeKeybinding()}preventDefault(){this.browserEvent&&this.browserEvent.preventDefault&&this.browserEvent.preventDefault()}stopPropagation(){this.browserEvent&&this.browserEvent.stopPropagation&&this.browserEvent.stopPropagation()}toKeybinding(){return this._asRuntimeKeybinding}equals(n){return this._asKeybinding===n}_computeKeybinding(){let n=0;this.keyCode!==5&&this.keyCode!==4&&this.keyCode!==6&&this.keyCode!==57&&(n=this.keyCode);let l=0;return this.ctrlKey&&(l|=b),this.altKey&&(l|=p),this.shiftKey&&(l|=h),this.metaKey&&(l|=g),l|=n,l}_computeRuntimeKeybinding(){let n=0;return this.keyCode!==5&&this.keyCode!==4&&this.keyCode!==6&&this.keyCode!==57&&(n=this.keyCode),new D.SimpleKeybinding(this.ctrlKey,this.shiftKey,this.altKey,this.metaKey,n)}}e.StandardKeyboardEvent=t}),define(te[56],ie([1,0,34,211,17]),function(j,e,y,m,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.StandardWheelEvent=e.StandardMouseEvent=void 0;class I{constructor(p){this.timestamp=Date.now(),this.browserEvent=p,this.leftButton=p.button===0,this.middleButton=p.button===1,this.rightButton=p.button===2,this.buttons=p.buttons,this.target=p.target,this.detail=p.detail||1,p.type==="dblclick"&&(this.detail=2),this.ctrlKey=p.ctrlKey,this.shiftKey=p.shiftKey,this.altKey=p.altKey,this.metaKey=p.metaKey,typeof p.pageX=="number"?(this.posx=p.pageX,this.posy=p.pageY):(this.posx=p.clientX+document.body.scrollLeft+document.documentElement.scrollLeft,this.posy=p.clientY+document.body.scrollTop+document.documentElement.scrollTop);let h=m.IframeUtils.getPositionOfChildWindowRelativeToAncestorWindow(self,p.view);this.posx-=h.left,this.posy-=h.top}preventDefault(){this.browserEvent.preventDefault()}stopPropagation(){this.browserEvent.stopPropagation()}}e.StandardMouseEvent=I;class w{constructor(p,h=0,g=0){if(this.browserEvent=p||null,this.target=p?p.target||p.targetNode||p.srcElement:null,this.deltaY=g,this.deltaX=h,p){let t=p,i=p;if(typeof t.wheelDeltaY!="undefined")this.deltaY=t.wheelDeltaY/120;else if(typeof i.VERTICAL_AXIS!="undefined"&&i.axis===i.VERTICAL_AXIS)this.deltaY=-i.detail/3;else if(p.type==="wheel"){const n=p;n.deltaMode===n.DOM_DELTA_LINE?y.isFirefox&&!D.isMacintosh?this.deltaY=-p.deltaY/3:this.deltaY=-p.deltaY:this.deltaY=-p.deltaY/40}if(typeof t.wheelDeltaX!="undefined")y.isSafari&&D.isWindows?this.deltaX=-(t.wheelDeltaX/120):this.deltaX=t.wheelDeltaX/120;else if(typeof i.HORIZONTAL_AXIS!="undefined"&&i.axis===i.HORIZONTAL_AXIS)this.deltaX=-p.detail/3;else if(p.type==="wheel"){const n=p;n.deltaMode===n.DOM_DELTA_LINE?y.isFirefox&&!D.isMacintosh?this.deltaX=-p.deltaX/3:this.deltaX=-p.deltaX:this.deltaX=-p.deltaX/40}this.deltaY===0&&this.deltaX===0&&p.wheelDelta&&(this.deltaY=p.wheelDelta/120)}}preventDefault(){this.browserEvent&&this.browserEvent.preventDefault()}stopPropagation(){this.browserEvent&&this.browserEvent.stopPropagation()}}e.StandardWheelEvent=w}),define(te[21],ie([1,0,4]),function(j,e,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CancellationTokenSource=e.CancellationToken=void 0;const m=Object.freeze(function(b,p){const h=setTimeout(b.bind(p),0);return{dispose(){clearTimeout(h)}}});var D;(function(b){function p(h){return h===b.None||h===b.Cancelled||h instanceof I?!0:!h||typeof h!="object"?!1:typeof h.isCancellationRequested=="boolean"&&typeof h.onCancellationRequested=="function"}b.isCancellationToken=p,b.None=Object.freeze({isCancellationRequested:!1,onCancellationRequested:y.Event.None}),b.Cancelled=Object.freeze({isCancellationRequested:!0,onCancellationRequested:m})})(D=e.CancellationToken||(e.CancellationToken={}));class I{constructor(){this._isCancelled=!1,this._emitter=null}cancel(){this._isCancelled||(this._isCancelled=!0,this._emitter&&(this._emitter.fire(void 0),this.dispose()))}get isCancellationRequested(){return this._isCancelled}get onCancellationRequested(){return this._isCancelled?m:(this._emitter||(this._emitter=new y.Emitter),this._emitter.event)}dispose(){this._emitter&&(this._emitter.dispose(),this._emitter=null)}}class w{constructor(p){this._token=void 0,this._parentListener=void 0,this._parentListener=p&&p.onCancellationRequested(this.cancel,this)}get token(){return this._token||(this._token=new I),this._token}cancel(){this._token?this._token instanceof I&&this._token.cancel():this._token=D.Cancelled}dispose(p=!1){p&&this.cancel(),this._parentListener&&this._parentListener.dispose(),this._token?this._token instanceof I&&this._token.dispose():this._token=D.None}}e.CancellationTokenSource=w});var ye=this&&this.__awaiter||function(j,e,y,m){function D(I){return I instanceof y?I:new y(function(w){w(I)})}return new(y||(y=Promise))(function(I,w){function b(g){try{h(m.next(g))}catch(t){w(t)}}function p(g){try{h(m.throw(g))}catch(t){w(t)}}function h(g){g.done?I(g.value):D(g.value).then(b,p)}h((m=m.apply(j,e||[])).next())})},pt=this&&this.__asyncValues||function(j){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var e=j[Symbol.asyncIterator],y;return e?e.call(j):(j=typeof __values=="function"?__values(j):j[Symbol.iterator](),y={},m("next"),m("throw"),m("return"),y[Symbol.asyncIterator]=function(){return this},y);function m(I){y[I]=j[I]&&function(w){return new Promise(function(b,p){w=j[I](w),D(b,p,w.done,w.value)})}}function D(I,w,b,p){Promise.resolve(p).then(function(h){I({value:h,done:b})},w)}};define(te[10],ie([1,0,21,13,4,2,17]),function(j,e,y,m,D,I,w){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.createCancelableAsyncIterable=e.CancelableAsyncIterableObject=e.AsyncIterableObject=e.Promises=e.DeferredPromise=e.IdleValue=e.runWhenIdle=e.RunOnceScheduler=e.IntervalTimer=e.TimeoutTimer=e.first=e.disposableTimeout=e.timeout=e.ThrottledDelayer=e.Delayer=e.MicrotaskDelay=e.Throttler=e.raceCancellation=e.createCancelablePromise=e.isThenable=void 0;function b(L){return!!L&&typeof L.then=="function"}e.isThenable=b;function p(L){const E=new y.CancellationTokenSource,N=L(E.token),k=new Promise((M,O)=>{const B=E.token.onCancellationRequested(()=>{B.dispose(),E.dispose(),O(new m.CancellationError)});Promise.resolve(N).then(T=>{B.dispose(),E.dispose(),M(T)},T=>{B.dispose(),E.dispose(),O(T)})});return new class{cancel(){E.cancel()}then(M,O){return k.then(M,O)}catch(M){return this.then(void 0,M)}finally(M){return k.finally(M)}}}e.createCancelablePromise=p;function h(L,E,N){return new Promise((k,M)=>{const O=E.onCancellationRequested(()=>{O.dispose(),k(N)});L.then(k,M).finally(()=>O.dispose())})}e.raceCancellation=h;class g{constructor(){this.activePromise=null,this.queuedPromise=null,this.queuedPromiseFactory=null}queue(E){if(this.activePromise){if(this.queuedPromiseFactory=E,!this.queuedPromise){const N=()=>{this.queuedPromise=null;const k=this.queue(this.queuedPromiseFactory);return this.queuedPromiseFactory=null,k};this.queuedPromise=new Promise(k=>{this.activePromise.then(N,N).then(k)})}return new Promise((N,k)=>{this.queuedPromise.then(N,k)})}return this.activePromise=E(),new Promise((N,k)=>{this.activePromise.then(M=>{this.activePromise=null,N(M)},M=>{this.activePromise=null,k(M)})})}}e.Throttler=g;const t=(L,E)=>{let N=!0;const k=setTimeout(()=>{N=!1,E()},L);return{isTriggered:()=>N,dispose:()=>{clearTimeout(k),N=!1}}},i=L=>{let E=!0;return queueMicrotask(()=>{E&&(E=!1,L())}),{isTriggered:()=>E,dispose:()=>{E=!1}}};e.MicrotaskDelay=Symbol("MicrotaskDelay");class n{constructor(E){this.defaultDelay=E,this.deferred=null,this.completionPromise=null,this.doResolve=null,this.doReject=null,this.task=null}trigger(E,N=this.defaultDelay){this.task=E,this.cancelTimeout(),this.completionPromise||(this.completionPromise=new Promise((M,O)=>{this.doResolve=M,this.doReject=O}).then(()=>{if(this.completionPromise=null,this.doResolve=null,this.task){const M=this.task;return this.task=null,M()}}));const k=()=>{var M;this.deferred=null,(M=this.doResolve)===null||M===void 0||M.call(this,null)};return this.deferred=N===e.MicrotaskDelay?i(k):t(N,k),this.completionPromise}isTriggered(){var E;return!!((E=this.deferred)===null||E===void 0?void 0:E.isTriggered())}cancel(){this.cancelTimeout(),this.completionPromise&&(this.doReject&&this.doReject(new m.CancellationError),this.completionPromise=null)}cancelTimeout(){var E;(E=this.deferred)===null||E===void 0||E.dispose(),this.deferred=null}dispose(){this.cancel()}}e.Delayer=n;class l{constructor(E){this.delayer=new n(E),this.throttler=new g}trigger(E,N){return this.delayer.trigger(()=>this.throttler.queue(E),N)}dispose(){this.delayer.dispose()}}e.ThrottledDelayer=l;function c(L,E){return E?new Promise((N,k)=>{const M=setTimeout(()=>{O.dispose(),N()},L),O=E.onCancellationRequested(()=>{clearTimeout(M),O.dispose(),k(new m.CancellationError)})}):p(N=>c(L,N))}e.timeout=c;function r(L,E=0){const N=setTimeout(L,E);return(0,I.toDisposable)(()=>clearTimeout(N))}e.disposableTimeout=r;function s(L,E=k=>!!k,N=null){let k=0;const M=L.length,O=()=>{if(k>=M)return Promise.resolve(N);const B=L[k++];return Promise.resolve(B()).then(R=>E(R)?Promise.resolve(R):O())};return O()}e.first=s;class o{constructor(E,N){this._token=-1,typeof E=="function"&&typeof N=="number"&&this.setIfNotSet(E,N)}dispose(){this.cancel()}cancel(){this._token!==-1&&(clearTimeout(this._token),this._token=-1)}cancelAndSet(E,N){this.cancel(),this._token=setTimeout(()=>{this._token=-1,E()},N)}setIfNotSet(E,N){this._token===-1&&(this._token=setTimeout(()=>{this._token=-1,E()},N))}}e.TimeoutTimer=o;class a{constructor(){this._token=-1}dispose(){this.cancel()}cancel(){this._token!==-1&&(clearInterval(this._token),this._token=-1)}cancelAndSet(E,N){this.cancel(),this._token=setInterval(()=>{E()},N)}}e.IntervalTimer=a;class d{constructor(E,N){this.timeoutToken=-1,this.runner=E,this.timeout=N,this.timeoutHandler=this.onTimeout.bind(this)}dispose(){this.cancel(),this.runner=null}cancel(){this.isScheduled()&&(clearTimeout(this.timeoutToken),this.timeoutToken=-1)}schedule(E=this.timeout){this.cancel(),this.timeoutToken=setTimeout(this.timeoutHandler,E)}get delay(){return this.timeout}set delay(E){this.timeout=E}isScheduled(){return this.timeoutToken!==-1}onTimeout(){this.timeoutToken=-1,this.runner&&this.doRun()}doRun(){this.runner&&this.runner()}}e.RunOnceScheduler=d,function(){typeof requestIdleCallback!="function"||typeof cancelIdleCallback!="function"?e.runWhenIdle=L=>{(0,w.setTimeout0)(()=>{if(E)return;const N=Date.now()+15;L(Object.freeze({didTimeout:!0,timeRemaining(){return Math.max(0,N-Date.now())}}))});let E=!1;return{dispose(){E||(E=!0)}}}:e.runWhenIdle=(L,E)=>{const N=requestIdleCallback(L,typeof E=="number"?{timeout:E}:void 0);let k=!1;return{dispose(){k||(k=!0,cancelIdleCallback(N))}}}}();class u{constructor(E){this._didRun=!1,this._executor=()=>{try{this._value=E()}catch(N){this._error=N}finally{this._didRun=!0}},this._handle=(0,e.runWhenIdle)(()=>this._executor())}dispose(){this._handle.dispose()}get value(){if(this._didRun||(this._handle.dispose(),this._executor()),this._error)throw this._error;return this._value}get isInitialized(){return this._didRun}}e.IdleValue=u;class f{constructor(){this.rejected=!1,this.resolved=!1,this.p=new Promise((E,N)=>{this.completeCallback=E,this.errorCallback=N})}get isRejected(){return this.rejected}get isSettled(){return this.rejected||this.resolved}complete(E){return new Promise(N=>{this.completeCallback(E),this.resolved=!0,N()})}cancel(){new Promise(E=>{this.errorCallback(new m.CancellationError),this.rejected=!0,E()})}}e.DeferredPromise=f;var S;(function(L){function E(k){return ye(this,void 0,void 0,function*(){let M;const O=yield Promise.all(k.map(B=>B.then(T=>T,T=>{M||(M=T)})));if(typeof M!="undefined")throw M;return O})}L.settled=E;function N(k){return new Promise((M,O)=>ye(this,void 0,void 0,function*(){try{yield k(M,O)}catch(B){O(B)}}))}L.withAsyncBody=N})(S=e.Promises||(e.Promises={}));class v{constructor(E){this._state=0,this._results=[],this._error=null,this._onStateChanged=new D.Emitter,queueMicrotask(()=>ye(this,void 0,void 0,function*(){const N={emitOne:k=>this.emitOne(k),emitMany:k=>this.emitMany(k),reject:k=>this.reject(k)};try{yield Promise.resolve(E(N)),this.resolve()}catch(k){this.reject(k)}finally{N.emitOne=void 0,N.emitMany=void 0,N.reject=void 0}}))}static fromArray(E){return new v(N=>{N.emitMany(E)})}static fromPromise(E){return new v(N=>ye(this,void 0,void 0,function*(){N.emitMany(yield E)}))}static fromPromises(E){return new v(N=>ye(this,void 0,void 0,function*(){yield Promise.all(E.map(k=>ye(this,void 0,void 0,function*(){return N.emitOne(yield k)})))}))}static merge(E){return new v(N=>ye(this,void 0,void 0,function*(){yield Promise.all(E.map(k=>{var M,O;return ye(this,void 0,void 0,function*(){var B,T;try{for(M=pt(k);O=yield M.next(),!O.done;){const R=O.value;N.emitOne(R)}}catch(R){B={error:R}}finally{try{O&&!O.done&&(T=M.return)&&(yield T.call(M))}finally{if(B)throw B.error}}})}))}))}[Symbol.asyncIterator](){let E=0;return{next:()=>ye(this,void 0,void 0,function*(){do{if(this._state===2)throw this._error;if(E<this._results.length)return{done:!1,value:this._results[E++]};if(this._state===1)return{done:!0,value:void 0};yield D.Event.toPromise(this._onStateChanged.event)}while(!0)})}}static map(E,N){return new v(k=>ye(this,void 0,void 0,function*(){var M,O;try{for(var B=pt(E),T;T=yield B.next(),!T.done;){const R=T.value;k.emitOne(N(R))}}catch(R){M={error:R}}finally{try{T&&!T.done&&(O=B.return)&&(yield O.call(B))}finally{if(M)throw M.error}}}))}map(E){return v.map(this,E)}static filter(E,N){return new v(k=>ye(this,void 0,void 0,function*(){var M,O;try{for(var B=pt(E),T;T=yield B.next(),!T.done;){const R=T.value;N(R)&&k.emitOne(R)}}catch(R){M={error:R}}finally{try{T&&!T.done&&(O=B.return)&&(yield O.call(B))}finally{if(M)throw M.error}}}))}filter(E){return v.filter(this,E)}static coalesce(E){return v.filter(E,N=>!!N)}coalesce(){return v.coalesce(this)}static toPromise(E){var N,k,M,O;return ye(this,void 0,void 0,function*(){const B=[];try{for(N=pt(E);k=yield N.next(),!k.done;){const T=k.value;B.push(T)}}catch(T){M={error:T}}finally{try{k&&!k.done&&(O=N.return)&&(yield O.call(N))}finally{if(M)throw M.error}}return B})}toPromise(){return v.toPromise(this)}emitOne(E){this._state===0&&(this._results.push(E),this._onStateChanged.fire())}emitMany(E){this._state===0&&(this._results=this._results.concat(E),this._onStateChanged.fire())}resolve(){this._state===0&&(this._state=1,this._onStateChanged.fire())}reject(E){this._state===0&&(this._state=2,this._error=E,this._onStateChanged.fire())}}e.AsyncIterableObject=v,v.EMPTY=v.fromArray([]);class C extends v{constructor(E,N){super(N);this._source=E}cancel(){this._source.cancel()}}e.CancelableAsyncIterableObject=C;function _(L){const E=new y.CancellationTokenSource,N=L(E.token);return new C(E,k=>ye(this,void 0,void 0,function*(){var M,O;const B=E.token.onCancellationRequested(()=>{B.dispose(),E.dispose(),k.reject(new m.CancellationError)});try{try{for(var T=pt(N),R;R=yield T.next(),!R.done;){const P=R.value;if(E.token.isCancellationRequested)return;k.emitOne(P)}}catch(P){M={error:P}}finally{try{R&&!R.done&&(O=T.return)&&(yield O.call(T))}finally{if(M)throw M.error}}B.dispose(),E.dispose()}catch(P){B.dispose(),E.dispose(),k.reject(P)}}))}e.createCancelableAsyncIterable=_}),define(te[316],ie([1,0,10,2]),function(j,e,y,m){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ScrollbarVisibilityController=void 0;class D extends m.Disposable{constructor(w,b,p){super();this._visibility=w,this._visibleClassName=b,this._invisibleClassName=p,this._domNode=null,this._isVisible=!1,this._isNeeded=!1,this._rawShouldBeVisible=!1,this._shouldBeVisible=!1,this._revealTimer=this._register(new y.TimeoutTimer)}setVisibility(w){this._visibility!==w&&(this._visibility=w,this._updateShouldBeVisible())}setShouldBeVisible(w){this._rawShouldBeVisible=w,this._updateShouldBeVisible()}_applyVisibilitySetting(){return this._visibility===2?!1:this._visibility===3?!0:this._rawShouldBeVisible}_updateShouldBeVisible(){const w=this._applyVisibilitySetting();this._shouldBeVisible!==w&&(this._shouldBeVisible=w,this.ensureVisibility())}setIsNeeded(w){this._isNeeded!==w&&(this._isNeeded=w,this.ensureVisibility())}setDomNode(w){this._domNode=w,this._domNode.setClassName(this._invisibleClassName),this.setShouldBeVisible(!1)}ensureVisibility(){if(!this._isNeeded){this._hide(!1);return}this._shouldBeVisible?this._reveal():this._hide(!0)}_reveal(){this._isVisible||(this._isVisible=!0,this._revealTimer.setIfNotSet(()=>{this._domNode&&this._domNode.setClassName(this._visibleClassName)},0))}_hide(w){this._revealTimer.cancel(),!!this._isVisible&&(this._isVisible=!1,this._domNode&&this._domNode.setClassName(this._invisibleClassName+(w?" fade":"")))}}e.ScrollbarVisibilityController=D}),define(te[317],ie([1,0,10]),function(j,e,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.compareByPrefix=e.compareAnything=e.compareFileNames=void 0;const m=new y.IdleValue(()=>{const h=new Intl.Collator(void 0,{numeric:!0,sensitivity:"base"});return{collator:h,collatorIsNumeric:h.resolvedOptions().numeric}}),D=new y.IdleValue(()=>({collator:new Intl.Collator(void 0,{numeric:!0})})),I=new y.IdleValue(()=>({collator:new Intl.Collator(void 0,{numeric:!0,sensitivity:"accent"})}));function w(h,g,t=!1){const i=h||"",n=g||"",l=m.value.collator.compare(i,n);return m.value.collatorIsNumeric&&l===0&&i!==n?i<n?-1:1:l}e.compareFileNames=w;function b(h,g,t){const i=h.toLowerCase(),n=g.toLowerCase(),l=p(h,g,t);if(l)return l;const c=i.endsWith(t),r=n.endsWith(t);if(c!==r)return c?-1:1;const s=w(i,n);return s!==0?s:i.localeCompare(n)}e.compareAnything=b;function p(h,g,t){const i=h.toLowerCase(),n=g.toLowerCase(),l=i.startsWith(t),c=n.startsWith(t);if(l!==c)return l?-1:1;if(l&&c){if(i.length<n.length)return-1;if(i.length>n.length)return 1}return 0}e.compareByPrefix=p}),define(te[137],ie([1,0,4,2]),function(j,e,y,m){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SmoothScrollingOperation=e.SmoothScrollingUpdate=e.Scrollable=e.ScrollState=void 0;class D{constructor(n,l,c,r,s,o,a){this._forceIntegerValues=n,this._scrollStateBrand=void 0,this._forceIntegerValues&&(l=l|0,c=c|0,r=r|0,s=s|0,o=o|0,a=a|0),this.rawScrollLeft=r,this.rawScrollTop=a,l<0&&(l=0),r+l>c&&(r=c-l),r<0&&(r=0),s<0&&(s=0),a+s>o&&(a=o-s),a<0&&(a=0),this.width=l,this.scrollWidth=c,this.scrollLeft=r,this.height=s,this.scrollHeight=o,this.scrollTop=a}equals(n){return this.rawScrollLeft===n.rawScrollLeft&&this.rawScrollTop===n.rawScrollTop&&this.width===n.width&&this.scrollWidth===n.scrollWidth&&this.scrollLeft===n.scrollLeft&&this.height===n.height&&this.scrollHeight===n.scrollHeight&&this.scrollTop===n.scrollTop}withScrollDimensions(n,l){return new D(this._forceIntegerValues,typeof n.width!="undefined"?n.width:this.width,typeof n.scrollWidth!="undefined"?n.scrollWidth:this.scrollWidth,l?this.rawScrollLeft:this.scrollLeft,typeof n.height!="undefined"?n.height:this.height,typeof n.scrollHeight!="undefined"?n.scrollHeight:this.scrollHeight,l?this.rawScrollTop:this.scrollTop)}withScrollPosition(n){return new D(this._forceIntegerValues,this.width,this.scrollWidth,typeof n.scrollLeft!="undefined"?n.scrollLeft:this.rawScrollLeft,this.height,this.scrollHeight,typeof n.scrollTop!="undefined"?n.scrollTop:this.rawScrollTop)}createScrollEvent(n,l){const c=this.width!==n.width,r=this.scrollWidth!==n.scrollWidth,s=this.scrollLeft!==n.scrollLeft,o=this.height!==n.height,a=this.scrollHeight!==n.scrollHeight,d=this.scrollTop!==n.scrollTop;return{inSmoothScrolling:l,oldWidth:n.width,oldScrollWidth:n.scrollWidth,oldScrollLeft:n.scrollLeft,width:this.width,scrollWidth:this.scrollWidth,scrollLeft:this.scrollLeft,oldHeight:n.height,oldScrollHeight:n.scrollHeight,oldScrollTop:n.scrollTop,height:this.height,scrollHeight:this.scrollHeight,scrollTop:this.scrollTop,widthChanged:c,scrollWidthChanged:r,scrollLeftChanged:s,heightChanged:o,scrollHeightChanged:a,scrollTopChanged:d}}}e.ScrollState=D;class I extends m.Disposable{constructor(n){super();this._scrollableBrand=void 0,this._onScroll=this._register(new y.Emitter),this.onScroll=this._onScroll.event,this._smoothScrollDuration=n.smoothScrollDuration,this._scheduleAtNextAnimationFrame=n.scheduleAtNextAnimationFrame,this._state=new D(n.forceIntegerValues,0,0,0,0,0,0),this._smoothScrolling=null}dispose(){this._smoothScrolling&&(this._smoothScrolling.dispose(),this._smoothScrolling=null),super.dispose()}setSmoothScrollDuration(n){this._smoothScrollDuration=n}validateScrollPosition(n){return this._state.withScrollPosition(n)}getScrollDimensions(){return this._state}setScrollDimensions(n,l){const c=this._state.withScrollDimensions(n,l);this._setState(c,Boolean(this._smoothScrolling)),this._smoothScrolling&&this._smoothScrolling.acceptScrollDimensions(this._state)}getFutureScrollPosition(){return this._smoothScrolling?this._smoothScrolling.to:this._state}getCurrentScrollPosition(){return this._state}setScrollPositionNow(n){const l=this._state.withScrollPosition(n);this._smoothScrolling&&(this._smoothScrolling.dispose(),this._smoothScrolling=null),this._setState(l,!1)}setScrollPositionSmooth(n,l){if(this._smoothScrollDuration===0)return this.setScrollPositionNow(n);if(this._smoothScrolling){n={scrollLeft:typeof n.scrollLeft=="undefined"?this._smoothScrolling.to.scrollLeft:n.scrollLeft,scrollTop:typeof n.scrollTop=="undefined"?this._smoothScrolling.to.scrollTop:n.scrollTop};const c=this._state.withScrollPosition(n);if(this._smoothScrolling.to.scrollLeft===c.scrollLeft&&this._smoothScrolling.to.scrollTop===c.scrollTop)return;let r;l?r=new h(this._smoothScrolling.from,c,this._smoothScrolling.startTime,this._smoothScrolling.duration):r=this._smoothScrolling.combine(this._state,c,this._smoothScrollDuration),this._smoothScrolling.dispose(),this._smoothScrolling=r}else{const c=this._state.withScrollPosition(n);this._smoothScrolling=h.start(this._state,c,this._smoothScrollDuration)}this._smoothScrolling.animationFrameDisposable=this._scheduleAtNextAnimationFrame(()=>{!this._smoothScrolling||(this._smoothScrolling.animationFrameDisposable=null,this._performSmoothScrolling())})}_performSmoothScrolling(){if(!this._smoothScrolling)return;const n=this._smoothScrolling.tick(),l=this._state.withScrollPosition(n);if(this._setState(l,!0),!!this._smoothScrolling){if(n.isDone){this._smoothScrolling.dispose(),this._smoothScrolling=null;return}this._smoothScrolling.animationFrameDisposable=this._scheduleAtNextAnimationFrame(()=>{!this._smoothScrolling||(this._smoothScrolling.animationFrameDisposable=null,this._performSmoothScrolling())})}}_setState(n,l){const c=this._state;c.equals(n)||(this._state=n,this._onScroll.fire(this._state.createScrollEvent(c,l)))}}e.Scrollable=I;class w{constructor(n,l,c){this.scrollLeft=n,this.scrollTop=l,this.isDone=c}}e.SmoothScrollingUpdate=w;function b(i,n){const l=n-i;return function(c){return i+l*t(c)}}function p(i,n,l){return function(c){return c<l?i(c/l):n((c-l)/(1-l))}}class h{constructor(n,l,c,r){this.from=n,this.to=l,this.duration=r,this.startTime=c,this.animationFrameDisposable=null,this._initAnimations()}_initAnimations(){this.scrollLeft=this._initAnimation(this.from.scrollLeft,this.to.scrollLeft,this.to.width),this.scrollTop=this._initAnimation(this.from.scrollTop,this.to.scrollTop,this.to.height)}_initAnimation(n,l,c){if(Math.abs(n-l)>2.5*c){let s,o;return n<l?(s=n+.75*c,o=l-.75*c):(s=n-.75*c,o=l+.75*c),p(b(n,s),b(o,l),.33)}return b(n,l)}dispose(){this.animationFrameDisposable!==null&&(this.animationFrameDisposable.dispose(),this.animationFrameDisposable=null)}acceptScrollDimensions(n){this.to=n.withScrollPosition(this.to),this._initAnimations()}tick(){return this._tick(Date.now())}_tick(n){const l=(n-this.startTime)/this.duration;if(l<1){const c=this.scrollLeft(l),r=this.scrollTop(l);return new w(c,r,!1)}return new w(this.to.scrollLeft,this.to.scrollTop,!0)}combine(n,l,c){return h.start(n,l,c)}static start(n,l,c){c=c+10;const r=Date.now()-10;return new h(n,l,r,c)}}e.SmoothScrollingOperation=h;function g(i){return Math.pow(i,3)}function t(i){return 1-g(1-i)}}),define(te[8],ie([1,0,309,134]),function(j,e,y,m){"use strict";var D;Object.defineProperty(e,"__esModule",{value:!0}),e.InvisibleCharacters=e.AmbiguousCharacters=e.noBreakWhitespace=e.getLeftDeleteOffset=e.singleLetterHash=e.containsUppercaseCharacter=e.startsWithUTF8BOM=e.UTF8_BOM_CHARACTER=e.isEmojiImprecise=e.isFullWidthCharacter=e.containsUnusualLineTerminators=e.UNUSUAL_LINE_TERMINATORS=e.isBasicASCII=e.containsRTL=e.getCharContainingOffset=e.prevCharLength=e.nextCharLength=e.GraphemeIterator=e.CodePointIterator=e.getNextCodePoint=e.computeCodePoint=e.isLowSurrogate=e.isHighSurrogate=e.commonSuffixLength=e.commonPrefixLength=e.startsWithIgnoreCase=e.equalsIgnoreCase=e.isUpperAsciiLetter=e.isLowerAsciiLetter=e.compareSubstringIgnoreCase=e.compareIgnoreCase=e.compareSubstring=e.compare=e.lastNonWhitespaceIndex=e.getLeadingWhitespace=e.firstNonWhitespaceIndex=e.splitLines=e.regExpFlags=e.regExpLeadsToEndlessLoop=e.createRegExp=e.stripWildcards=e.convertSimple2RegExpPattern=e.rtrim=e.ltrim=e.trim=e.escapeRegExpCharacters=e.escape=e.format=e.isFalsyOrWhitespace=void 0;function I(Y){return!Y||typeof Y!="string"?!0:Y.trim().length===0}e.isFalsyOrWhitespace=I;const w=/{(\d+)}/g;function b(Y,...se){return se.length===0?Y:Y.replace(w,function(ge,me){const le=parseInt(me,10);return isNaN(le)||le<0||le>=se.length?ge:se[le]})}e.format=b;function p(Y){return Y.replace(/[<>&]/g,function(se){switch(se){case"<":return"<";case">":return">";case"&":return"&";default:return se}})}e.escape=p;function h(Y){return Y.replace(/[\\\{\}\*\+\?\|\^\$\.\[\]\(\)]/g,"\\$&")}e.escapeRegExpCharacters=h;function g(Y,se=" "){const ge=t(Y,se);return i(ge,se)}e.trim=g;function t(Y,se){if(!Y||!se)return Y;const ge=se.length;if(ge===0||Y.length===0)return Y;let me=0;for(;Y.indexOf(se,me)===me;)me=me+ge;return Y.substring(me)}e.ltrim=t;function i(Y,se){if(!Y||!se)return Y;const ge=se.length,me=Y.length;if(ge===0||me===0)return Y;let le=me,he=-1;for(;he=Y.lastIndexOf(se,le-1),!(he===-1||he+ge!==le);){if(he===0)return"";le=he}return Y.substring(0,le)}e.rtrim=i;function n(Y){return Y.replace(/[\-\\\{\}\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,"\\$&").replace(/[\*]/g,".*")}e.convertSimple2RegExpPattern=n;function l(Y){return Y.replace(/\*/g,"")}e.stripWildcards=l;function c(Y,se,ge={}){if(!Y)throw new Error("Cannot create regex from empty string");se||(Y=h(Y)),ge.wholeWord&&(/\B/.test(Y.charAt(0))||(Y="\\b"+Y),/\B/.test(Y.charAt(Y.length-1))||(Y=Y+"\\b"));let me="";return ge.global&&(me+="g"),ge.matchCase||(me+="i"),ge.multiline&&(me+="m"),ge.unicode&&(me+="u"),new RegExp(Y,me)}e.createRegExp=c;function r(Y){return Y.source==="^"||Y.source==="^$"||Y.source==="$"||Y.source==="^\\s*$"?!1:!!(Y.exec("")&&Y.lastIndex===0)}e.regExpLeadsToEndlessLoop=r;function s(Y){return(Y.global?"g":"")+(Y.ignoreCase?"i":"")+(Y.multiline?"m":"")+(Y.unicode?"u":"")}e.regExpFlags=s;function o(Y){return Y.split(/\r\n|\r|\n/)}e.splitLines=o;function a(Y){for(let se=0,ge=Y.length;se<ge;se++){const me=Y.charCodeAt(se);if(me!==32&&me!==9)return se}return-1}e.firstNonWhitespaceIndex=a;function d(Y,se=0,ge=Y.length){for(let me=se;me<ge;me++){const le=Y.charCodeAt(me);if(le!==32&&le!==9)return Y.substring(se,me)}return Y.substring(se,ge)}e.getLeadingWhitespace=d;function u(Y,se=Y.length-1){for(let ge=se;ge>=0;ge--){const me=Y.charCodeAt(ge);if(me!==32&&me!==9)return ge}return-1}e.lastNonWhitespaceIndex=u;function f(Y,se){return Y<se?-1:Y>se?1:0}e.compare=f;function S(Y,se,ge=0,me=Y.length,le=0,he=se.length){for(;ge<me&&le<he;ge++,le++){let be=Y.charCodeAt(ge),de=se.charCodeAt(le);if(be<de)return-1;if(be>de)return 1}const ve=me-ge,pe=he-le;return ve<pe?-1:ve>pe?1:0}e.compareSubstring=S;function v(Y,se){return C(Y,se,0,Y.length,0,se.length)}e.compareIgnoreCase=v;function C(Y,se,ge=0,me=Y.length,le=0,he=se.length){for(;ge<me&&le<he;ge++,le++){let be=Y.charCodeAt(ge),de=se.charCodeAt(le);if(be===de)continue;if(be>=128||de>=128)return S(Y.toLowerCase(),se.toLowerCase(),ge,me,le,he);_(be)&&(be-=32),_(de)&&(de-=32);const fe=be-de;if(fe!==0)return fe}const ve=me-ge,pe=he-le;return ve<pe?-1:ve>pe?1:0}e.compareSubstringIgnoreCase=C;function _(Y){return Y>=97&&Y<=122}e.isLowerAsciiLetter=_;function L(Y){return Y>=65&&Y<=90}e.isUpperAsciiLetter=L;function E(Y,se){return Y.length===se.length&&C(Y,se)===0}e.equalsIgnoreCase=E;function N(Y,se){const ge=se.length;return se.length>Y.length?!1:C(Y,se,0,ge)===0}e.startsWithIgnoreCase=N;function k(Y,se){let ge,me=Math.min(Y.length,se.length);for(ge=0;ge<me;ge++)if(Y.charCodeAt(ge)!==se.charCodeAt(ge))return ge;return me}e.commonPrefixLength=k;function M(Y,se){let ge,me=Math.min(Y.length,se.length);const le=Y.length-1,he=se.length-1;for(ge=0;ge<me;ge++)if(Y.charCodeAt(le-ge)!==se.charCodeAt(he-ge))return ge;return me}e.commonSuffixLength=M;function O(Y){return 55296<=Y&&Y<=56319}e.isHighSurrogate=O;function B(Y){return 56320<=Y&&Y<=57343}e.isLowSurrogate=B;function T(Y,se){return(Y-55296<<10)+(se-56320)+65536}e.computeCodePoint=T;function R(Y,se,ge){const me=Y.charCodeAt(ge);if(O(me)&&ge+1<se){const le=Y.charCodeAt(ge+1);if(B(le))return T(me,le)}return me}e.getNextCodePoint=R;function P(Y,se){const ge=Y.charCodeAt(se-1);if(B(ge)&&se>1){const me=Y.charCodeAt(se-2);if(O(me))return T(me,ge)}return ge}class F{constructor(se,ge=0){this._str=se,this._len=se.length,this._offset=ge}get offset(){return this._offset}setOffset(se){this._offset=se}prevCodePoint(){const se=P(this._str,this._offset);return this._offset-=se>=65536?2:1,se}nextCodePoint(){const se=R(this._str,this._len,this._offset);return this._offset+=se>=65536?2:1,se}eol(){return this._offset>=this._len}}e.CodePointIterator=F;class W{constructor(se,ge=0){this._iterator=new F(se,ge)}get offset(){return this._iterator.offset}nextGraphemeLength(){const se=ee.getInstance(),ge=this._iterator,me=ge.offset;let le=se.getGraphemeBreakType(ge.nextCodePoint());for(;!ge.eol();){const he=ge.offset,ve=se.getGraphemeBreakType(ge.nextCodePoint());if(ce(le,ve)){ge.setOffset(he);break}le=ve}return ge.offset-me}prevGraphemeLength(){const se=ee.getInstance(),ge=this._iterator,me=ge.offset;let le=se.getGraphemeBreakType(ge.prevCodePoint());for(;ge.offset>0;){const he=ge.offset,ve=se.getGraphemeBreakType(ge.prevCodePoint());if(ce(ve,le)){ge.setOffset(he);break}le=ve}return me-ge.offset}eol(){return this._iterator.eol()}}e.GraphemeIterator=W;function A(Y,se){return new W(Y,se).nextGraphemeLength()}e.nextCharLength=A;function H(Y,se){return new W(Y,se).prevGraphemeLength()}e.prevCharLength=H;function q(Y,se){se>0&&B(Y.charCodeAt(se))&&se--;const ge=se+A(Y,se);return[ge-H(Y,ge),ge]}e.getCharContainingOffset=q;const X=/(?:[\u05BE\u05C0\u05C3\u05C6\u05D0-\u05F4\u0608\u060B\u060D\u061B-\u064A\u066D-\u066F\u0671-\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u0710\u0712-\u072F\u074D-\u07A5\u07B1-\u07EA\u07F4\u07F5\u07FA\u07FE-\u0815\u081A\u0824\u0828\u0830-\u0858\u085E-\u088E\u08A0-\u08C9\u200F\uFB1D\uFB1F-\uFB28\uFB2A-\uFD3D\uFD50-\uFDC7\uFDF0-\uFDFC\uFE70-\uFEFC]|\uD802[\uDC00-\uDD1B\uDD20-\uDE00\uDE10-\uDE35\uDE40-\uDEE4\uDEEB-\uDF35\uDF40-\uDFFF]|\uD803[\uDC00-\uDD23\uDE80-\uDEA9\uDEAD-\uDF45\uDF51-\uDF81\uDF86-\uDFF6]|\uD83A[\uDC00-\uDCCF\uDD00-\uDD43\uDD4B-\uDFFF]|\uD83B[\uDC00-\uDEBB])/;function G(Y){return X.test(Y)}e.containsRTL=G;const re=/^[\t\n\r\x20-\x7E]*$/;function ae(Y){return re.test(Y)}e.isBasicASCII=ae,e.UNUSUAL_LINE_TERMINATORS=/[\u2028\u2029]/;function oe(Y){return e.UNUSUAL_LINE_TERMINATORS.test(Y)}e.containsUnusualLineTerminators=oe;function Z(Y){return Y>=11904&&Y<=55215||Y>=63744&&Y<=64255||Y>=65281&&Y<=65374}e.isFullWidthCharacter=Z;function x(Y){return Y>=127462&&Y<=127487||Y===8986||Y===8987||Y===9200||Y===9203||Y>=9728&&Y<=10175||Y===11088||Y===11093||Y>=127744&&Y<=128591||Y>=128640&&Y<=128764||Y>=128992&&Y<=129008||Y>=129280&&Y<=129535||Y>=129648&&Y<=129782}e.isEmojiImprecise=x,e.UTF8_BOM_CHARACTER=String.fromCharCode(65279);function U(Y){return!!(Y&&Y.length>0&&Y.charCodeAt(0)===65279)}e.startsWithUTF8BOM=U;function Q(Y,se=!1){return Y?(se&&(Y=Y.replace(/\\./g,"")),Y.toLowerCase()!==Y):!1}e.containsUppercaseCharacter=Q;function ne(Y){const se=90-65+1;return Y=Y%(2*se),Y<se?String.fromCharCode(97+Y):String.fromCharCode(65+Y-se)}e.singleLetterHash=ne;function ce(Y,se){return Y===0?se!==5&&se!==7:Y===2&&se===3?!1:Y===4||Y===2||Y===3||se===4||se===2||se===3?!0:!(Y===8&&(se===8||se===9||se===11||se===12)||(Y===11||Y===9)&&(se===9||se===10)||(Y===12||Y===10)&&se===10||se===5||se===13||se===7||Y===1||Y===13&&se===14||Y===6&&se===6)}class ee{constructor(){this._data=ue()}static getInstance(){return ee._INSTANCE||(ee._INSTANCE=new ee),ee._INSTANCE}getGraphemeBreakType(se){if(se<32)return se===10?3:se===13?2:4;if(se<127)return 0;const ge=this._data,me=ge.length/3;let le=1;for(;le<=me;)if(se<ge[3*le])le=2*le;else if(se>ge[3*le+1])le=2*le+1;else return ge[3*le+2];return 0}}ee._INSTANCE=null;function ue(){return JSON.parse("[0,0,0,51229,51255,12,44061,44087,12,127462,127487,6,7083,7085,5,47645,47671,12,54813,54839,12,128678,128678,14,3270,3270,5,9919,9923,14,45853,45879,12,49437,49463,12,53021,53047,12,71216,71218,7,128398,128399,14,129360,129374,14,2519,2519,5,4448,4519,9,9742,9742,14,12336,12336,14,44957,44983,12,46749,46775,12,48541,48567,12,50333,50359,12,52125,52151,12,53917,53943,12,69888,69890,5,73018,73018,5,127990,127990,14,128558,128559,14,128759,128760,14,129653,129655,14,2027,2035,5,2891,2892,7,3761,3761,5,6683,6683,5,8293,8293,4,9825,9826,14,9999,9999,14,43452,43453,5,44509,44535,12,45405,45431,12,46301,46327,12,47197,47223,12,48093,48119,12,48989,49015,12,49885,49911,12,50781,50807,12,51677,51703,12,52573,52599,12,53469,53495,12,54365,54391,12,65279,65279,4,70471,70472,7,72145,72147,7,119173,119179,5,127799,127818,14,128240,128244,14,128512,128512,14,128652,128652,14,128721,128722,14,129292,129292,14,129445,129450,14,129734,129743,14,1476,1477,5,2366,2368,7,2750,2752,7,3076,3076,5,3415,3415,5,4141,4144,5,6109,6109,5,6964,6964,5,7394,7400,5,9197,9198,14,9770,9770,14,9877,9877,14,9968,9969,14,10084,10084,14,43052,43052,5,43713,43713,5,44285,44311,12,44733,44759,12,45181,45207,12,45629,45655,12,46077,46103,12,46525,46551,12,46973,46999,12,47421,47447,12,47869,47895,12,48317,48343,12,48765,48791,12,49213,49239,12,49661,49687,12,50109,50135,12,50557,50583,12,51005,51031,12,51453,51479,12,51901,51927,12,52349,52375,12,52797,52823,12,53245,53271,12,53693,53719,12,54141,54167,12,54589,54615,12,55037,55063,12,69506,69509,5,70191,70193,5,70841,70841,7,71463,71467,5,72330,72342,5,94031,94031,5,123628,123631,5,127763,127765,14,127941,127941,14,128043,128062,14,128302,128317,14,128465,128467,14,128539,128539,14,128640,128640,14,128662,128662,14,128703,128703,14,128745,128745,14,129004,129007,14,129329,129330,14,129402,129402,14,129483,129483,14,129686,129704,14,130048,131069,14,173,173,4,1757,1757,1,2200,2207,5,2434,2435,7,2631,2632,5,2817,2817,5,3008,3008,5,3201,3201,5,3387,3388,5,3542,3542,5,3902,3903,7,4190,4192,5,6002,6003,5,6439,6440,5,6765,6770,7,7019,7027,5,7154,7155,7,8205,8205,13,8505,8505,14,9654,9654,14,9757,9757,14,9792,9792,14,9852,9853,14,9890,9894,14,9937,9937,14,9981,9981,14,10035,10036,14,11035,11036,14,42654,42655,5,43346,43347,7,43587,43587,5,44006,44007,7,44173,44199,12,44397,44423,12,44621,44647,12,44845,44871,12,45069,45095,12,45293,45319,12,45517,45543,12,45741,45767,12,45965,45991,12,46189,46215,12,46413,46439,12,46637,46663,12,46861,46887,12,47085,47111,12,47309,47335,12,47533,47559,12,47757,47783,12,47981,48007,12,48205,48231,12,48429,48455,12,48653,48679,12,48877,48903,12,49101,49127,12,49325,49351,12,49549,49575,12,49773,49799,12,49997,50023,12,50221,50247,12,50445,50471,12,50669,50695,12,50893,50919,12,51117,51143,12,51341,51367,12,51565,51591,12,51789,51815,12,52013,52039,12,52237,52263,12,52461,52487,12,52685,52711,12,52909,52935,12,53133,53159,12,53357,53383,12,53581,53607,12,53805,53831,12,54029,54055,12,54253,54279,12,54477,54503,12,54701,54727,12,54925,54951,12,55149,55175,12,68101,68102,5,69762,69762,7,70067,70069,7,70371,70378,5,70720,70721,7,71087,71087,5,71341,71341,5,71995,71996,5,72249,72249,7,72850,72871,5,73109,73109,5,118576,118598,5,121505,121519,5,127245,127247,14,127568,127569,14,127777,127777,14,127872,127891,14,127956,127967,14,128015,128016,14,128110,128172,14,128259,128259,14,128367,128368,14,128424,128424,14,128488,128488,14,128530,128532,14,128550,128551,14,128566,128566,14,128647,128647,14,128656,128656,14,128667,128673,14,128691,128693,14,128715,128715,14,128728,128732,14,128752,128752,14,128765,128767,14,129096,129103,14,129311,129311,14,129344,129349,14,129394,129394,14,129413,129425,14,129466,129471,14,129511,129535,14,129664,129666,14,129719,129722,14,129760,129767,14,917536,917631,5,13,13,2,1160,1161,5,1564,1564,4,1807,1807,1,2085,2087,5,2307,2307,7,2382,2383,7,2497,2500,5,2563,2563,7,2677,2677,5,2763,2764,7,2879,2879,5,2914,2915,5,3021,3021,5,3142,3144,5,3263,3263,5,3285,3286,5,3398,3400,7,3530,3530,5,3633,3633,5,3864,3865,5,3974,3975,5,4155,4156,7,4229,4230,5,5909,5909,7,6078,6085,7,6277,6278,5,6451,6456,7,6744,6750,5,6846,6846,5,6972,6972,5,7074,7077,5,7146,7148,7,7222,7223,5,7416,7417,5,8234,8238,4,8417,8417,5,9000,9000,14,9203,9203,14,9730,9731,14,9748,9749,14,9762,9763,14,9776,9783,14,9800,9811,14,9831,9831,14,9872,9873,14,9882,9882,14,9900,9903,14,9929,9933,14,9941,9960,14,9974,9974,14,9989,9989,14,10006,10006,14,10062,10062,14,10160,10160,14,11647,11647,5,12953,12953,14,43019,43019,5,43232,43249,5,43443,43443,5,43567,43568,7,43696,43696,5,43765,43765,7,44013,44013,5,44117,44143,12,44229,44255,12,44341,44367,12,44453,44479,12,44565,44591,12,44677,44703,12,44789,44815,12,44901,44927,12,45013,45039,12,45125,45151,12,45237,45263,12,45349,45375,12,45461,45487,12,45573,45599,12,45685,45711,12,45797,45823,12,45909,45935,12,46021,46047,12,46133,46159,12,46245,46271,12,46357,46383,12,46469,46495,12,46581,46607,12,46693,46719,12,46805,46831,12,46917,46943,12,47029,47055,12,47141,47167,12,47253,47279,12,47365,47391,12,47477,47503,12,47589,47615,12,47701,47727,12,47813,47839,12,47925,47951,12,48037,48063,12,48149,48175,12,48261,48287,12,48373,48399,12,48485,48511,12,48597,48623,12,48709,48735,12,48821,48847,12,48933,48959,12,49045,49071,12,49157,49183,12,49269,49295,12,49381,49407,12,49493,49519,12,49605,49631,12,49717,49743,12,49829,49855,12,49941,49967,12,50053,50079,12,50165,50191,12,50277,50303,12,50389,50415,12,50501,50527,12,50613,50639,12,50725,50751,12,50837,50863,12,50949,50975,12,51061,51087,12,51173,51199,12,51285,51311,12,51397,51423,12,51509,51535,12,51621,51647,12,51733,51759,12,51845,51871,12,51957,51983,12,52069,52095,12,52181,52207,12,52293,52319,12,52405,52431,12,52517,52543,12,52629,52655,12,52741,52767,12,52853,52879,12,52965,52991,12,53077,53103,12,53189,53215,12,53301,53327,12,53413,53439,12,53525,53551,12,53637,53663,12,53749,53775,12,53861,53887,12,53973,53999,12,54085,54111,12,54197,54223,12,54309,54335,12,54421,54447,12,54533,54559,12,54645,54671,12,54757,54783,12,54869,54895,12,54981,55007,12,55093,55119,12,55243,55291,10,66045,66045,5,68325,68326,5,69688,69702,5,69817,69818,5,69957,69958,7,70089,70092,5,70198,70199,5,70462,70462,5,70502,70508,5,70750,70750,5,70846,70846,7,71100,71101,5,71230,71230,7,71351,71351,5,71737,71738,5,72000,72000,7,72160,72160,5,72273,72278,5,72752,72758,5,72882,72883,5,73031,73031,5,73461,73462,7,94192,94193,7,119149,119149,7,121403,121452,5,122915,122916,5,126980,126980,14,127358,127359,14,127535,127535,14,127759,127759,14,127771,127771,14,127792,127793,14,127825,127867,14,127897,127899,14,127945,127945,14,127985,127986,14,128000,128007,14,128021,128021,14,128066,128100,14,128184,128235,14,128249,128252,14,128266,128276,14,128335,128335,14,128379,128390,14,128407,128419,14,128444,128444,14,128481,128481,14,128499,128499,14,128526,128526,14,128536,128536,14,128543,128543,14,128556,128556,14,128564,128564,14,128577,128580,14,128643,128645,14,128649,128649,14,128654,128654,14,128660,128660,14,128664,128664,14,128675,128675,14,128686,128689,14,128695,128696,14,128705,128709,14,128717,128719,14,128725,128725,14,128736,128741,14,128747,128748,14,128755,128755,14,128762,128762,14,128981,128991,14,129009,129023,14,129160,129167,14,129296,129304,14,129320,129327,14,129340,129342,14,129356,129356,14,129388,129392,14,129399,129400,14,129404,129407,14,129432,129442,14,129454,129455,14,129473,129474,14,129485,129487,14,129648,129651,14,129659,129660,14,129671,129679,14,129709,129711,14,129728,129730,14,129751,129753,14,129776,129782,14,917505,917505,4,917760,917999,5,10,10,3,127,159,4,768,879,5,1471,1471,5,1536,1541,1,1648,1648,5,1767,1768,5,1840,1866,5,2070,2073,5,2137,2139,5,2274,2274,1,2363,2363,7,2377,2380,7,2402,2403,5,2494,2494,5,2507,2508,7,2558,2558,5,2622,2624,7,2641,2641,5,2691,2691,7,2759,2760,5,2786,2787,5,2876,2876,5,2881,2884,5,2901,2902,5,3006,3006,5,3014,3016,7,3072,3072,5,3134,3136,5,3157,3158,5,3260,3260,5,3266,3266,5,3274,3275,7,3328,3329,5,3391,3392,7,3405,3405,5,3457,3457,5,3536,3537,7,3551,3551,5,3636,3642,5,3764,3772,5,3895,3895,5,3967,3967,7,3993,4028,5,4146,4151,5,4182,4183,7,4226,4226,5,4253,4253,5,4957,4959,5,5940,5940,7,6070,6070,7,6087,6088,7,6158,6158,4,6432,6434,5,6448,6449,7,6679,6680,5,6742,6742,5,6754,6754,5,6783,6783,5,6912,6915,5,6966,6970,5,6978,6978,5,7042,7042,7,7080,7081,5,7143,7143,7,7150,7150,7,7212,7219,5,7380,7392,5,7412,7412,5,8203,8203,4,8232,8232,4,8265,8265,14,8400,8412,5,8421,8432,5,8617,8618,14,9167,9167,14,9200,9200,14,9410,9410,14,9723,9726,14,9733,9733,14,9745,9745,14,9752,9752,14,9760,9760,14,9766,9766,14,9774,9774,14,9786,9786,14,9794,9794,14,9823,9823,14,9828,9828,14,9833,9850,14,9855,9855,14,9875,9875,14,9880,9880,14,9885,9887,14,9896,9897,14,9906,9916,14,9926,9927,14,9935,9935,14,9939,9939,14,9962,9962,14,9972,9972,14,9978,9978,14,9986,9986,14,9997,9997,14,10002,10002,14,10017,10017,14,10055,10055,14,10071,10071,14,10133,10135,14,10548,10549,14,11093,11093,14,12330,12333,5,12441,12442,5,42608,42610,5,43010,43010,5,43045,43046,5,43188,43203,7,43302,43309,5,43392,43394,5,43446,43449,5,43493,43493,5,43571,43572,7,43597,43597,7,43703,43704,5,43756,43757,5,44003,44004,7,44009,44010,7,44033,44059,12,44089,44115,12,44145,44171,12,44201,44227,12,44257,44283,12,44313,44339,12,44369,44395,12,44425,44451,12,44481,44507,12,44537,44563,12,44593,44619,12,44649,44675,12,44705,44731,12,44761,44787,12,44817,44843,12,44873,44899,12,44929,44955,12,44985,45011,12,45041,45067,12,45097,45123,12,45153,45179,12,45209,45235,12,45265,45291,12,45321,45347,12,45377,45403,12,45433,45459,12,45489,45515,12,45545,45571,12,45601,45627,12,45657,45683,12,45713,45739,12,45769,45795,12,45825,45851,12,45881,45907,12,45937,45963,12,45993,46019,12,46049,46075,12,46105,46131,12,46161,46187,12,46217,46243,12,46273,46299,12,46329,46355,12,46385,46411,12,46441,46467,12,46497,46523,12,46553,46579,12,46609,46635,12,46665,46691,12,46721,46747,12,46777,46803,12,46833,46859,12,46889,46915,12,46945,46971,12,47001,47027,12,47057,47083,12,47113,47139,12,47169,47195,12,47225,47251,12,47281,47307,12,47337,47363,12,47393,47419,12,47449,47475,12,47505,47531,12,47561,47587,12,47617,47643,12,47673,47699,12,47729,47755,12,47785,47811,12,47841,47867,12,47897,47923,12,47953,47979,12,48009,48035,12,48065,48091,12,48121,48147,12,48177,48203,12,48233,48259,12,48289,48315,12,48345,48371,12,48401,48427,12,48457,48483,12,48513,48539,12,48569,48595,12,48625,48651,12,48681,48707,12,48737,48763,12,48793,48819,12,48849,48875,12,48905,48931,12,48961,48987,12,49017,49043,12,49073,49099,12,49129,49155,12,49185,49211,12,49241,49267,12,49297,49323,12,49353,49379,12,49409,49435,12,49465,49491,12,49521,49547,12,49577,49603,12,49633,49659,12,49689,49715,12,49745,49771,12,49801,49827,12,49857,49883,12,49913,49939,12,49969,49995,12,50025,50051,12,50081,50107,12,50137,50163,12,50193,50219,12,50249,50275,12,50305,50331,12,50361,50387,12,50417,50443,12,50473,50499,12,50529,50555,12,50585,50611,12,50641,50667,12,50697,50723,12,50753,50779,12,50809,50835,12,50865,50891,12,50921,50947,12,50977,51003,12,51033,51059,12,51089,51115,12,51145,51171,12,51201,51227,12,51257,51283,12,51313,51339,12,51369,51395,12,51425,51451,12,51481,51507,12,51537,51563,12,51593,51619,12,51649,51675,12,51705,51731,12,51761,51787,12,51817,51843,12,51873,51899,12,51929,51955,12,51985,52011,12,52041,52067,12,52097,52123,12,52153,52179,12,52209,52235,12,52265,52291,12,52321,52347,12,52377,52403,12,52433,52459,12,52489,52515,12,52545,52571,12,52601,52627,12,52657,52683,12,52713,52739,12,52769,52795,12,52825,52851,12,52881,52907,12,52937,52963,12,52993,53019,12,53049,53075,12,53105,53131,12,53161,53187,12,53217,53243,12,53273,53299,12,53329,53355,12,53385,53411,12,53441,53467,12,53497,53523,12,53553,53579,12,53609,53635,12,53665,53691,12,53721,53747,12,53777,53803,12,53833,53859,12,53889,53915,12,53945,53971,12,54001,54027,12,54057,54083,12,54113,54139,12,54169,54195,12,54225,54251,12,54281,54307,12,54337,54363,12,54393,54419,12,54449,54475,12,54505,54531,12,54561,54587,12,54617,54643,12,54673,54699,12,54729,54755,12,54785,54811,12,54841,54867,12,54897,54923,12,54953,54979,12,55009,55035,12,55065,55091,12,55121,55147,12,55177,55203,12,65024,65039,5,65520,65528,4,66422,66426,5,68152,68154,5,69291,69292,5,69633,69633,5,69747,69748,5,69811,69814,5,69826,69826,5,69932,69932,7,70016,70017,5,70079,70080,7,70095,70095,5,70196,70196,5,70367,70367,5,70402,70403,7,70464,70464,5,70487,70487,5,70709,70711,7,70725,70725,7,70833,70834,7,70843,70844,7,70849,70849,7,71090,71093,5,71103,71104,5,71227,71228,7,71339,71339,5,71344,71349,5,71458,71461,5,71727,71735,5,71985,71989,7,71998,71998,5,72002,72002,7,72154,72155,5,72193,72202,5,72251,72254,5,72281,72283,5,72344,72345,5,72766,72766,7,72874,72880,5,72885,72886,5,73023,73029,5,73104,73105,5,73111,73111,5,92912,92916,5,94095,94098,5,113824,113827,4,119142,119142,7,119155,119162,4,119362,119364,5,121476,121476,5,122888,122904,5,123184,123190,5,125252,125258,5,127183,127183,14,127340,127343,14,127377,127386,14,127491,127503,14,127548,127551,14,127744,127756,14,127761,127761,14,127769,127769,14,127773,127774,14,127780,127788,14,127796,127797,14,127820,127823,14,127869,127869,14,127894,127895,14,127902,127903,14,127943,127943,14,127947,127950,14,127972,127972,14,127988,127988,14,127992,127994,14,128009,128011,14,128019,128019,14,128023,128041,14,128064,128064,14,128102,128107,14,128174,128181,14,128238,128238,14,128246,128247,14,128254,128254,14,128264,128264,14,128278,128299,14,128329,128330,14,128348,128359,14,128371,128377,14,128392,128393,14,128401,128404,14,128421,128421,14,128433,128434,14,128450,128452,14,128476,128478,14,128483,128483,14,128495,128495,14,128506,128506,14,128519,128520,14,128528,128528,14,128534,128534,14,128538,128538,14,128540,128542,14,128544,128549,14,128552,128555,14,128557,128557,14,128560,128563,14,128565,128565,14,128567,128576,14,128581,128591,14,128641,128642,14,128646,128646,14,128648,128648,14,128650,128651,14,128653,128653,14,128655,128655,14,128657,128659,14,128661,128661,14,128663,128663,14,128665,128666,14,128674,128674,14,128676,128677,14,128679,128685,14,128690,128690,14,128694,128694,14,128697,128702,14,128704,128704,14,128710,128714,14,128716,128716,14,128720,128720,14,128723,128724,14,128726,128727,14,128733,128735,14,128742,128744,14,128746,128746,14,128749,128751,14,128753,128754,14,128756,128758,14,128761,128761,14,128763,128764,14,128884,128895,14,128992,129003,14,129008,129008,14,129036,129039,14,129114,129119,14,129198,129279,14,129293,129295,14,129305,129310,14,129312,129319,14,129328,129328,14,129331,129338,14,129343,129343,14,129351,129355,14,129357,129359,14,129375,129387,14,129393,129393,14,129395,129398,14,129401,129401,14,129403,129403,14,129408,129412,14,129426,129431,14,129443,129444,14,129451,129453,14,129456,129465,14,129472,129472,14,129475,129482,14,129484,129484,14,129488,129510,14,129536,129647,14,129652,129652,14,129656,129658,14,129661,129663,14,129667,129670,14,129680,129685,14,129705,129708,14,129712,129718,14,129723,129727,14,129731,129733,14,129744,129750,14,129754,129759,14,129768,129775,14,129783,129791,14,917504,917504,4,917506,917535,4,917632,917759,4,918000,921599,4,0,9,4,11,12,4,14,31,4,169,169,14,174,174,14,1155,1159,5,1425,1469,5,1473,1474,5,1479,1479,5,1552,1562,5,1611,1631,5,1750,1756,5,1759,1764,5,1770,1773,5,1809,1809,5,1958,1968,5,2045,2045,5,2075,2083,5,2089,2093,5,2192,2193,1,2250,2273,5,2275,2306,5,2362,2362,5,2364,2364,5,2369,2376,5,2381,2381,5,2385,2391,5,2433,2433,5,2492,2492,5,2495,2496,7,2503,2504,7,2509,2509,5,2530,2531,5,2561,2562,5,2620,2620,5,2625,2626,5,2635,2637,5,2672,2673,5,2689,2690,5,2748,2748,5,2753,2757,5,2761,2761,7,2765,2765,5,2810,2815,5,2818,2819,7,2878,2878,5,2880,2880,7,2887,2888,7,2893,2893,5,2903,2903,5,2946,2946,5,3007,3007,7,3009,3010,7,3018,3020,7,3031,3031,5,3073,3075,7,3132,3132,5,3137,3140,7,3146,3149,5,3170,3171,5,3202,3203,7,3262,3262,7,3264,3265,7,3267,3268,7,3271,3272,7,3276,3277,5,3298,3299,5,3330,3331,7,3390,3390,5,3393,3396,5,3402,3404,7,3406,3406,1,3426,3427,5,3458,3459,7,3535,3535,5,3538,3540,5,3544,3550,7,3570,3571,7,3635,3635,7,3655,3662,5,3763,3763,7,3784,3789,5,3893,3893,5,3897,3897,5,3953,3966,5,3968,3972,5,3981,3991,5,4038,4038,5,4145,4145,7,4153,4154,5,4157,4158,5,4184,4185,5,4209,4212,5,4228,4228,7,4237,4237,5,4352,4447,8,4520,4607,10,5906,5908,5,5938,5939,5,5970,5971,5,6068,6069,5,6071,6077,5,6086,6086,5,6089,6099,5,6155,6157,5,6159,6159,5,6313,6313,5,6435,6438,7,6441,6443,7,6450,6450,5,6457,6459,5,6681,6682,7,6741,6741,7,6743,6743,7,6752,6752,5,6757,6764,5,6771,6780,5,6832,6845,5,6847,6862,5,6916,6916,7,6965,6965,5,6971,6971,7,6973,6977,7,6979,6980,7,7040,7041,5,7073,7073,7,7078,7079,7,7082,7082,7,7142,7142,5,7144,7145,5,7149,7149,5,7151,7153,5,7204,7211,7,7220,7221,7,7376,7378,5,7393,7393,7,7405,7405,5,7415,7415,7,7616,7679,5,8204,8204,5,8206,8207,4,8233,8233,4,8252,8252,14,8288,8292,4,8294,8303,4,8413,8416,5,8418,8420,5,8482,8482,14,8596,8601,14,8986,8987,14,9096,9096,14,9193,9196,14,9199,9199,14,9201,9202,14,9208,9210,14,9642,9643,14,9664,9664,14,9728,9729,14,9732,9732,14,9735,9741,14,9743,9744,14,9746,9746,14,9750,9751,14,9753,9756,14,9758,9759,14,9761,9761,14,9764,9765,14,9767,9769,14,9771,9773,14,9775,9775,14,9784,9785,14,9787,9791,14,9793,9793,14,9795,9799,14,9812,9822,14,9824,9824,14,9827,9827,14,9829,9830,14,9832,9832,14,9851,9851,14,9854,9854,14,9856,9861,14,9874,9874,14,9876,9876,14,9878,9879,14,9881,9881,14,9883,9884,14,9888,9889,14,9895,9895,14,9898,9899,14,9904,9905,14,9917,9918,14,9924,9925,14,9928,9928,14,9934,9934,14,9936,9936,14,9938,9938,14,9940,9940,14,9961,9961,14,9963,9967,14,9970,9971,14,9973,9973,14,9975,9977,14,9979,9980,14,9982,9985,14,9987,9988,14,9992,9996,14,9998,9998,14,10000,10001,14,10004,10004,14,10013,10013,14,10024,10024,14,10052,10052,14,10060,10060,14,10067,10069,14,10083,10083,14,10085,10087,14,10145,10145,14,10175,10175,14,11013,11015,14,11088,11088,14,11503,11505,5,11744,11775,5,12334,12335,5,12349,12349,14,12951,12951,14,42607,42607,5,42612,42621,5,42736,42737,5,43014,43014,5,43043,43044,7,43047,43047,7,43136,43137,7,43204,43205,5,43263,43263,5,43335,43345,5,43360,43388,8,43395,43395,7,43444,43445,7,43450,43451,7,43454,43456,7,43561,43566,5,43569,43570,5,43573,43574,5,43596,43596,5,43644,43644,5,43698,43700,5,43710,43711,5,43755,43755,7,43758,43759,7,43766,43766,5,44005,44005,5,44008,44008,5,44012,44012,7,44032,44032,11,44060,44060,11,44088,44088,11,44116,44116,11,44144,44144,11,44172,44172,11,44200,44200,11,44228,44228,11,44256,44256,11,44284,44284,11,44312,44312,11,44340,44340,11,44368,44368,11,44396,44396,11,44424,44424,11,44452,44452,11,44480,44480,11,44508,44508,11,44536,44536,11,44564,44564,11,44592,44592,11,44620,44620,11,44648,44648,11,44676,44676,11,44704,44704,11,44732,44732,11,44760,44760,11,44788,44788,11,44816,44816,11,44844,44844,11,44872,44872,11,44900,44900,11,44928,44928,11,44956,44956,11,44984,44984,11,45012,45012,11,45040,45040,11,45068,45068,11,45096,45096,11,45124,45124,11,45152,45152,11,45180,45180,11,45208,45208,11,45236,45236,11,45264,45264,11,45292,45292,11,45320,45320,11,45348,45348,11,45376,45376,11,45404,45404,11,45432,45432,11,45460,45460,11,45488,45488,11,45516,45516,11,45544,45544,11,45572,45572,11,45600,45600,11,45628,45628,11,45656,45656,11,45684,45684,11,45712,45712,11,45740,45740,11,45768,45768,11,45796,45796,11,45824,45824,11,45852,45852,11,45880,45880,11,45908,45908,11,45936,45936,11,45964,45964,11,45992,45992,11,46020,46020,11,46048,46048,11,46076,46076,11,46104,46104,11,46132,46132,11,46160,46160,11,46188,46188,11,46216,46216,11,46244,46244,11,46272,46272,11,46300,46300,11,46328,46328,11,46356,46356,11,46384,46384,11,46412,46412,11,46440,46440,11,46468,46468,11,46496,46496,11,46524,46524,11,46552,46552,11,46580,46580,11,46608,46608,11,46636,46636,11,46664,46664,11,46692,46692,11,46720,46720,11,46748,46748,11,46776,46776,11,46804,46804,11,46832,46832,11,46860,46860,11,46888,46888,11,46916,46916,11,46944,46944,11,46972,46972,11,47000,47000,11,47028,47028,11,47056,47056,11,47084,47084,11,47112,47112,11,47140,47140,11,47168,47168,11,47196,47196,11,47224,47224,11,47252,47252,11,47280,47280,11,47308,47308,11,47336,47336,11,47364,47364,11,47392,47392,11,47420,47420,11,47448,47448,11,47476,47476,11,47504,47504,11,47532,47532,11,47560,47560,11,47588,47588,11,47616,47616,11,47644,47644,11,47672,47672,11,47700,47700,11,47728,47728,11,47756,47756,11,47784,47784,11,47812,47812,11,47840,47840,11,47868,47868,11,47896,47896,11,47924,47924,11,47952,47952,11,47980,47980,11,48008,48008,11,48036,48036,11,48064,48064,11,48092,48092,11,48120,48120,11,48148,48148,11,48176,48176,11,48204,48204,11,48232,48232,11,48260,48260,11,48288,48288,11,48316,48316,11,48344,48344,11,48372,48372,11,48400,48400,11,48428,48428,11,48456,48456,11,48484,48484,11,48512,48512,11,48540,48540,11,48568,48568,11,48596,48596,11,48624,48624,11,48652,48652,11,48680,48680,11,48708,48708,11,48736,48736,11,48764,48764,11,48792,48792,11,48820,48820,11,48848,48848,11,48876,48876,11,48904,48904,11,48932,48932,11,48960,48960,11,48988,48988,11,49016,49016,11,49044,49044,11,49072,49072,11,49100,49100,11,49128,49128,11,49156,49156,11,49184,49184,11,49212,49212,11,49240,49240,11,49268,49268,11,49296,49296,11,49324,49324,11,49352,49352,11,49380,49380,11,49408,49408,11,49436,49436,11,49464,49464,11,49492,49492,11,49520,49520,11,49548,49548,11,49576,49576,11,49604,49604,11,49632,49632,11,49660,49660,11,49688,49688,11,49716,49716,11,49744,49744,11,49772,49772,11,49800,49800,11,49828,49828,11,49856,49856,11,49884,49884,11,49912,49912,11,49940,49940,11,49968,49968,11,49996,49996,11,50024,50024,11,50052,50052,11,50080,50080,11,50108,50108,11,50136,50136,11,50164,50164,11,50192,50192,11,50220,50220,11,50248,50248,11,50276,50276,11,50304,50304,11,50332,50332,11,50360,50360,11,50388,50388,11,50416,50416,11,50444,50444,11,50472,50472,11,50500,50500,11,50528,50528,11,50556,50556,11,50584,50584,11,50612,50612,11,50640,50640,11,50668,50668,11,50696,50696,11,50724,50724,11,50752,50752,11,50780,50780,11,50808,50808,11,50836,50836,11,50864,50864,11,50892,50892,11,50920,50920,11,50948,50948,11,50976,50976,11,51004,51004,11,51032,51032,11,51060,51060,11,51088,51088,11,51116,51116,11,51144,51144,11,51172,51172,11,51200,51200,11,51228,51228,11,51256,51256,11,51284,51284,11,51312,51312,11,51340,51340,11,51368,51368,11,51396,51396,11,51424,51424,11,51452,51452,11,51480,51480,11,51508,51508,11,51536,51536,11,51564,51564,11,51592,51592,11,51620,51620,11,51648,51648,11,51676,51676,11,51704,51704,11,51732,51732,11,51760,51760,11,51788,51788,11,51816,51816,11,51844,51844,11,51872,51872,11,51900,51900,11,51928,51928,11,51956,51956,11,51984,51984,11,52012,52012,11,52040,52040,11,52068,52068,11,52096,52096,11,52124,52124,11,52152,52152,11,52180,52180,11,52208,52208,11,52236,52236,11,52264,52264,11,52292,52292,11,52320,52320,11,52348,52348,11,52376,52376,11,52404,52404,11,52432,52432,11,52460,52460,11,52488,52488,11,52516,52516,11,52544,52544,11,52572,52572,11,52600,52600,11,52628,52628,11,52656,52656,11,52684,52684,11,52712,52712,11,52740,52740,11,52768,52768,11,52796,52796,11,52824,52824,11,52852,52852,11,52880,52880,11,52908,52908,11,52936,52936,11,52964,52964,11,52992,52992,11,53020,53020,11,53048,53048,11,53076,53076,11,53104,53104,11,53132,53132,11,53160,53160,11,53188,53188,11,53216,53216,11,53244,53244,11,53272,53272,11,53300,53300,11,53328,53328,11,53356,53356,11,53384,53384,11,53412,53412,11,53440,53440,11,53468,53468,11,53496,53496,11,53524,53524,11,53552,53552,11,53580,53580,11,53608,53608,11,53636,53636,11,53664,53664,11,53692,53692,11,53720,53720,11,53748,53748,11,53776,53776,11,53804,53804,11,53832,53832,11,53860,53860,11,53888,53888,11,53916,53916,11,53944,53944,11,53972,53972,11,54000,54000,11,54028,54028,11,54056,54056,11,54084,54084,11,54112,54112,11,54140,54140,11,54168,54168,11,54196,54196,11,54224,54224,11,54252,54252,11,54280,54280,11,54308,54308,11,54336,54336,11,54364,54364,11,54392,54392,11,54420,54420,11,54448,54448,11,54476,54476,11,54504,54504,11,54532,54532,11,54560,54560,11,54588,54588,11,54616,54616,11,54644,54644,11,54672,54672,11,54700,54700,11,54728,54728,11,54756,54756,11,54784,54784,11,54812,54812,11,54840,54840,11,54868,54868,11,54896,54896,11,54924,54924,11,54952,54952,11,54980,54980,11,55008,55008,11,55036,55036,11,55064,55064,11,55092,55092,11,55120,55120,11,55148,55148,11,55176,55176,11,55216,55238,9,64286,64286,5,65056,65071,5,65438,65439,5,65529,65531,4,66272,66272,5,68097,68099,5,68108,68111,5,68159,68159,5,68900,68903,5,69446,69456,5,69632,69632,7,69634,69634,7,69744,69744,5,69759,69761,5,69808,69810,7,69815,69816,7,69821,69821,1,69837,69837,1,69927,69931,5,69933,69940,5,70003,70003,5,70018,70018,7,70070,70078,5,70082,70083,1,70094,70094,7,70188,70190,7,70194,70195,7,70197,70197,7,70206,70206,5,70368,70370,7,70400,70401,5,70459,70460,5,70463,70463,7,70465,70468,7,70475,70477,7,70498,70499,7,70512,70516,5,70712,70719,5,70722,70724,5,70726,70726,5,70832,70832,5,70835,70840,5,70842,70842,5,70845,70845,5,70847,70848,5,70850,70851,5,71088,71089,7,71096,71099,7,71102,71102,7,71132,71133,5,71219,71226,5,71229,71229,5,71231,71232,5,71340,71340,7,71342,71343,7,71350,71350,7,71453,71455,5,71462,71462,7,71724,71726,7,71736,71736,7,71984,71984,5,71991,71992,7,71997,71997,7,71999,71999,1,72001,72001,1,72003,72003,5,72148,72151,5,72156,72159,7,72164,72164,7,72243,72248,5,72250,72250,1,72263,72263,5,72279,72280,7,72324,72329,1,72343,72343,7,72751,72751,7,72760,72765,5,72767,72767,5,72873,72873,7,72881,72881,7,72884,72884,7,73009,73014,5,73020,73021,5,73030,73030,1,73098,73102,7,73107,73108,7,73110,73110,7,73459,73460,5,78896,78904,4,92976,92982,5,94033,94087,7,94180,94180,5,113821,113822,5,118528,118573,5,119141,119141,5,119143,119145,5,119150,119154,5,119163,119170,5,119210,119213,5,121344,121398,5,121461,121461,5,121499,121503,5,122880,122886,5,122907,122913,5,122918,122922,5,123566,123566,5,125136,125142,5,126976,126979,14,126981,127182,14,127184,127231,14,127279,127279,14,127344,127345,14,127374,127374,14,127405,127461,14,127489,127490,14,127514,127514,14,127538,127546,14,127561,127567,14,127570,127743,14,127757,127758,14,127760,127760,14,127762,127762,14,127766,127768,14,127770,127770,14,127772,127772,14,127775,127776,14,127778,127779,14,127789,127791,14,127794,127795,14,127798,127798,14,127819,127819,14,127824,127824,14,127868,127868,14,127870,127871,14,127892,127893,14,127896,127896,14,127900,127901,14,127904,127940,14,127942,127942,14,127944,127944,14,127946,127946,14,127951,127955,14,127968,127971,14,127973,127984,14,127987,127987,14,127989,127989,14,127991,127991,14,127995,127999,5,128008,128008,14,128012,128014,14,128017,128018,14,128020,128020,14,128022,128022,14,128042,128042,14,128063,128063,14,128065,128065,14,128101,128101,14,128108,128109,14,128173,128173,14,128182,128183,14,128236,128237,14,128239,128239,14,128245,128245,14,128248,128248,14,128253,128253,14,128255,128258,14,128260,128263,14,128265,128265,14,128277,128277,14,128300,128301,14,128326,128328,14,128331,128334,14,128336,128347,14,128360,128366,14,128369,128370,14,128378,128378,14,128391,128391,14,128394,128397,14,128400,128400,14,128405,128406,14,128420,128420,14,128422,128423,14,128425,128432,14,128435,128443,14,128445,128449,14,128453,128464,14,128468,128475,14,128479,128480,14,128482,128482,14,128484,128487,14,128489,128494,14,128496,128498,14,128500,128505,14,128507,128511,14,128513,128518,14,128521,128525,14,128527,128527,14,128529,128529,14,128533,128533,14,128535,128535,14,128537,128537,14]")}function z(Y,se){if(Y===0)return 0;const ge=V(Y,se);if(ge!==void 0)return ge;const me=new F(se,Y);return me.prevCodePoint(),me.offset}e.getLeftDeleteOffset=z;function V(Y,se){const ge=new F(se,Y);let me=ge.prevCodePoint();for(;$(me)||me===65039||me===8419;){if(ge.offset===0)return;me=ge.prevCodePoint()}if(!x(me))return;let le=ge.offset;return le>0&&ge.prevCodePoint()===8205&&(le=ge.offset),le}function $(Y){return 127995<=Y&&Y<=127999}e.noBreakWhitespace="\xA0";class K{constructor(se){this.confusableDictionary=se}static getInstance(se){return K.cache.get(Array.from(se))}static getLocales(){return K._locales.getValue()}isAmbiguous(se){return this.confusableDictionary.has(se)}getPrimaryConfusable(se){return this.confusableDictionary.get(se)}getConfusableCodePoints(){return new Set(this.confusableDictionary.keys())}}e.AmbiguousCharacters=K,D=K,K.ambiguousCharacterData=new m.Lazy(()=>JSON.parse('{"_common":[8232,32,8233,32,5760,32,8192,32,8193,32,8194,32,8195,32,8196,32,8197,32,8198,32,8200,32,8201,32,8202,32,8287,32,8199,32,8239,32,2042,95,65101,95,65102,95,65103,95,8208,45,8209,45,8210,45,65112,45,1748,45,8259,45,727,45,8722,45,10134,45,11450,45,1549,44,1643,44,8218,44,184,44,42233,44,894,59,2307,58,2691,58,1417,58,1795,58,1796,58,5868,58,65072,58,6147,58,6153,58,8282,58,1475,58,760,58,42889,58,8758,58,720,58,42237,58,451,33,11601,33,660,63,577,63,2429,63,5038,63,42731,63,119149,46,8228,46,1793,46,1794,46,42510,46,68176,46,1632,46,1776,46,42232,46,1373,96,65287,96,8219,96,8242,96,1370,96,1523,96,8175,96,65344,96,900,96,8189,96,8125,96,8127,96,8190,96,697,96,884,96,712,96,714,96,715,96,756,96,699,96,701,96,700,96,702,96,42892,96,1497,96,2036,96,2037,96,5194,96,5836,96,94033,96,94034,96,65339,91,10088,40,10098,40,12308,40,64830,40,65341,93,10089,41,10099,41,12309,41,64831,41,10100,123,119060,123,10101,125,65342,94,8270,42,1645,42,8727,42,66335,42,5941,47,8257,47,8725,47,8260,47,9585,47,10187,47,10744,47,119354,47,12755,47,12339,47,11462,47,20031,47,12035,47,65340,92,65128,92,8726,92,10189,92,10741,92,10745,92,119311,92,119355,92,12756,92,20022,92,12034,92,42872,38,708,94,710,94,5869,43,10133,43,66203,43,8249,60,10094,60,706,60,119350,60,5176,60,5810,60,5120,61,11840,61,12448,61,42239,61,8250,62,10095,62,707,62,119351,62,5171,62,94015,62,8275,126,732,126,8128,126,8764,126,65372,124,65293,45,120784,50,120794,50,120804,50,120814,50,120824,50,130034,50,42842,50,423,50,1000,50,42564,50,5311,50,42735,50,119302,51,120785,51,120795,51,120805,51,120815,51,120825,51,130035,51,42923,51,540,51,439,51,42858,51,11468,51,1248,51,94011,51,71882,51,120786,52,120796,52,120806,52,120816,52,120826,52,130036,52,5070,52,71855,52,120787,53,120797,53,120807,53,120817,53,120827,53,130037,53,444,53,71867,53,120788,54,120798,54,120808,54,120818,54,120828,54,130038,54,11474,54,5102,54,71893,54,119314,55,120789,55,120799,55,120809,55,120819,55,120829,55,130039,55,66770,55,71878,55,2819,56,2538,56,2666,56,125131,56,120790,56,120800,56,120810,56,120820,56,120830,56,130040,56,547,56,546,56,66330,56,2663,57,2920,57,2541,57,3437,57,120791,57,120801,57,120811,57,120821,57,120831,57,130041,57,42862,57,11466,57,71884,57,71852,57,71894,57,9082,97,65345,97,119834,97,119886,97,119938,97,119990,97,120042,97,120094,97,120146,97,120198,97,120250,97,120302,97,120354,97,120406,97,120458,97,593,97,945,97,120514,97,120572,97,120630,97,120688,97,120746,97,65313,65,119808,65,119860,65,119912,65,119964,65,120016,65,120068,65,120120,65,120172,65,120224,65,120276,65,120328,65,120380,65,120432,65,913,65,120488,65,120546,65,120604,65,120662,65,120720,65,5034,65,5573,65,42222,65,94016,65,66208,65,119835,98,119887,98,119939,98,119991,98,120043,98,120095,98,120147,98,120199,98,120251,98,120303,98,120355,98,120407,98,120459,98,388,98,5071,98,5234,98,5551,98,65314,66,8492,66,119809,66,119861,66,119913,66,120017,66,120069,66,120121,66,120173,66,120225,66,120277,66,120329,66,120381,66,120433,66,42932,66,914,66,120489,66,120547,66,120605,66,120663,66,120721,66,5108,66,5623,66,42192,66,66178,66,66209,66,66305,66,65347,99,8573,99,119836,99,119888,99,119940,99,119992,99,120044,99,120096,99,120148,99,120200,99,120252,99,120304,99,120356,99,120408,99,120460,99,7428,99,1010,99,11429,99,43951,99,66621,99,128844,67,71922,67,71913,67,65315,67,8557,67,8450,67,8493,67,119810,67,119862,67,119914,67,119966,67,120018,67,120174,67,120226,67,120278,67,120330,67,120382,67,120434,67,1017,67,11428,67,5087,67,42202,67,66210,67,66306,67,66581,67,66844,67,8574,100,8518,100,119837,100,119889,100,119941,100,119993,100,120045,100,120097,100,120149,100,120201,100,120253,100,120305,100,120357,100,120409,100,120461,100,1281,100,5095,100,5231,100,42194,100,8558,68,8517,68,119811,68,119863,68,119915,68,119967,68,120019,68,120071,68,120123,68,120175,68,120227,68,120279,68,120331,68,120383,68,120435,68,5024,68,5598,68,5610,68,42195,68,8494,101,65349,101,8495,101,8519,101,119838,101,119890,101,119942,101,120046,101,120098,101,120150,101,120202,101,120254,101,120306,101,120358,101,120410,101,120462,101,43826,101,1213,101,8959,69,65317,69,8496,69,119812,69,119864,69,119916,69,120020,69,120072,69,120124,69,120176,69,120228,69,120280,69,120332,69,120384,69,120436,69,917,69,120492,69,120550,69,120608,69,120666,69,120724,69,11577,69,5036,69,42224,69,71846,69,71854,69,66182,69,119839,102,119891,102,119943,102,119995,102,120047,102,120099,102,120151,102,120203,102,120255,102,120307,102,120359,102,120411,102,120463,102,43829,102,42905,102,383,102,7837,102,1412,102,119315,70,8497,70,119813,70,119865,70,119917,70,120021,70,120073,70,120125,70,120177,70,120229,70,120281,70,120333,70,120385,70,120437,70,42904,70,988,70,120778,70,5556,70,42205,70,71874,70,71842,70,66183,70,66213,70,66853,70,65351,103,8458,103,119840,103,119892,103,119944,103,120048,103,120100,103,120152,103,120204,103,120256,103,120308,103,120360,103,120412,103,120464,103,609,103,7555,103,397,103,1409,103,119814,71,119866,71,119918,71,119970,71,120022,71,120074,71,120126,71,120178,71,120230,71,120282,71,120334,71,120386,71,120438,71,1292,71,5056,71,5107,71,42198,71,65352,104,8462,104,119841,104,119945,104,119997,104,120049,104,120101,104,120153,104,120205,104,120257,104,120309,104,120361,104,120413,104,120465,104,1211,104,1392,104,5058,104,65320,72,8459,72,8460,72,8461,72,119815,72,119867,72,119919,72,120023,72,120179,72,120231,72,120283,72,120335,72,120387,72,120439,72,919,72,120494,72,120552,72,120610,72,120668,72,120726,72,11406,72,5051,72,5500,72,42215,72,66255,72,731,105,9075,105,65353,105,8560,105,8505,105,8520,105,119842,105,119894,105,119946,105,119998,105,120050,105,120102,105,120154,105,120206,105,120258,105,120310,105,120362,105,120414,105,120466,105,120484,105,618,105,617,105,953,105,8126,105,890,105,120522,105,120580,105,120638,105,120696,105,120754,105,1110,105,42567,105,1231,105,43893,105,5029,105,71875,105,65354,106,8521,106,119843,106,119895,106,119947,106,119999,106,120051,106,120103,106,120155,106,120207,106,120259,106,120311,106,120363,106,120415,106,120467,106,1011,106,1112,106,65322,74,119817,74,119869,74,119921,74,119973,74,120025,74,120077,74,120129,74,120181,74,120233,74,120285,74,120337,74,120389,74,120441,74,42930,74,895,74,1032,74,5035,74,5261,74,42201,74,119844,107,119896,107,119948,107,120000,107,120052,107,120104,107,120156,107,120208,107,120260,107,120312,107,120364,107,120416,107,120468,107,8490,75,65323,75,119818,75,119870,75,119922,75,119974,75,120026,75,120078,75,120130,75,120182,75,120234,75,120286,75,120338,75,120390,75,120442,75,922,75,120497,75,120555,75,120613,75,120671,75,120729,75,11412,75,5094,75,5845,75,42199,75,66840,75,1472,108,8739,73,9213,73,65512,73,1633,108,1777,73,66336,108,125127,108,120783,73,120793,73,120803,73,120813,73,120823,73,130033,73,65321,73,8544,73,8464,73,8465,73,119816,73,119868,73,119920,73,120024,73,120128,73,120180,73,120232,73,120284,73,120336,73,120388,73,120440,73,65356,108,8572,73,8467,108,119845,108,119897,108,119949,108,120001,108,120053,108,120105,73,120157,73,120209,73,120261,73,120313,73,120365,73,120417,73,120469,73,448,73,120496,73,120554,73,120612,73,120670,73,120728,73,11410,73,1030,73,1216,73,1493,108,1503,108,1575,108,126464,108,126592,108,65166,108,65165,108,1994,108,11599,73,5825,73,42226,73,93992,73,66186,124,66313,124,119338,76,8556,76,8466,76,119819,76,119871,76,119923,76,120027,76,120079,76,120131,76,120183,76,120235,76,120287,76,120339,76,120391,76,120443,76,11472,76,5086,76,5290,76,42209,76,93974,76,71843,76,71858,76,66587,76,66854,76,65325,77,8559,77,8499,77,119820,77,119872,77,119924,77,120028,77,120080,77,120132,77,120184,77,120236,77,120288,77,120340,77,120392,77,120444,77,924,77,120499,77,120557,77,120615,77,120673,77,120731,77,1018,77,11416,77,5047,77,5616,77,5846,77,42207,77,66224,77,66321,77,119847,110,119899,110,119951,110,120003,110,120055,110,120107,110,120159,110,120211,110,120263,110,120315,110,120367,110,120419,110,120471,110,1400,110,1404,110,65326,78,8469,78,119821,78,119873,78,119925,78,119977,78,120029,78,120081,78,120185,78,120237,78,120289,78,120341,78,120393,78,120445,78,925,78,120500,78,120558,78,120616,78,120674,78,120732,78,11418,78,42208,78,66835,78,3074,111,3202,111,3330,111,3458,111,2406,111,2662,111,2790,111,3046,111,3174,111,3302,111,3430,111,3664,111,3792,111,4160,111,1637,111,1781,111,65359,111,8500,111,119848,111,119900,111,119952,111,120056,111,120108,111,120160,111,120212,111,120264,111,120316,111,120368,111,120420,111,120472,111,7439,111,7441,111,43837,111,959,111,120528,111,120586,111,120644,111,120702,111,120760,111,963,111,120532,111,120590,111,120648,111,120706,111,120764,111,11423,111,4351,111,1413,111,1505,111,1607,111,126500,111,126564,111,126596,111,65259,111,65260,111,65258,111,65257,111,1726,111,64428,111,64429,111,64427,111,64426,111,1729,111,64424,111,64425,111,64423,111,64422,111,1749,111,3360,111,4125,111,66794,111,71880,111,71895,111,66604,111,1984,79,2534,79,2918,79,12295,79,70864,79,71904,79,120782,79,120792,79,120802,79,120812,79,120822,79,130032,79,65327,79,119822,79,119874,79,119926,79,119978,79,120030,79,120082,79,120134,79,120186,79,120238,79,120290,79,120342,79,120394,79,120446,79,927,79,120502,79,120560,79,120618,79,120676,79,120734,79,11422,79,1365,79,11604,79,4816,79,2848,79,66754,79,42227,79,71861,79,66194,79,66219,79,66564,79,66838,79,9076,112,65360,112,119849,112,119901,112,119953,112,120005,112,120057,112,120109,112,120161,112,120213,112,120265,112,120317,112,120369,112,120421,112,120473,112,961,112,120530,112,120544,112,120588,112,120602,112,120646,112,120660,112,120704,112,120718,112,120762,112,120776,112,11427,112,65328,80,8473,80,119823,80,119875,80,119927,80,119979,80,120031,80,120083,80,120187,80,120239,80,120291,80,120343,80,120395,80,120447,80,929,80,120504,80,120562,80,120620,80,120678,80,120736,80,11426,80,5090,80,5229,80,42193,80,66197,80,119850,113,119902,113,119954,113,120006,113,120058,113,120110,113,120162,113,120214,113,120266,113,120318,113,120370,113,120422,113,120474,113,1307,113,1379,113,1382,113,8474,81,119824,81,119876,81,119928,81,119980,81,120032,81,120084,81,120188,81,120240,81,120292,81,120344,81,120396,81,120448,81,11605,81,119851,114,119903,114,119955,114,120007,114,120059,114,120111,114,120163,114,120215,114,120267,114,120319,114,120371,114,120423,114,120475,114,43847,114,43848,114,7462,114,11397,114,43905,114,119318,82,8475,82,8476,82,8477,82,119825,82,119877,82,119929,82,120033,82,120189,82,120241,82,120293,82,120345,82,120397,82,120449,82,422,82,5025,82,5074,82,66740,82,5511,82,42211,82,94005,82,65363,115,119852,115,119904,115,119956,115,120008,115,120060,115,120112,115,120164,115,120216,115,120268,115,120320,115,120372,115,120424,115,120476,115,42801,115,445,115,1109,115,43946,115,71873,115,66632,115,65331,83,119826,83,119878,83,119930,83,119982,83,120034,83,120086,83,120138,83,120190,83,120242,83,120294,83,120346,83,120398,83,120450,83,1029,83,1359,83,5077,83,5082,83,42210,83,94010,83,66198,83,66592,83,119853,116,119905,116,119957,116,120009,116,120061,116,120113,116,120165,116,120217,116,120269,116,120321,116,120373,116,120425,116,120477,116,8868,84,10201,84,128872,84,65332,84,119827,84,119879,84,119931,84,119983,84,120035,84,120087,84,120139,84,120191,84,120243,84,120295,84,120347,84,120399,84,120451,84,932,84,120507,84,120565,84,120623,84,120681,84,120739,84,11430,84,5026,84,42196,84,93962,84,71868,84,66199,84,66225,84,66325,84,119854,117,119906,117,119958,117,120010,117,120062,117,120114,117,120166,117,120218,117,120270,117,120322,117,120374,117,120426,117,120478,117,42911,117,7452,117,43854,117,43858,117,651,117,965,117,120534,117,120592,117,120650,117,120708,117,120766,117,1405,117,66806,117,71896,117,8746,85,8899,85,119828,85,119880,85,119932,85,119984,85,120036,85,120088,85,120140,85,120192,85,120244,85,120296,85,120348,85,120400,85,120452,85,1357,85,4608,85,66766,85,5196,85,42228,85,94018,85,71864,85,8744,118,8897,118,65366,118,8564,118,119855,118,119907,118,119959,118,120011,118,120063,118,120115,118,120167,118,120219,118,120271,118,120323,118,120375,118,120427,118,120479,118,7456,118,957,118,120526,118,120584,118,120642,118,120700,118,120758,118,1141,118,1496,118,71430,118,43945,118,71872,118,119309,86,1639,86,1783,86,8548,86,119829,86,119881,86,119933,86,119985,86,120037,86,120089,86,120141,86,120193,86,120245,86,120297,86,120349,86,120401,86,120453,86,1140,86,11576,86,5081,86,5167,86,42719,86,42214,86,93960,86,71840,86,66845,86,623,119,119856,119,119908,119,119960,119,120012,119,120064,119,120116,119,120168,119,120220,119,120272,119,120324,119,120376,119,120428,119,120480,119,7457,119,1121,119,1309,119,1377,119,71434,119,71438,119,71439,119,43907,119,71919,87,71910,87,119830,87,119882,87,119934,87,119986,87,120038,87,120090,87,120142,87,120194,87,120246,87,120298,87,120350,87,120402,87,120454,87,1308,87,5043,87,5076,87,42218,87,5742,120,10539,120,10540,120,10799,120,65368,120,8569,120,119857,120,119909,120,119961,120,120013,120,120065,120,120117,120,120169,120,120221,120,120273,120,120325,120,120377,120,120429,120,120481,120,5441,120,5501,120,5741,88,9587,88,66338,88,71916,88,65336,88,8553,88,119831,88,119883,88,119935,88,119987,88,120039,88,120091,88,120143,88,120195,88,120247,88,120299,88,120351,88,120403,88,120455,88,42931,88,935,88,120510,88,120568,88,120626,88,120684,88,120742,88,11436,88,11613,88,5815,88,42219,88,66192,88,66228,88,66327,88,66855,88,611,121,7564,121,65369,121,119858,121,119910,121,119962,121,120014,121,120066,121,120118,121,120170,121,120222,121,120274,121,120326,121,120378,121,120430,121,120482,121,655,121,7935,121,43866,121,947,121,8509,121,120516,121,120574,121,120632,121,120690,121,120748,121,1199,121,4327,121,71900,121,65337,89,119832,89,119884,89,119936,89,119988,89,120040,89,120092,89,120144,89,120196,89,120248,89,120300,89,120352,89,120404,89,120456,89,933,89,978,89,120508,89,120566,89,120624,89,120682,89,120740,89,11432,89,1198,89,5033,89,5053,89,42220,89,94019,89,71844,89,66226,89,119859,122,119911,122,119963,122,120015,122,120067,122,120119,122,120171,122,120223,122,120275,122,120327,122,120379,122,120431,122,120483,122,7458,122,43923,122,71876,122,66293,90,71909,90,65338,90,8484,90,8488,90,119833,90,119885,90,119937,90,119989,90,120041,90,120197,90,120249,90,120301,90,120353,90,120405,90,120457,90,918,90,120493,90,120551,90,120609,90,120667,90,120725,90,5059,90,42204,90,71849,90,65282,34,65284,36,65285,37,65286,38,65290,42,65291,43,65294,46,65295,47,65296,48,65297,49,65298,50,65299,51,65300,52,65301,53,65302,54,65303,55,65304,56,65305,57,65308,60,65309,61,65310,62,65312,64,65316,68,65318,70,65319,71,65324,76,65329,81,65330,82,65333,85,65334,86,65335,87,65343,95,65346,98,65348,100,65350,102,65355,107,65357,109,65358,110,65361,113,65362,114,65364,116,65365,117,65367,119,65370,122,65371,123,65373,125],"_default":[160,32,8211,45,65374,126,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"cs":[65374,126,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"de":[65374,126,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"es":[8211,45,65374,126,65306,58,65281,33,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"fr":[65374,126,65306,58,65281,33,8216,96,8245,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"it":[160,32,8211,45,65374,126,65306,58,65281,33,8216,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"ja":[8211,45,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65292,44,65307,59],"ko":[8211,45,65374,126,65306,58,65281,33,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"pl":[65374,126,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"pt-BR":[65374,126,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"qps-ploc":[160,32,8211,45,65374,126,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"ru":[65374,126,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,12494,47,305,105,921,73,1009,112,215,120,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"tr":[160,32,8211,45,65374,126,65306,58,65281,33,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"zh-hans":[65374,126,65306,58,65281,33,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65288,40,65289,41],"zh-hant":[8211,45,65374,126,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65307,59]}')),K.cache=new y.LRUCachedComputed(Y=>{function se(de){const fe=new Map;for(let _e=0;_e<de.length;_e+=2)fe.set(de[_e],de[_e+1]);return fe}function ge(de,fe){const _e=new Map(de);for(const[Le,Te]of fe)_e.set(Le,Te);return _e}function me(de,fe){if(!de)return fe;const _e=new Map;for(const[Le,Te]of de)fe.has(Le)&&_e.set(Le,Te);return _e}const le=D.ambiguousCharacterData.getValue();let he=Y.filter(de=>!de.startsWith("_")&&de in le);he.length===0&&(he=["_default"]);let ve;for(const de of he){const fe=se(le[de]);ve=me(ve,fe)}const pe=se(le._common),be=ge(pe,ve);return new K(be)}),K._locales=new m.Lazy(()=>Object.keys(K.ambiguousCharacterData.getValue()).filter(Y=>!Y.startsWith("_")));class J{static getRawData(){return JSON.parse("[9,10,11,12,13,32,127,160,173,847,1564,4447,4448,6068,6069,6155,6156,6157,6158,7355,7356,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8203,8204,8205,8206,8207,8234,8235,8236,8237,8238,8239,8287,8288,8289,8290,8291,8292,8293,8294,8295,8296,8297,8298,8299,8300,8301,8302,8303,10240,12288,12644,65024,65025,65026,65027,65028,65029,65030,65031,65032,65033,65034,65035,65036,65037,65038,65039,65279,65440,65520,65521,65522,65523,65524,65525,65526,65527,65528,65532,78844,119155,119156,119157,119158,119159,119160,119161,119162,917504,917505,917506,917507,917508,917509,917510,917511,917512,917513,917514,917515,917516,917517,917518,917519,917520,917521,917522,917523,917524,917525,917526,917527,917528,917529,917530,917531,917532,917533,917534,917535,917536,917537,917538,917539,917540,917541,917542,917543,917544,917545,917546,917547,917548,917549,917550,917551,917552,917553,917554,917555,917556,917557,917558,917559,917560,917561,917562,917563,917564,917565,917566,917567,917568,917569,917570,917571,917572,917573,917574,917575,917576,917577,917578,917579,917580,917581,917582,917583,917584,917585,917586,917587,917588,917589,917590,917591,917592,917593,917594,917595,917596,917597,917598,917599,917600,917601,917602,917603,917604,917605,917606,917607,917608,917609,917610,917611,917612,917613,917614,917615,917616,917617,917618,917619,917620,917621,917622,917623,917624,917625,917626,917627,917628,917629,917630,917631,917760,917761,917762,917763,917764,917765,917766,917767,917768,917769,917770,917771,917772,917773,917774,917775,917776,917777,917778,917779,917780,917781,917782,917783,917784,917785,917786,917787,917788,917789,917790,917791,917792,917793,917794,917795,917796,917797,917798,917799,917800,917801,917802,917803,917804,917805,917806,917807,917808,917809,917810,917811,917812,917813,917814,917815,917816,917817,917818,917819,917820,917821,917822,917823,917824,917825,917826,917827,917828,917829,917830,917831,917832,917833,917834,917835,917836,917837,917838,917839,917840,917841,917842,917843,917844,917845,917846,917847,917848,917849,917850,917851,917852,917853,917854,917855,917856,917857,917858,917859,917860,917861,917862,917863,917864,917865,917866,917867,917868,917869,917870,917871,917872,917873,917874,917875,917876,917877,917878,917879,917880,917881,917882,917883,917884,917885,917886,917887,917888,917889,917890,917891,917892,917893,917894,917895,917896,917897,917898,917899,917900,917901,917902,917903,917904,917905,917906,917907,917908,917909,917910,917911,917912,917913,917914,917915,917916,917917,917918,917919,917920,917921,917922,917923,917924,917925,917926,917927,917928,917929,917930,917931,917932,917933,917934,917935,917936,917937,917938,917939,917940,917941,917942,917943,917944,917945,917946,917947,917948,917949,917950,917951,917952,917953,917954,917955,917956,917957,917958,917959,917960,917961,917962,917963,917964,917965,917966,917967,917968,917969,917970,917971,917972,917973,917974,917975,917976,917977,917978,917979,917980,917981,917982,917983,917984,917985,917986,917987,917988,917989,917990,917991,917992,917993,917994,917995,917996,917997,917998,917999]")}static getData(){return this._data||(this._data=new Set(J.getRawData())),this._data}static isInvisibleCharacter(se){return J.getData().has(se)}static get codePoints(){return J.getData()}}e.InvisibleCharacters=J,J._data=void 0}),define(te[166],ie([1,0,82,17,8]),function(j,e,y,m,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.hasDriveLetter=e.isRootOrDriveLetter=e.isWindowsDriveLetter=e.isEqualOrParent=e.getRoot=e.toPosixPath=e.toSlashes=e.isPathSeparator=void 0;function I(n){return n===47||n===92}e.isPathSeparator=I;function w(n){return n.replace(/[\\/]/g,y.posix.sep)}e.toSlashes=w;function b(n){return n.indexOf("/")===-1&&(n=w(n)),/^[a-zA-Z]:(\/|$)/.test(n)&&(n="/"+n),n}e.toPosixPath=b;function p(n,l=y.posix.sep){if(!n)return"";const c=n.length,r=n.charCodeAt(0);if(I(r)){if(I(n.charCodeAt(1))&&!I(n.charCodeAt(2))){let o=3;const a=o;for(;o<c&&!I(n.charCodeAt(o));o++);if(a!==o&&!I(n.charCodeAt(o+1))){for(o+=1;o<c;o++)if(I(n.charCodeAt(o)))return n.slice(0,o+1).replace(/[\\/]/g,l)}}return l}else if(g(r)&&n.charCodeAt(1)===58)return I(n.charCodeAt(2))?n.slice(0,2)+l:n.slice(0,2);let s=n.indexOf("://");if(s!==-1){for(s+=3;s<c;s++)if(I(n.charCodeAt(s)))return n.slice(0,s+1)}return""}e.getRoot=p;function h(n,l,c,r=y.sep){if(n===l)return!0;if(!n||!l||l.length>n.length)return!1;if(c){if(!(0,D.startsWithIgnoreCase)(n,l))return!1;if(l.length===n.length)return!0;let o=l.length;return l.charAt(l.length-1)===r&&o--,n.charAt(o)===r}return l.charAt(l.length-1)!==r&&(l+=r),n.indexOf(l)===0}e.isEqualOrParent=h;function g(n){return n>=65&&n<=90||n>=97&&n<=122}e.isWindowsDriveLetter=g;function t(n){const l=(0,y.normalize)(n);return m.isWindows?n.length>3?!1:i(l)&&(n.length===2||l.charCodeAt(2)===92):l===y.posix.sep}e.isRootOrDriveLetter=t;function i(n,l){return(l!==void 0?l:m.isWindows)?g(n.charCodeAt(0))&&n.charCodeAt(1)===58:!1}e.hasDriveLetter=i}),define(te[112],ie([1,0,8]),function(j,e,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.StringSHA1=e.toHexString=e.stringHash=e.numberHash=e.doHash=e.hash=void 0;function m(c){return D(c,0)}e.hash=m;function D(c,r){switch(typeof c){case"object":return c===null?I(349,r):Array.isArray(c)?p(c,r):h(c,r);case"string":return b(c,r);case"boolean":return w(c,r);case"number":return I(c,r);case"undefined":return I(937,r);default:return I(617,r)}}e.doHash=D;function I(c,r){return(r<<5)-r+c|0}e.numberHash=I;function w(c,r){return I(c?433:863,r)}function b(c,r){r=I(149417,r);for(let s=0,o=c.length;s<o;s++)r=I(c.charCodeAt(s),r);return r}e.stringHash=b;function p(c,r){return r=I(104579,r),c.reduce((s,o)=>D(o,s),r)}function h(c,r){return r=I(181387,r),Object.keys(c).sort().reduce((s,o)=>(s=b(o,s),D(c[o],s)),r)}function g(c,r,s=32){const o=s-r,a=~((1<<o)-1);return(c<<r|(a&c)>>>o)>>>0}function t(c,r=0,s=c.byteLength,o=0){for(let a=0;a<s;a++)c[r+a]=o}function i(c,r,s="0"){for(;c.length<r;)c=s+c;return c}function n(c,r=32){return c instanceof ArrayBuffer?Array.from(new Uint8Array(c)).map(s=>s.toString(16).padStart(2,"0")).join(""):i((c>>>0).toString(16),r/4)}e.toHexString=n;class l{constructor(){this._h0=1732584193,this._h1=4023233417,this._h2=2562383102,this._h3=271733878,this._h4=3285377520,this._buff=new Uint8Array(64+3),this._buffDV=new DataView(this._buff.buffer),this._buffLen=0,this._totalLen=0,this._leftoverHighSurrogate=0,this._finished=!1}update(r){const s=r.length;if(s===0)return;const o=this._buff;let a=this._buffLen,d=this._leftoverHighSurrogate,u,f;for(d!==0?(u=d,f=-1,d=0):(u=r.charCodeAt(0),f=0);;){let S=u;if(y.isHighSurrogate(u))if(f+1<s){const v=r.charCodeAt(f+1);y.isLowSurrogate(v)?(f++,S=y.computeCodePoint(u,v)):S=65533}else{d=u;break}else y.isLowSurrogate(u)&&(S=65533);if(a=this._push(o,a,S),f++,f<s)u=r.charCodeAt(f);else break}this._buffLen=a,this._leftoverHighSurrogate=d}_push(r,s,o){return o<128?r[s++]=o:o<2048?(r[s++]=192|(o&1984)>>>6,r[s++]=128|(o&63)>>>0):o<65536?(r[s++]=224|(o&61440)>>>12,r[s++]=128|(o&4032)>>>6,r[s++]=128|(o&63)>>>0):(r[s++]=240|(o&1835008)>>>18,r[s++]=128|(o&258048)>>>12,r[s++]=128|(o&4032)>>>6,r[s++]=128|(o&63)>>>0),s>=64&&(this._step(),s-=64,this._totalLen+=64,r[0]=r[64+0],r[1]=r[64+1],r[2]=r[64+2]),s}digest(){return this._finished||(this._finished=!0,this._leftoverHighSurrogate&&(this._leftoverHighSurrogate=0,this._buffLen=this._push(this._buff,this._buffLen,65533)),this._totalLen+=this._buffLen,this._wrapUp()),n(this._h0)+n(this._h1)+n(this._h2)+n(this._h3)+n(this._h4)}_wrapUp(){this._buff[this._buffLen++]=128,t(this._buff,this._buffLen),this._buffLen>56&&(this._step(),t(this._buff));const r=8*this._totalLen;this._buffDV.setUint32(56,Math.floor(r/4294967296),!1),this._buffDV.setUint32(60,r%4294967296,!1),this._step()}_step(){const r=l._bigBlock32,s=this._buffDV;for(let _=0;_<64;_+=4)r.setUint32(_,s.getUint32(_,!1),!1);for(let _=64;_<320;_+=4)r.setUint32(_,g(r.getUint32(_-12,!1)^r.getUint32(_-32,!1)^r.getUint32(_-56,!1)^r.getUint32(_-64,!1),1),!1);let o=this._h0,a=this._h1,d=this._h2,u=this._h3,f=this._h4,S,v,C;for(let _=0;_<80;_++)_<20?(S=a&d|~a&u,v=1518500249):_<40?(S=a^d^u,v=1859775393):_<60?(S=a&d|a&u|d&u,v=2400959708):(S=a^d^u,v=3395469782),C=g(o,5)+S+f+v+r.getUint32(_*4,!1)&4294967295,f=u,u=d,d=g(a,30),a=o,o=C;this._h0=this._h0+o&4294967295,this._h1=this._h1+a&4294967295,this._h2=this._h2+d&4294967295,this._h3=this._h3+u&4294967295,this._h4=this._h4+f&4294967295}}e.StringSHA1=l,l._bigBlock32=new DataView(new ArrayBuffer(320))}),define(te[138],ie([1,0,310,112]),function(j,e,y,m){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.LcsDiff=e.MyArray=e.Debug=e.stringDiff=e.StringDiffSequence=void 0;class D{constructor(t){this.source=t}getElements(){const t=this.source,i=new Int32Array(t.length);for(let n=0,l=t.length;n<l;n++)i[n]=t.charCodeAt(n);return i}}e.StringDiffSequence=D;function I(g,t,i){return new h(new D(g),new D(t)).ComputeDiff(i).changes}e.stringDiff=I;class w{static Assert(t,i){if(!t)throw new Error(i)}}e.Debug=w;class b{static Copy(t,i,n,l,c){for(let r=0;r<c;r++)n[l+r]=t[i+r]}static Copy2(t,i,n,l,c){for(let r=0;r<c;r++)n[l+r]=t[i+r]}}e.MyArray=b;class p{constructor(){this.m_changes=[],this.m_originalStart=1073741824,this.m_modifiedStart=1073741824,this.m_originalCount=0,this.m_modifiedCount=0}MarkNextChange(){(this.m_originalCount>0||this.m_modifiedCount>0)&&this.m_changes.push(new y.DiffChange(this.m_originalStart,this.m_originalCount,this.m_modifiedStart,this.m_modifiedCount)),this.m_originalCount=0,this.m_modifiedCount=0,this.m_originalStart=1073741824,this.m_modifiedStart=1073741824}AddOriginalElement(t,i){this.m_originalStart=Math.min(this.m_originalStart,t),this.m_modifiedStart=Math.min(this.m_modifiedStart,i),this.m_originalCount++}AddModifiedElement(t,i){this.m_originalStart=Math.min(this.m_originalStart,t),this.m_modifiedStart=Math.min(this.m_modifiedStart,i),this.m_modifiedCount++}getChanges(){return(this.m_originalCount>0||this.m_modifiedCount>0)&&this.MarkNextChange(),this.m_changes}getReverseChanges(){return(this.m_originalCount>0||this.m_modifiedCount>0)&&this.MarkNextChange(),this.m_changes.reverse(),this.m_changes}}class h{constructor(t,i,n=null){this.ContinueProcessingPredicate=n,this._originalSequence=t,this._modifiedSequence=i;const[l,c,r]=h._getElements(t),[s,o,a]=h._getElements(i);this._hasStrings=r&&a,this._originalStringElements=l,this._originalElementsOrHash=c,this._modifiedStringElements=s,this._modifiedElementsOrHash=o,this.m_forwardHistory=[],this.m_reverseHistory=[]}static _isStringArray(t){return t.length>0&&typeof t[0]=="string"}static _getElements(t){const i=t.getElements();if(h._isStringArray(i)){const n=new Int32Array(i.length);for(let l=0,c=i.length;l<c;l++)n[l]=(0,m.stringHash)(i[l],0);return[i,n,!0]}return i instanceof Int32Array?[[],i,!1]:[[],new Int32Array(i),!1]}ElementsAreEqual(t,i){return this._originalElementsOrHash[t]!==this._modifiedElementsOrHash[i]?!1:this._hasStrings?this._originalStringElements[t]===this._modifiedStringElements[i]:!0}ElementsAreStrictEqual(t,i){if(!this.ElementsAreEqual(t,i))return!1;const n=h._getStrictElement(this._originalSequence,t),l=h._getStrictElement(this._modifiedSequence,i);return n===l}static _getStrictElement(t,i){return typeof t.getStrictElement=="function"?t.getStrictElement(i):null}OriginalElementsAreEqual(t,i){return this._originalElementsOrHash[t]!==this._originalElementsOrHash[i]?!1:this._hasStrings?this._originalStringElements[t]===this._originalStringElements[i]:!0}ModifiedElementsAreEqual(t,i){return this._modifiedElementsOrHash[t]!==this._modifiedElementsOrHash[i]?!1:this._hasStrings?this._modifiedStringElements[t]===this._modifiedStringElements[i]:!0}ComputeDiff(t){return this._ComputeDiff(0,this._originalElementsOrHash.length-1,0,this._modifiedElementsOrHash.length-1,t)}_ComputeDiff(t,i,n,l,c){const r=[!1];let s=this.ComputeDiffRecursive(t,i,n,l,r);return c&&(s=this.PrettifyChanges(s)),{quitEarly:r[0],changes:s}}ComputeDiffRecursive(t,i,n,l,c){for(c[0]=!1;t<=i&&n<=l&&this.ElementsAreEqual(t,n);)t++,n++;for(;i>=t&&l>=n&&this.ElementsAreEqual(i,l);)i--,l--;if(t>i||n>l){let u;return n<=l?(w.Assert(t===i+1,"originalStart should only be one more than originalEnd"),u=[new y.DiffChange(t,0,n,l-n+1)]):t<=i?(w.Assert(n===l+1,"modifiedStart should only be one more than modifiedEnd"),u=[new y.DiffChange(t,i-t+1,n,0)]):(w.Assert(t===i+1,"originalStart should only be one more than originalEnd"),w.Assert(n===l+1,"modifiedStart should only be one more than modifiedEnd"),u=[]),u}const r=[0],s=[0],o=this.ComputeRecursionPoint(t,i,n,l,r,s,c),a=r[0],d=s[0];if(o!==null)return o;if(!c[0]){const u=this.ComputeDiffRecursive(t,a,n,d,c);let f=[];return c[0]?f=[new y.DiffChange(a+1,i-(a+1)+1,d+1,l-(d+1)+1)]:f=this.ComputeDiffRecursive(a+1,i,d+1,l,c),this.ConcatenateChanges(u,f)}return[new y.DiffChange(t,i-t+1,n,l-n+1)]}WALKTRACE(t,i,n,l,c,r,s,o,a,d,u,f,S,v,C,_,L,E){let N=null,k=null,M=new p,O=i,B=n,T=S[0]-_[0]-l,R=-1073741824,P=this.m_forwardHistory.length-1;do{const F=T+t;F===O||F<B&&a[F-1]<a[F+1]?(u=a[F+1],v=u-T-l,u<R&&M.MarkNextChange(),R=u,M.AddModifiedElement(u+1,v),T=F+1-t):(u=a[F-1]+1,v=u-T-l,u<R&&M.MarkNextChange(),R=u-1,M.AddOriginalElement(u,v+1),T=F-1-t),P>=0&&(a=this.m_forwardHistory[P],t=a[0],O=1,B=a.length-1)}while(--P>=-1);if(N=M.getReverseChanges(),E[0]){let F=S[0]+1,W=_[0]+1;if(N!==null&&N.length>0){const A=N[N.length-1];F=Math.max(F,A.getOriginalEnd()),W=Math.max(W,A.getModifiedEnd())}k=[new y.DiffChange(F,f-F+1,W,C-W+1)]}else{M=new p,O=r,B=s,T=S[0]-_[0]-o,R=1073741824,P=L?this.m_reverseHistory.length-1:this.m_reverseHistory.length-2;do{const F=T+c;F===O||F<B&&d[F-1]>=d[F+1]?(u=d[F+1]-1,v=u-T-o,u>R&&M.MarkNextChange(),R=u+1,M.AddOriginalElement(u+1,v+1),T=F+1-c):(u=d[F-1],v=u-T-o,u>R&&M.MarkNextChange(),R=u,M.AddModifiedElement(u+1,v+1),T=F-1-c),P>=0&&(d=this.m_reverseHistory[P],c=d[0],O=1,B=d.length-1)}while(--P>=-1);k=M.getChanges()}return this.ConcatenateChanges(N,k)}ComputeRecursionPoint(t,i,n,l,c,r,s){let o=0,a=0,d=0,u=0,f=0,S=0;t--,n--,c[0]=0,r[0]=0,this.m_forwardHistory=[],this.m_reverseHistory=[];const v=i-t+(l-n),C=v+1,_=new Int32Array(C),L=new Int32Array(C),E=l-n,N=i-t,k=t-n,M=i-l,B=(N-E)%2==0;_[E]=t,L[N]=i,s[0]=!1;for(let T=1;T<=v/2+1;T++){let R=0,P=0;d=this.ClipDiagonalBound(E-T,T,E,C),u=this.ClipDiagonalBound(E+T,T,E,C);for(let W=d;W<=u;W+=2){W===d||W<u&&_[W-1]<_[W+1]?o=_[W+1]:o=_[W-1]+1,a=o-(W-E)-k;const A=o;for(;o<i&&a<l&&this.ElementsAreEqual(o+1,a+1);)o++,a++;if(_[W]=o,o+a>R+P&&(R=o,P=a),!B&&Math.abs(W-N)<=T-1&&o>=L[W])return c[0]=o,r[0]=a,A<=L[W]&&1447>0&&T<=1447+1?this.WALKTRACE(E,d,u,k,N,f,S,M,_,L,o,i,c,a,l,r,B,s):null}const F=(R-t+(P-n)-T)/2;if(this.ContinueProcessingPredicate!==null&&!this.ContinueProcessingPredicate(R,F))return s[0]=!0,c[0]=R,r[0]=P,F>0&&1447>0&&T<=1447+1?this.WALKTRACE(E,d,u,k,N,f,S,M,_,L,o,i,c,a,l,r,B,s):(t++,n++,[new y.DiffChange(t,i-t+1,n,l-n+1)]);f=this.ClipDiagonalBound(N-T,T,N,C),S=this.ClipDiagonalBound(N+T,T,N,C);for(let W=f;W<=S;W+=2){W===f||W<S&&L[W-1]>=L[W+1]?o=L[W+1]-1:o=L[W-1],a=o-(W-N)-M;const A=o;for(;o>t&&a>n&&this.ElementsAreEqual(o,a);)o--,a--;if(L[W]=o,B&&Math.abs(W-E)<=T&&o<=_[W])return c[0]=o,r[0]=a,A>=_[W]&&1447>0&&T<=1447+1?this.WALKTRACE(E,d,u,k,N,f,S,M,_,L,o,i,c,a,l,r,B,s):null}if(T<=1447){let W=new Int32Array(u-d+2);W[0]=E-d+1,b.Copy2(_,d,W,1,u-d+1),this.m_forwardHistory.push(W),W=new Int32Array(S-f+2),W[0]=N-f+1,b.Copy2(L,f,W,1,S-f+1),this.m_reverseHistory.push(W)}}return this.WALKTRACE(E,d,u,k,N,f,S,M,_,L,o,i,c,a,l,r,B,s)}PrettifyChanges(t){for(let i=0;i<t.length;i++){const n=t[i],l=i<t.length-1?t[i+1].originalStart:this._originalElementsOrHash.length,c=i<t.length-1?t[i+1].modifiedStart:this._modifiedElementsOrHash.length,r=n.originalLength>0,s=n.modifiedLength>0;for(;n.originalStart+n.originalLength<l&&n.modifiedStart+n.modifiedLength<c&&(!r||this.OriginalElementsAreEqual(n.originalStart,n.originalStart+n.originalLength))&&(!s||this.ModifiedElementsAreEqual(n.modifiedStart,n.modifiedStart+n.modifiedLength));){const a=this.ElementsAreStrictEqual(n.originalStart,n.modifiedStart);if(this.ElementsAreStrictEqual(n.originalStart+n.originalLength,n.modifiedStart+n.modifiedLength)&&!a)break;n.originalStart++,n.modifiedStart++}let o=[null];if(i<t.length-1&&this.ChangesOverlap(t[i],t[i+1],o)){t[i]=o[0],t.splice(i+1,1),i--;continue}}for(let i=t.length-1;i>=0;i--){const n=t[i];let l=0,c=0;if(i>0){const u=t[i-1];l=u.originalStart+u.originalLength,c=u.modifiedStart+u.modifiedLength}const r=n.originalLength>0,s=n.modifiedLength>0;let o=0,a=this._boundaryScore(n.originalStart,n.originalLength,n.modifiedStart,n.modifiedLength);for(let u=1;;u++){const f=n.originalStart-u,S=n.modifiedStart-u;if(f<l||S<c||r&&!this.OriginalElementsAreEqual(f,f+n.originalLength)||s&&!this.ModifiedElementsAreEqual(S,S+n.modifiedLength))break;const C=(f===l&&S===c?5:0)+this._boundaryScore(f,n.originalLength,S,n.modifiedLength);C>a&&(a=C,o=u)}n.originalStart-=o,n.modifiedStart-=o;const d=[null];if(i>0&&this.ChangesOverlap(t[i-1],t[i],d)){t[i-1]=d[0],t.splice(i,1),i++;continue}}if(this._hasStrings)for(let i=1,n=t.length;i<n;i++){const l=t[i-1],c=t[i],r=c.originalStart-l.originalStart-l.originalLength,s=l.originalStart,o=c.originalStart+c.originalLength,a=o-s,d=l.modifiedStart,u=c.modifiedStart+c.modifiedLength,f=u-d;if(r<5&&a<20&&f<20){const S=this._findBetterContiguousSequence(s,a,d,f,r);if(S){const[v,C]=S;(v!==l.originalStart+l.originalLength||C!==l.modifiedStart+l.modifiedLength)&&(l.originalLength=v-l.originalStart,l.modifiedLength=C-l.modifiedStart,c.originalStart=v+r,c.modifiedStart=C+r,c.originalLength=o-c.originalStart,c.modifiedLength=u-c.modifiedStart)}}}return t}_findBetterContiguousSequence(t,i,n,l,c){if(i<c||l<c)return null;const r=t+i-c+1,s=n+l-c+1;let o=0,a=0,d=0;for(let u=t;u<r;u++)for(let f=n;f<s;f++){const S=this._contiguousSequenceScore(u,f,c);S>0&&S>o&&(o=S,a=u,d=f)}return o>0?[a,d]:null}_contiguousSequenceScore(t,i,n){let l=0;for(let c=0;c<n;c++){if(!this.ElementsAreEqual(t+c,i+c))return 0;l+=this._originalStringElements[t+c].length}return l}_OriginalIsBoundary(t){return t<=0||t>=this._originalElementsOrHash.length-1?!0:this._hasStrings&&/^\s*$/.test(this._originalStringElements[t])}_OriginalRegionIsBoundary(t,i){if(this._OriginalIsBoundary(t)||this._OriginalIsBoundary(t-1))return!0;if(i>0){const n=t+i;if(this._OriginalIsBoundary(n-1)||this._OriginalIsBoundary(n))return!0}return!1}_ModifiedIsBoundary(t){return t<=0||t>=this._modifiedElementsOrHash.length-1?!0:this._hasStrings&&/^\s*$/.test(this._modifiedStringElements[t])}_ModifiedRegionIsBoundary(t,i){if(this._ModifiedIsBoundary(t)||this._ModifiedIsBoundary(t-1))return!0;if(i>0){const n=t+i;if(this._ModifiedIsBoundary(n-1)||this._ModifiedIsBoundary(n))return!0}return!1}_boundaryScore(t,i,n,l){const c=this._OriginalRegionIsBoundary(t,i)?1:0,r=this._ModifiedRegionIsBoundary(n,l)?1:0;return c+r}ConcatenateChanges(t,i){let n=[];if(t.length===0||i.length===0)return i.length>0?i:t;if(this.ChangesOverlap(t[t.length-1],i[0],n)){const l=new Array(t.length+i.length-1);return b.Copy(t,0,l,0,t.length-1),l[t.length-1]=n[0],b.Copy(i,1,l,t.length,i.length-1),l}else{const l=new Array(t.length+i.length);return b.Copy(t,0,l,0,t.length),b.Copy(i,0,l,t.length,i.length),l}}ChangesOverlap(t,i,n){if(w.Assert(t.originalStart<=i.originalStart,"Left change is not less than or equal to right change"),w.Assert(t.modifiedStart<=i.modifiedStart,"Left change is not less than or equal to right change"),t.originalStart+t.originalLength>=i.originalStart||t.modifiedStart+t.modifiedLength>=i.modifiedStart){const l=t.originalStart;let c=t.originalLength;const r=t.modifiedStart;let s=t.modifiedLength;return t.originalStart+t.originalLength>=i.originalStart&&(c=i.originalStart+i.originalLength-t.originalStart),t.modifiedStart+t.modifiedLength>=i.modifiedStart&&(s=i.modifiedStart+i.modifiedLength-t.modifiedStart),n[0]=new y.DiffChange(l,c,r,s),!0}else return n[0]=null,!1}ClipDiagonalBound(t,i,n,l){if(t>=0&&t<l)return t;const c=n,r=l-n-1,s=i%2==0;if(t<0){const o=c%2==0;return s===o?0:1}else{const o=r%2==0;return s===o?l-1:l-2}}}e.LcsDiff=h}),define(te[167],ie([1,0,109,19,10,138,4,54]),function(j,e,y,m,D,I,w,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IndexTreeModel=e.getVisibleState=e.isFilterResult=void 0;function p(i){return typeof i=="object"&&"visibility"in i&&"data"in i}e.isFilterResult=p;function h(i){switch(i){case!0:return 1;case!1:return 0;default:return i}}e.getVisibleState=h;function g(i){return typeof i.collapsible=="boolean"}class t{constructor(n,l,c,r={}){this.user=n,this.list=l,this.rootRef=[],this.eventBufferer=new w.EventBufferer,this._onDidChangeCollapseState=new w.Emitter,this.onDidChangeCollapseState=this.eventBufferer.wrapEvent(this._onDidChangeCollapseState.event),this._onDidChangeRenderNodeCount=new w.Emitter,this.onDidChangeRenderNodeCount=this.eventBufferer.wrapEvent(this._onDidChangeRenderNodeCount.event),this._onDidSplice=new w.Emitter,this.onDidSplice=this._onDidSplice.event,this.refilterDelayer=new D.Delayer(D.MicrotaskDelay),this.collapseByDefault=typeof r.collapseByDefault=="undefined"?!1:r.collapseByDefault,this.filter=r.filter,this.autoExpandSingleChildren=typeof r.autoExpandSingleChildren=="undefined"?!1:r.autoExpandSingleChildren,this.root={parent:void 0,element:c,children:[],depth:0,visibleChildrenCount:0,visibleChildIndex:-1,collapsible:!1,collapsed:!1,renderNodeCount:0,visibility:1,visible:!0,filterData:void 0}}splice(n,l,c=b.Iterable.empty(),r={}){if(n.length===0)throw new y.TreeError(this.user,"Invalid tree location");r.diffIdentityProvider?this.spliceSmart(r.diffIdentityProvider,n,l,c,r):this.spliceSimple(n,l,c,r)}spliceSmart(n,l,c,r,s,o){var a;r===void 0&&(r=b.Iterable.empty()),o===void 0&&(o=(a=s.diffDepth)!==null&&a!==void 0?a:0);const{parentNode:d}=this.getParentNodeWithListIndex(l);if(!d.lastDiffIds)return this.spliceSimple(l,c,r,s);const u=[...r],f=l[l.length-1],S=new I.LcsDiff({getElements:()=>d.lastDiffIds},{getElements:()=>[...d.children.slice(0,f),...u,...d.children.slice(f+c)].map(E=>n.getId(E.element).toString())}).ComputeDiff(!1);if(S.quitEarly)return d.lastDiffIds=void 0,this.spliceSimple(l,c,u,s);const v=l.slice(0,-1),C=(E,N,k)=>{if(o>0)for(let M=0;M<k;M++)E--,N--,this.spliceSmart(n,[...v,E,0],Number.MAX_SAFE_INTEGER,u[N].children,s,o-1)};let _=Math.min(d.children.length,f+c),L=u.length;for(const E of S.changes.sort((N,k)=>k.originalStart-N.originalStart))C(_,L,_-(E.originalStart+E.originalLength)),_=E.originalStart,L=E.modifiedStart-f,this.spliceSimple([...v,_],E.originalLength,b.Iterable.slice(u,L,L+E.modifiedLength),s);C(_,L,_)}spliceSimple(n,l,c=b.Iterable.empty(),{onDidCreateNode:r,onDidDeleteNode:s,diffIdentityProvider:o}){const{parentNode:a,listIndex:d,revealed:u,visible:f}=this.getParentNodeWithListIndex(n),S=[],v=b.Iterable.map(c,R=>this.createTreeNode(R,a,a.visible?1:0,u,S,r)),C=n[n.length-1],_=a.children.length>0;let L=0;for(let R=C;R>=0&&R<a.children.length;R--){const P=a.children[R];if(P.visible){L=P.visibleChildIndex;break}}const E=[];let N=0,k=0;for(const R of v)E.push(R),k+=R.renderNodeCount,R.visible&&(R.visibleChildIndex=L+N++);const M=(0,m.splice)(a.children,C,l,E);o?a.lastDiffIds?(0,m.splice)(a.lastDiffIds,C,l,E.map(R=>o.getId(R.element).toString())):a.lastDiffIds=a.children.map(R=>o.getId(R.element).toString()):a.lastDiffIds=void 0;let O=0;for(const R of M)R.visible&&O++;if(O!==0)for(let R=C+E.length;R<a.children.length;R++){const P=a.children[R];P.visible&&(P.visibleChildIndex-=O)}if(a.visibleChildrenCount+=N-O,u&&f){const R=M.reduce((P,F)=>P+(F.visible?F.renderNodeCount:0),0);this._updateAncestorsRenderNodeCount(a,k-R),this.list.splice(d,R,S)}if(M.length>0&&s){const R=P=>{s(P),P.children.forEach(R)};M.forEach(R)}const B=a.children.length>0;_!==B&&this.setCollapsible(n.slice(0,-1),B),this._onDidSplice.fire({insertedNodes:E,deletedNodes:M});let T=a;for(;T;){if(T.visibility===2){this.refilterDelayer.trigger(()=>this.refilter());break}T=T.parent}}rerender(n){if(n.length===0)throw new y.TreeError(this.user,"Invalid tree location");const{node:l,listIndex:c,revealed:r}=this.getTreeNodeWithListIndex(n);l.visible&&r&&this.list.splice(c,1,[l])}has(n){return this.hasTreeNode(n)}getListIndex(n){const{listIndex:l,visible:c,revealed:r}=this.getTreeNodeWithListIndex(n);return c&&r?l:-1}getListRenderCount(n){return this.getTreeNode(n).renderNodeCount}isCollapsible(n){return this.getTreeNode(n).collapsible}setCollapsible(n,l){const c=this.getTreeNode(n);typeof l=="undefined"&&(l=!c.collapsible);const r={collapsible:l};return this.eventBufferer.bufferEvents(()=>this._setCollapseState(n,r))}isCollapsed(n){return this.getTreeNode(n).collapsed}setCollapsed(n,l,c){const r=this.getTreeNode(n);typeof l=="undefined"&&(l=!r.collapsed);const s={collapsed:l,recursive:c||!1};return this.eventBufferer.bufferEvents(()=>this._setCollapseState(n,s))}_setCollapseState(n,l){const{node:c,listIndex:r,revealed:s}=this.getTreeNodeWithListIndex(n),o=this._setListNodeCollapseState(c,r,s,l);if(c!==this.root&&this.autoExpandSingleChildren&&o&&!g(l)&&c.collapsible&&!c.collapsed&&!l.recursive){let a=-1;for(let d=0;d<c.children.length;d++)if(c.children[d].visible)if(a>-1){a=-1;break}else a=d;a>-1&&this._setCollapseState([...n,a],l)}return o}_setListNodeCollapseState(n,l,c,r){const s=this._setNodeCollapseState(n,r,!1);if(!c||!n.visible||!s)return s;const o=n.renderNodeCount,a=this.updateNodeAfterCollapseChange(n),d=o-(l===-1?0:1);return this.list.splice(l+1,d,a.slice(1)),s}_setNodeCollapseState(n,l,c){let r;if(n===this.root?r=!1:(g(l)?(r=n.collapsible!==l.collapsible,n.collapsible=l.collapsible):n.collapsible?(r=n.collapsed!==l.collapsed,n.collapsed=l.collapsed):r=!1,r&&this._onDidChangeCollapseState.fire({node:n,deep:c})),!g(l)&&l.recursive)for(const s of n.children)r=this._setNodeCollapseState(s,l,!0)||r;return r}expandTo(n){this.eventBufferer.bufferEvents(()=>{let l=this.getTreeNode(n);for(;l.parent;)l=l.parent,n=n.slice(0,n.length-1),l.collapsed&&this._setCollapseState(n,{collapsed:!1,recursive:!1})})}refilter(){const n=this.root.renderNodeCount,l=this.updateNodeAfterFilterChange(this.root);this.list.splice(0,n,l),this.refilterDelayer.cancel()}createTreeNode(n,l,c,r,s,o){const a={parent:l,element:n.element,children:[],depth:l.depth+1,visibleChildrenCount:0,visibleChildIndex:-1,collapsible:typeof n.collapsible=="boolean"?n.collapsible:typeof n.collapsed!="undefined",collapsed:typeof n.collapsed=="undefined"?this.collapseByDefault:n.collapsed,renderNodeCount:1,visibility:1,visible:!0,filterData:void 0},d=this._filterNode(a,c);a.visibility=d,r&&s.push(a);const u=n.children||b.Iterable.empty(),f=r&&d!==0&&!a.collapsed,S=b.Iterable.map(u,_=>this.createTreeNode(_,a,d,f,s,o));let v=0,C=1;for(const _ of S)a.children.push(_),C+=_.renderNodeCount,_.visible&&(_.visibleChildIndex=v++);return a.collapsible=a.collapsible||a.children.length>0,a.visibleChildrenCount=v,a.visible=d===2?v>0:d===1,a.visible?a.collapsed||(a.renderNodeCount=C):(a.renderNodeCount=0,r&&s.pop()),o&&o(a),a}updateNodeAfterCollapseChange(n){const l=n.renderNodeCount,c=[];return this._updateNodeAfterCollapseChange(n,c),this._updateAncestorsRenderNodeCount(n.parent,c.length-l),c}_updateNodeAfterCollapseChange(n,l){if(n.visible===!1)return 0;if(l.push(n),n.renderNodeCount=1,!n.collapsed)for(const c of n.children)n.renderNodeCount+=this._updateNodeAfterCollapseChange(c,l);return this._onDidChangeRenderNodeCount.fire(n),n.renderNodeCount}updateNodeAfterFilterChange(n){const l=n.renderNodeCount,c=[];return this._updateNodeAfterFilterChange(n,n.visible?1:0,c),this._updateAncestorsRenderNodeCount(n.parent,c.length-l),c}_updateNodeAfterFilterChange(n,l,c,r=!0){let s;if(n!==this.root){if(s=this._filterNode(n,l),s===0)return n.visible=!1,n.renderNodeCount=0,!1;r&&c.push(n)}const o=c.length;n.renderNodeCount=n===this.root?0:1;let a=!1;if(!n.collapsed||s!==0){let d=0;for(const u of n.children)a=this._updateNodeAfterFilterChange(u,s,c,r&&!n.collapsed)||a,u.visible&&(u.visibleChildIndex=d++);n.visibleChildrenCount=d}else n.visibleChildrenCount=0;return n!==this.root&&(n.visible=s===2?a:s===1,n.visibility=s),n.visible?n.collapsed||(n.renderNodeCount+=c.length-o):(n.renderNodeCount=0,r&&c.pop()),this._onDidChangeRenderNodeCount.fire(n),n.visible}_updateAncestorsRenderNodeCount(n,l){if(l!==0)for(;n;)n.renderNodeCount+=l,this._onDidChangeRenderNodeCount.fire(n),n=n.parent}_filterNode(n,l){const c=this.filter?this.filter.filter(n.element,l):1;return typeof c=="boolean"?(n.filterData=void 0,c?1:0):p(c)?(n.filterData=c.data,h(c.visibility)):(n.filterData=void 0,h(c))}hasTreeNode(n,l=this.root){if(!n||n.length===0)return!0;const[c,...r]=n;return c<0||c>l.children.length?!1:this.hasTreeNode(r,l.children[c])}getTreeNode(n,l=this.root){if(!n||n.length===0)return l;const[c,...r]=n;if(c<0||c>l.children.length)throw new y.TreeError(this.user,"Invalid tree location");return this.getTreeNode(r,l.children[c])}getTreeNodeWithListIndex(n){if(n.length===0)return{node:this.root,listIndex:-1,revealed:!0,visible:!1};const{parentNode:l,listIndex:c,revealed:r,visible:s}=this.getParentNodeWithListIndex(n),o=n[n.length-1];if(o<0||o>l.children.length)throw new y.TreeError(this.user,"Invalid tree location");const a=l.children[o];return{node:a,listIndex:c,revealed:r,visible:s&&a.visible}}getParentNodeWithListIndex(n,l=this.root,c=0,r=!0,s=!0){const[o,...a]=n;if(o<0||o>l.children.length)throw new y.TreeError(this.user,"Invalid tree location");for(let d=0;d<o;d++)c+=l.children[d].renderNodeCount;return r=r&&!l.collapsed,s=s&&l.visible,a.length===0?{parentNode:l,listIndex:c,revealed:r,visible:s}:this.getParentNodeWithListIndex(a,l.children[o],c+1,r,s)}getNode(n=[]){return this.getTreeNode(n)}getNodeLocation(n){const l=[];let c=n;for(;c.parent;)l.push(c.parent.children.indexOf(c)),c=c.parent;return l.reverse()}getParentNodeLocation(n){if(n.length!==0)return n.length===1?[]:(0,m.tail2)(n)[0]}getFirstElementChild(n){const l=this.getTreeNode(n);if(l.children.length!==0)return l.children[0].element}}e.IndexTreeModel=t}),define(te[168],ie([1,0,167,109,54]),function(j,e,y,m,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ObjectTreeModel=void 0;class I{constructor(b,p,h={}){this.user=b,this.rootRef=null,this.nodes=new Map,this.nodesByIdentity=new Map,this.model=new y.IndexTreeModel(b,p,null,h),this.onDidSplice=this.model.onDidSplice,this.onDidChangeCollapseState=this.model.onDidChangeCollapseState,this.onDidChangeRenderNodeCount=this.model.onDidChangeRenderNodeCount,h.sorter&&(this.sorter={compare(g,t){return h.sorter.compare(g.element,t.element)}}),this.identityProvider=h.identityProvider}setChildren(b,p=D.Iterable.empty(),h={}){const g=this.getElementLocation(b);this._setChildren(g,this.preserveCollapseState(p),h)}_setChildren(b,p=D.Iterable.empty(),h){const g=new Set,t=new Set,i=l=>{var c;if(l.element===null)return;const r=l;if(g.add(r.element),this.nodes.set(r.element,r),this.identityProvider){const s=this.identityProvider.getId(r.element).toString();t.add(s),this.nodesByIdentity.set(s,r)}(c=h.onDidCreateNode)===null||c===void 0||c.call(h,r)},n=l=>{var c;if(l.element===null)return;const r=l;if(g.has(r.element)||this.nodes.delete(r.element),this.identityProvider){const s=this.identityProvider.getId(r.element).toString();t.has(s)||this.nodesByIdentity.delete(s)}(c=h.onDidDeleteNode)===null||c===void 0||c.call(h,r)};this.model.splice([...b,0],Number.MAX_VALUE,p,Object.assign(Object.assign({},h),{onDidCreateNode:i,onDidDeleteNode:n}))}preserveCollapseState(b=D.Iterable.empty()){return this.sorter&&(b=[...b].sort(this.sorter.compare.bind(this.sorter))),D.Iterable.map(b,p=>{let h=this.nodes.get(p.element);if(!h&&this.identityProvider){const i=this.identityProvider.getId(p.element).toString();h=this.nodesByIdentity.get(i)}if(!h)return Object.assign(Object.assign({},p),{children:this.preserveCollapseState(p.children)});const g=typeof p.collapsible=="boolean"?p.collapsible:h.collapsible,t=typeof p.collapsed!="undefined"?p.collapsed:h.collapsed;return Object.assign(Object.assign({},p),{collapsible:g,collapsed:t,children:this.preserveCollapseState(p.children)})})}rerender(b){const p=this.getElementLocation(b);this.model.rerender(p)}getFirstElementChild(b=null){const p=this.getElementLocation(b);return this.model.getFirstElementChild(p)}has(b){return this.nodes.has(b)}getListIndex(b){const p=this.getElementLocation(b);return this.model.getListIndex(p)}getListRenderCount(b){const p=this.getElementLocation(b);return this.model.getListRenderCount(p)}isCollapsible(b){const p=this.getElementLocation(b);return this.model.isCollapsible(p)}setCollapsible(b,p){const h=this.getElementLocation(b);return this.model.setCollapsible(h,p)}isCollapsed(b){const p=this.getElementLocation(b);return this.model.isCollapsed(p)}setCollapsed(b,p,h){const g=this.getElementLocation(b);return this.model.setCollapsed(g,p,h)}expandTo(b){const p=this.getElementLocation(b);this.model.expandTo(p)}refilter(){this.model.refilter()}getNode(b=null){if(b===null)return this.model.getNode(this.model.rootRef);const p=this.nodes.get(b);if(!p)throw new m.TreeError(this.user,`Tree element not found: ${b}`);return p}getNodeLocation(b){return b.element}getParentNodeLocation(b){if(b===null)throw new m.TreeError(this.user,"Invalid getParentNodeLocation call");const p=this.nodes.get(b);if(!p)throw new m.TreeError(this.user,`Tree element not found: ${b}`);const h=this.model.getNodeLocation(p),g=this.model.getParentNodeLocation(h);return this.model.getNode(g).element}getElementLocation(b){if(b===null)return[];const p=this.nodes.get(b);if(!p)throw new m.TreeError(this.user,`Tree element not found: ${b}`);return this.model.getNodeLocation(p)}}e.ObjectTreeModel=I}),define(te[318],ie([1,0,168,109,4,54]),function(j,e,y,m,D,I){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CompressibleObjectTreeModel=e.DefaultElementMapper=e.CompressedObjectTreeModel=e.decompress=e.compress=void 0;function w(o){const a=[o.element],d=o.incompressible||!1;return{element:{elements:a,incompressible:d},children:I.Iterable.map(I.Iterable.from(o.children),w),collapsible:o.collapsible,collapsed:o.collapsed}}function b(o){const a=[o.element],d=o.incompressible||!1;let u,f;for(;[f,u]=I.Iterable.consume(I.Iterable.from(o.children),2),!(f.length!==1||f[0].incompressible);)o=f[0],a.push(o.element);return{element:{elements:a,incompressible:d},children:I.Iterable.map(I.Iterable.concat(f,u),b),collapsible:o.collapsible,collapsed:o.collapsed}}e.compress=b;function p(o,a=0){let d;return a<o.element.elements.length-1?d=[p(o,a+1)]:d=I.Iterable.map(I.Iterable.from(o.children),u=>p(u,0)),a===0&&o.element.incompressible?{element:o.element.elements[a],children:d,incompressible:!0,collapsible:o.collapsible,collapsed:o.collapsed}:{element:o.element.elements[a],children:d,collapsible:o.collapsible,collapsed:o.collapsed}}function h(o){return p(o,0)}e.decompress=h;function g(o,a,d){return o.element===a?Object.assign(Object.assign({},o),{children:d}):Object.assign(Object.assign({},o),{children:I.Iterable.map(I.Iterable.from(o.children),u=>g(u,a,d))})}const t=o=>({getId(a){return a.elements.map(d=>o.getId(d).toString()).join("\0")}});class i{constructor(a,d,u={}){this.user=a,this.rootRef=null,this.nodes=new Map,this.model=new y.ObjectTreeModel(a,d,u),this.enabled=typeof u.compressionEnabled=="undefined"?!0:u.compressionEnabled,this.identityProvider=u.identityProvider}get onDidSplice(){return this.model.onDidSplice}get onDidChangeCollapseState(){return this.model.onDidChangeCollapseState}get onDidChangeRenderNodeCount(){return this.model.onDidChangeRenderNodeCount}setChildren(a,d=I.Iterable.empty(),u){const f=u.diffIdentityProvider&&t(u.diffIdentityProvider);if(a===null){const M=I.Iterable.map(d,this.enabled?b:w);this._setChildren(null,M,{diffIdentityProvider:f,diffDepth:1/0});return}const S=this.nodes.get(a);if(!S)throw new Error("Unknown compressed tree node");const v=this.model.getNode(S),C=this.model.getParentNodeLocation(S),_=this.model.getNode(C),L=h(v),E=g(L,a,d),N=(this.enabled?b:w)(E),k=_.children.map(M=>M===v?N:M);this._setChildren(_.element,k,{diffIdentityProvider:f,diffDepth:v.depth-_.depth})}setCompressionEnabled(a){if(a===this.enabled)return;this.enabled=a;const u=this.model.getNode().children,f=I.Iterable.map(u,h),S=I.Iterable.map(f,a?b:w);this._setChildren(null,S,{diffIdentityProvider:this.identityProvider,diffDepth:1/0})}_setChildren(a,d,u){const f=new Set,S=C=>{for(const _ of C.element.elements)f.add(_),this.nodes.set(_,C.element)},v=C=>{for(const _ of C.element.elements)f.has(_)||this.nodes.delete(_)};this.model.setChildren(a,d,Object.assign(Object.assign({},u),{onDidCreateNode:S,onDidDeleteNode:v}))}has(a){return this.nodes.has(a)}getListIndex(a){const d=this.getCompressedNode(a);return this.model.getListIndex(d)}getListRenderCount(a){const d=this.getCompressedNode(a);return this.model.getListRenderCount(d)}getNode(a){if(typeof a=="undefined")return this.model.getNode();const d=this.getCompressedNode(a);return this.model.getNode(d)}getNodeLocation(a){const d=this.model.getNodeLocation(a);return d===null?null:d.elements[d.elements.length-1]}getParentNodeLocation(a){const d=this.getCompressedNode(a),u=this.model.getParentNodeLocation(d);return u===null?null:u.elements[u.elements.length-1]}getFirstElementChild(a){const d=this.getCompressedNode(a);return this.model.getFirstElementChild(d)}isCollapsible(a){const d=this.getCompressedNode(a);return this.model.isCollapsible(d)}setCollapsible(a,d){const u=this.getCompressedNode(a);return this.model.setCollapsible(u,d)}isCollapsed(a){const d=this.getCompressedNode(a);return this.model.isCollapsed(d)}setCollapsed(a,d,u){const f=this.getCompressedNode(a);return this.model.setCollapsed(f,d,u)}expandTo(a){const d=this.getCompressedNode(a);this.model.expandTo(d)}rerender(a){const d=this.getCompressedNode(a);this.model.rerender(d)}refilter(){this.model.refilter()}getCompressedNode(a){if(a===null)return null;const d=this.nodes.get(a);if(!d)throw new m.TreeError(this.user,`Tree element not found: ${a}`);return d}}e.CompressedObjectTreeModel=i;const n=o=>o[o.length-1];e.DefaultElementMapper=n;class l{constructor(a,d){this.unwrapper=a,this.node=d}get element(){return this.node.element===null?null:this.unwrapper(this.node.element)}get children(){return this.node.children.map(a=>new l(this.unwrapper,a))}get depth(){return this.node.depth}get visibleChildrenCount(){return this.node.visibleChildrenCount}get visibleChildIndex(){return this.node.visibleChildIndex}get collapsible(){return this.node.collapsible}get collapsed(){return this.node.collapsed}get visible(){return this.node.visible}get filterData(){return this.node.filterData}}function c(o,a){return{splice(d,u,f){a.splice(d,u,f.map(S=>o.map(S)))},updateElementHeight(d,u){a.updateElementHeight(d,u)}}}function r(o,a){return Object.assign(Object.assign({},a),{identityProvider:a.identityProvider&&{getId(d){return a.identityProvider.getId(o(d))}},sorter:a.sorter&&{compare(d,u){return a.sorter.compare(d.elements[0],u.elements[0])}},filter:a.filter&&{filter(d,u){return a.filter.filter(o(d),u)}}})}class s{constructor(a,d,u={}){this.rootRef=null,this.elementMapper=u.elementMapper||e.DefaultElementMapper;const f=S=>this.elementMapper(S.elements);this.nodeMapper=new m.WeakMapper(S=>new l(f,S)),this.model=new i(a,c(this.nodeMapper,d),r(f,u))}get onDidSplice(){return D.Event.map(this.model.onDidSplice,({insertedNodes:a,deletedNodes:d})=>({insertedNodes:a.map(u=>this.nodeMapper.map(u)),deletedNodes:d.map(u=>this.nodeMapper.map(u))}))}get onDidChangeCollapseState(){return D.Event.map(this.model.onDidChangeCollapseState,({node:a,deep:d})=>({node:this.nodeMapper.map(a),deep:d}))}get onDidChangeRenderNodeCount(){return D.Event.map(this.model.onDidChangeRenderNodeCount,a=>this.nodeMapper.map(a))}setChildren(a,d=I.Iterable.empty(),u={}){this.model.setChildren(a,d,u)}setCompressionEnabled(a){this.model.setCompressionEnabled(a)}has(a){return this.model.has(a)}getListIndex(a){return this.model.getListIndex(a)}getListRenderCount(a){return this.model.getListRenderCount(a)}getNode(a){return this.nodeMapper.map(this.model.getNode(a))}getNodeLocation(a){return a.element}getParentNodeLocation(a){return this.model.getParentNodeLocation(a)}getFirstElementChild(a){const d=this.model.getFirstElementChild(a);return d===null||typeof d=="undefined"?d:this.elementMapper(d.elements)}isCollapsible(a){return this.model.isCollapsible(a)}setCollapsible(a,d){return this.model.setCollapsible(a,d)}isCollapsed(a){return this.model.isCollapsed(a)}setCollapsed(a,d,u){return this.model.setCollapsed(a,d,u)}expandTo(a){return this.model.expandTo(a)}rerender(a){return this.model.rerender(a)}refilter(){return this.model.refilter()}getCompressedTreeNode(a=null){return this.model.getNode(a)}}e.CompressibleObjectTreeModel=s}),define(te[47],ie([1,0,8]),function(j,e,y){"use strict";var m,D;Object.defineProperty(e,"__esModule",{value:!0}),e.LRUCache=e.LinkedMap=e.ResourceMap=e.TernarySearchTree=e.UriIterator=e.PathIterator=e.ConfigKeysIterator=e.StringIterator=void 0;class I{constructor(){this._value="",this._pos=0}reset(r){return this._value=r,this._pos=0,this}next(){return this._pos+=1,this}hasNext(){return this._pos<this._value.length-1}cmp(r){const s=r.charCodeAt(0),o=this._value.charCodeAt(this._pos);return s-o}value(){return this._value[this._pos]}}e.StringIterator=I;class w{constructor(r=!0){this._caseSensitive=r}reset(r){return this._value=r,this._from=0,this._to=0,this.next()}hasNext(){return this._to<this._value.length}next(){this._from=this._to;let r=!0;for(;this._to<this._value.length;this._to++)if(this._value.charCodeAt(this._to)===46)if(r)this._from++;else break;else r=!1;return this}cmp(r){return this._caseSensitive?(0,y.compareSubstring)(r,this._value,0,r.length,this._from,this._to):(0,y.compareSubstringIgnoreCase)(r,this._value,0,r.length,this._from,this._to)}value(){return this._value.substring(this._from,this._to)}}e.ConfigKeysIterator=w;class b{constructor(r=!0,s=!0){this._splitOnBackslash=r,this._caseSensitive=s}reset(r){this._from=0,this._to=0,this._value=r,this._valueLen=r.length;for(let s=r.length-1;s>=0;s--,this._valueLen--){const o=this._value.charCodeAt(s);if(!(o===47||this._splitOnBackslash&&o===92))break}return this.next()}hasNext(){return this._to<this._valueLen}next(){this._from=this._to;let r=!0;for(;this._to<this._valueLen;this._to++){const s=this._value.charCodeAt(this._to);if(s===47||this._splitOnBackslash&&s===92)if(r)this._from++;else break;else r=!1}return this}cmp(r){return this._caseSensitive?(0,y.compareSubstring)(r,this._value,0,r.length,this._from,this._to):(0,y.compareSubstringIgnoreCase)(r,this._value,0,r.length,this._from,this._to)}value(){return this._value.substring(this._from,this._to)}}e.PathIterator=b;class p{constructor(r){this._ignorePathCasing=r,this._states=[],this._stateIdx=0}reset(r){return this._value=r,this._states=[],this._value.scheme&&this._states.push(1),this._value.authority&&this._states.push(2),this._value.path&&(this._pathIterator=new b(!1,!this._ignorePathCasing(r)),this._pathIterator.reset(r.path),this._pathIterator.value()&&this._states.push(3)),this._value.query&&this._states.push(4),this._value.fragment&&this._states.push(5),this._stateIdx=0,this}next(){return this._states[this._stateIdx]===3&&this._pathIterator.hasNext()?this._pathIterator.next():this._stateIdx+=1,this}hasNext(){return this._states[this._stateIdx]===3&&this._pathIterator.hasNext()||this._stateIdx<this._states.length-1}cmp(r){if(this._states[this._stateIdx]===1)return(0,y.compareIgnoreCase)(r,this._value.scheme);if(this._states[this._stateIdx]===2)return(0,y.compareIgnoreCase)(r,this._value.authority);if(this._states[this._stateIdx]===3)return this._pathIterator.cmp(r);if(this._states[this._stateIdx]===4)return(0,y.compare)(r,this._value.query);if(this._states[this._stateIdx]===5)return(0,y.compare)(r,this._value.fragment);throw new Error}value(){if(this._states[this._stateIdx]===1)return this._value.scheme;if(this._states[this._stateIdx]===2)return this._value.authority;if(this._states[this._stateIdx]===3)return this._pathIterator.value();if(this._states[this._stateIdx]===4)return this._value.query;if(this._states[this._stateIdx]===5)return this._value.fragment;throw new Error}}e.UriIterator=p;class h{constructor(){this.height=1}rotateLeft(){const r=this.right;return this.right=r.left,r.left=this,this.updateHeight(),r.updateHeight(),r}rotateRight(){const r=this.left;return this.left=r.right,r.right=this,this.updateHeight(),r.updateHeight(),r}updateHeight(){this.height=1+Math.max(this.heightLeft,this.heightRight)}balanceFactor(){return this.heightRight-this.heightLeft}get heightLeft(){var r,s;return(s=(r=this.left)===null||r===void 0?void 0:r.height)!==null&&s!==void 0?s:0}get heightRight(){var r,s;return(s=(r=this.right)===null||r===void 0?void 0:r.height)!==null&&s!==void 0?s:0}}class g{constructor(r){this._iter=r}static forUris(r=()=>!1){return new g(new p(r))}static forStrings(){return new g(new I)}static forConfigKeys(){return new g(new w)}clear(){this._root=void 0}set(r,s){const o=this._iter.reset(r);let a;this._root||(this._root=new h,this._root.segment=o.value());const d=[];for(a=this._root;;){const f=o.cmp(a.segment);if(f>0)a.left||(a.left=new h,a.left.segment=o.value()),d.push([-1,a]),a=a.left;else if(f<0)a.right||(a.right=new h,a.right.segment=o.value()),d.push([1,a]),a=a.right;else if(o.hasNext())o.next(),a.mid||(a.mid=new h,a.mid.segment=o.value()),d.push([0,a]),a=a.mid;else break}const u=a.value;a.value=s,a.key=r;for(let f=d.length-1;f>=0;f--){const S=d[f][1];S.updateHeight();const v=S.balanceFactor();if(v<-1||v>1){const C=d[f][0],_=d[f+1][0];if(C===1&&_===1)d[f][1]=S.rotateLeft();else if(C===-1&&_===-1)d[f][1]=S.rotateRight();else if(C===1&&_===-1)S.right=d[f+1][1]=d[f+1][1].rotateRight(),d[f][1]=S.rotateLeft();else if(C===-1&&_===1)S.left=d[f+1][1]=d[f+1][1].rotateLeft(),d[f][1]=S.rotateRight();else throw new Error;if(f>0)switch(d[f-1][0]){case-1:d[f-1][1].left=d[f][1];break;case 1:d[f-1][1].right=d[f][1];break;case 0:d[f-1][1].mid=d[f][1];break}else this._root=d[0][1]}}return u}get(r){var s;return(s=this._getNode(r))===null||s===void 0?void 0:s.value}_getNode(r){const s=this._iter.reset(r);let o=this._root;for(;o;){const a=s.cmp(o.segment);if(a>0)o=o.left;else if(a<0)o=o.right;else if(s.hasNext())s.next(),o=o.mid;else break}return o}has(r){const s=this._getNode(r);return!((s==null?void 0:s.value)===void 0&&(s==null?void 0:s.mid)===void 0)}delete(r){return this._delete(r,!1)}deleteSuperstr(r){return this._delete(r,!0)}_delete(r,s){var o;const a=this._iter.reset(r),d=[];let u=this._root;for(;u;){const f=a.cmp(u.segment);if(f>0)d.push([-1,u]),u=u.left;else if(f<0)d.push([1,u]),u=u.right;else if(a.hasNext())a.next(),d.push([0,u]),u=u.mid;else break}if(!!u){if(s?(u.left=void 0,u.mid=void 0,u.right=void 0,u.height=1):(u.key=void 0,u.value=void 0),!u.mid&&!u.value)if(u.left&&u.right){const f=this._min(u.right),{key:S,value:v,segment:C}=f;this._delete(f.key,!1),u.key=S,u.value=v,u.segment=C}else{const f=(o=u.left)!==null&&o!==void 0?o:u.right;if(d.length>0){const[S,v]=d[d.length-1];switch(S){case-1:v.left=f;break;case 0:v.mid=f;break;case 1:v.right=f;break}}else this._root=f}for(let f=d.length-1;f>=0;f--){const S=d[f][1];S.updateHeight();const v=S.balanceFactor();if(v>1?(S.right.balanceFactor()>=0||(S.right=S.right.rotateRight()),d[f][1]=S.rotateLeft()):v<-1&&(S.left.balanceFactor()<=0||(S.left=S.left.rotateLeft()),d[f][1]=S.rotateRight()),f>0)switch(d[f-1][0]){case-1:d[f-1][1].left=d[f][1];break;case 1:d[f-1][1].right=d[f][1];break;case 0:d[f-1][1].mid=d[f][1];break}else this._root=d[0][1]}}}_min(r){for(;r.left;)r=r.left;return r}findSubstr(r){const s=this._iter.reset(r);let o=this._root,a;for(;o;){const d=s.cmp(o.segment);if(d>0)o=o.left;else if(d<0)o=o.right;else if(s.hasNext())s.next(),a=o.value||a,o=o.mid;else break}return o&&o.value||a}findSuperstr(r){const s=this._iter.reset(r);let o=this._root;for(;o;){const a=s.cmp(o.segment);if(a>0)o=o.left;else if(a<0)o=o.right;else if(s.hasNext())s.next(),o=o.mid;else return o.mid?this._entries(o.mid):void 0}}forEach(r){for(const[s,o]of this)r(o,s)}*[Symbol.iterator](){yield*this._entries(this._root)}*_entries(r){!r||(r.left&&(yield*this._entries(r.left)),r.value&&(yield[r.key,r.value]),r.mid&&(yield*this._entries(r.mid)),r.right&&(yield*this._entries(r.right)))}}e.TernarySearchTree=g;class t{constructor(r,s){this.uri=r,this.value=s}}class i{constructor(r,s){this[m]="ResourceMap",r instanceof i?(this.map=new Map(r.map),this.toKey=s??i.defaultToKey):(this.map=new Map,this.toKey=r??i.defaultToKey)}set(r,s){return this.map.set(this.toKey(r),new t(r,s)),this}get(r){var s;return(s=this.map.get(this.toKey(r)))===null||s===void 0?void 0:s.value}has(r){return this.map.has(this.toKey(r))}get size(){return this.map.size}clear(){this.map.clear()}delete(r){return this.map.delete(this.toKey(r))}forEach(r,s){typeof s!="undefined"&&(r=r.bind(s));for(let[o,a]of this.map)r(a.value,a.uri,this)}*values(){for(let r of this.map.values())yield r.value}*keys(){for(let r of this.map.values())yield r.uri}*entries(){for(let r of this.map.values())yield[r.uri,r.value]}*[(m=Symbol.toStringTag,Symbol.iterator)](){for(let[,r]of this.map)yield[r.uri,r.value]}}e.ResourceMap=i,i.defaultToKey=c=>c.toString();class n{constructor(){this[D]="LinkedMap",this._map=new Map,this._head=void 0,this._tail=void 0,this._size=0,this._state=0}clear(){this._map.clear(),this._head=void 0,this._tail=void 0,this._size=0,this._state++}isEmpty(){return!this._head&&!this._tail}get size(){return this._size}get first(){var r;return(r=this._head)===null||r===void 0?void 0:r.value}get last(){var r;return(r=this._tail)===null||r===void 0?void 0:r.value}has(r){return this._map.has(r)}get(r,s=0){const o=this._map.get(r);if(!!o)return s!==0&&this.touch(o,s),o.value}set(r,s,o=0){let a=this._map.get(r);if(a)a.value=s,o!==0&&this.touch(a,o);else{switch(a={key:r,value:s,next:void 0,previous:void 0},o){case 0:this.addItemLast(a);break;case 1:this.addItemFirst(a);break;case 2:this.addItemLast(a);break;default:this.addItemLast(a);break}this._map.set(r,a),this._size++}return this}delete(r){return!!this.remove(r)}remove(r){const s=this._map.get(r);if(!!s)return this._map.delete(r),this.removeItem(s),this._size--,s.value}shift(){if(!this._head&&!this._tail)return;if(!this._head||!this._tail)throw new Error("Invalid list");const r=this._head;return this._map.delete(r.key),this.removeItem(r),this._size--,r.value}forEach(r,s){const o=this._state;let a=this._head;for(;a;){if(s?r.bind(s)(a.value,a.key,this):r(a.value,a.key,this),this._state!==o)throw new Error("LinkedMap got modified during iteration.");a=a.next}}keys(){const r=this,s=this._state;let o=this._head;const a={[Symbol.iterator](){return a},next(){if(r._state!==s)throw new Error("LinkedMap got modified during iteration.");if(o){const d={value:o.key,done:!1};return o=o.next,d}else return{value:void 0,done:!0}}};return a}values(){const r=this,s=this._state;let o=this._head;const a={[Symbol.iterator](){return a},next(){if(r._state!==s)throw new Error("LinkedMap got modified during iteration.");if(o){const d={value:o.value,done:!1};return o=o.next,d}else return{value:void 0,done:!0}}};return a}entries(){const r=this,s=this._state;let o=this._head;const a={[Symbol.iterator](){return a},next(){if(r._state!==s)throw new Error("LinkedMap got modified during iteration.");if(o){const d={value:[o.key,o.value],done:!1};return o=o.next,d}else return{value:void 0,done:!0}}};return a}[(D=Symbol.toStringTag,Symbol.iterator)](){return this.entries()}trimOld(r){if(r>=this.size)return;if(r===0){this.clear();return}let s=this._head,o=this.size;for(;s&&o>r;)this._map.delete(s.key),s=s.next,o--;this._head=s,this._size=o,s&&(s.previous=void 0),this._state++}addItemFirst(r){if(!this._head&&!this._tail)this._tail=r;else if(this._head)r.next=this._head,this._head.previous=r;else throw new Error("Invalid list");this._head=r,this._state++}addItemLast(r){if(!this._head&&!this._tail)this._head=r;else if(this._tail)r.previous=this._tail,this._tail.next=r;else throw new Error("Invalid list");this._tail=r,this._state++}removeItem(r){if(r===this._head&&r===this._tail)this._head=void 0,this._tail=void 0;else if(r===this._head){if(!r.next)throw new Error("Invalid list");r.next.previous=void 0,this._head=r.next}else if(r===this._tail){if(!r.previous)throw new Error("Invalid list");r.previous.next=void 0,this._tail=r.previous}else{const s=r.next,o=r.previous;if(!s||!o)throw new Error("Invalid list");s.previous=o,o.next=s}r.next=void 0,r.previous=void 0,this._state++}touch(r,s){if(!this._head||!this._tail)throw new Error("Invalid list");if(!(s!==1&&s!==2)){if(s===1){if(r===this._head)return;const o=r.next,a=r.previous;r===this._tail?(a.next=void 0,this._tail=a):(o.previous=a,a.next=o),r.previous=void 0,r.next=this._head,this._head.previous=r,this._head=r,this._state++}else if(s===2){if(r===this._tail)return;const o=r.next,a=r.previous;r===this._head?(o.previous=void 0,this._head=o):(o.previous=a,a.next=o),r.next=void 0,r.previous=this._tail,this._tail.next=r,this._tail=r,this._state++}}}toJSON(){const r=[];return this.forEach((s,o)=>{r.push([o,s])}),r}fromJSON(r){this.clear();for(const[s,o]of r)this.set(s,o)}}e.LinkedMap=n;class l extends n{constructor(r,s=1){super();this._limit=r,this._ratio=Math.min(Math.max(0,s),1)}get limit(){return this._limit}set limit(r){this._limit=r,this.checkTrim()}get(r,s=2){return super.get(r,s)}peek(r){return super.get(r,0)}set(r,s){return super.set(r,s,2),this.checkTrim(),this}checkTrim(){this.size>this._limit&&this.trimOld(Math.round(this._limit*this._ratio))}}e.LRUCache=l}),define(te[73],ie([1,0,47,8]),function(j,e,y,m){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.fuzzyScoreGracefulAggressive=e.fuzzyScore=e.FuzzyScore=e.isPatternInWord=e.createMatches=e.anyScore=e.matchesFuzzy=e.matchesWords=e.matchesCamelCase=e.isUpper=e.matchesSubString=e.matchesContiguousSubString=e.matchesPrefix=e.matchesStrictPrefix=e.or=void 0;function D(...V){return function($,K){for(let J=0,Y=V.length;J<Y;J++){const se=V[J]($,K);if(se)return se}return null}}e.or=D,e.matchesStrictPrefix=I.bind(void 0,!1),e.matchesPrefix=I.bind(void 0,!0);function I(V,$,K){if(!K||K.length<$.length)return null;let J;return V?J=m.startsWithIgnoreCase(K,$):J=K.indexOf($)===0,J?$.length>0?[{start:0,end:$.length}]:[]:null}function w(V,$){const K=$.toLowerCase().indexOf(V.toLowerCase());return K===-1?null:[{start:K,end:K+V.length}]}e.matchesContiguousSubString=w;function b(V,$){return p(V.toLowerCase(),$.toLowerCase(),0,0)}e.matchesSubString=b;function p(V,$,K,J){if(K===V.length)return[];if(J===$.length)return null;if(V[K]===$[J]){let Y=null;return(Y=p(V,$,K+1,J+1))?s({start:J,end:J+1},Y):null}return p(V,$,K,J+1)}function h(V){return 97<=V&&V<=122}function g(V){return 65<=V&&V<=90}e.isUpper=g;function t(V){return 48<=V&&V<=57}function i(V){return V===32||V===9||V===10||V===13}const n=new Set;"()[]{}<>`'\"-/;:,.?!".split("").forEach(V=>n.add(V.charCodeAt(0)));function l(V){return i(V)||n.has(V)}function c(V,$){return V===$||l(V)&&l($)}function r(V){return h(V)||g(V)||t(V)}function s(V,$){return $.length===0?$=[V]:V.end===$[0].start?$[0].start=V.start:$.unshift(V),$}function o(V,$){for(let K=$;K<V.length;K++){const J=V.charCodeAt(K);if(g(J)||t(J)||K>0&&!r(V.charCodeAt(K-1)))return K}return V.length}function a(V,$,K,J){if(K===V.length)return[];if(J===$.length)return null;if(V[K]!==$[J].toLowerCase())return null;{let Y=null,se=J+1;for(Y=a(V,$,K+1,J+1);!Y&&(se=o($,se))<$.length;)Y=a(V,$,K+1,se),se++;return Y===null?null:s({start:J,end:J+1},Y)}}function d(V){let $=0,K=0,J=0,Y=0,se=0;for(let ve=0;ve<V.length;ve++)se=V.charCodeAt(ve),g(se)&&$++,h(se)&&K++,r(se)&&J++,t(se)&&Y++;const ge=$/V.length,me=K/V.length,le=J/V.length,he=Y/V.length;return{upperPercent:ge,lowerPercent:me,alphaPercent:le,numericPercent:he}}function u(V){const{upperPercent:$,lowerPercent:K}=V;return K===0&&$>.6}function f(V){const{upperPercent:$,lowerPercent:K,alphaPercent:J,numericPercent:Y}=V;return K>.2&&$<.8&&J>.6&&Y<.2}function S(V){let $=0,K=0,J=0,Y=0;for(let se=0;se<V.length;se++)J=V.charCodeAt(se),g(J)&&$++,h(J)&&K++,i(J)&&Y++;return($===0||K===0)&&Y===0?V.length<=30:$<=5}function v(V,$){if(!$||($=$.trim(),$.length===0)||!S(V)||$.length>60)return null;const K=d($);if(!f(K)){if(!u(K))return null;$=$.toLowerCase()}let J=null,Y=0;for(V=V.toLowerCase();Y<$.length&&(J=a(V,$,0,Y))===null;)Y=o($,Y+1);return J}e.matchesCamelCase=v;function C(V,$,K=!1){if(!$||$.length===0)return null;let J=null,Y=0;for(V=V.toLowerCase(),$=$.toLowerCase();Y<$.length&&(J=_(V,$,0,Y,K))===null;)Y=L($,Y+1);return J}e.matchesWords=C;function _(V,$,K,J,Y){if(K===V.length)return[];if(J===$.length)return null;if(c(V.charCodeAt(K),$.charCodeAt(J))){let se=null,ge=J+1;if(se=_(V,$,K+1,J+1,Y),!Y)for(;!se&&(ge=L($,ge))<$.length;)se=_(V,$,K+1,ge,Y),ge++;return se===null?null:s({start:J,end:J+1},se)}else return null}function L(V,$){for(let K=$;K<V.length;K++)if(l(V.charCodeAt(K))||K>0&&l(V.charCodeAt(K-1)))return K;return V.length}const E=D(e.matchesPrefix,v,w),N=D(e.matchesPrefix,v,b),k=new y.LRUCache(1e4);function M(V,$,K=!1){if(typeof V!="string"||typeof $!="string")return null;let J=k.get(V);J||(J=new RegExp(m.convertSimple2RegExpPattern(V),"i"),k.set(V,J));const Y=J.exec($);return Y?[{start:Y.index,end:Y.index+Y[0].length}]:K?N(V,$):E(V,$)}e.matchesFuzzy=M;function O(V,$,K,J,Y,se){const ge=Math.min(13,V.length);for(;K<ge;K++){const me=Q(V,$,K,J,Y,se,!1);if(me)return me}return[0,se]}e.anyScore=O;function B(V){if(typeof V=="undefined")return[];const $=[],K=V[1];for(let J=V.length-1;J>1;J--){const Y=V[J]+K,se=$[$.length-1];se&&se.end===Y?se.end=Y+1:$.push({start:Y,end:Y+1})}return $}e.createMatches=B;const T=128;function R(){const V=[],$=[];for(let K=0;K<=T;K++)$[K]=0;for(let K=0;K<=T;K++)V.push($.slice(0));return V}function P(V){const $=[];for(let K=0;K<=V;K++)$[K]=0;return $}const F=P(2*T),W=P(2*T),A=R(),H=R(),q=R(),X=!1;function G(V,$,K,J,Y){function se(me,le,he=" "){for(;me.length<le;)me=he+me;return me}let ge=` | |${J.split("").map(me=>se(me,3)).join("|")}
|
||
`;for(let me=0;me<=K;me++)me===0?ge+=" |":ge+=`${$[me-1]}|`,ge+=V[me].slice(0,Y+1).map(le=>se(le.toString(),3)).join("|")+`
|
||
`;return ge}function re(V,$,K,J){V=V.substr($),K=K.substr(J),console.log(G(H,V,V.length,K,K.length)),console.log(G(q,V,V.length,K,K.length)),console.log(G(A,V,V.length,K,K.length))}function ae(V,$){if($<0||$>=V.length)return!1;const K=V.codePointAt($);switch(K){case 95:case 45:case 46:case 32:case 47:case 92:case 39:case 34:case 58:case 36:case 60:case 40:case 91:return!0;case void 0:return!1;default:return!!m.isEmojiImprecise(K)}}function oe(V,$){if($<0||$>=V.length)return!1;switch(V.charCodeAt($)){case 32:case 9:return!0;default:return!1}}function Z(V,$,K){return $[V]!==K[V]}function x(V,$,K,J,Y,se,ge=!1){for(;$<K&&Y<se;)V[$]===J[Y]&&(ge&&(F[$]=Y),$+=1),Y+=1;return $===K}e.isPatternInWord=x;var U;(function(V){V.Default=[-100,0];function $(K){return!K||K.length===2&&K[0]===-100&&K[1]===0}V.isDefault=$})(U=e.FuzzyScore||(e.FuzzyScore={}));function Q(V,$,K,J,Y,se,ge){const me=V.length>T?T:V.length,le=J.length>T?T:J.length;if(K>=me||se>=le||me-K>le-se||!x($,K,me,Y,se,le,!0))return;ne(me,le,K,se,$,Y);let he=1,ve=1,pe=K,be=se;const de=[!1];for(he=1,pe=K;pe<me;he++,pe++){const ke=F[pe],Me=W[pe],$e=pe+1<me?W[pe+1]:le;for(ve=ke-se+1,be=ke;be<$e;ve++,be++){let He=Number.MIN_SAFE_INTEGER,Ge=!1;be<=Me&&(He=ce(V,$,pe,K,J,Y,be,le,se,A[he-1][ve-1]===0,de));let we=0;He!==Number.MAX_SAFE_INTEGER&&(Ge=!0,we=He+H[he-1][ve-1]);const Se=be>ke,De=Se?H[he][ve-1]+(A[he][ve-1]>0?-5:0):0,Pe=be>ke+1&&A[he][ve-1]>0,Fe=Pe?H[he][ve-2]+(A[he][ve-2]>0?-5:0):0;if(Pe&&(!Se||Fe>=De)&&(!Ge||Fe>=we))H[he][ve]=Fe,q[he][ve]=3,A[he][ve]=0;else if(Se&&(!Ge||De>=we))H[he][ve]=De,q[he][ve]=2,A[he][ve]=0;else if(Ge)H[he][ve]=we,q[he][ve]=1,A[he][ve]=A[he-1][ve-1]+1;else throw new Error("not possible")}}if(X&&re(V,K,J,se),!de[0]&&!ge)return;he--,ve--;const fe=[H[he][ve],se];let _e=0,Le=0;for(;he>=1;){let ke=ve;do{const Me=q[he][ke];if(Me===3)ke=ke-2;else if(Me===2)ke=ke-1;else break}while(ke>=1);_e>1&&$[K+he-1]===Y[se+ve-1]&&!Z(ke+se-1,J,Y)&&_e+1>A[he][ke]&&(ke=ve),ke===ve?_e++:_e=1,Le||(Le=ke),he--,ve=ke-1,fe.push(ve)}le===me&&(fe[0]+=2);const Te=Le-me;return fe[0]-=Te,fe}e.fuzzyScore=Q;function ne(V,$,K,J,Y,se){let ge=V-1,me=$-1;for(;ge>=K&&me>=J;)Y[ge]===se[me]&&(W[ge]=me,ge--),me--}function ce(V,$,K,J,Y,se,ge,me,le,he,ve){if($[K]!==se[ge])return Number.MIN_SAFE_INTEGER;let pe=1,be=!1;return ge===K-J?pe=V[K]===Y[ge]?7:5:Z(ge,Y,se)&&(ge===0||!Z(ge-1,Y,se))?(pe=V[K]===Y[ge]?7:5,be=!0):ae(se,ge)&&(ge===0||!ae(se,ge-1))?pe=5:(ae(se,ge-1)||oe(se,ge-1))&&(pe=5,be=!0),pe>1&&K===J&&(ve[0]=!0),be||(be=Z(ge,Y,se)||ae(se,ge-1)||oe(se,ge-1)),K===J?ge>le&&(pe-=be?3:5):he?pe+=be?2:0:pe+=be?0:1,ge+1===me&&(pe-=be?3:5),pe}function ee(V,$,K,J,Y,se,ge){return ue(V,$,K,J,Y,se,!0,ge)}e.fuzzyScoreGracefulAggressive=ee;function ue(V,$,K,J,Y,se,ge,me){let le=Q(V,$,K,J,Y,se,me);if(le&&!ge)return le;if(V.length>=3){const he=Math.min(7,V.length-1);for(let ve=K+1;ve<he;ve++){const pe=z(V,ve);if(pe){const be=Q(pe,pe.toLowerCase(),K,J,Y,se,me);be&&(be[0]-=3,(!le||be[0]>le[0])&&(le=be))}}}return le}function z(V,$){if($+1>=V.length)return;const K=V[$],J=V[$+1];if(K!==J)return V.slice(0,$)+J+K+V.slice($+2)}}),define(te[319],ie([1,0,73,82,17,8]),function(j,e,y,m,D,I){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.pieceToQuery=e.prepareQuery=e.scoreFuzzy2=void 0;const w=[void 0,[]];function b(o,a,d=0,u=0){const f=a;return f.values&&f.values.length>1?p(o,f.values,d,u):h(o,a,d,u)}e.scoreFuzzy2=b;function p(o,a,d,u){let f=0;const S=[];for(const v of a){const[C,_]=h(o,v,d,u);if(typeof C!="number")return w;f+=C,S.push(..._)}return[f,t(S)]}function h(o,a,d,u){const f=(0,y.fuzzyScore)(a.original,a.originalLowercase,d,o,o.toLowerCase(),u,!0);return f?[f[0],(0,y.createMatches)(f)]:w}const g=Object.freeze({score:0});function t(o){const a=o.sort((f,S)=>f.start-S.start),d=[];let u;for(const f of a)!u||!i(u,f)?(u=f,d.push(f)):(u.start=Math.min(u.start,f.start),u.end=Math.max(u.end,f.end));return d}function i(o,a){return!(o.end<a.start||a.end<o.start)}function n(o){return o.startsWith('"')&&o.endsWith('"')}const l=" ";function c(o){typeof o!="string"&&(o="");const a=o.toLowerCase(),{pathNormalized:d,normalized:u,normalizedLowercase:f}=r(o),S=d.indexOf(m.sep)>=0,v=n(o);let C;const _=o.split(l);if(_.length>1)for(const L of _){const E=n(L),{pathNormalized:N,normalized:k,normalizedLowercase:M}=r(L);k&&(C||(C=[]),C.push({original:L,originalLowercase:L.toLowerCase(),pathNormalized:N,normalized:k,normalizedLowercase:M,expectContiguousMatch:E}))}return{original:o,originalLowercase:a,pathNormalized:d,normalized:u,normalizedLowercase:f,values:C,containsPathSeparator:S,expectContiguousMatch:v}}e.prepareQuery=c;function r(o){let a;D.isWindows?a=o.replace(/\//g,m.sep):a=o.replace(/\\/g,m.sep);const d=(0,I.stripWildcards)(a).replace(/\s|"/g,"");return{pathNormalized:a,normalized:d,normalizedLowercase:d.toLowerCase()}}function s(o){return Array.isArray(o)?c(o.map(a=>a.original).join(l)):c(o.original)}e.pieceToQuery=s}),define(te[215],ie([1,0,10,166,47,82,17,8]),function(j,e,y,m,D,I,w,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.isRelativePattern=e.parse=e.match=e.splitGlobAware=e.GLOB_SPLIT=e.GLOBSTAR=void 0,e.GLOBSTAR="**",e.GLOB_SPLIT="/";const p="[/\\\\]",h="[^/\\\\]",g=/\//g;function t(P){switch(P){case 0:return"";case 1:return`${h}*?`;default:return`(?:${p}|${h}+${p}|${p}${h}+)*?`}}function i(P,F){if(!P)return[];const W=[];let A=!1,H=!1,q="";for(const X of P){switch(X){case F:if(!A&&!H){W.push(q),q="";continue}break;case"{":A=!0;break;case"}":A=!1;break;case"[":H=!0;break;case"]":H=!1;break}q+=X}return q&&W.push(q),W}e.splitGlobAware=i;function n(P){if(!P)return"";let F="";const W=i(P,e.GLOB_SPLIT);if(W.every(A=>A===e.GLOBSTAR))F=".*";else{let A=!1;W.forEach((H,q)=>{if(H===e.GLOBSTAR){A||(F+=t(2),A=!0);return}let X=!1,G="",re=!1,ae="";for(const oe of H){if(oe!=="}"&&X){G+=oe;continue}if(re&&(oe!=="]"||!ae)){let Z;oe==="-"?Z=oe:(oe==="^"||oe==="!")&&!ae?Z="^":oe===e.GLOB_SPLIT?Z="":Z=(0,b.escapeRegExpCharacters)(oe),ae+=Z;continue}switch(oe){case"{":X=!0;continue;case"[":re=!0;continue;case"}":{F+=`(?:${i(G,",").map(U=>n(U)).join("|")})`,X=!1,G="";break}case"]":F+="["+ae+"]",re=!1,ae="";break;case"?":F+=h;continue;case"*":F+=t(1);continue;default:F+=(0,b.escapeRegExpCharacters)(oe)}}q<W.length-1&&(W[q+1]!==e.GLOBSTAR||q+2<W.length)&&(F+=p),A=!1})}return F}const l=/^\*\*\/\*\.[\w\.-]+$/,c=/^\*\*\/([\w\.-]+)\/?$/,r=/^{\*\*\/[\*\.]?[\w\.-]+\/?(,\*\*\/[\*\.]?[\w\.-]+\/?)*}$/,s=/^{\*\*\/[\*\.]?[\w\.-]+(\/(\*\*)?)?(,\*\*\/[\*\.]?[\w\.-]+(\/(\*\*)?)?)*}$/,o=/^\*\*((\/[\w\.-]+)+)\/?$/,a=/^([\w\.-]+(\/[\w\.-]+)*)\/?$/,d=new D.LRUCache(1e4),u=function(){return!1},f=function(){return null};function S(P,F){if(!P)return f;let W;typeof P!="string"?W=P.pattern:W=P,W=W.trim();const A=`${W}_${!!F.trimForExclusions}`;let H=d.get(A);if(H)return v(H,P);let q;if(l.test(W)){const X=W.substr(4);H=function(G,re){return typeof G=="string"&&G.endsWith(X)?W:null}}else(q=c.exec(C(W,F)))?H=_(q[1],W):(F.trimForExclusions?s:r).test(W)?H=L(W,F):(q=o.exec(C(W,F)))?H=E(q[1].substr(1),W,!0):(q=a.exec(C(W,F)))?H=E(q[1],W,!1):H=N(W);return d.set(A,H),v(H,P)}function v(P,F){return typeof F=="string"?P:function(W,A){return(0,m.isEqualOrParent)(W,F.base,!w.isLinux)?P(W.substr(F.base.length+1),A):null}}function C(P,F){return F.trimForExclusions&&P.endsWith("/**")?P.substr(0,P.length-2):P}function _(P,F){const W=`/${P}`,A=`\\${P}`,H=function(X,G){return typeof X!="string"?null:G?G===P?F:null:X===P||X.endsWith(W)||X.endsWith(A)?F:null},q=[P];return H.basenames=q,H.patterns=[F],H.allBasenames=q,H}function L(P,F){const W=R(P.slice(1,-1).split(",").map(G=>S(G,F)).filter(G=>G!==f),P),A=W.length;if(!A)return f;if(A===1)return W[0];const H=function(G,re){for(let ae=0,oe=W.length;ae<oe;ae++)if(W[ae](G,re))return P;return null},q=W.find(G=>!!G.allBasenames);q&&(H.allBasenames=q.allBasenames);const X=W.reduce((G,re)=>re.allPaths?G.concat(re.allPaths):G,[]);return X.length&&(H.allPaths=X),H}function E(P,F,W){const A=I.sep===I.posix.sep,H=A?P:P.replace(g,I.sep),q=I.sep+H,X=I.posix.sep+P,G=W?function(re,ae){return typeof re=="string"&&(re===H||re.endsWith(q)||!A&&(re===P||re.endsWith(X)))?F:null}:function(re,ae){return typeof re=="string"&&(re===H||!A&&re===P)?F:null};return G.allPaths=[(W?"*/":"./")+P],G}function N(P){try{const F=new RegExp(`^${n(P)}$`);return function(W){return F.lastIndex=0,typeof W=="string"&&F.test(W)?P:null}}catch{return f}}function k(P,F,W){return!P||typeof F!="string"?!1:M(P)(F,void 0,W)}e.match=k;function M(P,F={}){if(!P)return u;if(typeof P=="string"||O(P)){const W=S(P,F);if(W===f)return u;const A=function(H,q){return!!W(H,q)};return W.allBasenames&&(A.allBasenames=W.allBasenames),W.allPaths&&(A.allPaths=W.allPaths),A}return B(P,F)}e.parse=M;function O(P){const F=P;return F?typeof F.base=="string"&&typeof F.pattern=="string":!1}e.isRelativePattern=O;function B(P,F){const W=R(Object.getOwnPropertyNames(P).map(G=>T(G,P[G],F)).filter(G=>G!==f)),A=W.length;if(!A)return f;if(!W.some(G=>!!G.requiresSiblings)){if(A===1)return W[0];const G=function(oe,Z){for(let x=0,U=W.length;x<U;x++){const Q=W[x](oe,Z);if(Q)return Q}return null},re=W.find(oe=>!!oe.allBasenames);re&&(G.allBasenames=re.allBasenames);const ae=W.reduce((oe,Z)=>Z.allPaths?oe.concat(Z.allPaths):oe,[]);return ae.length&&(G.allPaths=ae),G}const H=function(G,re,ae){let oe;for(let Z=0,x=W.length;Z<x;Z++){const U=W[Z];U.requiresSiblings&&ae&&(re||(re=(0,I.basename)(G)),oe||(oe=re.substr(0,re.length-(0,I.extname)(G).length)));const Q=U(G,re,oe,ae);if(Q)return Q}return null},q=W.find(G=>!!G.allBasenames);q&&(H.allBasenames=q.allBasenames);const X=W.reduce((G,re)=>re.allPaths?G.concat(re.allPaths):G,[]);return X.length&&(H.allPaths=X),H}function T(P,F,W){if(F===!1)return f;const A=S(P,W);if(A===f)return f;if(typeof F=="boolean")return A;if(F){const H=F.when;if(typeof H=="string"){const q=(X,G,re,ae)=>{if(!ae||!A(X,G))return null;const oe=H.replace("$(basename)",re),Z=ae(oe);return(0,y.isThenable)(Z)?Z.then(x=>x?P:null):Z?P:null};return q.requiresSiblings=!0,q}}return A}function R(P,F){const W=P.filter(G=>!!G.basenames);if(W.length<2)return P;const A=W.reduce((G,re)=>{const ae=re.basenames;return ae?G.concat(ae):G},[]);let H;if(F){H=[];for(let G=0,re=A.length;G<re;G++)H.push(F)}else H=W.reduce((G,re)=>{const ae=re.patterns;return ae?G.concat(ae):G},[]);const q=function(G,re){if(typeof G!="string")return null;if(!re){let oe;for(oe=G.length;oe>0;oe--){const Z=G.charCodeAt(oe-1);if(Z===47||Z===92)break}re=G.substr(oe)}const ae=A.indexOf(re);return ae!==-1?H[ae]:null};q.basenames=A,q.patterns=H,q.allBasenames=A;const X=P.filter(G=>!G.basenames);return X.push(q),X}}),define(te[95],ie([1,0,27,73,8]),function(j,e,y,m,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.matchesFuzzyIconAware=e.parseLabelWithIcons=e.stripIcons=e.markdownEscapeEscapedIcons=e.escapeIcons=e.iconStartMarker=void 0,e.iconStartMarker="$(";const I=new RegExp(`\\$\\(${y.CSSIcon.iconNameExpression}(?:${y.CSSIcon.iconModifierExpression})?\\)`,"g"),w=new RegExp(y.CSSIcon.iconNameCharacter),b=new RegExp(`(\\\\)?${I.source}`,"g");function p(r){return r.replace(b,(s,o)=>o?s:`\\${s}`)}e.escapeIcons=p;const h=new RegExp(`\\\\${I.source}`,"g");function g(r){return r.replace(h,s=>`\\${s}`)}e.markdownEscapeEscapedIcons=g;const t=new RegExp(`(\\s)?(\\\\)?${I.source}(\\s)?`,"g");function i(r){return r.indexOf(e.iconStartMarker)===-1?r:r.replace(t,(s,o,a,d)=>a?s:o||d||"")}e.stripIcons=i;function n(r){const s=r.indexOf(e.iconStartMarker);return s===-1?{text:r}:l(r,s)}e.parseLabelWithIcons=n;function l(r,s){const o=[];let a="";function d(E){if(E){a+=E;for(const N of E)o.push(S)}}let u=-1,f="",S=0,v,C,_=s;const L=r.length;for(d(r.substr(0,s));_<L;)v=r[_],C=r[_+1],v===e.iconStartMarker[0]&&C===e.iconStartMarker[1]?(u=_,d(f),f=e.iconStartMarker,_++):v===")"&&u!==-1?(S+=_-u+1,u=-1,f=""):u!==-1?w.test(v)?f+=v:(d(f),u=-1,f=""):d(v),_++;return d(f),{text:a,iconOffsets:o}}function c(r,s,o=!1){const{text:a,iconOffsets:d}=s;if(!d||d.length===0)return(0,m.matchesFuzzy)(r,a,o);const u=(0,D.ltrim)(a," "),f=a.length-u.length,S=(0,m.matchesFuzzy)(r,u,o);if(S)for(const v of S){const C=d[v.start+f]+f;v.start+=C,v.end+=C}return S}e.matchesFuzzyIconAware=c}),define(te[66],ie([1,0,13,95]),function(j,e,y,m){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.parseHrefAndDimensions=e.removeMarkdownEscapes=e.escapeMarkdownSyntaxTokens=e.isMarkdownString=e.isEmptyMarkdownString=e.MarkdownString=void 0;class D{constructor(t="",i=!1){var n,l,c;if(this.value=t,typeof this.value!="string")throw(0,y.illegalArgument)("value");typeof i=="boolean"?(this.isTrusted=i,this.supportThemeIcons=!1,this.supportHtml=!1):(this.isTrusted=(n=i.isTrusted)!==null&&n!==void 0?n:void 0,this.supportThemeIcons=(l=i.supportThemeIcons)!==null&&l!==void 0?l:!1,this.supportHtml=(c=i.supportHtml)!==null&&c!==void 0?c:!1)}appendText(t,i=0){return this.value+=b(this.supportThemeIcons?(0,m.escapeIcons)(t):t).replace(/([ \t]+)/g,(n,l)=>" ".repeat(l.length)).replace(/\>/gm,"\\>").replace(/\n/g,i===1?`\\
|
||
`:`
|
||
|
||
`),this}appendMarkdown(t){return this.value+=t,this}appendCodeblock(t,i){return this.value+="\n```",this.value+=t,this.value+=`
|
||
`,this.value+=i,this.value+="\n```\n",this}}e.MarkdownString=D;function I(g){return w(g)?!g.value:Array.isArray(g)?g.every(I):!0}e.isEmptyMarkdownString=I;function w(g){return g instanceof D?!0:g&&typeof g=="object"?typeof g.value=="string"&&(typeof g.isTrusted=="boolean"||g.isTrusted===void 0)&&(typeof g.supportThemeIcons=="boolean"||g.supportThemeIcons===void 0):!1}e.isMarkdownString=w;function b(g){return g.replace(/[\\`*_{}[\]()#+\-!]/g,"\\$&")}e.escapeMarkdownSyntaxTokens=b;function p(g){return g&&g.replace(/\\([\\`*_{}[\]()#+\-.!])/g,"$1")}e.removeMarkdownEscapes=p;function h(g){const t=[],i=g.split("|").map(l=>l.trim());g=i[0];const n=i[1];if(n){const l=/height=(\d+)/.exec(n),c=/width=(\d+)/.exec(n),r=l?l[1]:"",s=c?c[1]:"",o=isFinite(parseInt(s)),a=isFinite(parseInt(r));o&&t.push(`width="${s}"`),a&&t.push(`height="${r}"`)}return{href:g,dimensions:t}}e.parseHrefAndDimensions=h}),define(te[320],ie([1,0,8]),function(j,e,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.buildReplaceStringWithCasePreserved=void 0;function m(w,b){if(w&&w[0]!==""){const p=D(w,b,"-"),h=D(w,b,"_");return p&&!h?I(w,b,"-"):!p&&h?I(w,b,"_"):w[0].toUpperCase()===w[0]?b.toUpperCase():w[0].toLowerCase()===w[0]?b.toLowerCase():y.containsUppercaseCharacter(w[0][0])&&b.length>0?b[0].toUpperCase()+b.substr(1):w[0][0].toUpperCase()!==w[0][0]&&b.length>0?b[0].toLowerCase()+b.substr(1):b}else return b}e.buildReplaceStringWithCasePreserved=m;function D(w,b,p){return w[0].indexOf(p)!==-1&&b.indexOf(p)!==-1&&w[0].split(p).length===b.split(p).length}function I(w,b,p){const h=b.split(p),g=w[0].split(p);let t="";return h.forEach((i,n)=>{t+=m([g[n]],i)+p}),t.slice(0,-1)}}),define(te[74],ie([1,0,8]),function(j,e,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var m;(function(D){D[D.Ignore=0]="Ignore",D[D.Info=1]="Info",D[D.Warning=2]="Warning",D[D.Error=3]="Error"})(m||(m={})),function(D){const I="error",w="warning",b="warn",p="info",h="ignore";function g(i){return i?y.equalsIgnoreCase(I,i)?D.Error:y.equalsIgnoreCase(w,i)||y.equalsIgnoreCase(b,i)?D.Warning:y.equalsIgnoreCase(p,i)?D.Info:D.Ignore:D.Ignore}D.fromValue=g;function t(i){switch(i){case D.Error:return I;case D.Warning:return w;case D.Info:return p;default:return h}}D.toString=t}(m||(m={})),e.default=m}),define(te[20],ie([1,0]),function(j,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.assertNever=e.withNullAsUndefined=e.createProxyObject=e.getAllMethodNames=e.getAllPropertyNames=e.validateConstraint=e.validateConstraints=e.isFunction=e.assertIsDefined=e.assertType=e.isUndefinedOrNull=e.isDefined=e.isUndefined=e.isBoolean=e.isNumber=e.isObject=e.isString=e.isArray=void 0;function y(d){return Array.isArray(d)}e.isArray=y;function m(d){return typeof d=="string"}e.isString=m;function D(d){return typeof d=="object"&&d!==null&&!Array.isArray(d)&&!(d instanceof RegExp)&&!(d instanceof Date)}e.isObject=D;function I(d){return typeof d=="number"&&!isNaN(d)}e.isNumber=I;function w(d){return d===!0||d===!1}e.isBoolean=w;function b(d){return typeof d=="undefined"}e.isUndefined=b;function p(d){return!h(d)}e.isDefined=p;function h(d){return b(d)||d===null}e.isUndefinedOrNull=h;function g(d,u){if(!d)throw new Error(u?`Unexpected type, expected '${u}'`:"Unexpected type")}e.assertType=g;function t(d){if(h(d))throw new Error("Assertion Failed: argument is undefined or null");return d}e.assertIsDefined=t;function i(d){return typeof d=="function"}e.isFunction=i;function n(d,u){const f=Math.min(d.length,u.length);for(let S=0;S<f;S++)l(d[S],u[S])}e.validateConstraints=n;function l(d,u){if(m(u)){if(typeof d!==u)throw new Error(`argument does not match constraint: typeof ${u}`)}else if(i(u)){try{if(d instanceof u)return}catch{}if(!h(d)&&d.constructor===u||u.length===1&&u.call(void 0,d)===!0)return;throw new Error("argument does not match one of these constraints: arg instanceof constraint, arg.constructor === constraint, nor constraint(arg) === true")}}e.validateConstraint=l;function c(d){let u=[],f=Object.getPrototypeOf(d);for(;Object.prototype!==f;)u=u.concat(Object.getOwnPropertyNames(f)),f=Object.getPrototypeOf(f);return u}e.getAllPropertyNames=c;function r(d){const u=[];for(const f of c(d))typeof d[f]=="function"&&u.push(f);return u}e.getAllMethodNames=r;function s(d,u){const f=v=>function(){const C=Array.prototype.slice.call(arguments,0);return u(v,C)};let S={};for(const v of d)S[v]=f(v);return S}e.createProxyObject=s;function o(d){return d===null?void 0:d}e.withNullAsUndefined=o;function a(d,u="Unreachable"){throw new Error(u)}e.assertNever=a}),define(te[39],ie([1,0,20]),function(j,e,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getOrDefault=e.equals=e.mixin=e.cloneAndChange=e.deepFreeze=e.deepClone=void 0;function m(t){if(!t||typeof t!="object"||t instanceof RegExp)return t;const i=Array.isArray(t)?[]:{};return Object.keys(t).forEach(n=>{t[n]&&typeof t[n]=="object"?i[n]=m(t[n]):i[n]=t[n]}),i}e.deepClone=m;function D(t){if(!t||typeof t!="object")return t;const i=[t];for(;i.length>0;){const n=i.shift();Object.freeze(n);for(const l in n)if(I.call(n,l)){const c=n[l];typeof c=="object"&&!Object.isFrozen(c)&&i.push(c)}}return t}e.deepFreeze=D;const I=Object.prototype.hasOwnProperty;function w(t,i){return b(t,i,new Set)}e.cloneAndChange=w;function b(t,i,n){if((0,y.isUndefinedOrNull)(t))return t;const l=i(t);if(typeof l!="undefined")return l;if((0,y.isArray)(t)){const c=[];for(const r of t)c.push(b(r,i,n));return c}if((0,y.isObject)(t)){if(n.has(t))throw new Error("Cannot clone recursive data-structure");n.add(t);const c={};for(let r in t)I.call(t,r)&&(c[r]=b(t[r],i,n));return n.delete(t),c}return t}function p(t,i,n=!0){return(0,y.isObject)(t)?((0,y.isObject)(i)&&Object.keys(i).forEach(l=>{l in t?n&&((0,y.isObject)(t[l])&&(0,y.isObject)(i[l])?p(t[l],i[l],n):t[l]=i[l]):t[l]=i[l]}),t):i}e.mixin=p;function h(t,i){if(t===i)return!0;if(t==null||i===null||i===void 0||typeof t!=typeof i||typeof t!="object"||Array.isArray(t)!==Array.isArray(i))return!1;let n,l;if(Array.isArray(t)){if(t.length!==i.length)return!1;for(n=0;n<t.length;n++)if(!h(t[n],i[n]))return!1}else{const c=[];for(l in t)c.push(l);c.sort();const r=[];for(l in i)r.push(l);if(r.sort(),!h(c,r))return!1;for(n=0;n<c.length;n++)if(!h(t[c[n]],i[c[n]]))return!1}return!0}e.equals=h;function g(t,i,n){const l=i(t);return typeof l=="undefined"?n:l}e.getOrDefault=g}),define(te[139],ie([1,0]),function(j,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.toUint32=e.toUint8=void 0;function y(D){return D<0?0:D>255?255:D|0}e.toUint8=y;function m(D){return D<0?0:D>4294967295?4294967295:D|0}e.toUint32=m}),define(te[25],ie([1,0,82,17]),function(j,e,y,m){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.uriToFsPath=e.URI=void 0;const D=/^\w[\w\d+.-]*$/,I=/^\//,w=/^\/\//;function b(v,C){if(!v.scheme&&C)throw new Error(`[UriError]: Scheme is missing: {scheme: "", authority: "${v.authority}", path: "${v.path}", query: "${v.query}", fragment: "${v.fragment}"}`);if(v.scheme&&!D.test(v.scheme))throw new Error("[UriError]: Scheme contains illegal characters.");if(v.path){if(v.authority){if(!I.test(v.path))throw new Error('[UriError]: If a URI contains an authority component, then the path component must either be empty or begin with a slash ("/") character')}else if(w.test(v.path))throw new Error('[UriError]: If a URI does not contain an authority component, then the path cannot begin with two slash characters ("//")')}}function p(v,C){return!v&&!C?"file":v}function h(v,C){switch(v){case"https":case"http":case"file":C?C[0]!==t&&(C=t+C):C=t;break}return C}const g="",t="/",i=/^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/;class n{constructor(C,_,L,E,N,k=!1){typeof C=="object"?(this.scheme=C.scheme||g,this.authority=C.authority||g,this.path=C.path||g,this.query=C.query||g,this.fragment=C.fragment||g):(this.scheme=p(C,k),this.authority=_||g,this.path=h(this.scheme,L||g),this.query=E||g,this.fragment=N||g,b(this,k))}static isUri(C){return C instanceof n?!0:C?typeof C.authority=="string"&&typeof C.fragment=="string"&&typeof C.path=="string"&&typeof C.query=="string"&&typeof C.scheme=="string"&&typeof C.fsPath=="string"&&typeof C.with=="function"&&typeof C.toString=="function":!1}get fsPath(){return a(this,!1)}with(C){if(!C)return this;let{scheme:_,authority:L,path:E,query:N,fragment:k}=C;return _===void 0?_=this.scheme:_===null&&(_=g),L===void 0?L=this.authority:L===null&&(L=g),E===void 0?E=this.path:E===null&&(E=g),N===void 0?N=this.query:N===null&&(N=g),k===void 0?k=this.fragment:k===null&&(k=g),_===this.scheme&&L===this.authority&&E===this.path&&N===this.query&&k===this.fragment?this:new c(_,L,E,N,k)}static parse(C,_=!1){const L=i.exec(C);return L?new c(L[2]||g,S(L[4]||g),S(L[5]||g),S(L[7]||g),S(L[9]||g),_):new c(g,g,g,g,g)}static file(C){let _=g;if(m.isWindows&&(C=C.replace(/\\/g,t)),C[0]===t&&C[1]===t){const L=C.indexOf(t,2);L===-1?(_=C.substring(2),C=t):(_=C.substring(2,L),C=C.substring(L)||t)}return new c("file",_,C,g,g)}static from(C){const _=new c(C.scheme,C.authority,C.path,C.query,C.fragment);return b(_,!0),_}static joinPath(C,..._){if(!C.path)throw new Error("[UriError]: cannot call joinPath on URI without path");let L;return m.isWindows&&C.scheme==="file"?L=n.file(y.win32.join(a(C,!0),..._)).path:L=y.posix.join(C.path,..._),C.with({path:L})}toString(C=!1){return d(this,C)}toJSON(){return this}static revive(C){if(C){if(C instanceof n)return C;{const _=new c(C);return _._formatted=C.external,_._fsPath=C._sep===l?C.fsPath:null,_}}else return C}}e.URI=n;const l=m.isWindows?1:void 0;class c extends n{constructor(){super(...arguments);this._formatted=null,this._fsPath=null}get fsPath(){return this._fsPath||(this._fsPath=a(this,!1)),this._fsPath}toString(C=!1){return C?d(this,!0):(this._formatted||(this._formatted=d(this,!1)),this._formatted)}toJSON(){const C={$mid:1};return this._fsPath&&(C.fsPath=this._fsPath,C._sep=l),this._formatted&&(C.external=this._formatted),this.path&&(C.path=this.path),this.scheme&&(C.scheme=this.scheme),this.authority&&(C.authority=this.authority),this.query&&(C.query=this.query),this.fragment&&(C.fragment=this.fragment),C}}const r={[58]:"%3A",[47]:"%2F",[63]:"%3F",[35]:"%23",[91]:"%5B",[93]:"%5D",[64]:"%40",[33]:"%21",[36]:"%24",[38]:"%26",[39]:"%27",[40]:"%28",[41]:"%29",[42]:"%2A",[43]:"%2B",[44]:"%2C",[59]:"%3B",[61]:"%3D",[32]:"%20"};function s(v,C){let _,L=-1;for(let E=0;E<v.length;E++){const N=v.charCodeAt(E);if(N>=97&&N<=122||N>=65&&N<=90||N>=48&&N<=57||N===45||N===46||N===95||N===126||C&&N===47)L!==-1&&(_+=encodeURIComponent(v.substring(L,E)),L=-1),_!==void 0&&(_+=v.charAt(E));else{_===void 0&&(_=v.substr(0,E));const k=r[N];k!==void 0?(L!==-1&&(_+=encodeURIComponent(v.substring(L,E)),L=-1),_+=k):L===-1&&(L=E)}}return L!==-1&&(_+=encodeURIComponent(v.substring(L))),_!==void 0?_:v}function o(v){let C;for(let _=0;_<v.length;_++){const L=v.charCodeAt(_);L===35||L===63?(C===void 0&&(C=v.substr(0,_)),C+=r[L]):C!==void 0&&(C+=v[_])}return C!==void 0?C:v}function a(v,C){let _;return v.authority&&v.path.length>1&&v.scheme==="file"?_=`//${v.authority}${v.path}`:v.path.charCodeAt(0)===47&&(v.path.charCodeAt(1)>=65&&v.path.charCodeAt(1)<=90||v.path.charCodeAt(1)>=97&&v.path.charCodeAt(1)<=122)&&v.path.charCodeAt(2)===58?C?_=v.path.substr(1):_=v.path[1].toLowerCase()+v.path.substr(2):_=v.path,m.isWindows&&(_=_.replace(/\//g,"\\")),_}e.uriToFsPath=a;function d(v,C){const _=C?o:s;let L="",{scheme:E,authority:N,path:k,query:M,fragment:O}=v;if(E&&(L+=E,L+=":"),(N||E==="file")&&(L+=t,L+=t),N){let B=N.indexOf("@");if(B!==-1){const T=N.substr(0,B);N=N.substr(B+1),B=T.indexOf(":"),B===-1?L+=_(T,!1):(L+=_(T.substr(0,B),!1),L+=":",L+=_(T.substr(B+1),!1)),L+="@"}N=N.toLowerCase(),B=N.indexOf(":"),B===-1?L+=_(N,!1):(L+=_(N.substr(0,B),!1),L+=N.substr(B))}if(k){if(k.length>=3&&k.charCodeAt(0)===47&&k.charCodeAt(2)===58){const B=k.charCodeAt(1);B>=65&&B<=90&&(k=`/${String.fromCharCode(B+32)}:${k.substr(3)}`)}else if(k.length>=2&&k.charCodeAt(1)===58){const B=k.charCodeAt(0);B>=65&&B<=90&&(k=`${String.fromCharCode(B+32)}:${k.substr(2)}`)}L+=_(k,!0)}return M&&(L+="?",L+=_(M,!1)),O&&(L+="#",L+=C?O:s(O,!1)),L}function u(v){try{return decodeURIComponent(v)}catch{return v.length>3?v.substr(0,3)+u(v.substr(3)):v}}const f=/(%[0-9A-Za-z][0-9A-Za-z])+/g;function S(v){return v.match(f)?v.replace(f,C=>u(C)):v}}),define(te[216],ie([1,0,110,25]),function(j,e,y,m){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.revive=e.parse=void 0;function D(w){let b=JSON.parse(w);return b=I(b),b}e.parse=D;function I(w,b=0){if(!w||b>200)return w;if(typeof w=="object"){switch(w.$mid){case 1:return m.URI.revive(w);case 2:return new RegExp(w.source,w.flags);case 14:return new Date(w.source)}if(w instanceof y.VSBuffer||w instanceof Uint8Array)return w;if(Array.isArray(w))for(let p=0;p<w.length;++p)w[p]=I(w[p],b+1);else for(const p in w)Object.hasOwnProperty.call(w,p)&&(w[p]=I(w[p],b+1))}return w}e.revive=I}),define(te[48],ie([1,0,17,25]),function(j,e,y,m){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.FileAccess=e.RemoteAuthorities=e.connectionTokenQueryName=e.Schemas=void 0;var D;(function(b){b.inMemory="inmemory",b.vscode="vscode",b.internal="private",b.walkThrough="walkThrough",b.walkThroughSnippet="walkThroughSnippet",b.http="http",b.https="https",b.file="file",b.mailto="mailto",b.untitled="untitled",b.data="data",b.command="command",b.vscodeRemote="vscode-remote",b.vscodeRemoteResource="vscode-remote-resource",b.userData="vscode-userdata",b.vscodeCustomEditor="vscode-custom-editor",b.vscodeNotebook="vscode-notebook",b.vscodeNotebookCell="vscode-notebook-cell",b.vscodeNotebookCellMetadata="vscode-notebook-cell-metadata",b.vscodeNotebookCellOutput="vscode-notebook-cell-output",b.vscodeInteractive="vscode-interactive",b.vscodeInteractiveInput="vscode-interactive-input",b.vscodeSettings="vscode-settings",b.vscodeWorkspaceTrust="vscode-workspace-trust",b.vscodeTerminal="vscode-terminal",b.webviewPanel="webview-panel",b.vscodeWebview="vscode-webview",b.extension="extension",b.vscodeFileResource="vscode-file",b.tmp="tmp",b.vsls="vsls"})(D=e.Schemas||(e.Schemas={})),e.connectionTokenQueryName="tkn";class I{constructor(){this._hosts=Object.create(null),this._ports=Object.create(null),this._connectionTokens=Object.create(null),this._preferredWebSchema="http",this._delegate=null}setPreferredWebSchema(p){this._preferredWebSchema=p}rewrite(p){if(this._delegate)return this._delegate(p);const h=p.authority;let g=this._hosts[h];g&&g.indexOf(":")!==-1&&(g=`[${g}]`);const t=this._ports[h],i=this._connectionTokens[h];let n=`path=${encodeURIComponent(p.path)}`;return typeof i=="string"&&(n+=`&${e.connectionTokenQueryName}=${encodeURIComponent(i)}`),m.URI.from({scheme:y.isWeb?this._preferredWebSchema:D.vscodeRemoteResource,authority:`${g}:${t}`,path:"/vscode-remote-resource",query:n})}}e.RemoteAuthorities=new I;class w{asBrowserUri(p,h){const g=this.toUri(p,h);return g.scheme===D.vscodeRemote?e.RemoteAuthorities.rewrite(g):g.scheme===D.file&&(y.isNative||typeof y.globals.importScripts=="function"&&y.globals.origin===`${D.vscodeFileResource}://${w.FALLBACK_AUTHORITY}`)?g.with({scheme:D.vscodeFileResource,authority:g.authority||w.FALLBACK_AUTHORITY,query:null,fragment:null}):g}toUri(p,h){return m.URI.isUri(p)?p:m.URI.parse(h.toUrl(p))}}w.FALLBACK_AUTHORITY="vscode-app",e.FileAccess=new w}),define(te[7],ie([1,0,34,165,46,56,10,13,4,2,48,17]),function(j,e,y,m,D,I,w,b,p,h,g,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.addMatchMediaChangeListener=e.ModifierKeyEmitter=e.asCSSPropertyValue=e.asCSSUrl=e.animate=e.windowOpenNoOpener=e.computeScreenAwareSize=e.getElementsByTagName=e.hide=e.show=e.$=e.Namespace=e.reset=e.prepend=e.append=e.trackFocus=e.restoreParentsScrollTop=e.saveParentsScrollTop=e.EventHelper=e.EventType=e.isHTMLElement=e.removeCSSRulesContainingSelector=e.createCSSRule=e.createStyleSheet=e.getActiveElement=e.getShadowRoot=e.isInShadowDOM=e.isShadowRoot=e.hasParentWithClass=e.findParentWithClass=e.isAncestor=e.getTotalHeight=e.getContentHeight=e.getContentWidth=e.getTotalWidth=e.StandardWindow=e.getDomNodePagePosition=e.size=e.getTopLeftOffset=e.Dimension=e.getClientArea=e.getComputedStyle=e.addDisposableThrottledListener=e.scheduleAtNextAnimationFrame=e.runAtThisOrScheduleAtNextAnimationFrame=e.createEventEmitter=e.addDisposableNonBubblingPointerOutListener=e.addDisposableNonBubblingMouseOutListener=e.addDisposableGenericMouseUpListner=e.addDisposableGenericMouseDownListner=e.addStandardDisposableGenericMouseUpListner=e.addStandardDisposableGenericMouseDownListner=e.addStandardDisposableListener=e.addDisposableListener=e.isInDOM=e.clearNode=void 0;function i(we){for(;we.firstChild;)we.firstChild.remove()}e.clearNode=i;function n(we){var Se;return(Se=we==null?void 0:we.isConnected)!==null&&Se!==void 0?Se:!1}e.isInDOM=n;class l{constructor(Se,De,Pe,Fe){this._node=Se,this._type=De,this._handler=Pe,this._options=Fe||!1,this._node.addEventListener(this._type,this._handler,this._options)}dispose(){!this._handler||(this._node.removeEventListener(this._type,this._handler,this._options),this._node=null,this._handler=null)}}function c(we,Se,De,Pe){return new l(we,Se,De,Pe)}e.addDisposableListener=c;function r(we){return function(Se){return we(new I.StandardMouseEvent(Se))}}function s(we){return function(Se){return we(new D.StandardKeyboardEvent(Se))}}let o=function(Se,De,Pe,Fe){let xe=Pe;return De==="click"||De==="mousedown"?xe=r(Pe):(De==="keydown"||De==="keypress"||De==="keyup")&&(xe=s(Pe)),c(Se,De,xe,Fe)};e.addStandardDisposableListener=o;let a=function(Se,De,Pe){let Fe=r(De);return u(Se,Fe,Pe)};e.addStandardDisposableGenericMouseDownListner=a;let d=function(Se,De,Pe){let Fe=r(De);return f(Se,Fe,Pe)};e.addStandardDisposableGenericMouseUpListner=d;function u(we,Se,De){return c(we,t.isIOS&&m.BrowserFeatures.pointerEvents?e.EventType.POINTER_DOWN:e.EventType.MOUSE_DOWN,Se,De)}e.addDisposableGenericMouseDownListner=u;function f(we,Se,De){return c(we,t.isIOS&&m.BrowserFeatures.pointerEvents?e.EventType.POINTER_UP:e.EventType.MOUSE_UP,Se,De)}e.addDisposableGenericMouseUpListner=f;function S(we,Se){return c(we,"mouseout",De=>{let Pe=De.relatedTarget;for(;Pe&&Pe!==we;)Pe=Pe.parentNode;Pe!==we&&Se(De)})}e.addDisposableNonBubblingMouseOutListener=S;function v(we,Se){return c(we,"pointerout",De=>{let Pe=De.relatedTarget;for(;Pe&&Pe!==we;)Pe=Pe.parentNode;Pe!==we&&Se(De)})}e.addDisposableNonBubblingPointerOutListener=v;function C(we,Se,De){let Pe=null;const Fe=We=>qe.fire(We),xe=()=>{Pe||(Pe=new l(we,Se,Fe,De))},Ve=()=>{Pe&&(Pe.dispose(),Pe=null)},qe=new p.Emitter({onFirstListenerAdd:xe,onLastListenerRemove:Ve});return qe}e.createEventEmitter=C;let _=null;function L(we){if(!_){const Se=De=>setTimeout(()=>De(new Date().getTime()),0);_=self.requestAnimationFrame||self.msRequestAnimationFrame||self.webkitRequestAnimationFrame||self.mozRequestAnimationFrame||self.oRequestAnimationFrame||Se}return _.call(self,we)}class E{constructor(Se,De=0){this._runner=Se,this.priority=De,this._canceled=!1}dispose(){this._canceled=!0}execute(){if(!this._canceled)try{this._runner()}catch(Se){(0,b.onUnexpectedError)(Se)}}static sort(Se,De){return De.priority-Se.priority}}(function(){let we=[],Se=null,De=!1,Pe=!1,Fe=()=>{for(De=!1,Se=we,we=[],Pe=!0;Se.length>0;)Se.sort(E.sort),Se.shift().execute();Pe=!1};e.scheduleAtNextAnimationFrame=(xe,Ve=0)=>{let qe=new E(xe,Ve);return we.push(qe),De||(De=!0,L(Fe)),qe},e.runAtThisOrScheduleAtNextAnimationFrame=(xe,Ve)=>{if(Pe){let qe=new E(xe,Ve);return Se.push(qe),qe}else return(0,e.scheduleAtNextAnimationFrame)(xe,Ve)}})();const N=8,k=function(we,Se){return Se};class M extends h.Disposable{constructor(Se,De,Pe,Fe=k,xe=N){super();let Ve=null,qe=0,We=this._register(new w.TimeoutTimer),tt=()=>{qe=new Date().getTime(),Pe(Ve),Ve=null};this._register(c(Se,De,Be=>{Ve=Fe(Ve,Be);let Ee=new Date().getTime()-qe;Ee>=xe?(We.cancel(),tt()):We.setIfNotSet(tt,xe-Ee)}))}}function O(we,Se,De,Pe,Fe){return new M(we,Se,De,Pe,Fe)}e.addDisposableThrottledListener=O;function B(we){return document.defaultView.getComputedStyle(we,null)}e.getComputedStyle=B;function T(we){if(we!==document.body)return new P(we.clientWidth,we.clientHeight);if(t.isIOS&&window.visualViewport)return new P(window.visualViewport.width,window.visualViewport.height);if(window.innerWidth&&window.innerHeight)return new P(window.innerWidth,window.innerHeight);if(document.body&&document.body.clientWidth&&document.body.clientHeight)return new P(document.body.clientWidth,document.body.clientHeight);if(document.documentElement&&document.documentElement.clientWidth&&document.documentElement.clientHeight)return new P(document.documentElement.clientWidth,document.documentElement.clientHeight);throw new Error("Unable to figure out browser width and height")}e.getClientArea=T;class R{static convertToPixels(Se,De){return parseFloat(De)||0}static getDimension(Se,De,Pe){let Fe=B(Se),xe="0";return Fe&&(Fe.getPropertyValue?xe=Fe.getPropertyValue(De):xe=Fe.getAttribute(Pe)),R.convertToPixels(Se,xe)}static getBorderLeftWidth(Se){return R.getDimension(Se,"border-left-width","borderLeftWidth")}static getBorderRightWidth(Se){return R.getDimension(Se,"border-right-width","borderRightWidth")}static getBorderTopWidth(Se){return R.getDimension(Se,"border-top-width","borderTopWidth")}static getBorderBottomWidth(Se){return R.getDimension(Se,"border-bottom-width","borderBottomWidth")}static getPaddingLeft(Se){return R.getDimension(Se,"padding-left","paddingLeft")}static getPaddingRight(Se){return R.getDimension(Se,"padding-right","paddingRight")}static getPaddingTop(Se){return R.getDimension(Se,"padding-top","paddingTop")}static getPaddingBottom(Se){return R.getDimension(Se,"padding-bottom","paddingBottom")}static getMarginLeft(Se){return R.getDimension(Se,"margin-left","marginLeft")}static getMarginTop(Se){return R.getDimension(Se,"margin-top","marginTop")}static getMarginRight(Se){return R.getDimension(Se,"margin-right","marginRight")}static getMarginBottom(Se){return R.getDimension(Se,"margin-bottom","marginBottom")}}class P{constructor(Se,De){this.width=Se,this.height=De}with(Se=this.width,De=this.height){return Se!==this.width||De!==this.height?new P(Se,De):this}static is(Se){return typeof Se=="object"&&typeof Se.height=="number"&&typeof Se.width=="number"}static lift(Se){return Se instanceof P?Se:new P(Se.width,Se.height)}static equals(Se,De){return Se===De?!0:!Se||!De?!1:Se.width===De.width&&Se.height===De.height}}e.Dimension=P,P.None=new P(0,0);function F(we){let Se=we.offsetParent,De=we.offsetTop,Pe=we.offsetLeft;for(;(we=we.parentNode)!==null&&we!==document.body&&we!==document.documentElement;){De-=we.scrollTop;const Fe=Z(we)?null:B(we);Fe&&(Pe-=Fe.direction!=="rtl"?we.scrollLeft:-we.scrollLeft),we===Se&&(Pe+=R.getBorderLeftWidth(we),De+=R.getBorderTopWidth(we),De+=we.offsetTop,Pe+=we.offsetLeft,Se=we.offsetParent)}return{left:Pe,top:De}}e.getTopLeftOffset=F;function W(we,Se,De){typeof Se=="number"&&(we.style.width=`${Se}px`),typeof De=="number"&&(we.style.height=`${De}px`)}e.size=W;function A(we){let Se=we.getBoundingClientRect();return{left:Se.left+e.StandardWindow.scrollX,top:Se.top+e.StandardWindow.scrollY,width:Se.width,height:Se.height}}e.getDomNodePagePosition=A,e.StandardWindow=new class{get scrollX(){return typeof window.scrollX=="number"?window.scrollX:document.body.scrollLeft+document.documentElement.scrollLeft}get scrollY(){return typeof window.scrollY=="number"?window.scrollY:document.body.scrollTop+document.documentElement.scrollTop}};function H(we){let Se=R.getMarginLeft(we)+R.getMarginRight(we);return we.offsetWidth+Se}e.getTotalWidth=H;function q(we){let Se=R.getBorderLeftWidth(we)+R.getBorderRightWidth(we),De=R.getPaddingLeft(we)+R.getPaddingRight(we);return we.offsetWidth-Se-De}e.getContentWidth=q;function X(we){let Se=R.getBorderTopWidth(we)+R.getBorderBottomWidth(we),De=R.getPaddingTop(we)+R.getPaddingBottom(we);return we.offsetHeight-Se-De}e.getContentHeight=X;function G(we){let Se=R.getMarginTop(we)+R.getMarginBottom(we);return we.offsetHeight+Se}e.getTotalHeight=G;function re(we,Se){for(;we;){if(we===Se)return!0;we=we.parentNode}return!1}e.isAncestor=re;function ae(we,Se,De){for(;we&&we.nodeType===we.ELEMENT_NODE;){if(we.classList.contains(Se))return we;if(De){if(typeof De=="string"){if(we.classList.contains(De))return null}else if(we===De)return null}we=we.parentNode}return null}e.findParentWithClass=ae;function oe(we,Se,De){return!!ae(we,Se,De)}e.hasParentWithClass=oe;function Z(we){return we&&!!we.host&&!!we.mode}e.isShadowRoot=Z;function x(we){return!!U(we)}e.isInShadowDOM=x;function U(we){for(;we.parentNode;){if(we===document.body)return null;we=we.parentNode}return Z(we)?we:null}e.getShadowRoot=U;function Q(){let we=document.activeElement;for(;we==null?void 0:we.shadowRoot;)we=we.shadowRoot.activeElement;return we}e.getActiveElement=Q;function ne(we=document.getElementsByTagName("head")[0]){let Se=document.createElement("style");return Se.type="text/css",Se.media="screen",we.appendChild(Se),Se}e.createStyleSheet=ne;let ce=null;function ee(){return ce||(ce=ne()),ce}function ue(we){var Se,De;return((Se=we==null?void 0:we.sheet)===null||Se===void 0?void 0:Se.rules)?we.sheet.rules:((De=we==null?void 0:we.sheet)===null||De===void 0?void 0:De.cssRules)?we.sheet.cssRules:[]}function z(we,Se,De=ee()){!De||!Se||De.sheet.insertRule(we+"{"+Se+"}",0)}e.createCSSRule=z;function V(we,Se=ee()){if(!Se)return;let De=ue(Se),Pe=[];for(let Fe=0;Fe<De.length;Fe++)De[Fe].selectorText.indexOf(we)!==-1&&Pe.push(Fe);for(let Fe=Pe.length-1;Fe>=0;Fe--)Se.sheet.deleteRule(Pe[Fe])}e.removeCSSRulesContainingSelector=V;function $(we){return typeof HTMLElement=="object"?we instanceof HTMLElement:we&&typeof we=="object"&&we.nodeType===1&&typeof we.nodeName=="string"}e.isHTMLElement=$,e.EventType={CLICK:"click",AUXCLICK:"auxclick",DBLCLICK:"dblclick",MOUSE_UP:"mouseup",MOUSE_DOWN:"mousedown",MOUSE_OVER:"mouseover",MOUSE_MOVE:"mousemove",MOUSE_OUT:"mouseout",MOUSE_ENTER:"mouseenter",MOUSE_LEAVE:"mouseleave",MOUSE_WHEEL:"wheel",POINTER_UP:"pointerup",POINTER_DOWN:"pointerdown",POINTER_MOVE:"pointermove",CONTEXT_MENU:"contextmenu",WHEEL:"wheel",KEY_DOWN:"keydown",KEY_PRESS:"keypress",KEY_UP:"keyup",LOAD:"load",BEFORE_UNLOAD:"beforeunload",UNLOAD:"unload",PAGE_SHOW:"pageshow",PAGE_HIDE:"pagehide",ABORT:"abort",ERROR:"error",RESIZE:"resize",SCROLL:"scroll",FULLSCREEN_CHANGE:"fullscreenchange",WK_FULLSCREEN_CHANGE:"webkitfullscreenchange",SELECT:"select",CHANGE:"change",SUBMIT:"submit",RESET:"reset",FOCUS:"focus",FOCUS_IN:"focusin",FOCUS_OUT:"focusout",BLUR:"blur",INPUT:"input",STORAGE:"storage",DRAG_START:"dragstart",DRAG:"drag",DRAG_ENTER:"dragenter",DRAG_LEAVE:"dragleave",DRAG_OVER:"dragover",DROP:"drop",DRAG_END:"dragend",ANIMATION_START:y.isWebKit?"webkitAnimationStart":"animationstart",ANIMATION_END:y.isWebKit?"webkitAnimationEnd":"animationend",ANIMATION_ITERATION:y.isWebKit?"webkitAnimationIteration":"animationiteration"},e.EventHelper={stop:function(we,Se){we.preventDefault?we.preventDefault():we.returnValue=!1,Se&&(we.stopPropagation?we.stopPropagation():we.cancelBubble=!0)}};function K(we){let Se=[];for(let De=0;we&&we.nodeType===we.ELEMENT_NODE;De++)Se[De]=we.scrollTop,we=we.parentNode;return Se}e.saveParentsScrollTop=K;function J(we,Se){for(let De=0;we&&we.nodeType===we.ELEMENT_NODE;De++)we.scrollTop!==Se[De]&&(we.scrollTop=Se[De]),we=we.parentNode}e.restoreParentsScrollTop=J;class Y extends h.Disposable{constructor(Se){super();this._onDidFocus=this._register(new p.Emitter),this.onDidFocus=this._onDidFocus.event,this._onDidBlur=this._register(new p.Emitter),this.onDidBlur=this._onDidBlur.event;let De=Y.hasFocusWithin(Se),Pe=!1;const Fe=()=>{Pe=!1,De||(De=!0,this._onDidFocus.fire())},xe=()=>{De&&(Pe=!0,window.setTimeout(()=>{Pe&&(Pe=!1,De=!1,this._onDidBlur.fire())},0))};this._refreshStateHandler=()=>{Y.hasFocusWithin(Se)!==De&&(De?xe():Fe())},this._register(c(Se,e.EventType.FOCUS,Fe,!0)),this._register(c(Se,e.EventType.BLUR,xe,!0)),this._register(c(Se,e.EventType.FOCUS_IN,()=>this._refreshStateHandler())),this._register(c(Se,e.EventType.FOCUS_OUT,()=>this._refreshStateHandler()))}static hasFocusWithin(Se){const De=U(Se),Pe=De?De.activeElement:document.activeElement;return re(Pe,Se)}}function se(we){return new Y(we)}e.trackFocus=se;function ge(we,...Se){if(we.append(...Se),Se.length===1&&typeof Se[0]!="string")return Se[0]}e.append=ge;function me(we,Se){return we.insertBefore(Se,we.firstChild),Se}e.prepend=me;function le(we,...Se){we.innerText="",ge(we,...Se)}e.reset=le;const he=/([\w\-]+)?(#([\w\-]+))?((\.([\w\-]+))*)/;var ve;(function(we){we.HTML="http://www.w3.org/1999/xhtml",we.SVG="http://www.w3.org/2000/svg"})(ve=e.Namespace||(e.Namespace={}));function pe(we,Se,De,...Pe){let Fe=he.exec(Se);if(!Fe)throw new Error("Bad use of emmet");De=Object.assign({},De||{});let xe=Fe[1]||"div",Ve;return we!==ve.HTML?Ve=document.createElementNS(we,xe):Ve=document.createElement(xe),Fe[3]&&(Ve.id=Fe[3]),Fe[4]&&(Ve.className=Fe[4].replace(/\./g," ").trim()),Object.keys(De).forEach(qe=>{const We=De[qe];typeof We!="undefined"&&(/^on\w+$/.test(qe)?Ve[qe]=We:qe==="selected"?We&&Ve.setAttribute(qe,"true"):Ve.setAttribute(qe,We))}),Ve.append(...Pe),Ve}function be(we,Se,...De){return pe(ve.HTML,we,Se,...De)}e.$=be,be.SVG=function(we,Se,...De){return pe(ve.SVG,we,Se,...De)};function de(...we){for(let Se of we)Se.style.display="",Se.removeAttribute("aria-hidden")}e.show=de;function fe(...we){for(let Se of we)Se.style.display="none",Se.setAttribute("aria-hidden","true")}e.hide=fe;function _e(we){return Array.prototype.slice.call(document.getElementsByTagName(we),0)}e.getElementsByTagName=_e;function Le(we){const Se=window.devicePixelRatio*we;return Math.max(1,Math.floor(Se))/window.devicePixelRatio}e.computeScreenAwareSize=Le;function Te(we){window.open(we,"_blank","noopener")}e.windowOpenNoOpener=Te;function ke(we){const Se=()=>{we(),De=(0,e.scheduleAtNextAnimationFrame)(Se)};let De=(0,e.scheduleAtNextAnimationFrame)(Se);return(0,h.toDisposable)(()=>De.dispose())}e.animate=ke,g.RemoteAuthorities.setPreferredWebSchema(/^https:/.test(window.location.href)?"https":"http");function Me(we){return we?`url('${g.FileAccess.asBrowserUri(we).toString(!0).replace(/'/g,"%27")}')`:"url('')"}e.asCSSUrl=Me;function $e(we){return`'${we.replace(/'/g,"%27")}'`}e.asCSSPropertyValue=$e;class He extends p.Emitter{constructor(){super();this._subscriptions=new h.DisposableStore,this._keyStatus={altKey:!1,shiftKey:!1,ctrlKey:!1,metaKey:!1},this._subscriptions.add(c(window,"keydown",Se=>{if(Se.defaultPrevented)return;const De=new D.StandardKeyboardEvent(Se);if(!(De.keyCode===6&&Se.repeat)){if(Se.altKey&&!this._keyStatus.altKey)this._keyStatus.lastKeyPressed="alt";else if(Se.ctrlKey&&!this._keyStatus.ctrlKey)this._keyStatus.lastKeyPressed="ctrl";else if(Se.metaKey&&!this._keyStatus.metaKey)this._keyStatus.lastKeyPressed="meta";else if(Se.shiftKey&&!this._keyStatus.shiftKey)this._keyStatus.lastKeyPressed="shift";else if(De.keyCode!==6)this._keyStatus.lastKeyPressed=void 0;else return;this._keyStatus.altKey=Se.altKey,this._keyStatus.ctrlKey=Se.ctrlKey,this._keyStatus.metaKey=Se.metaKey,this._keyStatus.shiftKey=Se.shiftKey,this._keyStatus.lastKeyPressed&&(this._keyStatus.event=Se,this.fire(this._keyStatus))}},!0)),this._subscriptions.add(c(window,"keyup",Se=>{Se.defaultPrevented||(!Se.altKey&&this._keyStatus.altKey?this._keyStatus.lastKeyReleased="alt":!Se.ctrlKey&&this._keyStatus.ctrlKey?this._keyStatus.lastKeyReleased="ctrl":!Se.metaKey&&this._keyStatus.metaKey?this._keyStatus.lastKeyReleased="meta":!Se.shiftKey&&this._keyStatus.shiftKey?this._keyStatus.lastKeyReleased="shift":this._keyStatus.lastKeyReleased=void 0,this._keyStatus.lastKeyPressed!==this._keyStatus.lastKeyReleased&&(this._keyStatus.lastKeyPressed=void 0),this._keyStatus.altKey=Se.altKey,this._keyStatus.ctrlKey=Se.ctrlKey,this._keyStatus.metaKey=Se.metaKey,this._keyStatus.shiftKey=Se.shiftKey,this._keyStatus.lastKeyReleased&&(this._keyStatus.event=Se,this.fire(this._keyStatus)))},!0)),this._subscriptions.add(c(document.body,"mousedown",()=>{this._keyStatus.lastKeyPressed=void 0},!0)),this._subscriptions.add(c(document.body,"mouseup",()=>{this._keyStatus.lastKeyPressed=void 0},!0)),this._subscriptions.add(c(document.body,"mousemove",Se=>{Se.buttons&&(this._keyStatus.lastKeyPressed=void 0)},!0)),this._subscriptions.add(c(window,"blur",()=>{this.resetKeyStatus()}))}get keyStatus(){return this._keyStatus}resetKeyStatus(){this.doResetKeyStatus(),this.fire(this._keyStatus)}doResetKeyStatus(){this._keyStatus={altKey:!1,shiftKey:!1,ctrlKey:!1,metaKey:!1}}static getInstance(){return He.instance||(He.instance=new He),He.instance}dispose(){super.dispose(),this._subscriptions.dispose()}}e.ModifierKeyEmitter=He;function Ge(we,Se){window.matchMedia(we).addEventListener("change",Se)}e.addMatchMediaChangeListener=Ge}),define(te[169],ie([1,0,7]),function(j,e,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.createElement=e.renderFormattedText=e.renderText=void 0;function m(t,i={}){const n=I(i);return n.textContent=t,n}e.renderText=m;function D(t,i={}){const n=I(i);return b(n,p(t,!!i.renderCodeSegments),i.actionHandler,i.renderCodeSegments),n}e.renderFormattedText=D;function I(t){const i=t.inline?"span":"div",n=document.createElement(i);return t.className&&(n.className=t.className),n}e.createElement=I;class w{constructor(i){this.source=i,this.index=0}eos(){return this.index>=this.source.length}next(){const i=this.peek();return this.advance(),i}peek(){return this.source[this.index]}advance(){this.index++}}function b(t,i,n,l){let c;if(i.type===2)c=document.createTextNode(i.content||"");else if(i.type===3)c=document.createElement("b");else if(i.type===4)c=document.createElement("i");else if(i.type===7&&l)c=document.createElement("code");else if(i.type===5&&n){const r=document.createElement("a");n.disposables.add(y.addStandardDisposableListener(r,"click",s=>{n.callback(String(i.index),s)})),c=r}else i.type===8?c=document.createElement("br"):i.type===1&&(c=t);c&&t!==c&&t.appendChild(c),c&&Array.isArray(i.children)&&i.children.forEach(r=>{b(c,r,n,l)})}function p(t,i){const n={type:1,children:[]};let l=0,c=n;const r=[],s=new w(t);for(;!s.eos();){let o=s.next();const a=o==="\\"&&g(s.peek(),i)!==0;if(a&&(o=s.next()),!a&&h(o,i)&&o===s.peek()){s.advance(),c.type===2&&(c=r.pop());const d=g(o,i);if(c.type===d||c.type===5&&d===6)c=r.pop();else{const u={type:d,children:[]};d===5&&(u.index=l,l++),c.children.push(u),r.push(c),c=u}}else if(o===`
|
||
`)c.type===2&&(c=r.pop()),c.children.push({type:8});else if(c.type!==2){const d={type:2,content:o};c.children.push(d),r.push(c),c=d}else c.content+=o}return c.type===2&&(c=r.pop()),r.length,n}function h(t,i){return g(t,i)!==0}function g(t,i){switch(t){case"*":return 3;case"_":return 4;case"[":return 5;case"]":return 6;case"`":return i?7:0;default:return 0}}}),define(te[96],ie([1,0,7,211,56,2,17]),function(j,e,y,m,D,I,w){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.GlobalMouseMoveMonitor=e.standardMouseMoveMerger=void 0;function b(h,g){let t=new D.StandardMouseEvent(g);return t.preventDefault(),{leftButton:t.leftButton,buttons:t.buttons,posx:t.posx,posy:t.posy}}e.standardMouseMoveMerger=b;class p{constructor(){this._hooks=new I.DisposableStore,this._mouseMoveEventMerger=null,this._mouseMoveCallback=null,this._onStopCallback=null}dispose(){this.stopMonitoring(!1),this._hooks.dispose()}stopMonitoring(g,t){if(!this.isMonitoring())return;this._hooks.clear(),this._mouseMoveEventMerger=null,this._mouseMoveCallback=null;const i=this._onStopCallback;this._onStopCallback=null,g&&i&&i(t)}isMonitoring(){return!!this._mouseMoveEventMerger}startMonitoring(g,t,i,n,l){if(this.isMonitoring())return;this._mouseMoveEventMerger=i,this._mouseMoveCallback=n,this._onStopCallback=l;const c=m.IframeUtils.getSameOriginWindowChain(),r=w.isIOS?"pointermove":"mousemove",s="mouseup",o=c.map(d=>d.window.document),a=y.getShadowRoot(g);a&&o.unshift(a);for(const d of o)this._hooks.add(y.addDisposableThrottledListener(d,r,u=>{if(u.buttons!==t){this.stopMonitoring(!0);return}this._mouseMoveCallback(u)},(u,f)=>this._mouseMoveEventMerger(u,f))),this._hooks.add(y.addDisposableListener(d,s,u=>this.stopMonitoring(!0)));if(m.IframeUtils.hasDifferentOriginAncestor()){let d=c[c.length-1];this._hooks.add(y.addDisposableListener(d.window.document,"mouseout",u=>{new D.StandardMouseEvent(u).target.tagName.toLowerCase()==="html"&&this.stopMonitoring(!0)})),this._hooks.add(y.addDisposableListener(d.window.document,"mouseover",u=>{new D.StandardMouseEvent(u).target.tagName.toLowerCase()==="html"&&this.stopMonitoring(!0)})),this._hooks.add(y.addDisposableListener(d.window.document.body,"mouseleave",u=>{this.stopMonitoring(!0)}))}}}e.GlobalMouseMoveMonitor=p});var Ie=this&&this.__decorate||function(j,e,y,m){var D=arguments.length,I=D<3?e:m===null?m=Object.getOwnPropertyDescriptor(e,y):m,w;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")I=Reflect.decorate(j,e,y,m);else for(var b=j.length-1;b>=0;b--)(w=j[b])&&(I=(D<3?w(I):D>3?w(e,y,I):w(e,y))||I);return D>3&&I&&Object.defineProperty(e,y,I),I};define(te[57],ie([1,0,7,19,93,2]),function(j,e,y,m,D,I){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Gesture=e.EventType=void 0;var w;(function(p){p.Tap="-monaco-gesturetap",p.Change="-monaco-gesturechange",p.Start="-monaco-gesturestart",p.End="-monaco-gesturesend",p.Contextmenu="-monaco-gesturecontextmenu"})(w=e.EventType||(e.EventType={}));class b extends I.Disposable{constructor(){super();this.dispatched=!1,this.activeTouches={},this.handle=null,this.targets=[],this.ignoreTargets=[],this._lastSetTapCountTime=0,this._register(y.addDisposableListener(document,"touchstart",h=>this.onTouchStart(h),{passive:!1})),this._register(y.addDisposableListener(document,"touchend",h=>this.onTouchEnd(h))),this._register(y.addDisposableListener(document,"touchmove",h=>this.onTouchMove(h),{passive:!1}))}static addTarget(h){return b.isTouchDevice()?(b.INSTANCE||(b.INSTANCE=new b),b.INSTANCE.targets.push(h),{dispose:()=>{b.INSTANCE.targets=b.INSTANCE.targets.filter(g=>g!==h)}}):I.Disposable.None}static ignoreTarget(h){return b.isTouchDevice()?(b.INSTANCE||(b.INSTANCE=new b),b.INSTANCE.ignoreTargets.push(h),{dispose:()=>{b.INSTANCE.ignoreTargets=b.INSTANCE.ignoreTargets.filter(g=>g!==h)}}):I.Disposable.None}static isTouchDevice(){return"ontouchstart"in window||navigator.maxTouchPoints>0}dispose(){this.handle&&(this.handle.dispose(),this.handle=null),super.dispose()}onTouchStart(h){let g=Date.now();this.handle&&(this.handle.dispose(),this.handle=null);for(let t=0,i=h.targetTouches.length;t<i;t++){let n=h.targetTouches.item(t);this.activeTouches[n.identifier]={id:n.identifier,initialTarget:n.target,initialTimeStamp:g,initialPageX:n.pageX,initialPageY:n.pageY,rollingTimestamps:[g],rollingPageX:[n.pageX],rollingPageY:[n.pageY]};let l=this.newGestureEvent(w.Start,n.target);l.pageX=n.pageX,l.pageY=n.pageY,this.dispatchEvent(l)}this.dispatched&&(h.preventDefault(),h.stopPropagation(),this.dispatched=!1)}onTouchEnd(h){let g=Date.now(),t=Object.keys(this.activeTouches).length;for(let i=0,n=h.changedTouches.length;i<n;i++){let l=h.changedTouches.item(i);if(!this.activeTouches.hasOwnProperty(String(l.identifier))){console.warn("move of an UNKNOWN touch",l);continue}let c=this.activeTouches[l.identifier],r=Date.now()-c.initialTimeStamp;if(r<b.HOLD_DELAY&&Math.abs(c.initialPageX-m.tail(c.rollingPageX))<30&&Math.abs(c.initialPageY-m.tail(c.rollingPageY))<30){let s=this.newGestureEvent(w.Tap,c.initialTarget);s.pageX=m.tail(c.rollingPageX),s.pageY=m.tail(c.rollingPageY),this.dispatchEvent(s)}else if(r>=b.HOLD_DELAY&&Math.abs(c.initialPageX-m.tail(c.rollingPageX))<30&&Math.abs(c.initialPageY-m.tail(c.rollingPageY))<30){let s=this.newGestureEvent(w.Contextmenu,c.initialTarget);s.pageX=m.tail(c.rollingPageX),s.pageY=m.tail(c.rollingPageY),this.dispatchEvent(s)}else if(t===1){let s=m.tail(c.rollingPageX),o=m.tail(c.rollingPageY),a=m.tail(c.rollingTimestamps)-c.rollingTimestamps[0],d=s-c.rollingPageX[0],u=o-c.rollingPageY[0];const f=this.targets.filter(S=>c.initialTarget instanceof Node&&S.contains(c.initialTarget));this.inertia(f,g,Math.abs(d)/a,d>0?1:-1,s,Math.abs(u)/a,u>0?1:-1,o)}this.dispatchEvent(this.newGestureEvent(w.End,c.initialTarget)),delete this.activeTouches[l.identifier]}this.dispatched&&(h.preventDefault(),h.stopPropagation(),this.dispatched=!1)}newGestureEvent(h,g){let t=document.createEvent("CustomEvent");return t.initEvent(h,!1,!0),t.initialTarget=g,t.tapCount=0,t}dispatchEvent(h){if(h.type===w.Tap){const g=new Date().getTime();let t=0;g-this._lastSetTapCountTime>b.CLEAR_TAP_COUNT_TIME?t=1:t=2,this._lastSetTapCountTime=g,h.tapCount=t}else(h.type===w.Change||h.type===w.Contextmenu)&&(this._lastSetTapCountTime=0);for(let g=0;g<this.ignoreTargets.length;g++)if(h.initialTarget instanceof Node&&this.ignoreTargets[g].contains(h.initialTarget))return;this.targets.forEach(g=>{h.initialTarget instanceof Node&&g.contains(h.initialTarget)&&(g.dispatchEvent(h),this.dispatched=!0)})}inertia(h,g,t,i,n,l,c,r){this.handle=y.scheduleAtNextAnimationFrame(()=>{let s=Date.now(),o=s-g,a=0,d=0,u=!0;t+=b.SCROLL_FRICTION*o,l+=b.SCROLL_FRICTION*o,t>0&&(u=!1,a=i*t*o),l>0&&(u=!1,d=c*l*o);let f=this.newGestureEvent(w.Change);f.translationX=a,f.translationY=d,h.forEach(S=>S.dispatchEvent(f)),u||this.inertia(h,s,t,i,n+a,l,c,r+d)})}onTouchMove(h){let g=Date.now();for(let t=0,i=h.changedTouches.length;t<i;t++){let n=h.changedTouches.item(t);if(!this.activeTouches.hasOwnProperty(String(n.identifier))){console.warn("end of an UNKNOWN touch",n);continue}let l=this.activeTouches[n.identifier],c=this.newGestureEvent(w.Change,l.initialTarget);c.translationX=n.pageX-m.tail(l.rollingPageX),c.translationY=n.pageY-m.tail(l.rollingPageY),c.pageX=n.pageX,c.pageY=n.pageY,this.dispatchEvent(c),l.rollingPageX.length>3&&(l.rollingPageX.shift(),l.rollingPageY.shift(),l.rollingTimestamps.shift()),l.rollingPageX.push(n.pageX),l.rollingPageY.push(n.pageY),l.rollingTimestamps.push(g)}this.dispatched&&(h.preventDefault(),h.stopPropagation(),this.dispatched=!1)}}b.SCROLL_FRICTION=-.005,b.HOLD_DELAY=700,b.CLEAR_TAP_COUNT_TIME=400,Ie([D.memoize],b,"isTouchDevice",null),e.Gesture=b}),define(te[113],ie([1,0,7,27]),function(j,e,y,m){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.renderIcon=e.renderLabelWithIcons=void 0;const D=new RegExp(`(\\\\)?\\$\\((${m.CSSIcon.iconNameExpression}(?:${m.CSSIcon.iconModifierExpression})?)\\)`,"g");function I(b){const p=new Array;let h,g=0,t=0;for(;(h=D.exec(b))!==null;){t=h.index||0,p.push(b.substring(g,t)),g=(h.index||0)+h[0].length;const[,i,n]=h;p.push(i?`$(${n})`:w({id:n}))}return g<b.length&&p.push(b.substring(g)),p}e.renderLabelWithIcons=I;function w(b){const p=y.$("span");return p.classList.add(...m.CSSIcon.asClassNameArray(b)),p}e.renderIcon=w}),define(te[217],ie([1,0,7,113,39]),function(j,e,y,m,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.HighlightedLabel=void 0;class I{constructor(b,p){var h;this.text="",this.title="",this.highlights=[],this.didEverRender=!1,this.supportIcons=(h=p==null?void 0:p.supportIcons)!==null&&h!==void 0?h:!1,this.domNode=y.append(b,y.$("span.monaco-highlighted-label"))}get element(){return this.domNode}set(b,p=[],h="",g){b||(b=""),g&&(b=I.escapeNewLines(b,p)),!(this.didEverRender&&this.text===b&&this.title===h&&D.equals(this.highlights,p))&&(this.text=b,this.title=h,this.highlights=p,this.render())}render(){const b=[];let p=0;for(const h of this.highlights){if(h.end===h.start)continue;if(p<h.start){const i=this.text.substring(p,h.start);b.push(y.$("span",void 0,...this.supportIcons?(0,m.renderLabelWithIcons)(i):[i])),p=h.end}const g=this.text.substring(h.start,h.end),t=y.$("span.highlight",void 0,...this.supportIcons?(0,m.renderLabelWithIcons)(g):[g]);h.extraClasses&&t.classList.add(...h.extraClasses),b.push(t),p=h.end}if(p<this.text.length){const h=this.text.substring(p);b.push(y.$("span",void 0,...this.supportIcons?(0,m.renderLabelWithIcons)(h):[h]))}y.reset(this.domNode,...b),this.title?this.domNode.title=this.title:this.domNode.removeAttribute("title"),this.didEverRender=!0}static escapeNewLines(b,p){let h=0,g=0;return b.replace(/\r\n|\r|\n/g,(t,i)=>{g=t===`\r
|
||
`?-1:0,i+=h;for(const n of p)n.end<=i||(n.start>=i&&(n.start+=g),n.end>=i&&(n.end+=g));return h+=g,"\u23CE"})}}e.HighlightedLabel=I}),define(te[321],ie([1,0,7]),function(j,e,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.RowCache=void 0;function m(I){try{I.parentElement&&I.parentElement.removeChild(I)}catch{}}class D{constructor(w){this.renderers=w,this.cache=new Map}alloc(w){let b=this.getTemplateCache(w).pop();if(!b){const p=(0,y.$)(".monaco-list-row"),g=this.getRenderer(w).renderTemplate(p);b={domNode:p,templateId:w,templateData:g}}return b}release(w){!w||this.releaseRow(w)}releaseRow(w){const{domNode:b,templateId:p}=w;b&&(b.classList.remove("scrolling"),m(b)),this.getTemplateCache(p).push(w)}getTemplateCache(w){let b=this.cache.get(w);return b||(b=[],this.cache.set(w,b)),b}dispose(){this.cache.forEach((w,b)=>{for(const p of w)this.getRenderer(b).disposeTemplate(p.templateData),p.templateData=null}),this.cache.clear()}getRenderer(w){const b=this.renderers.get(w);if(!b)throw new Error(`No renderer found for ${w}`);return b}}e.RowCache=D}),define(te[60],ie([1,0,7,46,56,57,2]),function(j,e,y,m,D,I,w){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Widget=void 0;class b extends w.Disposable{onclick(h,g){this._register(y.addDisposableListener(h,y.EventType.CLICK,t=>g(new D.StandardMouseEvent(t))))}onmousedown(h,g){this._register(y.addDisposableListener(h,y.EventType.MOUSE_DOWN,t=>g(new D.StandardMouseEvent(t))))}onmouseover(h,g){this._register(y.addDisposableListener(h,y.EventType.MOUSE_OVER,t=>g(new D.StandardMouseEvent(t))))}onnonbubblingmouseout(h,g){this._register(y.addDisposableNonBubblingMouseOutListener(h,t=>g(new D.StandardMouseEvent(t))))}onkeydown(h,g){this._register(y.addDisposableListener(h,y.EventType.KEY_DOWN,t=>g(new m.StandardKeyboardEvent(t))))}onkeyup(h,g){this._register(y.addDisposableListener(h,y.EventType.KEY_UP,t=>g(new m.StandardKeyboardEvent(t))))}oninput(h,g){this._register(y.addDisposableListener(h,y.EventType.INPUT,g))}onblur(h,g){this._register(y.addDisposableListener(h,y.EventType.BLUR,g))}onfocus(h,g){this._register(y.addDisposableListener(h,y.EventType.FOCUS,g))}ignoreGesture(h){I.Gesture.ignoreTarget(h)}}e.Widget=b}),define(te[170],ie([1,0,96,60,10]),function(j,e,y,m,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ScrollbarArrow=e.ARROW_IMG_SIZE=void 0,e.ARROW_IMG_SIZE=11;class I extends m.Widget{constructor(b){super();this._onActivate=b.onActivate,this.bgDomNode=document.createElement("div"),this.bgDomNode.className="arrow-background",this.bgDomNode.style.position="absolute",this.bgDomNode.style.width=b.bgWidth+"px",this.bgDomNode.style.height=b.bgHeight+"px",typeof b.top!="undefined"&&(this.bgDomNode.style.top="0px"),typeof b.left!="undefined"&&(this.bgDomNode.style.left="0px"),typeof b.bottom!="undefined"&&(this.bgDomNode.style.bottom="0px"),typeof b.right!="undefined"&&(this.bgDomNode.style.right="0px"),this.domNode=document.createElement("div"),this.domNode.className=b.className,this.domNode.classList.add(...b.icon.classNamesArray),this.domNode.style.position="absolute",this.domNode.style.width=e.ARROW_IMG_SIZE+"px",this.domNode.style.height=e.ARROW_IMG_SIZE+"px",typeof b.top!="undefined"&&(this.domNode.style.top=b.top+"px"),typeof b.left!="undefined"&&(this.domNode.style.left=b.left+"px"),typeof b.bottom!="undefined"&&(this.domNode.style.bottom=b.bottom+"px"),typeof b.right!="undefined"&&(this.domNode.style.right=b.right+"px"),this._mouseMoveMonitor=this._register(new y.GlobalMouseMoveMonitor),this.onmousedown(this.bgDomNode,p=>this._arrowMouseDown(p)),this.onmousedown(this.domNode,p=>this._arrowMouseDown(p)),this._mousedownRepeatTimer=this._register(new D.IntervalTimer),this._mousedownScheduleRepeatTimer=this._register(new D.TimeoutTimer)}_arrowMouseDown(b){const p=()=>{this._mousedownRepeatTimer.cancelAndSet(()=>this._onActivate(),1e3/24)};this._onActivate(),this._mousedownRepeatTimer.cancel(),this._mousedownScheduleRepeatTimer.cancelAndSet(p,200),this._mouseMoveMonitor.startMonitoring(b.target,b.buttons,y.standardMouseMoveMerger,h=>{},()=>{this._mousedownRepeatTimer.cancel(),this._mousedownScheduleRepeatTimer.cancel()}),b.preventDefault()}}e.ScrollbarArrow=I}),define(te[218],ie([1,0,7,30,96,170,316,60,17]),function(j,e,y,m,D,I,w,b,p){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AbstractScrollbar=void 0;const h=140;class g extends b.Widget{constructor(i){super();this._lazyRender=i.lazyRender,this._host=i.host,this._scrollable=i.scrollable,this._scrollByPage=i.scrollByPage,this._scrollbarState=i.scrollbarState,this._visibilityController=this._register(new w.ScrollbarVisibilityController(i.visibility,"visible scrollbar "+i.extraScrollbarClassName,"invisible scrollbar "+i.extraScrollbarClassName)),this._visibilityController.setIsNeeded(this._scrollbarState.isNeeded()),this._mouseMoveMonitor=this._register(new D.GlobalMouseMoveMonitor),this._shouldRender=!0,this.domNode=(0,m.createFastDomNode)(document.createElement("div")),this.domNode.setAttribute("role","presentation"),this.domNode.setAttribute("aria-hidden","true"),this._visibilityController.setDomNode(this.domNode),this.domNode.setPosition("absolute"),this.onmousedown(this.domNode.domNode,n=>this._domNodeMouseDown(n))}_createArrow(i){const n=this._register(new I.ScrollbarArrow(i));this.domNode.domNode.appendChild(n.bgDomNode),this.domNode.domNode.appendChild(n.domNode)}_createSlider(i,n,l,c){this.slider=(0,m.createFastDomNode)(document.createElement("div")),this.slider.setClassName("slider"),this.slider.setPosition("absolute"),this.slider.setTop(i),this.slider.setLeft(n),typeof l=="number"&&this.slider.setWidth(l),typeof c=="number"&&this.slider.setHeight(c),this.slider.setLayerHinting(!0),this.slider.setContain("strict"),this.domNode.domNode.appendChild(this.slider.domNode),this.onmousedown(this.slider.domNode,r=>{r.leftButton&&(r.preventDefault(),this._sliderMouseDown(r,()=>{}))}),this.onclick(this.slider.domNode,r=>{r.leftButton&&r.stopPropagation()})}_onElementSize(i){return this._scrollbarState.setVisibleSize(i)&&(this._visibilityController.setIsNeeded(this._scrollbarState.isNeeded()),this._shouldRender=!0,this._lazyRender||this.render()),this._shouldRender}_onElementScrollSize(i){return this._scrollbarState.setScrollSize(i)&&(this._visibilityController.setIsNeeded(this._scrollbarState.isNeeded()),this._shouldRender=!0,this._lazyRender||this.render()),this._shouldRender}_onElementScrollPosition(i){return this._scrollbarState.setScrollPosition(i)&&(this._visibilityController.setIsNeeded(this._scrollbarState.isNeeded()),this._shouldRender=!0,this._lazyRender||this.render()),this._shouldRender}beginReveal(){this._visibilityController.setShouldBeVisible(!0)}beginHide(){this._visibilityController.setShouldBeVisible(!1)}render(){!this._shouldRender||(this._shouldRender=!1,this._renderDomNode(this._scrollbarState.getRectangleLargeSize(),this._scrollbarState.getRectangleSmallSize()),this._updateSlider(this._scrollbarState.getSliderSize(),this._scrollbarState.getArrowSize()+this._scrollbarState.getSliderPosition()))}_domNodeMouseDown(i){i.target===this.domNode.domNode&&this._onMouseDown(i)}delegateMouseDown(i){const n=this.domNode.domNode.getClientRects()[0].top,l=n+this._scrollbarState.getSliderPosition(),c=n+this._scrollbarState.getSliderPosition()+this._scrollbarState.getSliderSize(),r=this._sliderMousePosition(i);l<=r&&r<=c?i.leftButton&&(i.preventDefault(),this._sliderMouseDown(i,()=>{})):this._onMouseDown(i)}_onMouseDown(i){let n,l;if(i.target===this.domNode.domNode&&typeof i.browserEvent.offsetX=="number"&&typeof i.browserEvent.offsetY=="number")n=i.browserEvent.offsetX,l=i.browserEvent.offsetY;else{const r=y.getDomNodePagePosition(this.domNode.domNode);n=i.posx-r.left,l=i.posy-r.top}const c=this._mouseDownRelativePosition(n,l);this._setDesiredScrollPositionNow(this._scrollByPage?this._scrollbarState.getDesiredScrollPositionFromOffsetPaged(c):this._scrollbarState.getDesiredScrollPositionFromOffset(c)),i.leftButton&&(i.preventDefault(),this._sliderMouseDown(i,()=>{}))}_sliderMouseDown(i,n){const l=this._sliderMousePosition(i),c=this._sliderOrthogonalMousePosition(i),r=this._scrollbarState.clone();this.slider.toggleClassName("active",!0),this._mouseMoveMonitor.startMonitoring(i.target,i.buttons,D.standardMouseMoveMerger,s=>{const o=this._sliderOrthogonalMousePosition(s),a=Math.abs(o-c);if(p.isWindows&&a>h){this._setDesiredScrollPositionNow(r.getScrollPosition());return}const u=this._sliderMousePosition(s)-l;this._setDesiredScrollPositionNow(r.getDesiredScrollPositionFromDelta(u))},()=>{this.slider.toggleClassName("active",!1),this._host.onDragEnd(),n()}),this._host.onDragStart()}_setDesiredScrollPositionNow(i){const n={};this.writeScrollPosition(n,i),this._scrollable.setScrollPositionNow(n)}updateScrollbarSize(i){this._updateScrollbarSize(i),this._scrollbarState.setScrollbarSize(i),this._shouldRender=!0,this._lazyRender||this.render()}isNeeded(){return this._scrollbarState.isNeeded()}}e.AbstractScrollbar=g}),define(te[322],ie([1,0,56,218,170,212,27]),function(j,e,y,m,D,I,w){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.HorizontalScrollbar=void 0;class b extends m.AbstractScrollbar{constructor(h,g,t){const i=h.getScrollDimensions(),n=h.getCurrentScrollPosition();super({lazyRender:g.lazyRender,host:t,scrollbarState:new I.ScrollbarState(g.horizontalHasArrows?g.arrowSize:0,g.horizontal===2?0:g.horizontalScrollbarSize,g.vertical===2?0:g.verticalScrollbarSize,i.width,i.scrollWidth,n.scrollLeft),visibility:g.horizontal,extraScrollbarClassName:"horizontal",scrollable:h,scrollByPage:g.scrollByPage});if(g.horizontalHasArrows){const l=(g.arrowSize-D.ARROW_IMG_SIZE)/2,c=(g.horizontalScrollbarSize-D.ARROW_IMG_SIZE)/2;this._createArrow({className:"scra",icon:w.Codicon.scrollbarButtonLeft,top:c,left:l,bottom:void 0,right:void 0,bgWidth:g.arrowSize,bgHeight:g.horizontalScrollbarSize,onActivate:()=>this._host.onMouseWheel(new y.StandardWheelEvent(null,1,0))}),this._createArrow({className:"scra",icon:w.Codicon.scrollbarButtonRight,top:c,left:void 0,bottom:void 0,right:l,bgWidth:g.arrowSize,bgHeight:g.horizontalScrollbarSize,onActivate:()=>this._host.onMouseWheel(new y.StandardWheelEvent(null,-1,0))})}this._createSlider(Math.floor((g.horizontalScrollbarSize-g.horizontalSliderSize)/2),0,void 0,g.horizontalSliderSize)}_updateSlider(h,g){this.slider.setWidth(h),this.slider.setLeft(g)}_renderDomNode(h,g){this.domNode.setWidth(h),this.domNode.setHeight(g),this.domNode.setLeft(0),this.domNode.setBottom(0)}onDidScroll(h){return this._shouldRender=this._onElementScrollSize(h.scrollWidth)||this._shouldRender,this._shouldRender=this._onElementScrollPosition(h.scrollLeft)||this._shouldRender,this._shouldRender=this._onElementSize(h.width)||this._shouldRender,this._shouldRender}_mouseDownRelativePosition(h,g){return h}_sliderMousePosition(h){return h.posx}_sliderOrthogonalMousePosition(h){return h.posy}_updateScrollbarSize(h){this.slider.setHeight(h)}writeScrollPosition(h,g){h.scrollLeft=g}updateOptions(h){this.updateScrollbarSize(h.horizontal===2?0:h.horizontalScrollbarSize),this._scrollbarState.setOppositeScrollbarSize(h.vertical===2?0:h.verticalScrollbarSize),this._visibilityController.setVisibility(h.horizontal),this._scrollByPage=h.scrollByPage}}e.HorizontalScrollbar=b}),define(te[323],ie([1,0,56,218,170,212,27]),function(j,e,y,m,D,I,w){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.VerticalScrollbar=void 0;class b extends m.AbstractScrollbar{constructor(h,g,t){const i=h.getScrollDimensions(),n=h.getCurrentScrollPosition();super({lazyRender:g.lazyRender,host:t,scrollbarState:new I.ScrollbarState(g.verticalHasArrows?g.arrowSize:0,g.vertical===2?0:g.verticalScrollbarSize,0,i.height,i.scrollHeight,n.scrollTop),visibility:g.vertical,extraScrollbarClassName:"vertical",scrollable:h,scrollByPage:g.scrollByPage});if(g.verticalHasArrows){const l=(g.arrowSize-D.ARROW_IMG_SIZE)/2,c=(g.verticalScrollbarSize-D.ARROW_IMG_SIZE)/2;this._createArrow({className:"scra",icon:w.Codicon.scrollbarButtonUp,top:l,left:c,bottom:void 0,right:void 0,bgWidth:g.verticalScrollbarSize,bgHeight:g.arrowSize,onActivate:()=>this._host.onMouseWheel(new y.StandardWheelEvent(null,0,1))}),this._createArrow({className:"scra",icon:w.Codicon.scrollbarButtonDown,top:void 0,left:c,bottom:l,right:void 0,bgWidth:g.verticalScrollbarSize,bgHeight:g.arrowSize,onActivate:()=>this._host.onMouseWheel(new y.StandardWheelEvent(null,0,-1))})}this._createSlider(0,Math.floor((g.verticalScrollbarSize-g.verticalSliderSize)/2),g.verticalSliderSize,void 0)}_updateSlider(h,g){this.slider.setHeight(h),this.slider.setTop(g)}_renderDomNode(h,g){this.domNode.setWidth(g),this.domNode.setHeight(h),this.domNode.setRight(0),this.domNode.setTop(0)}onDidScroll(h){return this._shouldRender=this._onElementScrollSize(h.scrollHeight)||this._shouldRender,this._shouldRender=this._onElementScrollPosition(h.scrollTop)||this._shouldRender,this._shouldRender=this._onElementSize(h.height)||this._shouldRender,this._shouldRender}_mouseDownRelativePosition(h,g){return g}_sliderMousePosition(h){return h.posy}_sliderOrthogonalMousePosition(h){return h.posx}_updateScrollbarSize(h){this.slider.setWidth(h)}writeScrollPosition(h,g){h.scrollTop=g}updateOptions(h){this.updateScrollbarSize(h.vertical===2?0:h.verticalScrollbarSize),this._scrollbarState.setOppositeScrollbarSize(0),this._visibilityController.setVisibility(h.vertical),this._scrollByPage=h.scrollByPage}}e.VerticalScrollbar=b}),define(te[41],ie([1,0,166,48,82,17,8,25]),function(j,e,y,m,D,I,w,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DataUri=e.addTrailingPathSeparator=e.removeTrailingPathSeparator=e.hasTrailingPathSeparator=e.isEqualAuthority=e.isAbsolutePath=e.resolvePath=e.relativePath=e.normalizePath=e.joinPath=e.dirname=e.extname=e.basename=e.basenameOrAuthority=e.getComparisonKey=e.isEqualOrParent=e.isEqual=e.extUriIgnorePathCase=e.extUriBiasedIgnorePathCase=e.extUri=e.ExtUri=e.originalFSPath=void 0;function p(t){return(0,b.uriToFsPath)(t,!0)}e.originalFSPath=p;class h{constructor(i){this._ignorePathCasing=i}compare(i,n,l=!1){return i===n?0:(0,w.compare)(this.getComparisonKey(i,l),this.getComparisonKey(n,l))}isEqual(i,n,l=!1){return i===n?!0:!i||!n?!1:this.getComparisonKey(i,l)===this.getComparisonKey(n,l)}getComparisonKey(i,n=!1){return i.with({path:this._ignorePathCasing(i)?i.path.toLowerCase():void 0,fragment:n?null:void 0}).toString()}isEqualOrParent(i,n,l=!1){if(i.scheme===n.scheme){if(i.scheme===m.Schemas.file)return y.isEqualOrParent(p(i),p(n),this._ignorePathCasing(i))&&i.query===n.query&&(l||i.fragment===n.fragment);if((0,e.isEqualAuthority)(i.authority,n.authority))return y.isEqualOrParent(i.path,n.path,this._ignorePathCasing(i),"/")&&i.query===n.query&&(l||i.fragment===n.fragment)}return!1}joinPath(i,...n){return b.URI.joinPath(i,...n)}basenameOrAuthority(i){return(0,e.basename)(i)||i.authority}basename(i){return D.posix.basename(i.path)}extname(i){return D.posix.extname(i.path)}dirname(i){if(i.path.length===0)return i;let n;return i.scheme===m.Schemas.file?n=b.URI.file(D.dirname(p(i))).path:(n=D.posix.dirname(i.path),i.authority&&n.length&&n.charCodeAt(0)!==47&&(console.error(`dirname("${i.toString})) resulted in a relative path`),n="/")),i.with({path:n})}normalizePath(i){if(!i.path.length)return i;let n;return i.scheme===m.Schemas.file?n=b.URI.file(D.normalize(p(i))).path:n=D.posix.normalize(i.path),i.with({path:n})}relativePath(i,n){if(i.scheme!==n.scheme||!(0,e.isEqualAuthority)(i.authority,n.authority))return;if(i.scheme===m.Schemas.file){const r=D.relative(p(i),p(n));return I.isWindows?y.toSlashes(r):r}let l=i.path||"/",c=n.path||"/";if(this._ignorePathCasing(i)){let r=0;for(const s=Math.min(l.length,c.length);r<s&&!(l.charCodeAt(r)!==c.charCodeAt(r)&&l.charAt(r).toLowerCase()!==c.charAt(r).toLowerCase());r++);l=c.substr(0,r)+l.substr(r)}return D.posix.relative(l,c)}resolvePath(i,n){if(i.scheme===m.Schemas.file){const l=b.URI.file(D.resolve(p(i),n));return i.with({authority:l.authority,path:l.path})}return n=y.toPosixPath(n),i.with({path:D.posix.resolve(i.path,n)})}isAbsolutePath(i){return!!i.path&&i.path[0]==="/"}isEqualAuthority(i,n){return i===n||i!==void 0&&n!==void 0&&(0,w.equalsIgnoreCase)(i,n)}hasTrailingPathSeparator(i,n=D.sep){if(i.scheme===m.Schemas.file){const l=p(i);return l.length>y.getRoot(l).length&&l[l.length-1]===n}else{const l=i.path;return l.length>1&&l.charCodeAt(l.length-1)===47&&!/^[a-zA-Z]:(\/$|\\$)/.test(i.fsPath)}}removeTrailingPathSeparator(i,n=D.sep){return(0,e.hasTrailingPathSeparator)(i,n)?i.with({path:i.path.substr(0,i.path.length-1)}):i}addTrailingPathSeparator(i,n=D.sep){let l=!1;if(i.scheme===m.Schemas.file){const c=p(i);l=c!==void 0&&c.length===y.getRoot(c).length&&c[c.length-1]===n}else{n="/";const c=i.path;l=c.length===1&&c.charCodeAt(c.length-1)===47}return!l&&!(0,e.hasTrailingPathSeparator)(i,n)?i.with({path:i.path+"/"}):i}}e.ExtUri=h,e.extUri=new h(()=>!1),e.extUriBiasedIgnorePathCase=new h(t=>t.scheme===m.Schemas.file?!I.isLinux:!0),e.extUriIgnorePathCase=new h(t=>!0),e.isEqual=e.extUri.isEqual.bind(e.extUri),e.isEqualOrParent=e.extUri.isEqualOrParent.bind(e.extUri),e.getComparisonKey=e.extUri.getComparisonKey.bind(e.extUri),e.basenameOrAuthority=e.extUri.basenameOrAuthority.bind(e.extUri),e.basename=e.extUri.basename.bind(e.extUri),e.extname=e.extUri.extname.bind(e.extUri),e.dirname=e.extUri.dirname.bind(e.extUri),e.joinPath=e.extUri.joinPath.bind(e.extUri),e.normalizePath=e.extUri.normalizePath.bind(e.extUri),e.relativePath=e.extUri.relativePath.bind(e.extUri),e.resolvePath=e.extUri.resolvePath.bind(e.extUri),e.isAbsolutePath=e.extUri.isAbsolutePath.bind(e.extUri),e.isEqualAuthority=e.extUri.isEqualAuthority.bind(e.extUri),e.hasTrailingPathSeparator=e.extUri.hasTrailingPathSeparator.bind(e.extUri),e.removeTrailingPathSeparator=e.extUri.removeTrailingPathSeparator.bind(e.extUri),e.addTrailingPathSeparator=e.extUri.addTrailingPathSeparator.bind(e.extUri);var g;(function(t){t.META_DATA_LABEL="label",t.META_DATA_DESCRIPTION="description",t.META_DATA_SIZE="size",t.META_DATA_MIME="mime";function i(n){const l=new Map;n.path.substring(n.path.indexOf(";")+1,n.path.lastIndexOf(";")).split(";").forEach(s=>{const[o,a]=s.split(":");o&&a&&l.set(o,a)});const r=n.path.substring(0,n.path.indexOf(";"));return r&&l.set(t.META_DATA_MIME,r),l}t.parseMetaData=i})(g=e.DataUri||(e.DataUri={}))}),define(te[324],ie([1,0,7,751,89,169,56,113,10,21,13,4,66,95,133,2,311,216,48,39,41,8,25]),function(j,e,y,m,D,I,w,b,p,h,g,t,i,n,l,c,r,s,o,a,d,u,f){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.renderMarkdown=void 0;function S(_,L={},E={}){var N;const k=new c.DisposableStore;let M=!1;const O=k.add(new h.CancellationTokenSource),B=(0,I.createElement)(L),T=function(G){let re;try{re=(0,s.parse)(decodeURIComponent(G))}catch{}return re?(re=(0,a.cloneAndChange)(re,ae=>{if(_.uris&&_.uris[ae])return f.URI.revive(_.uris[ae])}),encodeURIComponent(JSON.stringify(re))):G},R=function(G,re){const ae=_.uris&&_.uris[G];let oe=f.URI.revive(ae);return re?G.startsWith(o.Schemas.data+":")?G:(oe||(oe=f.URI.parse(G)),o.FileAccess.asBrowserUri(oe).toString(!0)):!oe||f.URI.parse(G).toString()===oe.toString()?G:(oe.query&&(oe=oe.with({query:T(oe.query)})),oe.toString())};let P;const F=new Promise(G=>P=G),W=new r.marked.Renderer;if(W.image=(G,re,ae)=>{let oe=[],Z=[];return G&&({href:G,dimensions:oe}=(0,i.parseHrefAndDimensions)(G),Z.push(`src="${G}"`)),ae&&Z.push(`alt="${ae}"`),re&&Z.push(`title="${re}"`),oe.length&&(Z=Z.concat(oe)),"<img "+Z.join(" ")+">"},W.link=(G,re,ae)=>typeof G!="string"?"":(G===ae&&(ae=(0,i.removeMarkdownEscapes)(ae)),G=R(G,!1),L.baseUrl&&(/^\w[\w\d+.-]*:/.test(G)||(G=(0,d.resolvePath)(L.baseUrl,G).toString())),re=typeof re=="string"?(0,i.removeMarkdownEscapes)(re):"",G=(0,i.removeMarkdownEscapes)(G),!G||G.match(/^data:|javascript:/i)||G.match(/^command:/i)&&!_.isTrusted||G.match(/^command:(\/\/\/)?_workbench\.downloadResource/i)?ae:(G=G.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'"),`<a data-href="${G}" title="${re||G}">${ae}</a>`)),W.paragraph=G=>`<p>${G}</p>`,L.codeBlockRenderer&&(W.code=(G,re)=>{if(typeof re!="string")return"";const ae=L.codeBlockRenderer(re,G),oe=l.defaultGenerator.nextId();return(0,p.raceCancellation)(Promise.all([ae,F]),O.token).then(Z=>{var x;if(!M&&Z){const U=B.querySelector(`div[data-code="${oe}"]`);U&&y.reset(U,Z[0]),(x=L.asyncRenderCallback)===null||x===void 0||x.call(L)}}).catch(()=>{}),`<div class="code" data-code="${oe}">${(0,u.escape)(G)}</div>`}),L.actionHandler){const G=L.actionHandler.disposables.add(new D.DomEmitter(B,"click")),re=L.actionHandler.disposables.add(new D.DomEmitter(B,"auxclick"));L.actionHandler.disposables.add(t.Event.any(G.event,re.event)(ae=>{const oe=new w.StandardMouseEvent(ae);if(!oe.leftButton&&!oe.middleButton)return;let Z=oe.target;if(!(Z.tagName!=="A"&&(Z=Z.parentElement,!Z||Z.tagName!=="A")))try{const x=Z.dataset.href;x&&L.actionHandler.callback(x,oe)}catch(x){(0,g.onUnexpectedError)(x)}finally{oe.preventDefault()}}))}_.supportHtml||(E.sanitizer=G=>(_.isTrusted?G.match(/^(<span[^>]+>)|(<\/\s*span>)$/):void 0)?G:"",E.sanitize=!0,E.silent=!0),E.renderer=W;let A=(N=_.value)!==null&&N!==void 0?N:"";A.length>1e5&&(A=`${A.substr(0,1e5)}\u2026`),_.supportThemeIcons&&(A=(0,n.markdownEscapeEscapedIcons)(A));let H=r.marked.parse(A,E);_.supportThemeIcons&&(H=(0,b.renderLabelWithIcons)(H).map(re=>typeof re=="string"?re:re.outerHTML).join(""));const X=new DOMParser().parseFromString(v(_,H),"text/html");if(X.body.querySelectorAll("img").forEach(G=>{if(G.src){let re=R(G.src,!0);try{const ae=f.URI.parse(re);L.baseUrl&&ae.scheme===o.Schemas.file&&(re=(0,d.resolvePath)(L.baseUrl,re).toString())}catch{}G.src=re}}),B.innerHTML=v(_,X.body.innerHTML),P(),L.asyncRenderCallback)for(const G of B.getElementsByTagName("img")){const re=k.add(y.addDisposableListener(G,"load",()=>{re.dispose(),L.asyncRenderCallback()}))}return{element:B,dispose:()=>{M=!0,O.cancel(),k.dispose()}}}e.renderMarkdown=S;function v(_,L){const{config:E,allowedSchemes:N}=C(_);m.addHook("uponSanitizeAttribute",(M,O)=>{if(O.attrName==="style"||O.attrName==="class"){if(M.tagName==="SPAN"){if(O.attrName==="style"){O.keepAttr=/^(color\:#[0-9a-fA-F]+;)?(background-color\:#[0-9a-fA-F]+;)?$/.test(O.attrValue);return}else if(O.attrName==="class"){O.keepAttr=/^codicon codicon-[a-z\-]+( codicon-modifier-[a-z\-]+)?$/.test(O.attrValue);return}}O.keepAttr=!1;return}});const k=document.createElement("a");m.addHook("afterSanitizeAttributes",M=>{for(const O of["href","src"])M.hasAttribute(O)&&(k.href=M.getAttribute(O),N.includes(k.protocol.replace(/:$/,""))||M.removeAttribute(O))});try{return m.sanitize(L,Object.assign(Object.assign({},E),{RETURN_TRUSTED_TYPE:!0}))}finally{m.removeHook("uponSanitizeAttribute"),m.removeHook("afterSanitizeAttributes")}}function C(_){const L=[o.Schemas.http,o.Schemas.https,o.Schemas.mailto,o.Schemas.data,o.Schemas.file,o.Schemas.vscodeFileResource,o.Schemas.vscodeRemote,o.Schemas.vscodeRemoteResource];return _.isTrusted&&L.push(o.Schemas.command),{config:{ALLOWED_TAGS:["ul","li","p","b","i","code","blockquote","ol","h1","h2","h3","h4","h5","h6","hr","em","pre","table","thead","tbody","tr","th","td","div","del","a","strong","br","img","span"],ALLOWED_ATTR:["href","data-href","target","title","src","alt","class","style","data-code","width","height","align"],ALLOW_UNKNOWN_PROTOCOLS:!0},allowedSchemes:L}}}),define(te[171],ie([1,0,166,48,17,41,25]),function(j,e,y,m,D,I,w){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.normalizeDriveLetter=e.getBaseLabel=void 0;function b(g){if(!g)return;typeof g=="string"&&(g=w.URI.file(g));const t=(0,I.basename)(g)||(g.scheme===m.Schemas.file?g.fsPath:g.path);return D.isWindows&&(0,y.isRootOrDriveLetter)(t)?p(t):t}e.getBaseLabel=b;function p(g,t){return(0,y.hasDriveLetter)(g,t)?g.charAt(0).toUpperCase()+g.slice(1):g}e.normalizeDriveLetter=p;let h=Object.create(null)}),define(te[325],ie([1,0]),function(j,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.generateUuid=void 0;const y=new Uint8Array(16),m=[];for(let w=0;w<256;w++)m.push(w.toString(16).padStart(2,"0"));let D;typeof crypto=="object"&&typeof crypto.getRandomValues=="function"?D=crypto.getRandomValues.bind(crypto):D=function(w){for(let b=0;b<w.length;b++)w[b]=Math.floor(Math.random()*256);return w};function I(){D(y),y[6]=y[6]&15|64,y[8]=y[8]&63|128;let w=0,b="";return b+=m[y[w++]],b+=m[y[w++]],b+=m[y[w++]],b+=m[y[w++]],b+="-",b+=m[y[w++]],b+=m[y[w++]],b+="-",b+=m[y[w++]],b+=m[y[w++]],b+="-",b+=m[y[w++]],b+=m[y[w++]],b+="-",b+=m[y[w++]],b+=m[y[w++]],b+=m[y[w++]],b+=m[y[w++]],b+=m[y[w++]],b+=m[y[w++]],b}e.generateUuid=I}),define(te[219],ie([1,0,13,4,2,17,20,8]),function(j,e,y,m,D,I,w,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.create=e.SimpleWorkerServer=e.SimpleWorkerClient=e.logOnceWebWorkerWarning=void 0;const p="$initialize";let h=!1;function g(S){!I.isWeb||(h||(h=!0,console.warn("Could not create web worker(s). Falling back to loading web worker code in main thread, which might cause UI freezes. Please see https://github.com/microsoft/monaco-editor#faq")),console.warn(S.message))}e.logOnceWebWorkerWarning=g;class t{constructor(v,C,_,L){this.vsWorker=v,this.req=C,this.method=_,this.args=L,this.type=0}}class i{constructor(v,C,_,L){this.vsWorker=v,this.seq=C,this.res=_,this.err=L,this.type=1}}class n{constructor(v,C,_,L){this.vsWorker=v,this.req=C,this.eventName=_,this.arg=L,this.type=2}}class l{constructor(v,C,_){this.vsWorker=v,this.req=C,this.event=_,this.type=3}}class c{constructor(v,C){this.vsWorker=v,this.req=C,this.type=4}}class r{constructor(v){this._workerId=-1,this._handler=v,this._lastSentReq=0,this._pendingReplies=Object.create(null),this._pendingEmitters=new Map,this._pendingEvents=new Map}setWorkerId(v){this._workerId=v}sendMessage(v,C){const _=String(++this._lastSentReq);return new Promise((L,E)=>{this._pendingReplies[_]={resolve:L,reject:E},this._send(new t(this._workerId,_,v,C))})}listen(v,C){let _=null;const L=new m.Emitter({onFirstListenerAdd:()=>{_=String(++this._lastSentReq),this._pendingEmitters.set(_,L),this._send(new n(this._workerId,_,v,C))},onLastListenerRemove:()=>{this._pendingEmitters.delete(_),this._send(new c(this._workerId,_)),_=null}});return L.event}handleMessage(v){!v||!v.vsWorker||this._workerId!==-1&&v.vsWorker!==this._workerId||this._handleMessage(v)}_handleMessage(v){switch(v.type){case 1:return this._handleReplyMessage(v);case 0:return this._handleRequestMessage(v);case 2:return this._handleSubscribeEventMessage(v);case 3:return this._handleEventMessage(v);case 4:return this._handleUnsubscribeEventMessage(v)}}_handleReplyMessage(v){if(!this._pendingReplies[v.seq]){console.warn("Got reply to unknown seq");return}let C=this._pendingReplies[v.seq];if(delete this._pendingReplies[v.seq],v.err){let _=v.err;v.err.$isError&&(_=new Error,_.name=v.err.name,_.message=v.err.message,_.stack=v.err.stack),C.reject(_);return}C.resolve(v.res)}_handleRequestMessage(v){let C=v.req;this._handler.handleMessage(v.method,v.args).then(L=>{this._send(new i(this._workerId,C,L,void 0))},L=>{L.detail instanceof Error&&(L.detail=(0,y.transformErrorForSerialization)(L.detail)),this._send(new i(this._workerId,C,void 0,(0,y.transformErrorForSerialization)(L)))})}_handleSubscribeEventMessage(v){const C=v.req,_=this._handler.handleEvent(v.eventName,v.arg)(L=>{this._send(new l(this._workerId,C,L))});this._pendingEvents.set(C,_)}_handleEventMessage(v){if(!this._pendingEmitters.has(v.req)){console.warn("Got event for unknown req");return}this._pendingEmitters.get(v.req).fire(v.event)}_handleUnsubscribeEventMessage(v){if(!this._pendingEvents.has(v.req)){console.warn("Got unsubscribe for unknown req");return}this._pendingEvents.get(v.req).dispose(),this._pendingEvents.delete(v.req)}_send(v){let C=[];if(v.type===0)for(let _=0;_<v.args.length;_++)v.args[_]instanceof ArrayBuffer&&C.push(v.args[_]);else v.type===1&&v.res instanceof ArrayBuffer&&C.push(v.res);this._handler.sendMessage(v,C)}}class s extends D.Disposable{constructor(v,C,_){super();let L=null;this._worker=this._register(v.create("vs/base/common/worker/simpleWorker",O=>{this._protocol.handleMessage(O)},O=>{L&&L(O)})),this._protocol=new r({sendMessage:(O,B)=>{this._worker.postMessage(O,B)},handleMessage:(O,B)=>{if(typeof _[O]!="function")return Promise.reject(new Error("Missing method "+O+" on main thread host."));try{return Promise.resolve(_[O].apply(_,B))}catch(T){return Promise.reject(T)}},handleEvent:(O,B)=>{if(a(O)){const T=_[O].call(_,B);if(typeof T!="function")throw new Error(`Missing dynamic event ${O} on main thread host.`);return T}if(o(O)){const T=_[O];if(typeof T!="function")throw new Error(`Missing event ${O} on main thread host.`);return T}throw new Error(`Malformed event name ${O}`)}}),this._protocol.setWorkerId(this._worker.getId());let E=null;typeof I.globals.require!="undefined"&&typeof I.globals.require.getConfig=="function"?E=I.globals.require.getConfig():typeof I.globals.requirejs!="undefined"&&(E=I.globals.requirejs.s.contexts._.config);const N=w.getAllMethodNames(_);this._onModuleLoaded=this._protocol.sendMessage(p,[this._worker.getId(),JSON.parse(JSON.stringify(E)),C,N]);const k=(O,B)=>this._request(O,B),M=(O,B)=>this._protocol.listen(O,B);this._lazyProxy=new Promise((O,B)=>{L=B,this._onModuleLoaded.then(T=>{O(d(T,k,M))},T=>{B(T),this._onError("Worker failed to load "+C,T)})})}getProxyObject(){return this._lazyProxy}_request(v,C){return new Promise((_,L)=>{this._onModuleLoaded.then(()=>{this._protocol.sendMessage(v,C).then(_,L)},L)})}_onError(v,C){console.error(v),console.info(C)}}e.SimpleWorkerClient=s;function o(S){return S[0]==="o"&&S[1]==="n"&&b.isUpperAsciiLetter(S.charCodeAt(2))}function a(S){return/^onDynamic/.test(S)&&b.isUpperAsciiLetter(S.charCodeAt(9))}function d(S,v,C){const _=N=>function(){const k=Array.prototype.slice.call(arguments,0);return v(N,k)},L=N=>function(k){return C(N,k)};let E={};for(const N of S){if(a(N)){E[N]=L(N);continue}if(o(N)){E[N]=C(N,void 0);continue}E[N]=_(N)}return E}class u{constructor(v,C){this._requestHandlerFactory=C,this._requestHandler=null,this._protocol=new r({sendMessage:(_,L)=>{v(_,L)},handleMessage:(_,L)=>this._handleMessage(_,L),handleEvent:(_,L)=>this._handleEvent(_,L)})}onmessage(v){this._protocol.handleMessage(v)}_handleMessage(v,C){if(v===p)return this.initialize(C[0],C[1],C[2],C[3]);if(!this._requestHandler||typeof this._requestHandler[v]!="function")return Promise.reject(new Error("Missing requestHandler or method: "+v));try{return Promise.resolve(this._requestHandler[v].apply(this._requestHandler,C))}catch(_){return Promise.reject(_)}}_handleEvent(v,C){if(!this._requestHandler)throw new Error("Missing requestHandler");if(a(v)){const _=this._requestHandler[v].call(this._requestHandler,C);if(typeof _!="function")throw new Error(`Missing dynamic event ${v} on request handler.`);return _}if(o(v)){const _=this._requestHandler[v];if(typeof _!="function")throw new Error(`Missing event ${v} on request handler.`);return _}throw new Error(`Malformed event name ${v}`)}initialize(v,C,_,L){this._protocol.setWorkerId(v);const k=d(L,(M,O)=>this._protocol.sendMessage(M,O),(M,O)=>this._protocol.listen(M,O));return this._requestHandlerFactory?(this._requestHandler=this._requestHandlerFactory(k),Promise.resolve(w.getAllMethodNames(this._requestHandler))):(C&&(typeof C.baseUrl!="undefined"&&delete C.baseUrl,typeof C.paths!="undefined"&&typeof C.paths.vs!="undefined"&&delete C.paths.vs,typeof C.trustedTypesPolicy!==void 0&&delete C.trustedTypesPolicy,C.catchError=!0,I.globals.require.config(C)),new Promise((M,O)=>{(I.globals.require||j)([_],T=>{if(this._requestHandler=T.create(k),!this._requestHandler){O(new Error("No RequestHandler!"));return}M(w.getAllMethodNames(this._requestHandler))},O)}))}}e.SimpleWorkerServer=u;function f(S){return new u(S,null)}e.create=f}),define(te[326],ie([1,0,17,219]),function(j,e,y,m){"use strict";var D;Object.defineProperty(e,"__esModule",{value:!0}),e.DefaultWorkerFactory=e.getWorkerBootstrapUrl=void 0;const I=(D=window.trustedTypes)===null||D===void 0?void 0:D.createPolicy("defaultWorkerFactory",{createScriptURL:t=>t});function w(t){if(y.globals.MonacoEnvironment){if(typeof y.globals.MonacoEnvironment.getWorker=="function")return y.globals.MonacoEnvironment.getWorker("workerMain.js",t);if(typeof y.globals.MonacoEnvironment.getWorkerUrl=="function"){const i=y.globals.MonacoEnvironment.getWorkerUrl("workerMain.js",t);return new Worker(I?I.createScriptURL(i):i,{name:t})}}if(typeof j=="function"){const i=j.toUrl("vs/base/worker/workerMain.js"),n=b(i,t);return new Worker(I?I.createScriptURL(n):n,{name:t})}throw new Error("You must define a function MonacoEnvironment.getWorkerUrl or MonacoEnvironment.getWorker")}function b(t,i){if(/^((http:)|(https:)|(file:))/.test(t)&&t.substring(0,self.origin.length)!==self.origin){const n="vs/base/worker/defaultWorkerFactory.js",l=j.toUrl(n).slice(0,-n.length),c=`/*${i}*/self.MonacoEnvironment={baseUrl: '${l}'};const ttPolicy = self.trustedTypes?.createPolicy('defaultWorkerFactory', { createScriptURL: value => value });importScripts(ttPolicy?.createScriptURL('${t}') ?? '${t}');/*${i}*/`,r=new Blob([c],{type:"application/javascript"});return URL.createObjectURL(r)}return t+"#"+i}e.getWorkerBootstrapUrl=b;function p(t){return typeof t.then=="function"}class h{constructor(i,n,l,c,r){this.id=n;const s=w(l);p(s)?this.worker=s:this.worker=Promise.resolve(s),this.postMessage(i,[]),this.worker.then(o=>{o.onmessage=function(a){c(a.data)},o.onmessageerror=r,typeof o.addEventListener=="function"&&o.addEventListener("error",r)})}getId(){return this.id}postMessage(i,n){this.worker&&this.worker.then(l=>l.postMessage(i,n))}dispose(){this.worker&&this.worker.then(i=>i.terminate()),this.worker=null}}class g{constructor(i){this._label=i,this._webWorkerFailedBeforeError=!1}create(i,n,l){let c=++g.LAST_WORKER_ID;if(this._webWorkerFailedBeforeError)throw this._webWorkerFailedBeforeError;return new h(i,c,this._label||"anonymous"+c,n,r=>{(0,m.logOnceWebWorkerWarning)(r),this._webWorkerFailedBeforeError=r,l(r)})}}e.DefaultWorkerFactory=g,g.LAST_WORKER_ID=0}),define(te[220],ie([1,0]),function(j,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.quickPickItemScorerAccessor=e.QuickPickItemScorerAccessor=e.ItemActivation=e.QuickInputHideReason=e.NO_KEY_MODS=void 0,e.NO_KEY_MODS={ctrlCmd:!1,alt:!1};var y;(function(I){I[I.Blur=1]="Blur",I[I.Gesture=2]="Gesture",I[I.Other=3]="Other"})(y=e.QuickInputHideReason||(e.QuickInputHideReason={}));var m;(function(I){I[I.NONE=0]="NONE",I[I.FIRST=1]="FIRST",I[I.SECOND=2]="SECOND",I[I.LAST=3]="LAST"})(m=e.ItemActivation||(e.ItemActivation={}));class D{constructor(w){this.options=w}}e.QuickPickItemScorerAccessor=D,e.quickPickItemScorerAccessor=new D}),define(te[327],ie([1,0,10,4,2,20]),function(j,e,y,m,D,I){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.InMemoryStorageDatabase=e.Storage=void 0;var w;(function(h){h[h.None=0]="None",h[h.Initialized=1]="Initialized",h[h.Closed=2]="Closed"})(w||(w={}));class b extends D.Disposable{constructor(g,t=Object.create(null)){super();this.database=g,this.options=t,this._onDidChangeStorage=this._register(new m.Emitter),this.onDidChangeStorage=this._onDidChangeStorage.event,this.state=w.None,this.cache=new Map,this.flushDelayer=new y.ThrottledDelayer(b.DEFAULT_FLUSH_DELAY),this.pendingDeletes=new Set,this.pendingInserts=new Map,this.whenFlushedCallbacks=[],this.registerListeners()}registerListeners(){this._register(this.database.onDidChangeItemsExternal(g=>this.onDidChangeItemsExternal(g)))}onDidChangeItemsExternal(g){var t,i;(t=g.changed)===null||t===void 0||t.forEach((n,l)=>this.accept(l,n)),(i=g.deleted)===null||i===void 0||i.forEach(n=>this.accept(n,void 0))}accept(g,t){if(this.state===w.Closed)return;let i=!1;(0,I.isUndefinedOrNull)(t)?i=this.cache.delete(g):this.cache.get(g)!==t&&(this.cache.set(g,t),i=!0),i&&this._onDidChangeStorage.fire(g)}get(g,t){const i=this.cache.get(g);return(0,I.isUndefinedOrNull)(i)?t:i}getBoolean(g,t){const i=this.get(g);return(0,I.isUndefinedOrNull)(i)?t:i==="true"}getNumber(g,t){const i=this.get(g);return(0,I.isUndefinedOrNull)(i)?t:parseInt(i,10)}set(g,t){return ye(this,void 0,void 0,function*(){if(this.state===w.Closed)return;if((0,I.isUndefinedOrNull)(t))return this.delete(g);const i=String(t);if(this.cache.get(g)!==i)return this.cache.set(g,i),this.pendingInserts.set(g,i),this.pendingDeletes.delete(g),this._onDidChangeStorage.fire(g),this.doFlush()})}delete(g){return ye(this,void 0,void 0,function*(){if(!(this.state===w.Closed||!this.cache.delete(g)))return this.pendingDeletes.has(g)||this.pendingDeletes.add(g),this.pendingInserts.delete(g),this._onDidChangeStorage.fire(g),this.doFlush()})}get hasPending(){return this.pendingInserts.size>0||this.pendingDeletes.size>0}flushPending(){return ye(this,void 0,void 0,function*(){if(!this.hasPending)return;const g={insert:this.pendingInserts,delete:this.pendingDeletes};return this.pendingDeletes=new Set,this.pendingInserts=new Map,this.database.updateItems(g).finally(()=>{var t;if(!this.hasPending)for(;this.whenFlushedCallbacks.length;)(t=this.whenFlushedCallbacks.pop())===null||t===void 0||t()})})}doFlush(g){return ye(this,void 0,void 0,function*(){return this.flushDelayer.trigger(()=>this.flushPending(),g)})}dispose(){this.flushDelayer.dispose(),super.dispose()}}e.Storage=b,b.DEFAULT_FLUSH_DELAY=100;class p{constructor(){this.onDidChangeItemsExternal=m.Event.None,this.items=new Map}updateItems(g){return ye(this,void 0,void 0,function*(){g.insert&&g.insert.forEach((t,i)=>this.items.set(i,t)),g.delete&&g.delete.forEach(t=>this.items.delete(t))})}}e.InMemoryStorageDatabase=p}),define(te[221],ie([12]),{}),define(te[328],ie([12]),{}),define(te[43],ie([1,0,7,17,328]),function(j,e,y,m){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.status=e.alert=e.setARIAContainer=void 0;const D=2e4;let I,w,b,p,h;function g(l){I=document.createElement("div"),I.className="monaco-aria-container";const c=()=>{const s=document.createElement("div");return s.className="monaco-alert",s.setAttribute("role","alert"),s.setAttribute("aria-atomic","true"),I.appendChild(s),s};w=c(),b=c();const r=()=>{const s=document.createElement("div");return s.className="monaco-status",s.setAttribute("role","complementary"),s.setAttribute("aria-live","polite"),s.setAttribute("aria-atomic","true"),I.appendChild(s),s};p=r(),h=r(),l.appendChild(I)}e.setARIAContainer=g;function t(l){!I||(w.textContent!==l?(y.clearNode(b),n(w,l)):(y.clearNode(w),n(b,l)))}e.alert=t;function i(l){!I||(m.isMacintosh?t(l):p.textContent!==l?(y.clearNode(h),n(p,l)):(y.clearNode(p),n(h,l)))}e.status=i;function n(l,c){y.clearNode(l),c.length>D&&(c=c.substr(0,D)),l.textContent=c,l.style.visibility="hidden",l.style.visibility="visible"}}),define(te[329],ie([12]),{}),define(te[330],ie([1,0,7,46,57,113,29,4,2,39,329]),function(j,e,y,m,D,I,w,b,p,h){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Button=void 0;const g={buttonBackground:w.Color.fromHex("#0E639C"),buttonHoverBackground:w.Color.fromHex("#006BB3"),buttonForeground:w.Color.white};class t extends p.Disposable{constructor(n,l){super();this._onDidClick=this._register(new b.Emitter),this.options=l||Object.create(null),(0,h.mixin)(this.options,g,!1),this.buttonForeground=this.options.buttonForeground,this.buttonBackground=this.options.buttonBackground,this.buttonHoverBackground=this.options.buttonHoverBackground,this.buttonSecondaryForeground=this.options.buttonSecondaryForeground,this.buttonSecondaryBackground=this.options.buttonSecondaryBackground,this.buttonSecondaryHoverBackground=this.options.buttonSecondaryHoverBackground,this.buttonBorder=this.options.buttonBorder,this._element=document.createElement("a"),this._element.classList.add("monaco-button"),this._element.tabIndex=0,this._element.setAttribute("role","button"),n.appendChild(this._element),this._register(D.Gesture.addTarget(this._element)),[y.EventType.CLICK,D.EventType.Tap].forEach(c=>{this._register((0,y.addDisposableListener)(this._element,c,r=>{if(!this.enabled){y.EventHelper.stop(r);return}this._onDidClick.fire(r)}))}),this._register((0,y.addDisposableListener)(this._element,y.EventType.KEY_DOWN,c=>{const r=new m.StandardKeyboardEvent(c);let s=!1;this.enabled&&(r.equals(3)||r.equals(10))?(this._onDidClick.fire(c),s=!0):r.equals(9)&&(this._element.blur(),s=!0),s&&y.EventHelper.stop(r,!0)})),this._register((0,y.addDisposableListener)(this._element,y.EventType.MOUSE_OVER,c=>{this._element.classList.contains("disabled")||this.setHoverBackground()})),this._register((0,y.addDisposableListener)(this._element,y.EventType.MOUSE_OUT,c=>{this.applyStyles()})),this.focusTracker=this._register((0,y.trackFocus)(this._element)),this._register(this.focusTracker.onDidFocus(()=>this.setHoverBackground())),this._register(this.focusTracker.onDidBlur(()=>this.applyStyles())),this.applyStyles()}get onDidClick(){return this._onDidClick.event}setHoverBackground(){let n;this.options.secondary?n=this.buttonSecondaryHoverBackground?this.buttonSecondaryHoverBackground.toString():null:n=this.buttonHoverBackground?this.buttonHoverBackground.toString():null,n&&(this._element.style.backgroundColor=n)}style(n){this.buttonForeground=n.buttonForeground,this.buttonBackground=n.buttonBackground,this.buttonHoverBackground=n.buttonHoverBackground,this.buttonSecondaryForeground=n.buttonSecondaryForeground,this.buttonSecondaryBackground=n.buttonSecondaryBackground,this.buttonSecondaryHoverBackground=n.buttonSecondaryHoverBackground,this.buttonBorder=n.buttonBorder,this.applyStyles()}applyStyles(){if(this._element){let n,l;this.options.secondary?(l=this.buttonSecondaryForeground?this.buttonSecondaryForeground.toString():"",n=this.buttonSecondaryBackground?this.buttonSecondaryBackground.toString():""):(l=this.buttonForeground?this.buttonForeground.toString():"",n=this.buttonBackground?this.buttonBackground.toString():"");const c=this.buttonBorder?this.buttonBorder.toString():"";this._element.style.color=l,this._element.style.backgroundColor=n,this._element.style.borderWidth=c?"1px":"",this._element.style.borderStyle=c?"solid":"",this._element.style.borderColor=c}}get element(){return this._element}set label(n){this._element.classList.add("monaco-text-button"),this.options.supportIcons?(0,y.reset)(this._element,...(0,I.renderLabelWithIcons)(n)):this._element.textContent=n,typeof this.options.title=="string"?this._element.title=this.options.title:this.options.title&&(this._element.title=n)}set enabled(n){n?(this._element.classList.remove("disabled"),this._element.setAttribute("aria-disabled",String(!1)),this._element.tabIndex=0):(this._element.classList.add("disabled"),this._element.setAttribute("aria-disabled",String(!0)))}get enabled(){return!this._element.classList.contains("disabled")}}e.Button=t}),define(te[331],ie([12]),{}),define(te[172],ie([1,0,60,27,29,4,331]),function(j,e,y,m,D,I){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Checkbox=void 0;const w={inputActiveOptionBorder:D.Color.fromHex("#007ACC00"),inputActiveOptionForeground:D.Color.fromHex("#FFFFFF"),inputActiveOptionBackground:D.Color.fromHex("#0E639C50")};class b extends y.Widget{constructor(h){super();this._onChange=this._register(new I.Emitter),this.onChange=this._onChange.event,this._onKeyDown=this._register(new I.Emitter),this.onKeyDown=this._onKeyDown.event,this._opts=Object.assign(Object.assign({},w),h),this._checked=this._opts.isChecked;const g=["monaco-custom-checkbox"];this._opts.icon&&g.push(...m.CSSIcon.asClassNameArray(this._opts.icon)),this._opts.actionClassName&&g.push(...this._opts.actionClassName.split(" ")),this._checked&&g.push("checked"),this.domNode=document.createElement("div"),this.domNode.title=this._opts.title,this.domNode.classList.add(...g),this._opts.notFocusable||(this.domNode.tabIndex=0),this.domNode.setAttribute("role","checkbox"),this.domNode.setAttribute("aria-checked",String(this._checked)),this.domNode.setAttribute("aria-label",this._opts.title),this.applyStyles(),this.onclick(this.domNode,t=>{this.enabled&&(this.checked=!this._checked,this._onChange.fire(!1),t.preventDefault())}),this.ignoreGesture(this.domNode),this.onkeydown(this.domNode,t=>{if(t.keyCode===10||t.keyCode===3){this.checked=!this._checked,this._onChange.fire(!0),t.preventDefault();return}this._onKeyDown.fire(t)})}get enabled(){return this.domNode.getAttribute("aria-disabled")!=="true"}focus(){this.domNode.focus()}get checked(){return this._checked}set checked(h){this._checked=h,this.domNode.setAttribute("aria-checked",String(this._checked)),this.domNode.classList.toggle("checked",this._checked),this.applyStyles()}width(){return 2+2+2+16}style(h){h.inputActiveOptionBorder&&(this._opts.inputActiveOptionBorder=h.inputActiveOptionBorder),h.inputActiveOptionForeground&&(this._opts.inputActiveOptionForeground=h.inputActiveOptionForeground),h.inputActiveOptionBackground&&(this._opts.inputActiveOptionBackground=h.inputActiveOptionBackground),this.applyStyles()}applyStyles(){this.domNode&&(this.domNode.style.borderColor=this._checked&&this._opts.inputActiveOptionBorder?this._opts.inputActiveOptionBorder.toString():"",this.domNode.style.color=this._checked&&this._opts.inputActiveOptionForeground?this._opts.inputActiveOptionForeground.toString():"inherit",this.domNode.style.backgroundColor=this._checked&&this._opts.inputActiveOptionBackground?this._opts.inputActiveOptionBackground.toString():"")}enable(){this.domNode.setAttribute("aria-disabled",String(!1))}disable(){this.domNode.setAttribute("aria-disabled",String(!0))}}e.Checkbox=b}),define(te[332],ie([12]),{}),define(te[333],ie([12]),{}),define(te[140],ie([1,0,27,332,333]),function(j,e,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.formatRule=void 0;function m(D){let I=D.definition;for(;I instanceof y.Codicon;)I=I.definition;return`.codicon-${D.id}:before { content: '${I.fontCharacter}'; }`}e.formatRule=m}),define(te[334],ie([12]),{}),define(te[222],ie([1,0,165,7,2,17,136,334]),function(j,e,y,m,D,I,w){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ContextView=e.layout=e.LayoutAnchorMode=void 0;var b;(function(t){t[t.AVOID=0]="AVOID",t[t.ALIGN=1]="ALIGN"})(b=e.LayoutAnchorMode||(e.LayoutAnchorMode={}));function p(t,i,n){const l=n.mode===b.ALIGN?n.offset:n.offset+n.size,c=n.mode===b.ALIGN?n.offset+n.size:n.offset;return n.position===0?i<=t-l?l:i<=c?c-i:Math.max(t-i,0):i<=c?c-i:i<=t-l?l:0}e.layout=p;class h extends D.Disposable{constructor(i,n){super();this.container=null,this.delegate=null,this.toDisposeOnClean=D.Disposable.None,this.toDisposeOnSetContainer=D.Disposable.None,this.shadowRoot=null,this.shadowRootHostElement=null,this.view=m.$(".context-view"),this.useFixedPosition=!1,this.useShadowDOM=!1,m.hide(this.view),this.setContainer(i,n),this._register((0,D.toDisposable)(()=>this.setContainer(null,1)))}setContainer(i,n){var l;if(this.container&&(this.toDisposeOnSetContainer.dispose(),this.shadowRoot?(this.shadowRoot.removeChild(this.view),this.shadowRoot=null,(l=this.shadowRootHostElement)===null||l===void 0||l.remove(),this.shadowRootHostElement=null):this.container.removeChild(this.view),this.container=null),i){if(this.container=i,this.useFixedPosition=n!==1,this.useShadowDOM=n===3,this.useShadowDOM){this.shadowRootHostElement=m.$(".shadow-root-host"),this.container.appendChild(this.shadowRootHostElement),this.shadowRoot=this.shadowRootHostElement.attachShadow({mode:"open"});const r=document.createElement("style");r.textContent=g,this.shadowRoot.appendChild(r),this.shadowRoot.appendChild(this.view),this.shadowRoot.appendChild(m.$("slot"))}else this.container.appendChild(this.view);const c=new D.DisposableStore;h.BUBBLE_UP_EVENTS.forEach(r=>{c.add(m.addStandardDisposableListener(this.container,r,s=>{this.onDOMEvent(s,!1)}))}),h.BUBBLE_DOWN_EVENTS.forEach(r=>{c.add(m.addStandardDisposableListener(this.container,r,s=>{this.onDOMEvent(s,!0)},!0))}),this.toDisposeOnSetContainer=c}}show(i){this.isVisible()&&this.hide(),m.clearNode(this.view),this.view.className="context-view",this.view.style.top="0px",this.view.style.left="0px",this.view.style.zIndex="2500",this.view.style.position=this.useFixedPosition?"fixed":"absolute",m.show(this.view),this.toDisposeOnClean=i.render(this.view)||D.Disposable.None,this.delegate=i,this.doLayout(),this.delegate.focus&&this.delegate.focus()}getViewElement(){return this.view}layout(){if(!!this.isVisible()){if(this.delegate.canRelayout===!1&&!(I.isIOS&&y.BrowserFeatures.pointerEvents)){this.hide();return}this.delegate.layout&&this.delegate.layout(),this.doLayout()}}doLayout(){if(!this.isVisible())return;let i=this.delegate.getAnchor(),n;if(m.isHTMLElement(i)){let f=m.getDomNodePagePosition(i);n={top:f.top,left:f.left,width:f.width,height:f.height}}else n={top:i.y,left:i.x,width:i.width||1,height:i.height||2};const l=m.getTotalWidth(this.view),c=m.getTotalHeight(this.view),r=this.delegate.anchorPosition||0,s=this.delegate.anchorAlignment||0,o=this.delegate.anchorAxisAlignment||0;let a,d;if(o===0){const f={offset:n.top-window.pageYOffset,size:n.height,position:r===0?0:1},S={offset:n.left,size:n.width,position:s===0?0:1,mode:b.ALIGN};a=p(window.innerHeight,c,f)+window.pageYOffset,w.Range.intersects({start:a,end:a+c},{start:f.offset,end:f.offset+f.size})&&(S.mode=b.AVOID),d=p(window.innerWidth,l,S)}else{const f={offset:n.left,size:n.width,position:s===0?0:1},S={offset:n.top,size:n.height,position:r===0?0:1,mode:b.ALIGN};d=p(window.innerWidth,l,f),w.Range.intersects({start:d,end:d+l},{start:f.offset,end:f.offset+f.size})&&(S.mode=b.AVOID),a=p(window.innerHeight,c,S)+window.pageYOffset}this.view.classList.remove("top","bottom","left","right"),this.view.classList.add(r===0?"bottom":"top"),this.view.classList.add(s===0?"left":"right"),this.view.classList.toggle("fixed",this.useFixedPosition);const u=m.getDomNodePagePosition(this.container);this.view.style.top=`${a-(this.useFixedPosition?m.getDomNodePagePosition(this.view).top:u.top)}px`,this.view.style.left=`${d-(this.useFixedPosition?m.getDomNodePagePosition(this.view).left:u.left)}px`,this.view.style.width="initial"}hide(i){const n=this.delegate;this.delegate=null,(n==null?void 0:n.onHide)&&n.onHide(i),this.toDisposeOnClean.dispose(),m.hide(this.view)}isVisible(){return!!this.delegate}onDOMEvent(i,n){this.delegate&&(this.delegate.onDOMEvent?this.delegate.onDOMEvent(i,document.activeElement):n&&!m.isAncestor(i.target,this.container)&&this.hide())}dispose(){this.hide(),super.dispose()}}e.ContextView=h,h.BUBBLE_UP_EVENTS=["click","keydown","focus","blur"],h.BUBBLE_DOWN_EVENTS=["click"];let g=`
|
||
:host {
|
||
all: initial; /* 1st rule so subsequent properties are reset. */
|
||
}
|
||
|
||
@font-face {
|
||
font-family: "codicon";
|
||
font-display: block;
|
||
src: url("./codicon.ttf?5d4d76ab2ce5108968ad644d591a16a6") format("truetype");
|
||
}
|
||
|
||
.codicon[class*='codicon-'] {
|
||
font: normal normal normal 16px/1 codicon;
|
||
display: inline-block;
|
||
text-decoration: none;
|
||
text-rendering: auto;
|
||
text-align: center;
|
||
-webkit-font-smoothing: antialiased;
|
||
-moz-osx-font-smoothing: grayscale;
|
||
user-select: none;
|
||
-webkit-user-select: none;
|
||
-ms-user-select: none;
|
||
}
|
||
|
||
:host {
|
||
font-family: -apple-system, BlinkMacSystemFont, "Segoe WPC", "Segoe UI", "HelveticaNeue-Light", system-ui, "Ubuntu", "Droid Sans", sans-serif;
|
||
}
|
||
|
||
:host-context(.mac) { font-family: -apple-system, BlinkMacSystemFont, sans-serif; }
|
||
:host-context(.mac:lang(zh-Hans)) { font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", sans-serif; }
|
||
:host-context(.mac:lang(zh-Hant)) { font-family: -apple-system, BlinkMacSystemFont, "PingFang TC", sans-serif; }
|
||
:host-context(.mac:lang(ja)) { font-family: -apple-system, BlinkMacSystemFont, "Hiragino Kaku Gothic Pro", sans-serif; }
|
||
:host-context(.mac:lang(ko)) { font-family: -apple-system, BlinkMacSystemFont, "Nanum Gothic", "Apple SD Gothic Neo", "AppleGothic", sans-serif; }
|
||
|
||
:host-context(.windows) { font-family: "Segoe WPC", "Segoe UI", sans-serif; }
|
||
:host-context(.windows:lang(zh-Hans)) { font-family: "Segoe WPC", "Segoe UI", "Microsoft YaHei", sans-serif; }
|
||
:host-context(.windows:lang(zh-Hant)) { font-family: "Segoe WPC", "Segoe UI", "Microsoft Jhenghei", sans-serif; }
|
||
:host-context(.windows:lang(ja)) { font-family: "Segoe WPC", "Segoe UI", "Yu Gothic UI", "Meiryo UI", sans-serif; }
|
||
:host-context(.windows:lang(ko)) { font-family: "Segoe WPC", "Segoe UI", "Malgun Gothic", "Dotom", sans-serif; }
|
||
|
||
:host-context(.linux) { font-family: system-ui, "Ubuntu", "Droid Sans", sans-serif; }
|
||
:host-context(.linux:lang(zh-Hans)) { font-family: system-ui, "Ubuntu", "Droid Sans", "Source Han Sans SC", "Source Han Sans CN", "Source Han Sans", sans-serif; }
|
||
:host-context(.linux:lang(zh-Hant)) { font-family: system-ui, "Ubuntu", "Droid Sans", "Source Han Sans TC", "Source Han Sans TW", "Source Han Sans", sans-serif; }
|
||
:host-context(.linux:lang(ja)) { font-family: system-ui, "Ubuntu", "Droid Sans", "Source Han Sans J", "Source Han Sans JP", "Source Han Sans", sans-serif; }
|
||
:host-context(.linux:lang(ko)) { font-family: system-ui, "Ubuntu", "Droid Sans", "Source Han Sans K", "Source Han Sans JR", "Source Han Sans", "UnDotum", "FBaekmuk Gulim", sans-serif; }
|
||
`}),define(te[335],ie([12]),{}),define(te[223],ie([1,0,7,29,39,8,335]),function(j,e,y,m,D,I){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CountBadge=void 0;const w={badgeBackground:m.Color.fromHex("#4D4D4D"),badgeForeground:m.Color.fromHex("#FFFFFF")};class b{constructor(h,g){this.count=0,this.options=g||Object.create(null),(0,D.mixin)(this.options,w,!1),this.badgeBackground=this.options.badgeBackground,this.badgeForeground=this.options.badgeForeground,this.badgeBorder=this.options.badgeBorder,this.element=(0,y.append)(h,(0,y.$)(".monaco-count-badge")),this.countFormat=this.options.countFormat||"{0}",this.titleFormat=this.options.titleFormat||"",this.setCount(this.options.count||0)}setCount(h){this.count=h,this.render()}setTitleFormat(h){this.titleFormat=h,this.render()}render(){this.element.textContent=(0,I.format)(this.countFormat,this.count),this.element.title=(0,I.format)(this.titleFormat,this.count),this.applyStyles()}style(h){this.badgeBackground=h.badgeBackground,this.badgeForeground=h.badgeForeground,this.badgeBorder=h.badgeBorder,this.applyStyles()}applyStyles(){if(this.element){const h=this.badgeBackground?this.badgeBackground.toString():"",g=this.badgeForeground?this.badgeForeground.toString():"",t=this.badgeBorder?this.badgeBorder.toString():"";this.element.style.backgroundColor=h,this.element.style.color=g,this.element.style.borderWidth=t?"1px":"",this.element.style.borderStyle=t?"solid":"",this.element.style.borderColor=t}}}e.CountBadge=b}),define(te[224],ie([12]),{}),define(te[225],ie([12]),{}),define(te[336],ie([12]),{}),define(te[337],ie([12]),{}),define(te[338],ie([12]),{}),define(te[339],ie([12]),{}),define(te[226],ie([12]),{}),define(te[340],ie([12]),{}),define(te[141],ie([1,0,340]),function(j,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MOUSE_CURSOR_TEXT_CSS_CLASS_NAME=void 0,e.MOUSE_CURSOR_TEXT_CSS_CLASS_NAME="monaco-mouse-cursor-text"}),define(te[341],ie([12]),{}),define(te[342],ie([1,0,7,10,29,2,39,341]),function(j,e,y,m,D,I,w){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ProgressBar=void 0;const b="done",p="active",h="infinite",g="infinite-long-running",t="discrete",i={progressBarBackground:D.Color.fromHex("#0E70C0")};class n extends I.Disposable{constructor(c,r){super();this.options=r||Object.create(null),(0,w.mixin)(this.options,i,!1),this.workedVal=0,this.progressBarBackground=this.options.progressBarBackground,this.showDelayedScheduler=this._register(new m.RunOnceScheduler(()=>(0,y.show)(this.element),0)),this.longRunningScheduler=this._register(new m.RunOnceScheduler(()=>this.infiniteLongRunning(),n.LONG_RUNNING_INFINITE_THRESHOLD)),this.create(c)}create(c){this.element=document.createElement("div"),this.element.classList.add("monaco-progress-container"),this.element.setAttribute("role","progressbar"),this.element.setAttribute("aria-valuemin","0"),c.appendChild(this.element),this.bit=document.createElement("div"),this.bit.classList.add("progress-bit"),this.element.appendChild(this.bit),this.applyStyles()}off(){this.bit.style.width="inherit",this.bit.style.opacity="1",this.element.classList.remove(p,h,g,t),this.workedVal=0,this.totalWork=void 0,this.longRunningScheduler.cancel()}stop(){return this.doDone(!1)}doDone(c){return this.element.classList.add(b),this.element.classList.contains(h)?(this.bit.style.opacity="0",c?setTimeout(()=>this.off(),200):this.off()):(this.bit.style.width="inherit",c?setTimeout(()=>this.off(),200):this.off()),this}infinite(){return this.bit.style.width="2%",this.bit.style.opacity="1",this.element.classList.remove(t,b,g),this.element.classList.add(p,h),this.longRunningScheduler.schedule(),this}infiniteLongRunning(){this.element.classList.add(g)}getContainer(){return this.element}style(c){this.progressBarBackground=c.progressBarBackground,this.applyStyles()}applyStyles(){if(this.bit){const c=this.progressBarBackground?this.progressBarBackground.toString():"";this.bit.style.backgroundColor=c}}}e.ProgressBar=n,n.LONG_RUNNING_INFINITE_THRESHOLD=1e4}),define(te[343],ie([12]),{}),define(te[114],ie([1,0,7,89,57,10,93,4,2,17,343]),function(j,e,y,m,D,I,w,b,p,h){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Sash=e.OrthogonalEdge=void 0;let g=!1;var t;(function(u){u.North="north",u.South="south",u.East="east",u.West="west"})(t=e.OrthogonalEdge||(e.OrthogonalEdge={}));let i=4;const n=new b.Emitter;let l=300;const c=new b.Emitter;class r{constructor(){this.disposables=new p.DisposableStore}get onPointerMove(){return this.disposables.add(new m.DomEmitter(window,"mousemove")).event}get onPointerUp(){return this.disposables.add(new m.DomEmitter(window,"mouseup")).event}dispose(){this.disposables.dispose()}}Ie([w.memoize],r.prototype,"onPointerMove",null),Ie([w.memoize],r.prototype,"onPointerUp",null);class s{constructor(f){this.el=f,this.disposables=new p.DisposableStore}get onPointerMove(){return this.disposables.add(new m.DomEmitter(this.el,D.EventType.Change)).event}get onPointerUp(){return this.disposables.add(new m.DomEmitter(this.el,D.EventType.End)).event}dispose(){this.disposables.dispose()}}Ie([w.memoize],s.prototype,"onPointerMove",null),Ie([w.memoize],s.prototype,"onPointerUp",null);class o{constructor(f){this.factory=f}get onPointerMove(){return this.factory.onPointerMove}get onPointerUp(){return this.factory.onPointerUp}dispose(){}}Ie([w.memoize],o.prototype,"onPointerMove",null),Ie([w.memoize],o.prototype,"onPointerUp",null);const a="pointer-events-disabled";class d extends p.Disposable{constructor(f,S,v){super();this.hoverDelay=l,this.hoverDelayer=this._register(new I.Delayer(this.hoverDelay)),this._state=3,this.onDidEnablementChange=this._register(new b.Emitter),this._onDidStart=this._register(new b.Emitter),this._onDidChange=this._register(new b.Emitter),this._onDidReset=this._register(new b.Emitter),this._onDidEnd=this._register(new b.Emitter),this.orthogonalStartSashDisposables=this._register(new p.DisposableStore),this.orthogonalStartDragHandleDisposables=this._register(new p.DisposableStore),this.orthogonalEndSashDisposables=this._register(new p.DisposableStore),this.orthogonalEndDragHandleDisposables=this._register(new p.DisposableStore),this.onDidStart=this._onDidStart.event,this.onDidChange=this._onDidChange.event,this.onDidReset=this._onDidReset.event,this.onDidEnd=this._onDidEnd.event,this.linkedSash=void 0,this.el=(0,y.append)(f,(0,y.$)(".monaco-sash")),v.orthogonalEdge&&this.el.classList.add(`orthogonal-edge-${v.orthogonalEdge}`),h.isMacintosh&&this.el.classList.add("mac");const C=this._register(new m.DomEmitter(this.el,"mousedown")).event;this._register(C(O=>this.onPointerStart(O,new r),this));const _=this._register(new m.DomEmitter(this.el,"dblclick")).event;this._register(_(this.onPointerDoublePress,this));const L=this._register(new m.DomEmitter(this.el,"mouseenter")).event;this._register(L(()=>d.onMouseEnter(this)));const E=this._register(new m.DomEmitter(this.el,"mouseleave")).event;this._register(E(()=>d.onMouseLeave(this))),this._register(D.Gesture.addTarget(this.el));const N=b.Event.map(this._register(new m.DomEmitter(this.el,D.EventType.Start)).event,O=>{var B;return Object.assign(Object.assign({},O),{target:(B=O.initialTarget)!==null&&B!==void 0?B:null})});this._register(N(O=>this.onPointerStart(O,new s(this.el)),this));const k=this._register(new m.DomEmitter(this.el,D.EventType.Tap)).event,M=b.Event.map(b.Event.filter(b.Event.debounce(k,(O,B)=>{var T;return{event:B,count:((T=O==null?void 0:O.count)!==null&&T!==void 0?T:0)+1}},250),({count:O})=>O===2),({event:O})=>{var B;return Object.assign(Object.assign({},O),{target:(B=O.initialTarget)!==null&&B!==void 0?B:null})});this._register(M(this.onPointerDoublePress,this)),typeof v.size=="number"?(this.size=v.size,v.orientation===0?this.el.style.width=`${this.size}px`:this.el.style.height=`${this.size}px`):(this.size=i,this._register(n.event(O=>{this.size=O,this.layout()}))),this._register(c.event(O=>this.hoverDelay=O)),this.layoutProvider=S,this.orthogonalStartSash=v.orthogonalStartSash,this.orthogonalEndSash=v.orthogonalEndSash,this.orientation=v.orientation||0,this.orientation===1?(this.el.classList.add("horizontal"),this.el.classList.remove("vertical")):(this.el.classList.remove("horizontal"),this.el.classList.add("vertical")),this.el.classList.toggle("debug",g),this.layout()}get state(){return this._state}get orthogonalStartSash(){return this._orthogonalStartSash}get orthogonalEndSash(){return this._orthogonalEndSash}set state(f){this._state!==f&&(this.el.classList.toggle("disabled",f===0),this.el.classList.toggle("minimum",f===1),this.el.classList.toggle("maximum",f===2),this._state=f,this.onDidEnablementChange.fire(f))}set orthogonalStartSash(f){if(this.orthogonalStartDragHandleDisposables.clear(),this.orthogonalStartSashDisposables.clear(),f){const S=v=>{this.orthogonalStartDragHandleDisposables.clear(),v!==0&&(this._orthogonalStartDragHandle=(0,y.append)(this.el,(0,y.$)(".orthogonal-drag-handle.start")),this.orthogonalStartDragHandleDisposables.add((0,p.toDisposable)(()=>this._orthogonalStartDragHandle.remove())),this.orthogonalStartDragHandleDisposables.add(new m.DomEmitter(this._orthogonalStartDragHandle,"mouseenter")).event(()=>d.onMouseEnter(f),void 0,this.orthogonalStartDragHandleDisposables),this.orthogonalStartDragHandleDisposables.add(new m.DomEmitter(this._orthogonalStartDragHandle,"mouseleave")).event(()=>d.onMouseLeave(f),void 0,this.orthogonalStartDragHandleDisposables))};this.orthogonalStartSashDisposables.add(f.onDidEnablementChange.event(S,this)),S(f.state)}this._orthogonalStartSash=f}set orthogonalEndSash(f){if(this.orthogonalEndDragHandleDisposables.clear(),this.orthogonalEndSashDisposables.clear(),f){const S=v=>{this.orthogonalEndDragHandleDisposables.clear(),v!==0&&(this._orthogonalEndDragHandle=(0,y.append)(this.el,(0,y.$)(".orthogonal-drag-handle.end")),this.orthogonalEndDragHandleDisposables.add((0,p.toDisposable)(()=>this._orthogonalEndDragHandle.remove())),this.orthogonalEndDragHandleDisposables.add(new m.DomEmitter(this._orthogonalEndDragHandle,"mouseenter")).event(()=>d.onMouseEnter(f),void 0,this.orthogonalEndDragHandleDisposables),this.orthogonalEndDragHandleDisposables.add(new m.DomEmitter(this._orthogonalEndDragHandle,"mouseleave")).event(()=>d.onMouseLeave(f),void 0,this.orthogonalEndDragHandleDisposables))};this.orthogonalEndSashDisposables.add(f.onDidEnablementChange.event(S,this)),S(f.state)}this._orthogonalEndSash=f}onPointerStart(f,S){y.EventHelper.stop(f);let v=!1;if(!f.__orthogonalSashEvent){const R=this.getOrthogonalSash(f);R&&(v=!0,f.__orthogonalSashEvent=!0,R.onPointerStart(f,new o(S)))}if(this.linkedSash&&!f.__linkedSashEvent&&(f.__linkedSashEvent=!0,this.linkedSash.onPointerStart(f,new o(S))),!this.state)return;const C=(0,y.getElementsByTagName)("iframe");for(const R of C)R.classList.add(a);const _=f.pageX,L=f.pageY,E=f.altKey,N={startX:_,currentX:_,startY:L,currentY:L,altKey:E};this.el.classList.add("active"),this._onDidStart.fire(N);const k=(0,y.createStyleSheet)(this.el),M=()=>{let R="";v?R="all-scroll":this.orientation===1?this.state===1?R="s-resize":this.state===2?R="n-resize":R=h.isMacintosh?"row-resize":"ns-resize":this.state===1?R="e-resize":this.state===2?R="w-resize":R=h.isMacintosh?"col-resize":"ew-resize",k.textContent=`* { cursor: ${R} !important; }`},O=new p.DisposableStore;M(),v||this.onDidEnablementChange.event(M,null,O);const B=R=>{y.EventHelper.stop(R,!1);const P={startX:_,currentX:R.pageX,startY:L,currentY:R.pageY,altKey:E};this._onDidChange.fire(P)},T=R=>{y.EventHelper.stop(R,!1),this.el.removeChild(k),this.el.classList.remove("active"),this._onDidEnd.fire(),O.dispose();for(const P of C)P.classList.remove(a)};S.onPointerMove(B,null,O),S.onPointerUp(T,null,O),O.add(S)}onPointerDoublePress(f){const S=this.getOrthogonalSash(f);S&&S._onDidReset.fire(),this.linkedSash&&this.linkedSash._onDidReset.fire(),this._onDidReset.fire()}static onMouseEnter(f,S=!1){f.el.classList.contains("active")?(f.hoverDelayer.cancel(),f.el.classList.add("hover")):f.hoverDelayer.trigger(()=>f.el.classList.add("hover"),f.hoverDelay).then(void 0,()=>{}),!S&&f.linkedSash&&d.onMouseEnter(f.linkedSash,!0)}static onMouseLeave(f,S=!1){f.hoverDelayer.cancel(),f.el.classList.remove("hover"),!S&&f.linkedSash&&d.onMouseLeave(f.linkedSash,!0)}clearSashHoverState(){d.onMouseLeave(this)}layout(){if(this.orientation===0){const f=this.layoutProvider;this.el.style.left=f.getVerticalSashLeft(this)-this.size/2+"px",f.getVerticalSashTop&&(this.el.style.top=f.getVerticalSashTop(this)+"px"),f.getVerticalSashHeight&&(this.el.style.height=f.getVerticalSashHeight(this)+"px")}else{const f=this.layoutProvider;this.el.style.top=f.getHorizontalSashTop(this)-this.size/2+"px",f.getHorizontalSashLeft&&(this.el.style.left=f.getHorizontalSashLeft(this)+"px"),f.getHorizontalSashWidth&&(this.el.style.width=f.getHorizontalSashWidth(this)+"px")}}getOrthogonalSash(f){if(!(!f.target||!(f.target instanceof HTMLElement))&&f.target.classList.contains("orthogonal-drag-handle"))return f.target.classList.contains("start")?this.orthogonalStartSash:this.orthogonalEndSash}dispose(){super.dispose(),this.el.remove()}}e.Sash=d}),define(te[344],ie([12]),{}),define(te[67],ie([1,0,34,7,30,56,322,323,60,10,4,2,17,137,344]),function(j,e,y,m,D,I,w,b,p,h,g,t,i,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DomScrollableElement=e.SmoothScrollableElement=e.ScrollableElement=e.AbstractScrollableElement=e.MouseWheelClassifier=void 0;const l=500,c=50,r=!0;class s{constructor(C,_,L){this.timestamp=C,this.deltaX=_,this.deltaY=L,this.score=0}}class o{constructor(){this._capacity=5,this._memory=[],this._front=-1,this._rear=-1}isPhysicalMouseWheel(){if(this._front===-1&&this._rear===-1)return!1;let C=1,_=0,L=1,E=this._rear;do{const N=E===this._front?C:Math.pow(2,-L);if(C-=N,_+=this._memory[E].score*N,E===this._front)break;E=(this._capacity+E-1)%this._capacity,L++}while(!0);return _<=.5}accept(C,_,L){const E=new s(C,_,L);E.score=this._computeScore(E),this._front===-1&&this._rear===-1?(this._memory[0]=E,this._front=0,this._rear=0):(this._rear=(this._rear+1)%this._capacity,this._rear===this._front&&(this._front=(this._front+1)%this._capacity),this._memory[this._rear]=E)}_computeScore(C){if(Math.abs(C.deltaX)>0&&Math.abs(C.deltaY)>0)return 1;let _=.5;const L=this._front===-1&&this._rear===-1?null:this._memory[this._rear];return(!this._isAlmostInt(C.deltaX)||!this._isAlmostInt(C.deltaY))&&(_+=.25),Math.min(Math.max(_,0),1)}_isAlmostInt(C){return Math.abs(Math.round(C)-C)<.01}}e.MouseWheelClassifier=o,o.INSTANCE=new o;class a extends p.Widget{constructor(C,_,L){super();this._onScroll=this._register(new g.Emitter),this.onScroll=this._onScroll.event,this._onWillScroll=this._register(new g.Emitter),C.style.overflow="hidden",this._options=S(_),this._scrollable=L,this._register(this._scrollable.onScroll(N=>{this._onWillScroll.fire(N),this._onDidScroll(N),this._onScroll.fire(N)}));const E={onMouseWheel:N=>this._onMouseWheel(N),onDragStart:()=>this._onDragStart(),onDragEnd:()=>this._onDragEnd()};this._verticalScrollbar=this._register(new b.VerticalScrollbar(this._scrollable,this._options,E)),this._horizontalScrollbar=this._register(new w.HorizontalScrollbar(this._scrollable,this._options,E)),this._domNode=document.createElement("div"),this._domNode.className="monaco-scrollable-element "+this._options.className,this._domNode.setAttribute("role","presentation"),this._domNode.style.position="relative",this._domNode.style.overflow="hidden",this._domNode.appendChild(C),this._domNode.appendChild(this._horizontalScrollbar.domNode.domNode),this._domNode.appendChild(this._verticalScrollbar.domNode.domNode),this._options.useShadows?(this._leftShadowDomNode=(0,D.createFastDomNode)(document.createElement("div")),this._leftShadowDomNode.setClassName("shadow"),this._domNode.appendChild(this._leftShadowDomNode.domNode),this._topShadowDomNode=(0,D.createFastDomNode)(document.createElement("div")),this._topShadowDomNode.setClassName("shadow"),this._domNode.appendChild(this._topShadowDomNode.domNode),this._topLeftShadowDomNode=(0,D.createFastDomNode)(document.createElement("div")),this._topLeftShadowDomNode.setClassName("shadow"),this._domNode.appendChild(this._topLeftShadowDomNode.domNode)):(this._leftShadowDomNode=null,this._topShadowDomNode=null,this._topLeftShadowDomNode=null),this._listenOnDomNode=this._options.listenOnDomNode||this._domNode,this._mouseWheelToDispose=[],this._setListeningToMouseWheel(this._options.handleMouseWheel),this.onmouseover(this._listenOnDomNode,N=>this._onMouseOver(N)),this.onnonbubblingmouseout(this._listenOnDomNode,N=>this._onMouseOut(N)),this._hideTimeout=this._register(new h.TimeoutTimer),this._isDragging=!1,this._mouseIsOver=!1,this._shouldRender=!0,this._revealOnScroll=!0}get options(){return this._options}dispose(){this._mouseWheelToDispose=(0,t.dispose)(this._mouseWheelToDispose),super.dispose()}getDomNode(){return this._domNode}getOverviewRulerLayoutInfo(){return{parent:this._domNode,insertBefore:this._verticalScrollbar.domNode.domNode}}delegateVerticalScrollbarMouseDown(C){this._verticalScrollbar.delegateMouseDown(C)}getScrollDimensions(){return this._scrollable.getScrollDimensions()}setScrollDimensions(C){this._scrollable.setScrollDimensions(C,!1)}updateClassName(C){this._options.className=C,i.isMacintosh&&(this._options.className+=" mac"),this._domNode.className="monaco-scrollable-element "+this._options.className}updateOptions(C){typeof C.handleMouseWheel!="undefined"&&(this._options.handleMouseWheel=C.handleMouseWheel,this._setListeningToMouseWheel(this._options.handleMouseWheel)),typeof C.mouseWheelScrollSensitivity!="undefined"&&(this._options.mouseWheelScrollSensitivity=C.mouseWheelScrollSensitivity),typeof C.fastScrollSensitivity!="undefined"&&(this._options.fastScrollSensitivity=C.fastScrollSensitivity),typeof C.scrollPredominantAxis!="undefined"&&(this._options.scrollPredominantAxis=C.scrollPredominantAxis),typeof C.horizontal!="undefined"&&(this._options.horizontal=C.horizontal),typeof C.vertical!="undefined"&&(this._options.vertical=C.vertical),typeof C.horizontalScrollbarSize!="undefined"&&(this._options.horizontalScrollbarSize=C.horizontalScrollbarSize),typeof C.verticalScrollbarSize!="undefined"&&(this._options.verticalScrollbarSize=C.verticalScrollbarSize),typeof C.scrollByPage!="undefined"&&(this._options.scrollByPage=C.scrollByPage),this._horizontalScrollbar.updateOptions(this._options),this._verticalScrollbar.updateOptions(this._options),this._options.lazyRender||this._render()}_setListeningToMouseWheel(C){if(this._mouseWheelToDispose.length>0!==C&&(this._mouseWheelToDispose=(0,t.dispose)(this._mouseWheelToDispose),C)){const L=E=>{this._onMouseWheel(new I.StandardWheelEvent(E))};this._mouseWheelToDispose.push(m.addDisposableListener(this._listenOnDomNode,m.EventType.MOUSE_WHEEL,L,{passive:!1}))}}_onMouseWheel(C){const _=o.INSTANCE;if(r){const N=window.devicePixelRatio/(0,y.getZoomFactor)();i.isWindows||i.isLinux?_.accept(Date.now(),C.deltaX/N,C.deltaY/N):_.accept(Date.now(),C.deltaX,C.deltaY)}let L=!1;if(C.deltaY||C.deltaX){let N=C.deltaY*this._options.mouseWheelScrollSensitivity,k=C.deltaX*this._options.mouseWheelScrollSensitivity;this._options.scrollPredominantAxis&&(Math.abs(N)>=Math.abs(k)?k=0:N=0),this._options.flipAxes&&([N,k]=[k,N]);const M=!i.isMacintosh&&C.browserEvent&&C.browserEvent.shiftKey;(this._options.scrollYToX||M)&&!k&&(k=N,N=0),C.browserEvent&&C.browserEvent.altKey&&(k=k*this._options.fastScrollSensitivity,N=N*this._options.fastScrollSensitivity);const O=this._scrollable.getFutureScrollPosition();let B={};if(N){const T=c*N,R=O.scrollTop-(T<0?Math.floor(T):Math.ceil(T));this._verticalScrollbar.writeScrollPosition(B,R)}if(k){const T=c*k,R=O.scrollLeft-(T<0?Math.floor(T):Math.ceil(T));this._horizontalScrollbar.writeScrollPosition(B,R)}B=this._scrollable.validateScrollPosition(B),(O.scrollLeft!==B.scrollLeft||O.scrollTop!==B.scrollTop)&&(r&&this._options.mouseWheelSmoothScroll&&_.isPhysicalMouseWheel()?this._scrollable.setScrollPositionSmooth(B):this._scrollable.setScrollPositionNow(B),L=!0)}let E=L;!E&&this._options.alwaysConsumeMouseWheel&&(E=!0),!E&&this._options.consumeMouseWheelIfScrollbarIsNeeded&&(this._verticalScrollbar.isNeeded()||this._horizontalScrollbar.isNeeded())&&(E=!0),E&&(C.preventDefault(),C.stopPropagation())}_onDidScroll(C){this._shouldRender=this._horizontalScrollbar.onDidScroll(C)||this._shouldRender,this._shouldRender=this._verticalScrollbar.onDidScroll(C)||this._shouldRender,this._options.useShadows&&(this._shouldRender=!0),this._revealOnScroll&&this._reveal(),this._options.lazyRender||this._render()}renderNow(){if(!this._options.lazyRender)throw new Error("Please use `lazyRender` together with `renderNow`!");this._render()}_render(){if(!!this._shouldRender&&(this._shouldRender=!1,this._horizontalScrollbar.render(),this._verticalScrollbar.render(),this._options.useShadows)){const C=this._scrollable.getCurrentScrollPosition(),_=C.scrollTop>0,L=C.scrollLeft>0,E=L?" left":"",N=_?" top":"",k=L||_?" top-left-corner":"";this._leftShadowDomNode.setClassName(`shadow${E}`),this._topShadowDomNode.setClassName(`shadow${N}`),this._topLeftShadowDomNode.setClassName(`shadow${k}${N}${E}`)}}_onDragStart(){this._isDragging=!0,this._reveal()}_onDragEnd(){this._isDragging=!1,this._hide()}_onMouseOut(C){this._mouseIsOver=!1,this._hide()}_onMouseOver(C){this._mouseIsOver=!0,this._reveal()}_reveal(){this._verticalScrollbar.beginReveal(),this._horizontalScrollbar.beginReveal(),this._scheduleHide()}_hide(){!this._mouseIsOver&&!this._isDragging&&(this._verticalScrollbar.beginHide(),this._horizontalScrollbar.beginHide())}_scheduleHide(){!this._mouseIsOver&&!this._isDragging&&this._hideTimeout.cancelAndSet(()=>this._hide(),l)}}e.AbstractScrollableElement=a;class d extends a{constructor(C,_){_=_||{},_.mouseWheelSmoothScroll=!1;const L=new n.Scrollable({forceIntegerValues:!0,smoothScrollDuration:0,scheduleAtNextAnimationFrame:E=>m.scheduleAtNextAnimationFrame(E)});super(C,_,L);this._register(L)}setScrollPosition(C){this._scrollable.setScrollPositionNow(C)}}e.ScrollableElement=d;class u extends a{constructor(C,_,L){super(C,_,L)}setScrollPosition(C){C.reuseAnimation?this._scrollable.setScrollPositionSmooth(C,C.reuseAnimation):this._scrollable.setScrollPositionNow(C)}getScrollPosition(){return this._scrollable.getCurrentScrollPosition()}}e.SmoothScrollableElement=u;class f extends a{constructor(C,_){_=_||{},_.mouseWheelSmoothScroll=!1;const L=new n.Scrollable({forceIntegerValues:!1,smoothScrollDuration:0,scheduleAtNextAnimationFrame:E=>m.scheduleAtNextAnimationFrame(E)});super(C,_,L);this._register(L),this._element=C,this.onScroll(E=>{E.scrollTopChanged&&(this._element.scrollTop=E.scrollTop),E.scrollLeftChanged&&(this._element.scrollLeft=E.scrollLeft)}),this.scanDomNode()}setScrollPosition(C){this._scrollable.setScrollPositionNow(C)}getScrollPosition(){return this._scrollable.getCurrentScrollPosition()}scanDomNode(){this.setScrollDimensions({width:this._element.clientWidth,scrollWidth:this._element.scrollWidth,height:this._element.clientHeight,scrollHeight:this._element.scrollHeight}),this.setScrollPosition({scrollLeft:this._element.scrollLeft,scrollTop:this._element.scrollTop})}}e.DomScrollableElement=f;function S(v){const C={lazyRender:typeof v.lazyRender!="undefined"?v.lazyRender:!1,className:typeof v.className!="undefined"?v.className:"",useShadows:typeof v.useShadows!="undefined"?v.useShadows:!0,handleMouseWheel:typeof v.handleMouseWheel!="undefined"?v.handleMouseWheel:!0,flipAxes:typeof v.flipAxes!="undefined"?v.flipAxes:!1,consumeMouseWheelIfScrollbarIsNeeded:typeof v.consumeMouseWheelIfScrollbarIsNeeded!="undefined"?v.consumeMouseWheelIfScrollbarIsNeeded:!1,alwaysConsumeMouseWheel:typeof v.alwaysConsumeMouseWheel!="undefined"?v.alwaysConsumeMouseWheel:!1,scrollYToX:typeof v.scrollYToX!="undefined"?v.scrollYToX:!1,mouseWheelScrollSensitivity:typeof v.mouseWheelScrollSensitivity!="undefined"?v.mouseWheelScrollSensitivity:1,fastScrollSensitivity:typeof v.fastScrollSensitivity!="undefined"?v.fastScrollSensitivity:5,scrollPredominantAxis:typeof v.scrollPredominantAxis!="undefined"?v.scrollPredominantAxis:!0,mouseWheelSmoothScroll:typeof v.mouseWheelSmoothScroll!="undefined"?v.mouseWheelSmoothScroll:!0,arrowSize:typeof v.arrowSize!="undefined"?v.arrowSize:11,listenOnDomNode:typeof v.listenOnDomNode!="undefined"?v.listenOnDomNode:null,horizontal:typeof v.horizontal!="undefined"?v.horizontal:1,horizontalScrollbarSize:typeof v.horizontalScrollbarSize!="undefined"?v.horizontalScrollbarSize:10,horizontalSliderSize:typeof v.horizontalSliderSize!="undefined"?v.horizontalSliderSize:0,horizontalHasArrows:typeof v.horizontalHasArrows!="undefined"?v.horizontalHasArrows:!1,vertical:typeof v.vertical!="undefined"?v.vertical:1,verticalScrollbarSize:typeof v.verticalScrollbarSize!="undefined"?v.verticalScrollbarSize:10,verticalHasArrows:typeof v.verticalHasArrows!="undefined"?v.verticalHasArrows:!1,verticalSliderSize:typeof v.verticalSliderSize!="undefined"?v.verticalSliderSize:0,scrollByPage:typeof v.scrollByPage!="undefined"?v.scrollByPage:!1};return C.horizontalSliderSize=typeof v.horizontalSliderSize!="undefined"?v.horizontalSliderSize:C.horizontalScrollbarSize,C.verticalSliderSize=typeof v.verticalSliderSize!="undefined"?v.verticalSliderSize:C.verticalScrollbarSize,i.isMacintosh&&(C.className+=" mac"),C}}),define(te[227],ie([1,0,7,67,2,336]),function(j,e,y,m,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.HoverAction=e.HoverWidget=void 0;const I=y.$;class w extends D.Disposable{constructor(){super();this.containerDomNode=document.createElement("div"),this.containerDomNode.className="monaco-hover",this.containerDomNode.tabIndex=0,this.containerDomNode.setAttribute("role","tooltip"),this.contentsDomNode=document.createElement("div"),this.contentsDomNode.className="monaco-hover-content",this.scrollbar=this._register(new m.DomScrollableElement(this.contentsDomNode,{consumeMouseWheelIfScrollbarIsNeeded:!0})),this.containerDomNode.appendChild(this.scrollbar.getDomNode())}onContentsChanged(){this.scrollbar.scanDomNode()}}e.HoverWidget=w;class b extends D.Disposable{constructor(h,g,t){super();this.actionContainer=y.append(h,I("div.action-container")),this.action=y.append(this.actionContainer,I("a.action")),this.action.setAttribute("role","button"),g.iconClass&&y.append(this.action,I(`span.icon.${g.iconClass}`));const i=y.append(this.action,I("span"));i.textContent=t?`${g.label} (${t})`:g.label,this._register(y.addDisposableListener(this.actionContainer,y.EventType.MOUSE_DOWN,n=>{n.stopPropagation(),n.preventDefault(),g.run(this.actionContainer)})),this.setEnabled(!0)}static render(h,g,t){return new b(h,g,t)}setEnabled(h){h?(this.actionContainer.classList.remove("disabled"),this.actionContainer.removeAttribute("aria-disabled")):(this.actionContainer.classList.add("disabled"),this.actionContainer.setAttribute("aria-disabled","true"))}}e.HoverAction=b}),define(te[173],ie([1,0,34,164,7,89,57,67,19,10,93,4,2,39,136,137,315,321]),function(j,e,y,m,D,I,w,b,p,h,g,t,i,n,l,c,r,s){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ListView=e.NativeDragAndDropData=e.ExternalElementsDragAndDropData=e.ElementsDragAndDropData=void 0;const o={useShadows:!0,verticalScrollMode:1,setRowLineHeight:!0,setRowHeight:!0,supportDynamicHeights:!1,dnd:{getDragElements(C){return[C]},getDragURI(){return null},onDragStart(){},onDragOver(){return!1},drop(){}},horizontalScrolling:!1,transformOptimization:!0,alwaysConsumeMouseWheel:!0};class a{constructor(_){this.elements=_}update(){}getData(){return this.elements}}e.ElementsDragAndDropData=a;class d{constructor(_){this.elements=_}update(){}getData(){return this.elements}}e.ExternalElementsDragAndDropData=d;class u{constructor(){this.types=[],this.files=[]}update(_){if(_.types&&this.types.splice(0,this.types.length,..._.types),_.files){this.files.splice(0,this.files.length);for(let L=0;L<_.files.length;L++){const E=_.files.item(L);E&&(E.size||E.type)&&this.files.push(E)}}}getData(){return{types:this.types,files:this.files}}}e.NativeDragAndDropData=u;function f(C,_){return Array.isArray(C)&&Array.isArray(_)?(0,p.equals)(C,_):C===_}class S{constructor(_){(_==null?void 0:_.getSetSize)?this.getSetSize=_.getSetSize.bind(_):this.getSetSize=(L,E,N)=>N,(_==null?void 0:_.getPosInSet)?this.getPosInSet=_.getPosInSet.bind(_):this.getPosInSet=(L,E)=>E+1,(_==null?void 0:_.getRole)?this.getRole=_.getRole.bind(_):this.getRole=L=>"listitem",(_==null?void 0:_.isChecked)?this.isChecked=_.isChecked.bind(_):this.isChecked=L=>{}}}class v{constructor(_,L,E,N=o){if(this.virtualDelegate=L,this.domId=`list_id_${++v.InstanceCount}`,this.renderers=new Map,this.renderWidth=0,this._scrollHeight=0,this.scrollableElementUpdateDisposable=null,this.scrollableElementWidthDelayer=new h.Delayer(50),this.splicing=!1,this.dragOverAnimationStopDisposable=i.Disposable.None,this.dragOverMouseY=0,this.canDrop=!1,this.currentDragFeedbackDisposable=i.Disposable.None,this.onDragLeaveTimeout=i.Disposable.None,this.disposables=new i.DisposableStore,this._onDidChangeContentHeight=new t.Emitter,this._horizontalScrolling=!1,N.horizontalScrolling&&N.supportDynamicHeights)throw new Error("Horizontal scrolling and dynamic heights not supported simultaneously");this.items=[],this.itemId=0,this.rangeMap=new r.RangeMap;for(const M of E)this.renderers.set(M.templateId,M);this.cache=this.disposables.add(new s.RowCache(this.renderers)),this.lastRenderTop=0,this.lastRenderHeight=0,this.domNode=document.createElement("div"),this.domNode.className="monaco-list",this.domNode.classList.add(this.domId),this.domNode.tabIndex=0,this.domNode.classList.toggle("mouse-support",typeof N.mouseSupport=="boolean"?N.mouseSupport:!0),this._horizontalScrolling=(0,n.getOrDefault)(N,M=>M.horizontalScrolling,o.horizontalScrolling),this.domNode.classList.toggle("horizontal-scrolling",this._horizontalScrolling),this.additionalScrollHeight=typeof N.additionalScrollHeight=="undefined"?0:N.additionalScrollHeight,this.accessibilityProvider=new S(N.accessibilityProvider),this.rowsContainer=document.createElement("div"),this.rowsContainer.className="monaco-list-rows",(0,n.getOrDefault)(N,M=>M.transformOptimization,o.transformOptimization)&&(this.rowsContainer.style.transform="translate3d(0px, 0px, 0px)"),this.disposables.add(w.Gesture.addTarget(this.rowsContainer)),this.scrollable=new c.Scrollable({forceIntegerValues:!0,smoothScrollDuration:(0,n.getOrDefault)(N,M=>M.smoothScrolling,!1)?125:0,scheduleAtNextAnimationFrame:M=>(0,D.scheduleAtNextAnimationFrame)(M)}),this.scrollableElement=this.disposables.add(new b.SmoothScrollableElement(this.rowsContainer,{alwaysConsumeMouseWheel:(0,n.getOrDefault)(N,M=>M.alwaysConsumeMouseWheel,o.alwaysConsumeMouseWheel),horizontal:1,vertical:(0,n.getOrDefault)(N,M=>M.verticalScrollMode,o.verticalScrollMode),useShadows:(0,n.getOrDefault)(N,M=>M.useShadows,o.useShadows),mouseWheelScrollSensitivity:N.mouseWheelScrollSensitivity,fastScrollSensitivity:N.fastScrollSensitivity},this.scrollable)),this.domNode.appendChild(this.scrollableElement.getDomNode()),_.appendChild(this.domNode),this.scrollableElement.onScroll(this.onScroll,this,this.disposables),this.disposables.add((0,D.addDisposableListener)(this.rowsContainer,w.EventType.Change,M=>this.onTouchChange(M))),this.disposables.add((0,D.addDisposableListener)(this.scrollableElement.getDomNode(),"scroll",M=>M.target.scrollTop=0)),this.disposables.add((0,D.addDisposableListener)(this.domNode,"dragover",M=>this.onDragOver(this.toDragEvent(M)))),this.disposables.add((0,D.addDisposableListener)(this.domNode,"drop",M=>this.onDrop(this.toDragEvent(M)))),this.disposables.add((0,D.addDisposableListener)(this.domNode,"dragleave",M=>this.onDragLeave(this.toDragEvent(M)))),this.disposables.add((0,D.addDisposableListener)(this.domNode,"dragend",M=>this.onDragEnd(M))),this.setRowLineHeight=(0,n.getOrDefault)(N,M=>M.setRowLineHeight,o.setRowLineHeight),this.setRowHeight=(0,n.getOrDefault)(N,M=>M.setRowHeight,o.setRowHeight),this.supportDynamicHeights=(0,n.getOrDefault)(N,M=>M.supportDynamicHeights,o.supportDynamicHeights),this.dnd=(0,n.getOrDefault)(N,M=>M.dnd,o.dnd),this.layout()}get contentHeight(){return this.rangeMap.size}get horizontalScrolling(){return this._horizontalScrolling}set horizontalScrolling(_){if(_!==this._horizontalScrolling){if(_&&this.supportDynamicHeights)throw new Error("Horizontal scrolling and dynamic heights not supported simultaneously");if(this._horizontalScrolling=_,this.domNode.classList.toggle("horizontal-scrolling",this._horizontalScrolling),this._horizontalScrolling){for(const L of this.items)this.measureItemWidth(L);this.updateScrollWidth(),this.scrollableElement.setScrollDimensions({width:(0,D.getContentWidth)(this.domNode)}),this.rowsContainer.style.width=`${Math.max(this.scrollWidth||0,this.renderWidth)}px`}else this.scrollableElementWidthDelayer.cancel(),this.scrollableElement.setScrollDimensions({width:this.renderWidth,scrollWidth:this.renderWidth}),this.rowsContainer.style.width=""}}updateOptions(_){_.additionalScrollHeight!==void 0&&(this.additionalScrollHeight=_.additionalScrollHeight,this.scrollableElement.setScrollDimensions({scrollHeight:this.scrollHeight})),_.smoothScrolling!==void 0&&this.scrollable.setSmoothScrollDuration(_.smoothScrolling?125:0),_.horizontalScrolling!==void 0&&(this.horizontalScrolling=_.horizontalScrolling),_.mouseWheelScrollSensitivity!==void 0&&this.scrollableElement.updateOptions({mouseWheelScrollSensitivity:_.mouseWheelScrollSensitivity}),_.fastScrollSensitivity!==void 0&&this.scrollableElement.updateOptions({fastScrollSensitivity:_.fastScrollSensitivity})}splice(_,L,E=[]){if(this.splicing)throw new Error("Can't run recursive splices.");this.splicing=!0;try{return this._splice(_,L,E)}finally{this.splicing=!1,this._onDidChangeContentHeight.fire(this.contentHeight)}}_splice(_,L,E=[]){const N=this.getRenderRange(this.lastRenderTop,this.lastRenderHeight),k={start:_,end:_+L},M=l.Range.intersect(N,k),O=new Map;for(let Z=M.end-1;Z>=M.start;Z--){const x=this.items[Z];if(x.dragStartDisposable.dispose(),x.row){let U=O.get(x.templateId);U||(U=[],O.set(x.templateId,U));const Q=this.renderers.get(x.templateId);Q&&Q.disposeElement&&Q.disposeElement(x.element,Z,x.row.templateData,x.size),U.push(x.row)}x.row=null}const B={start:_+L,end:this.items.length},T=l.Range.intersect(B,N),R=l.Range.relativeComplement(B,N),P=E.map(Z=>({id:String(this.itemId++),element:Z,templateId:this.virtualDelegate.getTemplateId(Z),size:this.virtualDelegate.getHeight(Z),width:void 0,hasDynamicHeight:!!this.virtualDelegate.hasDynamicHeight&&this.virtualDelegate.hasDynamicHeight(Z),lastDynamicHeightWidth:void 0,row:null,uri:void 0,dropTarget:!1,dragStartDisposable:i.Disposable.None}));let F;_===0&&L>=this.items.length?(this.rangeMap=new r.RangeMap,this.rangeMap.splice(0,0,P),F=this.items,this.items=P):(this.rangeMap.splice(_,L,P),F=this.items.splice(_,L,...P));const W=E.length-L,A=this.getRenderRange(this.lastRenderTop,this.lastRenderHeight),H=(0,r.shift)(T,W),q=l.Range.intersect(A,H);for(let Z=q.start;Z<q.end;Z++)this.updateItemInDOM(this.items[Z],Z);const X=l.Range.relativeComplement(H,A);for(const Z of X)for(let x=Z.start;x<Z.end;x++)this.removeItemFromDOM(x);const G=R.map(Z=>(0,r.shift)(Z,W)),ae=[{start:_,end:_+E.length},...G].map(Z=>l.Range.intersect(A,Z)),oe=this.getNextToLastElement(ae);for(const Z of ae)for(let x=Z.start;x<Z.end;x++){const U=this.items[x],Q=O.get(U.templateId),ne=Q==null?void 0:Q.pop();this.insertItemInDOM(x,oe,ne)}for(const Z of O.values())for(const x of Z)this.cache.release(x);return this.eventuallyUpdateScrollDimensions(),this.supportDynamicHeights&&this._rerender(this.scrollTop,this.renderHeight),F.map(Z=>Z.element)}eventuallyUpdateScrollDimensions(){this._scrollHeight=this.contentHeight,this.rowsContainer.style.height=`${this._scrollHeight}px`,this.scrollableElementUpdateDisposable||(this.scrollableElementUpdateDisposable=(0,D.scheduleAtNextAnimationFrame)(()=>{this.scrollableElement.setScrollDimensions({scrollHeight:this.scrollHeight}),this.updateScrollWidth(),this.scrollableElementUpdateDisposable=null}))}eventuallyUpdateScrollWidth(){if(!this.horizontalScrolling){this.scrollableElementWidthDelayer.cancel();return}this.scrollableElementWidthDelayer.trigger(()=>this.updateScrollWidth())}updateScrollWidth(){if(!this.horizontalScrolling)return;let _=0;for(const L of this.items)typeof L.width!="undefined"&&(_=Math.max(_,L.width));this.scrollWidth=_,this.scrollableElement.setScrollDimensions({scrollWidth:_===0?0:_+10})}rerender(){if(!!this.supportDynamicHeights){for(const _ of this.items)_.lastDynamicHeightWidth=void 0;this._rerender(this.lastRenderTop,this.lastRenderHeight)}}get length(){return this.items.length}get renderHeight(){return this.scrollableElement.getScrollDimensions().height}element(_){return this.items[_].element}domElement(_){const L=this.items[_].row;return L&&L.domNode}elementHeight(_){return this.items[_].size}elementTop(_){return this.rangeMap.positionAt(_)}indexAt(_){return this.rangeMap.indexAt(_)}indexAfter(_){return this.rangeMap.indexAfter(_)}layout(_,L){let E={height:typeof _=="number"?_:(0,D.getContentHeight)(this.domNode)};this.scrollableElementUpdateDisposable&&(this.scrollableElementUpdateDisposable.dispose(),this.scrollableElementUpdateDisposable=null,E.scrollHeight=this.scrollHeight),this.scrollableElement.setScrollDimensions(E),typeof L!="undefined"&&(this.renderWidth=L,this.supportDynamicHeights&&this._rerender(this.scrollTop,this.renderHeight)),this.horizontalScrolling&&this.scrollableElement.setScrollDimensions({width:typeof L=="number"?L:(0,D.getContentWidth)(this.domNode)})}render(_,L,E,N,k,M=!1){const O=this.getRenderRange(L,E),B=l.Range.relativeComplement(O,_),T=l.Range.relativeComplement(_,O),R=this.getNextToLastElement(B);if(M){const P=l.Range.intersect(_,O);for(let F=P.start;F<P.end;F++)this.updateItemInDOM(this.items[F],F)}for(const P of B)for(let F=P.start;F<P.end;F++)this.insertItemInDOM(F,R);for(const P of T)for(let F=P.start;F<P.end;F++)this.removeItemFromDOM(F);N!==void 0&&(this.rowsContainer.style.left=`-${N}px`),this.rowsContainer.style.top=`-${L}px`,this.horizontalScrolling&&k!==void 0&&(this.rowsContainer.style.width=`${Math.max(k,this.renderWidth)}px`),this.lastRenderTop=L,this.lastRenderHeight=E}insertItemInDOM(_,L,E){const N=this.items[_];N.row||(N.row=E??this.cache.alloc(N.templateId));const k=this.accessibilityProvider.getRole(N.element)||"listitem";N.row.domNode.setAttribute("role",k);const M=this.accessibilityProvider.isChecked(N.element);typeof M!="undefined"&&N.row.domNode.setAttribute("aria-checked",String(!!M)),N.row.domNode.parentElement||(L?this.rowsContainer.insertBefore(N.row.domNode,L):this.rowsContainer.appendChild(N.row.domNode)),this.updateItemInDOM(N,_);const O=this.renderers.get(N.templateId);if(!O)throw new Error(`No renderer found for template id ${N.templateId}`);O&&O.renderElement(N.element,_,N.row.templateData,N.size);const B=this.dnd.getDragURI(N.element);N.dragStartDisposable.dispose(),N.row.domNode.draggable=!!B,B&&(N.dragStartDisposable=(0,D.addDisposableListener)(N.row.domNode,"dragstart",T=>this.onDragStart(N.element,B,T))),this.horizontalScrolling&&(this.measureItemWidth(N),this.eventuallyUpdateScrollWidth())}measureItemWidth(_){if(!_.row||!_.row.domNode)return;_.row.domNode.style.width=y.isFirefox?"-moz-fit-content":"fit-content",_.width=(0,D.getContentWidth)(_.row.domNode);const L=window.getComputedStyle(_.row.domNode);L.paddingLeft&&(_.width+=parseFloat(L.paddingLeft)),L.paddingRight&&(_.width+=parseFloat(L.paddingRight)),_.row.domNode.style.width=""}updateItemInDOM(_,L){_.row.domNode.style.top=`${this.elementTop(L)}px`,this.setRowHeight&&(_.row.domNode.style.height=`${_.size}px`),this.setRowLineHeight&&(_.row.domNode.style.lineHeight=`${_.size}px`),_.row.domNode.setAttribute("data-index",`${L}`),_.row.domNode.setAttribute("data-last-element",L===this.length-1?"true":"false"),_.row.domNode.setAttribute("data-parity",L%2==0?"even":"odd"),_.row.domNode.setAttribute("aria-setsize",String(this.accessibilityProvider.getSetSize(_.element,L,this.length))),_.row.domNode.setAttribute("aria-posinset",String(this.accessibilityProvider.getPosInSet(_.element,L))),_.row.domNode.setAttribute("id",this.getElementDomId(L)),_.row.domNode.classList.toggle("drop-target",_.dropTarget)}removeItemFromDOM(_){const L=this.items[_];if(L.dragStartDisposable.dispose(),L.row){const E=this.renderers.get(L.templateId);E&&E.disposeElement&&E.disposeElement(L.element,_,L.row.templateData,L.size),this.cache.release(L.row),L.row=null}this.horizontalScrolling&&this.eventuallyUpdateScrollWidth()}getScrollTop(){return this.scrollableElement.getScrollPosition().scrollTop}setScrollTop(_,L){this.scrollableElementUpdateDisposable&&(this.scrollableElementUpdateDisposable.dispose(),this.scrollableElementUpdateDisposable=null,this.scrollableElement.setScrollDimensions({scrollHeight:this.scrollHeight})),this.scrollableElement.setScrollPosition({scrollTop:_,reuseAnimation:L})}get scrollTop(){return this.getScrollTop()}set scrollTop(_){this.setScrollTop(_)}get scrollHeight(){return this._scrollHeight+(this.horizontalScrolling?10:0)+this.additionalScrollHeight}get onMouseClick(){return t.Event.map(this.disposables.add(new I.DomEmitter(this.domNode,"click")).event,_=>this.toMouseEvent(_))}get onMouseDblClick(){return t.Event.map(this.disposables.add(new I.DomEmitter(this.domNode,"dblclick")).event,_=>this.toMouseEvent(_))}get onMouseMiddleClick(){return t.Event.filter(t.Event.map(this.disposables.add(new I.DomEmitter(this.domNode,"auxclick")).event,_=>this.toMouseEvent(_)),_=>_.browserEvent.button===1)}get onMouseDown(){return t.Event.map(this.disposables.add(new I.DomEmitter(this.domNode,"mousedown")).event,_=>this.toMouseEvent(_))}get onContextMenu(){return t.Event.any(t.Event.map(this.disposables.add(new I.DomEmitter(this.domNode,"contextmenu")).event,_=>this.toMouseEvent(_)),t.Event.map(this.disposables.add(new I.DomEmitter(this.domNode,w.EventType.Contextmenu)).event,_=>this.toGestureEvent(_)))}get onTouchStart(){return t.Event.map(this.disposables.add(new I.DomEmitter(this.domNode,"touchstart")).event,_=>this.toTouchEvent(_))}get onTap(){return t.Event.map(this.disposables.add(new I.DomEmitter(this.rowsContainer,w.EventType.Tap)).event,_=>this.toGestureEvent(_))}toMouseEvent(_){const L=this.getItemIndexFromEventTarget(_.target||null),E=typeof L=="undefined"?void 0:this.items[L],N=E&&E.element;return{browserEvent:_,index:L,element:N}}toTouchEvent(_){const L=this.getItemIndexFromEventTarget(_.target||null),E=typeof L=="undefined"?void 0:this.items[L],N=E&&E.element;return{browserEvent:_,index:L,element:N}}toGestureEvent(_){const L=this.getItemIndexFromEventTarget(_.initialTarget||null),E=typeof L=="undefined"?void 0:this.items[L],N=E&&E.element;return{browserEvent:_,index:L,element:N}}toDragEvent(_){const L=this.getItemIndexFromEventTarget(_.target||null),E=typeof L=="undefined"?void 0:this.items[L],N=E&&E.element;return{browserEvent:_,index:L,element:N}}onScroll(_){try{const L=this.getRenderRange(this.lastRenderTop,this.lastRenderHeight);this.render(L,_.scrollTop,_.height,_.scrollLeft,_.scrollWidth),this.supportDynamicHeights&&this._rerender(_.scrollTop,_.height,_.inSmoothScrolling)}catch(L){throw console.error("Got bad scroll event:",_),L}}onTouchChange(_){_.preventDefault(),_.stopPropagation(),this.scrollTop-=_.translationY}onDragStart(_,L,E){if(!E.dataTransfer)return;const N=this.dnd.getDragElements(_);if(E.dataTransfer.effectAllowed="copyMove",E.dataTransfer.setData(m.DataTransfers.TEXT,L),E.dataTransfer.setDragImage){let k;this.dnd.getDragLabel&&(k=this.dnd.getDragLabel(N,E)),typeof k=="undefined"&&(k=String(N.length));const M=(0,D.$)(".monaco-drag-image");M.textContent=k,document.body.appendChild(M),E.dataTransfer.setDragImage(M,-10,-10),setTimeout(()=>document.body.removeChild(M),0)}this.currentDragData=new a(N),m.StaticDND.CurrentDragAndDropData=new d(N),this.dnd.onDragStart&&this.dnd.onDragStart(this.currentDragData,E)}onDragOver(_){if(_.browserEvent.preventDefault(),this.onDragLeaveTimeout.dispose(),m.StaticDND.CurrentDragAndDropData&&m.StaticDND.CurrentDragAndDropData.getData()==="vscode-ui"||(this.setupDragAndDropScrollTopAnimation(_.browserEvent),!_.browserEvent.dataTransfer))return!1;if(!this.currentDragData)if(m.StaticDND.CurrentDragAndDropData)this.currentDragData=m.StaticDND.CurrentDragAndDropData;else{if(!_.browserEvent.dataTransfer.types)return!1;this.currentDragData=new u}const L=this.dnd.onDragOver(this.currentDragData,_.element,_.index,_.browserEvent);if(this.canDrop=typeof L=="boolean"?L:L.accept,!this.canDrop)return this.currentDragFeedback=void 0,this.currentDragFeedbackDisposable.dispose(),!1;_.browserEvent.dataTransfer.dropEffect=typeof L!="boolean"&&L.effect===0?"copy":"move";let E;if(typeof L!="boolean"&&L.feedback?E=L.feedback:typeof _.index=="undefined"?E=[-1]:E=[_.index],E=(0,p.distinct)(E).filter(N=>N>=-1&&N<this.length).sort((N,k)=>N-k),E=E[0]===-1?[-1]:E,f(this.currentDragFeedback,E))return!0;if(this.currentDragFeedback=E,this.currentDragFeedbackDisposable.dispose(),E[0]===-1)this.domNode.classList.add("drop-target"),this.rowsContainer.classList.add("drop-target"),this.currentDragFeedbackDisposable=(0,i.toDisposable)(()=>{this.domNode.classList.remove("drop-target"),this.rowsContainer.classList.remove("drop-target")});else{for(const N of E){const k=this.items[N];k.dropTarget=!0,k.row&&k.row.domNode.classList.add("drop-target")}this.currentDragFeedbackDisposable=(0,i.toDisposable)(()=>{for(const N of E){const k=this.items[N];k.dropTarget=!1,k.row&&k.row.domNode.classList.remove("drop-target")}})}return!0}onDragLeave(_){var L,E;this.onDragLeaveTimeout.dispose(),this.onDragLeaveTimeout=(0,h.disposableTimeout)(()=>this.clearDragOverFeedback(),100),this.currentDragData&&((E=(L=this.dnd).onDragLeave)===null||E===void 0||E.call(L,this.currentDragData,_.element,_.index,_.browserEvent))}onDrop(_){if(!this.canDrop)return;const L=this.currentDragData;this.teardownDragAndDropScrollTopAnimation(),this.clearDragOverFeedback(),this.currentDragData=void 0,m.StaticDND.CurrentDragAndDropData=void 0,!(!L||!_.browserEvent.dataTransfer)&&(_.browserEvent.preventDefault(),L.update(_.browserEvent.dataTransfer),this.dnd.drop(L,_.element,_.index,_.browserEvent))}onDragEnd(_){this.canDrop=!1,this.teardownDragAndDropScrollTopAnimation(),this.clearDragOverFeedback(),this.currentDragData=void 0,m.StaticDND.CurrentDragAndDropData=void 0,this.dnd.onDragEnd&&this.dnd.onDragEnd(_)}clearDragOverFeedback(){this.currentDragFeedback=void 0,this.currentDragFeedbackDisposable.dispose(),this.currentDragFeedbackDisposable=i.Disposable.None}setupDragAndDropScrollTopAnimation(_){if(!this.dragOverAnimationDisposable){const L=(0,D.getTopLeftOffset)(this.domNode).top;this.dragOverAnimationDisposable=(0,D.animate)(this.animateDragAndDropScrollTop.bind(this,L))}this.dragOverAnimationStopDisposable.dispose(),this.dragOverAnimationStopDisposable=(0,h.disposableTimeout)(()=>{this.dragOverAnimationDisposable&&(this.dragOverAnimationDisposable.dispose(),this.dragOverAnimationDisposable=void 0)},1e3),this.dragOverMouseY=_.pageY}animateDragAndDropScrollTop(_){if(this.dragOverMouseY===void 0)return;const L=this.dragOverMouseY-_,E=this.renderHeight-35;L<35?this.scrollTop+=Math.max(-14,Math.floor(.3*(L-35))):L>E&&(this.scrollTop+=Math.min(14,Math.floor(.3*(L-E))))}teardownDragAndDropScrollTopAnimation(){this.dragOverAnimationStopDisposable.dispose(),this.dragOverAnimationDisposable&&(this.dragOverAnimationDisposable.dispose(),this.dragOverAnimationDisposable=void 0)}getItemIndexFromEventTarget(_){const L=this.scrollableElement.getDomNode();let E=_;for(;E instanceof HTMLElement&&E!==this.rowsContainer&&L.contains(E);){const N=E.getAttribute("data-index");if(N){const k=Number(N);if(!isNaN(k))return k}E=E.parentElement}}getRenderRange(_,L){return{start:this.rangeMap.indexAt(_),end:this.rangeMap.indexAfter(_+L-1)}}_rerender(_,L,E){const N=this.getRenderRange(_,L);let k,M;_===this.elementTop(N.start)?(k=N.start,M=0):N.end-N.start>1&&(k=N.start+1,M=this.elementTop(k)-_);let O=0;for(;;){const B=this.getRenderRange(_,L);let T=!1;for(let R=B.start;R<B.end;R++){const P=this.probeDynamicHeight(R);P!==0&&this.rangeMap.splice(R,1,[this.items[R]]),O+=P,T=T||P!==0}if(!T){O!==0&&this.eventuallyUpdateScrollDimensions();const R=l.Range.relativeComplement(N,B);for(const F of R)for(let W=F.start;W<F.end;W++)this.items[W].row&&this.removeItemFromDOM(W);const P=l.Range.relativeComplement(B,N);for(const F of P)for(let W=F.start;W<F.end;W++){const A=W+1,H=A<this.items.length?this.items[A].row:null,q=H?H.domNode:null;this.insertItemInDOM(W,q)}for(let F=B.start;F<B.end;F++)this.items[F].row&&this.updateItemInDOM(this.items[F],F);if(typeof k=="number"){const F=this.scrollable.getFutureScrollPosition().scrollTop-_,W=this.elementTop(k)-M+F;this.setScrollTop(W,E)}this._onDidChangeContentHeight.fire(this.contentHeight);return}}}probeDynamicHeight(_){const L=this.items[_];if(this.virtualDelegate.getDynamicHeight){const M=this.virtualDelegate.getDynamicHeight(L.element);if(M!==null){const O=L.size;return L.size=M,L.lastDynamicHeightWidth=this.renderWidth,M-O}}if(!L.hasDynamicHeight||L.lastDynamicHeightWidth===this.renderWidth||!!this.virtualDelegate.hasDynamicHeight&&!this.virtualDelegate.hasDynamicHeight(L.element))return 0;const E=L.size;if(!this.setRowHeight&&L.row){let M=L.row.domNode.offsetHeight;return L.size=M,L.lastDynamicHeightWidth=this.renderWidth,M-E}const N=this.cache.alloc(L.templateId);N.domNode.style.height="",this.rowsContainer.appendChild(N.domNode);const k=this.renderers.get(L.templateId);return k&&(k.renderElement(L.element,_,N.templateData,void 0),k.disposeElement&&k.disposeElement(L.element,_,N.templateData,void 0)),L.size=N.domNode.offsetHeight,this.virtualDelegate.setDynamicHeight&&this.virtualDelegate.setDynamicHeight(L.element,L.size),L.lastDynamicHeightWidth=this.renderWidth,this.rowsContainer.removeChild(N.domNode),this.cache.release(N),L.size-E}getNextToLastElement(_){const L=_[_.length-1];if(!L)return null;const E=this.items[L.end];return!E||!E.row?null:E.row.domNode}getElementDomId(_){return`${this.domId}_${_}`}dispose(){if(this.items){for(const _ of this.items)if(_.row){const L=this.renderers.get(_.row.templateId);L&&(L.disposeElement&&L.disposeElement(_.element,-1,_.row.templateData,void 0),L.disposeTemplate(_.row.templateData))}this.items=[]}this.domNode&&this.domNode.parentNode&&this.domNode.parentNode.removeChild(this.domNode),(0,i.dispose)(this.disposables)}}v.InstanceCount=0,Ie([g.memoize],v.prototype,"onMouseClick",null),Ie([g.memoize],v.prototype,"onMouseDblClick",null),Ie([g.memoize],v.prototype,"onMouseMiddleClick",null),Ie([g.memoize],v.prototype,"onMouseDown",null),Ie([g.memoize],v.prototype,"onContextMenu",null),Ie([g.memoize],v.prototype,"onTouchStart",null),Ie([g.memoize],v.prototype,"onTap",null),e.ListView=v}),define(te[115],ie([1,0,7,89,46,57,43,308,19,10,29,93,4,73,2,111,39,17,20,307,173,226]),function(j,e,y,m,D,I,w,b,p,h,g,t,i,n,l,c,r,s,o,a,d){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.List=e.DefaultStyleController=e.MouseController=e.isSelectionRangeChangeEvent=e.isSelectionSingleChangeEvent=e.DefaultKeyboardNavigationDelegate=e.isMonacoEditor=e.isInputElement=void 0;class u{constructor(x){this.trait=x,this.renderedElements=[]}get templateId(){return`template:${this.trait.trait}`}renderTemplate(x){return x}renderElement(x,U,Q){const ne=this.renderedElements.findIndex(ce=>ce.templateData===Q);if(ne>=0){const ce=this.renderedElements[ne];this.trait.unrender(Q),ce.index=U}else{const ce={index:U,templateData:Q};this.renderedElements.push(ce)}this.trait.renderIndex(U,Q)}splice(x,U,Q){const ne=[];for(const ce of this.renderedElements)ce.index<x?ne.push(ce):ce.index>=x+U&&ne.push({index:ce.index+Q-U,templateData:ce.templateData});this.renderedElements=ne}renderIndexes(x){for(const{index:U,templateData:Q}of this.renderedElements)x.indexOf(U)>-1&&this.trait.renderIndex(U,Q)}disposeTemplate(x){const U=this.renderedElements.findIndex(Q=>Q.templateData===x);U<0||this.renderedElements.splice(U,1)}}class f{constructor(x){this._trait=x,this.length=0,this.indexes=[],this.sortedIndexes=[],this._onChange=new i.Emitter,this.onChange=this._onChange.event}get trait(){return this._trait}get renderer(){return new u(this)}splice(x,U,Q){var ne;U=Math.max(0,Math.min(U,this.length-x));const ce=Q.length-U,ee=x+U,ue=[...this.sortedIndexes.filter(V=>V<x),...Q.map((V,$)=>V?$+x:-1).filter(V=>V!==-1),...this.sortedIndexes.filter(V=>V>=ee).map(V=>V+ce)],z=this.length+ce;if(this.sortedIndexes.length>0&&ue.length===0&&z>0){const V=(ne=this.sortedIndexes.find($=>$>=x))!==null&&ne!==void 0?ne:z-1;ue.push(Math.min(V,z-1))}this.renderer.splice(x,U,Q.length),this._set(ue,ue),this.length=z}renderIndex(x,U){U.classList.toggle(this._trait,this.contains(x))}unrender(x){x.classList.remove(this._trait)}set(x,U){return this._set(x,[...x].sort(X),U)}_set(x,U,Q){const ne=this.indexes,ce=this.sortedIndexes;this.indexes=x,this.sortedIndexes=U;const ee=H(ce,x);return this.renderer.renderIndexes(ee),this._onChange.fire({indexes:x,browserEvent:Q}),ne}get(){return this.indexes}contains(x){return(0,p.binarySearch)(this.sortedIndexes,x,X)>=0}dispose(){(0,l.dispose)(this._onChange)}}Ie([t.memoize],f.prototype,"renderer",null);class S extends f{constructor(x){super("selected");this.setAriaSelected=x}renderIndex(x,U){super.renderIndex(x,U),this.setAriaSelected&&(this.contains(x)?U.setAttribute("aria-selected","true"):U.setAttribute("aria-selected","false"))}}class v{constructor(x,U,Q){this.trait=x,this.view=U,this.identityProvider=Q}splice(x,U,Q){if(!this.identityProvider)return this.trait.splice(x,U,Q.map(()=>!1));const ne=this.trait.get().map(ee=>this.identityProvider.getId(this.view.element(ee)).toString()),ce=Q.map(ee=>ne.indexOf(this.identityProvider.getId(ee).toString())>-1);this.trait.splice(x,U,ce)}}function C(Z){return Z.tagName==="INPUT"||Z.tagName==="TEXTAREA"}e.isInputElement=C;function _(Z){return Z.classList.contains("monaco-editor")?!0:Z.classList.contains("monaco-list")||!Z.parentElement?!1:_(Z.parentElement)}e.isMonacoEditor=_;class L{constructor(x,U,Q){this.list=x,this.view=U,this.disposables=new l.DisposableStore,this.multipleSelectionDisposables=new l.DisposableStore,this.onKeyDown.filter(ne=>ne.keyCode===3).on(this.onEnter,this,this.disposables),this.onKeyDown.filter(ne=>ne.keyCode===16).on(this.onUpArrow,this,this.disposables),this.onKeyDown.filter(ne=>ne.keyCode===18).on(this.onDownArrow,this,this.disposables),this.onKeyDown.filter(ne=>ne.keyCode===11).on(this.onPageUpArrow,this,this.disposables),this.onKeyDown.filter(ne=>ne.keyCode===12).on(this.onPageDownArrow,this,this.disposables),this.onKeyDown.filter(ne=>ne.keyCode===9).on(this.onEscape,this,this.disposables),Q.multipleSelectionSupport!==!1&&this.onKeyDown.filter(ne=>(s.isMacintosh?ne.metaKey:ne.ctrlKey)&&ne.keyCode===31).on(this.onCtrlA,this,this.multipleSelectionDisposables)}get onKeyDown(){return i.Event.chain(this.disposables.add(new m.DomEmitter(this.view.domNode,"keydown")).event).filter(x=>!C(x.target)).map(x=>new D.StandardKeyboardEvent(x))}updateOptions(x){x.multipleSelectionSupport!==void 0&&(this.multipleSelectionDisposables.clear(),x.multipleSelectionSupport&&this.onKeyDown.filter(U=>(s.isMacintosh?U.metaKey:U.ctrlKey)&&U.keyCode===31).on(this.onCtrlA,this,this.multipleSelectionDisposables))}onEnter(x){x.preventDefault(),x.stopPropagation(),this.list.setSelection(this.list.getFocus(),x.browserEvent)}onUpArrow(x){x.preventDefault(),x.stopPropagation(),this.list.focusPrevious(1,!1,x.browserEvent);const U=this.list.getFocus()[0];this.list.setAnchor(U),this.list.reveal(U),this.view.domNode.focus()}onDownArrow(x){x.preventDefault(),x.stopPropagation(),this.list.focusNext(1,!1,x.browserEvent);const U=this.list.getFocus()[0];this.list.setAnchor(U),this.list.reveal(U),this.view.domNode.focus()}onPageUpArrow(x){x.preventDefault(),x.stopPropagation(),this.list.focusPreviousPage(x.browserEvent);const U=this.list.getFocus()[0];this.list.setAnchor(U),this.list.reveal(U),this.view.domNode.focus()}onPageDownArrow(x){x.preventDefault(),x.stopPropagation(),this.list.focusNextPage(x.browserEvent);const U=this.list.getFocus()[0];this.list.setAnchor(U),this.list.reveal(U),this.view.domNode.focus()}onCtrlA(x){x.preventDefault(),x.stopPropagation(),this.list.setSelection((0,p.range)(this.list.length),x.browserEvent),this.list.setAnchor(void 0),this.view.domNode.focus()}onEscape(x){this.list.getSelection().length&&(x.preventDefault(),x.stopPropagation(),this.list.setSelection([],x.browserEvent),this.list.setAnchor(void 0),this.view.domNode.focus())}dispose(){this.disposables.dispose(),this.multipleSelectionDisposables.dispose()}}Ie([t.memoize],L.prototype,"onKeyDown",null);var E;(function(Z){Z[Z.Idle=0]="Idle",Z[Z.Typing=1]="Typing"})(E||(E={})),e.DefaultKeyboardNavigationDelegate=new class{mightProducePrintableCharacter(Z){return Z.ctrlKey||Z.metaKey||Z.altKey?!1:Z.keyCode>=31&&Z.keyCode<=56||Z.keyCode>=21&&Z.keyCode<=30||Z.keyCode>=93&&Z.keyCode<=102||Z.keyCode>=80&&Z.keyCode<=90}};class N{constructor(x,U,Q,ne){this.list=x,this.view=U,this.keyboardNavigationLabelProvider=Q,this.delegate=ne,this.enabled=!1,this.state=E.Idle,this.automaticKeyboardNavigation=!0,this.triggered=!1,this.previouslyFocused=-1,this.enabledDisposables=new l.DisposableStore,this.disposables=new l.DisposableStore,this.updateOptions(x.options)}updateOptions(x){(typeof x.enableKeyboardNavigation=="undefined"?!0:!!x.enableKeyboardNavigation)?this.enable():this.disable(),typeof x.automaticKeyboardNavigation!="undefined"&&(this.automaticKeyboardNavigation=x.automaticKeyboardNavigation)}enable(){if(this.enabled)return;const x=i.Event.chain(this.enabledDisposables.add(new m.DomEmitter(this.view.domNode,"keydown")).event).filter(ne=>!C(ne.target)).filter(()=>this.automaticKeyboardNavigation||this.triggered).map(ne=>new D.StandardKeyboardEvent(ne)).filter(ne=>this.delegate.mightProducePrintableCharacter(ne)).forEach(ne=>ne.preventDefault()).map(ne=>ne.browserEvent.key).event,U=i.Event.debounce(x,()=>null,800);i.Event.reduce(i.Event.any(x,U),(ne,ce)=>ce===null?null:(ne||"")+ce)(this.onInput,this,this.enabledDisposables),U(this.onClear,this,this.enabledDisposables),this.enabled=!0,this.triggered=!1}disable(){!this.enabled||(this.enabledDisposables.clear(),this.enabled=!1,this.triggered=!1)}onClear(){var x;const U=this.list.getFocus();if(U.length>0&&U[0]===this.previouslyFocused){const Q=(x=this.list.options.accessibilityProvider)===null||x===void 0?void 0:x.getAriaLabel(this.list.element(U[0]));Q&&(0,w.alert)(Q)}this.previouslyFocused=-1}onInput(x){if(!x){this.state=E.Idle,this.triggered=!1;return}const U=this.list.getFocus(),Q=U.length>0?U[0]:0,ne=this.state===E.Idle?1:0;this.state=E.Typing;for(let ce=0;ce<this.list.length;ce++){const ee=(Q+ce+ne)%this.list.length,ue=this.keyboardNavigationLabelProvider.getKeyboardNavigationLabel(this.view.element(ee)),z=ue&&ue.toString();if(typeof z=="undefined"||(0,n.matchesPrefix)(x,z)){this.previouslyFocused=Q,this.list.setFocus([ee]),this.list.reveal(ee);return}}}dispose(){this.disable(),this.enabledDisposables.dispose(),this.disposables.dispose()}}class k{constructor(x,U){this.list=x,this.view=U,this.disposables=new l.DisposableStore,i.Event.chain(this.disposables.add(new m.DomEmitter(U.domNode,"keydown")).event).filter(ne=>!C(ne.target)).map(ne=>new D.StandardKeyboardEvent(ne)).filter(ne=>ne.keyCode===2&&!ne.ctrlKey&&!ne.metaKey&&!ne.shiftKey&&!ne.altKey).on(this.onTab,this,this.disposables)}onTab(x){if(x.target!==this.view.domNode)return;const U=this.list.getFocus();if(U.length===0)return;const Q=this.view.domElement(U[0]);if(!Q)return;const ne=Q.querySelector("[tabIndex]");if(!ne||!(ne instanceof HTMLElement)||ne.tabIndex===-1)return;const ce=window.getComputedStyle(ne);ce.visibility==="hidden"||ce.display==="none"||(x.preventDefault(),x.stopPropagation(),ne.focus())}dispose(){this.disposables.dispose()}}function M(Z){return s.isMacintosh?Z.browserEvent.metaKey:Z.browserEvent.ctrlKey}e.isSelectionSingleChangeEvent=M;function O(Z){return Z.browserEvent.shiftKey}e.isSelectionRangeChangeEvent=O;function B(Z){return Z instanceof MouseEvent&&Z.button===2}const T={isSelectionSingleChangeEvent:M,isSelectionRangeChangeEvent:O};class R{constructor(x){this.list=x,this.disposables=new l.DisposableStore,this._onPointer=new i.Emitter,this.onPointer=this._onPointer.event,x.options.multipleSelectionSupport!==!1&&(this.multipleSelectionController=this.list.options.multipleSelectionController||T),this.mouseSupport=typeof x.options.mouseSupport=="undefined"||!!x.options.mouseSupport,this.mouseSupport&&(x.onMouseDown(this.onMouseDown,this,this.disposables),x.onContextMenu(this.onContextMenu,this,this.disposables),x.onMouseDblClick(this.onDoubleClick,this,this.disposables),x.onTouchStart(this.onMouseDown,this,this.disposables),this.disposables.add(I.Gesture.addTarget(x.getHTMLElement()))),i.Event.any(x.onMouseClick,x.onMouseMiddleClick,x.onTap)(this.onViewPointer,this,this.disposables)}updateOptions(x){x.multipleSelectionSupport!==void 0&&(this.multipleSelectionController=void 0,x.multipleSelectionSupport&&(this.multipleSelectionController=this.list.options.multipleSelectionController||T))}isSelectionSingleChangeEvent(x){return this.multipleSelectionController?this.multipleSelectionController.isSelectionSingleChangeEvent(x):!1}isSelectionRangeChangeEvent(x){return this.multipleSelectionController?this.multipleSelectionController.isSelectionRangeChangeEvent(x):!1}isSelectionChangeEvent(x){return this.isSelectionSingleChangeEvent(x)||this.isSelectionRangeChangeEvent(x)}onMouseDown(x){_(x.browserEvent.target)||document.activeElement!==x.browserEvent.target&&this.list.domFocus()}onContextMenu(x){if(_(x.browserEvent.target))return;const U=typeof x.index=="undefined"?[]:[x.index];this.list.setFocus(U,x.browserEvent)}onViewPointer(x){if(!this.mouseSupport||C(x.browserEvent.target)||_(x.browserEvent.target))return;const U=x.index;if(typeof U=="undefined"){this.list.setFocus([],x.browserEvent),this.list.setSelection([],x.browserEvent),this.list.setAnchor(void 0);return}if(this.isSelectionRangeChangeEvent(x))return this.changeSelection(x);if(this.isSelectionChangeEvent(x))return this.changeSelection(x);this.list.setFocus([U],x.browserEvent),this.list.setAnchor(U),B(x.browserEvent)||this.list.setSelection([U],x.browserEvent),this._onPointer.fire(x)}onDoubleClick(x){if(C(x.browserEvent.target)||_(x.browserEvent.target)||this.isSelectionChangeEvent(x))return;const U=this.list.getFocus();this.list.setSelection(U,x.browserEvent)}changeSelection(x){const U=x.index;let Q=this.list.getAnchor();if(this.isSelectionRangeChangeEvent(x)){if(typeof Q=="undefined"){const $=this.list.getFocus()[0];Q=$??U,this.list.setAnchor(Q)}const ne=Math.min(Q,U),ce=Math.max(Q,U),ee=(0,p.range)(ne,ce+1),ue=this.list.getSelection(),z=A(H(ue,[Q]),Q);if(z.length===0)return;const V=H(ee,q(ue,z));this.list.setSelection(V,x.browserEvent),this.list.setFocus([U],x.browserEvent)}else if(this.isSelectionSingleChangeEvent(x)){const ne=this.list.getSelection(),ce=ne.filter(ee=>ee!==U);this.list.setFocus([U]),this.list.setAnchor(U),ne.length===ce.length?this.list.setSelection([...ce,U],x.browserEvent):this.list.setSelection(ce,x.browserEvent)}}dispose(){this.disposables.dispose()}}e.MouseController=R;class P{constructor(x,U){this.styleElement=x,this.selectorSuffix=U}style(x){const U=this.selectorSuffix&&`.${this.selectorSuffix}`,Q=[];x.listBackground&&(x.listBackground.isOpaque()?Q.push(`.monaco-list${U} .monaco-list-rows { background: ${x.listBackground}; }`):s.isMacintosh||console.warn(`List with id '${this.selectorSuffix}' was styled with a non-opaque background color. This will break sub-pixel antialiasing.`)),x.listFocusBackground&&(Q.push(`.monaco-list${U}:focus .monaco-list-row.focused { background-color: ${x.listFocusBackground}; }`),Q.push(`.monaco-list${U}:focus .monaco-list-row.focused:hover { background-color: ${x.listFocusBackground}; }`)),x.listFocusForeground&&Q.push(`.monaco-list${U}:focus .monaco-list-row.focused { color: ${x.listFocusForeground}; }`),x.listActiveSelectionBackground&&(Q.push(`.monaco-list${U}:focus .monaco-list-row.selected { background-color: ${x.listActiveSelectionBackground}; }`),Q.push(`.monaco-list${U}:focus .monaco-list-row.selected:hover { background-color: ${x.listActiveSelectionBackground}; }`)),x.listActiveSelectionForeground&&Q.push(`.monaco-list${U}:focus .monaco-list-row.selected { color: ${x.listActiveSelectionForeground}; }`),x.listActiveSelectionIconForeground&&Q.push(`.monaco-list${U}:focus .monaco-list-row.selected .codicon { color: ${x.listActiveSelectionIconForeground}; }`),x.listFocusAndSelectionBackground&&Q.push(`
|
||
.monaco-drag-image,
|
||
.monaco-list${U}:focus .monaco-list-row.selected.focused { background-color: ${x.listFocusAndSelectionBackground}; }
|
||
`),x.listFocusAndSelectionForeground&&Q.push(`
|
||
.monaco-drag-image,
|
||
.monaco-list${U}:focus .monaco-list-row.selected.focused { color: ${x.listFocusAndSelectionForeground}; }
|
||
`),x.listInactiveFocusForeground&&(Q.push(`.monaco-list${U} .monaco-list-row.focused { color: ${x.listInactiveFocusForeground}; }`),Q.push(`.monaco-list${U} .monaco-list-row.focused:hover { color: ${x.listInactiveFocusForeground}; }`)),x.listInactiveSelectionIconForeground&&Q.push(`.monaco-list${U} .monaco-list-row.focused .codicon { color: ${x.listInactiveSelectionIconForeground}; }`),x.listInactiveFocusBackground&&(Q.push(`.monaco-list${U} .monaco-list-row.focused { background-color: ${x.listInactiveFocusBackground}; }`),Q.push(`.monaco-list${U} .monaco-list-row.focused:hover { background-color: ${x.listInactiveFocusBackground}; }`)),x.listInactiveSelectionBackground&&(Q.push(`.monaco-list${U} .monaco-list-row.selected { background-color: ${x.listInactiveSelectionBackground}; }`),Q.push(`.monaco-list${U} .monaco-list-row.selected:hover { background-color: ${x.listInactiveSelectionBackground}; }`)),x.listInactiveSelectionForeground&&Q.push(`.monaco-list${U} .monaco-list-row.selected { color: ${x.listInactiveSelectionForeground}; }`),x.listHoverBackground&&Q.push(`.monaco-list${U}:not(.drop-target) .monaco-list-row:hover:not(.selected):not(.focused) { background-color: ${x.listHoverBackground}; }`),x.listHoverForeground&&Q.push(`.monaco-list${U} .monaco-list-row:hover:not(.selected):not(.focused) { color: ${x.listHoverForeground}; }`),x.listSelectionOutline&&Q.push(`.monaco-list${U} .monaco-list-row.selected { outline: 1px dotted ${x.listSelectionOutline}; outline-offset: -1px; }`),x.listFocusOutline&&Q.push(`
|
||
.monaco-drag-image,
|
||
.monaco-list${U}:focus .monaco-list-row.focused { outline: 1px solid ${x.listFocusOutline}; outline-offset: -1px; }
|
||
.monaco-workbench.context-menu-visible .monaco-list${U}.last-focused .monaco-list-row.focused { outline: 1px solid ${x.listFocusOutline}; outline-offset: -1px; }
|
||
`),x.listInactiveFocusOutline&&Q.push(`.monaco-list${U} .monaco-list-row.focused { outline: 1px dotted ${x.listInactiveFocusOutline}; outline-offset: -1px; }`),x.listHoverOutline&&Q.push(`.monaco-list${U} .monaco-list-row:hover { outline: 1px dashed ${x.listHoverOutline}; outline-offset: -1px; }`),x.listDropBackground&&Q.push(`
|
||
.monaco-list${U}.drop-target,
|
||
.monaco-list${U} .monaco-list-rows.drop-target,
|
||
.monaco-list${U} .monaco-list-row.drop-target { background-color: ${x.listDropBackground} !important; color: inherit !important; }
|
||
`),x.listFilterWidgetBackground&&Q.push(`.monaco-list-type-filter { background-color: ${x.listFilterWidgetBackground} }`),x.listFilterWidgetOutline&&Q.push(`.monaco-list-type-filter { border: 1px solid ${x.listFilterWidgetOutline}; }`),x.listFilterWidgetNoMatchesOutline&&Q.push(`.monaco-list-type-filter.no-matches { border: 1px solid ${x.listFilterWidgetNoMatchesOutline}; }`),x.listMatchesShadow&&Q.push(`.monaco-list-type-filter { box-shadow: 1px 1px 1px ${x.listMatchesShadow}; }`),x.tableColumnsBorder&&Q.push(`
|
||
.monaco-table:hover > .monaco-split-view2,
|
||
.monaco-table:hover > .monaco-split-view2 .monaco-sash.vertical::before {
|
||
border-color: ${x.tableColumnsBorder};
|
||
}`),x.tableOddRowsBackgroundColor&&Q.push(`
|
||
.monaco-table .monaco-list-row[data-parity=odd]:not(.focused):not(.selected):not(:hover) .monaco-table-tr,
|
||
.monaco-table .monaco-list:not(:focus) .monaco-list-row[data-parity=odd].focused:not(.selected):not(:hover) .monaco-table-tr,
|
||
.monaco-table .monaco-list:not(.focused) .monaco-list-row[data-parity=odd].focused:not(.selected):not(:hover) .monaco-table-tr {
|
||
background-color: ${x.tableOddRowsBackgroundColor};
|
||
}
|
||
`),this.styleElement.textContent=Q.join(`
|
||
`)}}e.DefaultStyleController=P;const F={listFocusBackground:g.Color.fromHex("#7FB0D0"),listActiveSelectionBackground:g.Color.fromHex("#0E639C"),listActiveSelectionForeground:g.Color.fromHex("#FFFFFF"),listActiveSelectionIconForeground:g.Color.fromHex("#FFFFFF"),listFocusAndSelectionBackground:g.Color.fromHex("#094771"),listFocusAndSelectionForeground:g.Color.fromHex("#FFFFFF"),listInactiveSelectionBackground:g.Color.fromHex("#3F3F46"),listInactiveSelectionIconForeground:g.Color.fromHex("#FFFFFF"),listHoverBackground:g.Color.fromHex("#2A2D2E"),listDropBackground:g.Color.fromHex("#383B3D"),treeIndentGuidesStroke:g.Color.fromHex("#a9a9a9"),tableColumnsBorder:g.Color.fromHex("#cccccc").transparent(.2),tableOddRowsBackgroundColor:g.Color.fromHex("#cccccc").transparent(.04)},W={keyboardSupport:!0,mouseSupport:!0,multipleSelectionSupport:!0,dnd:{getDragURI(){return null},onDragStart(){},onDragOver(){return!1},drop(){}}};function A(Z,x){const U=Z.indexOf(x);if(U===-1)return[];const Q=[];let ne=U-1;for(;ne>=0&&Z[ne]===x-(U-ne);)Q.push(Z[ne--]);for(Q.reverse(),ne=U;ne<Z.length&&Z[ne]===x+(ne-U);)Q.push(Z[ne++]);return Q}function H(Z,x){const U=[];let Q=0,ne=0;for(;Q<Z.length||ne<x.length;)if(Q>=Z.length)U.push(x[ne++]);else if(ne>=x.length)U.push(Z[Q++]);else if(Z[Q]===x[ne]){U.push(Z[Q]),Q++,ne++;continue}else Z[Q]<x[ne]?U.push(Z[Q++]):U.push(x[ne++]);return U}function q(Z,x){const U=[];let Q=0,ne=0;for(;Q<Z.length||ne<x.length;)if(Q>=Z.length)U.push(x[ne++]);else if(ne>=x.length)U.push(Z[Q++]);else if(Z[Q]===x[ne]){Q++,ne++;continue}else Z[Q]<x[ne]?U.push(Z[Q++]):ne++;return U}const X=(Z,x)=>Z-x;class G{constructor(x,U){this._templateId=x,this.renderers=U}get templateId(){return this._templateId}renderTemplate(x){return this.renderers.map(U=>U.renderTemplate(x))}renderElement(x,U,Q,ne){let ce=0;for(const ee of this.renderers)ee.renderElement(x,U,Q[ce++],ne)}disposeElement(x,U,Q,ne){let ce=0;for(const ee of this.renderers)ee.disposeElement&&ee.disposeElement(x,U,Q[ce],ne),ce+=1}disposeTemplate(x){let U=0;for(const Q of this.renderers)Q.disposeTemplate(x[U++])}}class re{constructor(x){this.accessibilityProvider=x,this.templateId="a18n"}renderTemplate(x){return x}renderElement(x,U,Q){const ne=this.accessibilityProvider.getAriaLabel(x);ne?Q.setAttribute("aria-label",ne):Q.removeAttribute("aria-label");const ce=this.accessibilityProvider.getAriaLevel&&this.accessibilityProvider.getAriaLevel(x);typeof ce=="number"?Q.setAttribute("aria-level",`${ce}`):Q.removeAttribute("aria-level")}disposeTemplate(x){}}class ae{constructor(x,U){this.list=x,this.dnd=U}getDragElements(x){const U=this.list.getSelectedElements();return U.indexOf(x)>-1?U:[x]}getDragURI(x){return this.dnd.getDragURI(x)}getDragLabel(x,U){if(this.dnd.getDragLabel)return this.dnd.getDragLabel(x,U)}onDragStart(x,U){this.dnd.onDragStart&&this.dnd.onDragStart(x,U)}onDragOver(x,U,Q,ne){return this.dnd.onDragOver(x,U,Q,ne)}onDragLeave(x,U,Q,ne){var ce,ee;(ee=(ce=this.dnd).onDragLeave)===null||ee===void 0||ee.call(ce,x,U,Q,ne)}onDragEnd(x){this.dnd.onDragEnd&&this.dnd.onDragEnd(x)}drop(x,U,Q,ne){this.dnd.drop(x,U,Q,ne)}}class oe{constructor(x,U,Q,ne,ce=W){var ee;this.user=x,this._options=ce,this.focus=new f("focused"),this.anchor=new f("anchor"),this.eventBufferer=new i.EventBufferer,this._ariaLabel="",this.disposables=new l.DisposableStore,this._onDidDispose=new i.Emitter,this.onDidDispose=this._onDidDispose.event;const ue=this._options.accessibilityProvider&&this._options.accessibilityProvider.getWidgetRole?(ee=this._options.accessibilityProvider)===null||ee===void 0?void 0:ee.getWidgetRole():"list";this.selection=new S(ue!=="listbox"),(0,r.mixin)(ce,F,!1);const z=[this.focus.renderer,this.selection.renderer];this.accessibilityProvider=ce.accessibilityProvider,this.accessibilityProvider&&(z.push(new re(this.accessibilityProvider)),this.accessibilityProvider.onDidChangeActiveDescendant&&this.accessibilityProvider.onDidChangeActiveDescendant(this.onDidChangeActiveDescendant,this,this.disposables)),ne=ne.map($=>new G($.templateId,[...z,$]));const V=Object.assign(Object.assign({},ce),{dnd:ce.dnd&&new ae(this,ce.dnd)});if(this.view=new d.ListView(U,Q,ne,V),this.view.domNode.setAttribute("role",ue),ce.styleController)this.styleController=ce.styleController(this.view.domId);else{const $=(0,y.createStyleSheet)(this.view.domNode);this.styleController=new P($,this.view.domId)}if(this.spliceable=new b.CombinedSpliceable([new v(this.focus,this.view,ce.identityProvider),new v(this.selection,this.view,ce.identityProvider),new v(this.anchor,this.view,ce.identityProvider),this.view]),this.disposables.add(this.focus),this.disposables.add(this.selection),this.disposables.add(this.anchor),this.disposables.add(this.view),this.disposables.add(this._onDidDispose),this.disposables.add(new k(this,this.view)),(typeof ce.keyboardSupport!="boolean"||ce.keyboardSupport)&&(this.keyboardController=new L(this,this.view,ce),this.disposables.add(this.keyboardController)),ce.keyboardNavigationLabelProvider){const $=ce.keyboardNavigationDelegate||e.DefaultKeyboardNavigationDelegate;this.typeLabelController=new N(this,this.view,ce.keyboardNavigationLabelProvider,$),this.disposables.add(this.typeLabelController)}this.mouseController=this.createMouseController(ce),this.disposables.add(this.mouseController),this.onDidChangeFocus(this._onFocusChange,this,this.disposables),this.onDidChangeSelection(this._onSelectionChange,this,this.disposables),this.accessibilityProvider&&(this.ariaLabel=this.accessibilityProvider.getWidgetAriaLabel()),this._options.multipleSelectionSupport!==!1&&this.view.domNode.setAttribute("aria-multiselectable","true")}get onDidChangeFocus(){return i.Event.map(this.eventBufferer.wrapEvent(this.focus.onChange),x=>this.toListEvent(x))}get onDidChangeSelection(){return i.Event.map(this.eventBufferer.wrapEvent(this.selection.onChange),x=>this.toListEvent(x))}get domId(){return this.view.domId}get onMouseClick(){return this.view.onMouseClick}get onMouseDblClick(){return this.view.onMouseDblClick}get onMouseMiddleClick(){return this.view.onMouseMiddleClick}get onPointer(){return this.mouseController.onPointer}get onMouseDown(){return this.view.onMouseDown}get onTouchStart(){return this.view.onTouchStart}get onTap(){return this.view.onTap}get onContextMenu(){let x=!1;const U=i.Event.chain(this.disposables.add(new m.DomEmitter(this.view.domNode,"keydown")).event).map(ce=>new D.StandardKeyboardEvent(ce)).filter(ce=>x=ce.keyCode===58||ce.shiftKey&&ce.keyCode===68).map(m.stopEvent).filter(()=>!1).event,Q=i.Event.chain(this.disposables.add(new m.DomEmitter(this.view.domNode,"keyup")).event).forEach(()=>x=!1).map(ce=>new D.StandardKeyboardEvent(ce)).filter(ce=>ce.keyCode===58||ce.shiftKey&&ce.keyCode===68).map(m.stopEvent).map(({browserEvent:ce})=>{const ee=this.getFocus(),ue=ee.length?ee[0]:void 0,z=typeof ue!="undefined"?this.view.element(ue):void 0,V=typeof ue!="undefined"?this.view.domElement(ue):this.view.domNode;return{index:ue,element:z,anchor:V,browserEvent:ce}}).event,ne=i.Event.chain(this.view.onContextMenu).filter(ce=>!x).map(({element:ce,index:ee,browserEvent:ue})=>({element:ce,index:ee,anchor:{x:ue.pageX+1,y:ue.pageY},browserEvent:ue})).event;return i.Event.any(U,Q,ne)}get onKeyDown(){return this.disposables.add(new m.DomEmitter(this.view.domNode,"keydown")).event}get onDidFocus(){return i.Event.signal(this.disposables.add(new m.DomEmitter(this.view.domNode,"focus",!0)).event)}createMouseController(x){return new R(this)}updateOptions(x={}){var U;this._options=Object.assign(Object.assign({},this._options),x),this.typeLabelController&&this.typeLabelController.updateOptions(this._options),this._options.multipleSelectionController!==void 0&&(this._options.multipleSelectionSupport?this.view.domNode.setAttribute("aria-multiselectable","true"):this.view.domNode.removeAttribute("aria-multiselectable")),this.mouseController.updateOptions(x),(U=this.keyboardController)===null||U===void 0||U.updateOptions(x),this.view.updateOptions(x)}get options(){return this._options}splice(x,U,Q=[]){if(x<0||x>this.view.length)throw new a.ListError(this.user,`Invalid start index: ${x}`);if(U<0)throw new a.ListError(this.user,`Invalid delete count: ${U}`);U===0&&Q.length===0||this.eventBufferer.bufferEvents(()=>this.spliceable.splice(x,U,Q))}rerender(){this.view.rerender()}element(x){return this.view.element(x)}get length(){return this.view.length}get contentHeight(){return this.view.contentHeight}get scrollTop(){return this.view.getScrollTop()}set scrollTop(x){this.view.setScrollTop(x)}get ariaLabel(){return this._ariaLabel}set ariaLabel(x){this._ariaLabel=x,this.view.domNode.setAttribute("aria-label",x)}domFocus(){this.view.domNode.focus({preventScroll:!0})}layout(x,U){this.view.layout(x,U)}setSelection(x,U){for(const Q of x)if(Q<0||Q>=this.length)throw new a.ListError(this.user,`Invalid index ${Q}`);this.selection.set(x,U)}getSelection(){return this.selection.get()}getSelectedElements(){return this.getSelection().map(x=>this.view.element(x))}setAnchor(x){if(typeof x=="undefined"){this.anchor.set([]);return}if(x<0||x>=this.length)throw new a.ListError(this.user,`Invalid index ${x}`);this.anchor.set([x])}getAnchor(){return(0,p.firstOrDefault)(this.anchor.get(),void 0)}getAnchorElement(){const x=this.getAnchor();return typeof x=="undefined"?void 0:this.element(x)}setFocus(x,U){for(const Q of x)if(Q<0||Q>=this.length)throw new a.ListError(this.user,`Invalid index ${Q}`);this.focus.set(x,U)}focusNext(x=1,U=!1,Q,ne){if(this.length===0)return;const ce=this.focus.get(),ee=this.findNextIndex(ce.length>0?ce[0]+x:0,U,ne);ee>-1&&this.setFocus([ee],Q)}focusPrevious(x=1,U=!1,Q,ne){if(this.length===0)return;const ce=this.focus.get(),ee=this.findPreviousIndex(ce.length>0?ce[0]-x:0,U,ne);ee>-1&&this.setFocus([ee],Q)}focusNextPage(x,U){return ye(this,void 0,void 0,function*(){let Q=this.view.indexAt(this.view.getScrollTop()+this.view.renderHeight);Q=Q===0?0:Q-1;const ne=this.view.element(Q),ce=this.getFocusedElements()[0];if(ce!==ne){const ee=this.findPreviousIndex(Q,!1,U);ee>-1&&ce!==this.view.element(ee)?this.setFocus([ee],x):this.setFocus([Q],x)}else{const ee=this.view.getScrollTop();this.view.setScrollTop(ee+this.view.renderHeight-this.view.elementHeight(Q)),this.view.getScrollTop()!==ee&&(this.setFocus([]),yield(0,h.timeout)(0),yield this.focusNextPage(x,U))}})}focusPreviousPage(x,U){return ye(this,void 0,void 0,function*(){let Q;const ne=this.view.getScrollTop();ne===0?Q=this.view.indexAt(ne):Q=this.view.indexAfter(ne-1);const ce=this.view.element(Q),ee=this.getFocusedElements()[0];if(ee!==ce){const ue=this.findNextIndex(Q,!1,U);ue>-1&&ee!==this.view.element(ue)?this.setFocus([ue],x):this.setFocus([Q],x)}else{const ue=ne;this.view.setScrollTop(ne-this.view.renderHeight),this.view.getScrollTop()!==ue&&(this.setFocus([]),yield(0,h.timeout)(0),yield this.focusPreviousPage(x,U))}})}focusLast(x,U){if(this.length===0)return;const Q=this.findPreviousIndex(this.length-1,!1,U);Q>-1&&this.setFocus([Q],x)}focusFirst(x,U){this.focusNth(0,x,U)}focusNth(x,U,Q){if(this.length===0)return;const ne=this.findNextIndex(x,!1,Q);ne>-1&&this.setFocus([ne],U)}findNextIndex(x,U=!1,Q){for(let ne=0;ne<this.length;ne++){if(x>=this.length&&!U)return-1;if(x=x%this.length,!Q||Q(this.element(x)))return x;x++}return-1}findPreviousIndex(x,U=!1,Q){for(let ne=0;ne<this.length;ne++){if(x<0&&!U)return-1;if(x=(this.length+x%this.length)%this.length,!Q||Q(this.element(x)))return x;x--}return-1}getFocus(){return this.focus.get()}getFocusedElements(){return this.getFocus().map(x=>this.view.element(x))}reveal(x,U){if(x<0||x>=this.length)throw new a.ListError(this.user,`Invalid index ${x}`);const Q=this.view.getScrollTop(),ne=this.view.elementTop(x),ce=this.view.elementHeight(x);if((0,o.isNumber)(U)){const ee=ce-this.view.renderHeight;this.view.setScrollTop(ee*(0,c.clamp)(U,0,1)+ne)}else{const ee=ne+ce,ue=Q+this.view.renderHeight;ne<Q&&ee>=ue||(ne<Q||ee>=ue&&ce>=this.view.renderHeight?this.view.setScrollTop(ne):ee>=ue&&this.view.setScrollTop(ee-this.view.renderHeight))}}getRelativeTop(x){if(x<0||x>=this.length)throw new a.ListError(this.user,`Invalid index ${x}`);const U=this.view.getScrollTop(),Q=this.view.elementTop(x),ne=this.view.elementHeight(x);if(Q<U||Q+ne>U+this.view.renderHeight)return null;const ce=ne-this.view.renderHeight;return Math.abs((U-Q)/ce)}getHTMLElement(){return this.view.domNode}style(x){this.styleController.style(x)}toListEvent({indexes:x,browserEvent:U}){return{indexes:x,elements:x.map(Q=>this.view.element(Q)),browserEvent:U}}_onFocusChange(){const x=this.focus.get();this.view.domNode.classList.toggle("element-focused",x.length>0),this.onDidChangeActiveDescendant()}onDidChangeActiveDescendant(){var x;const U=this.focus.get();if(U.length>0){let Q;((x=this.accessibilityProvider)===null||x===void 0?void 0:x.getActiveDescendantId)&&(Q=this.accessibilityProvider.getActiveDescendantId(this.view.element(U[0]))),this.view.domNode.setAttribute("aria-activedescendant",Q||this.view.getElementDomId(U[0]))}else this.view.domNode.removeAttribute("aria-activedescendant")}_onSelectionChange(){const x=this.selection.get();this.view.domNode.classList.toggle("selection-none",x.length===0),this.view.domNode.classList.toggle("selection-single",x.length===1),this.view.domNode.classList.toggle("selection-multiple",x.length>1)}dispose(){this._onDidDispose.fire(),this.disposables.dispose(),this._onDidDispose.dispose()}}Ie([t.memoize],oe.prototype,"onDidChangeFocus",null),Ie([t.memoize],oe.prototype,"onDidChangeSelection",null),Ie([t.memoize],oe.prototype,"onContextMenu",null),Ie([t.memoize],oe.prototype,"onKeyDown",null),Ie([t.memoize],oe.prototype,"onDidFocus",null),e.List=oe}),define(te[345],ie([1,0,19,21,4,2,115,226]),function(j,e,y,m,D,I,w){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.PagedList=void 0;class b{constructor(i,n){this.renderer=i,this.modelProvider=n}get templateId(){return this.renderer.templateId}renderTemplate(i){return{data:this.renderer.renderTemplate(i),disposable:I.Disposable.None}}renderElement(i,n,l,c){if(l.disposable&&l.disposable.dispose(),!l.data)return;const r=this.modelProvider();if(r.isResolved(i))return this.renderer.renderElement(r.get(i),i,l.data,c);const s=new m.CancellationTokenSource,o=r.resolve(i,s.token);l.disposable={dispose:()=>s.cancel()},this.renderer.renderPlaceholder(i,l.data),o.then(a=>this.renderer.renderElement(a,i,l.data,c))}disposeTemplate(i){i.disposable&&(i.disposable.dispose(),i.disposable=void 0),i.data&&(this.renderer.disposeTemplate(i.data),i.data=void 0)}}class p{constructor(i,n){this.modelProvider=i,this.accessibilityProvider=n}getWidgetAriaLabel(){return this.accessibilityProvider.getWidgetAriaLabel()}getAriaLabel(i){const n=this.modelProvider();return n.isResolved(i)?this.accessibilityProvider.getAriaLabel(n.get(i)):null}}function h(t,i){return Object.assign(Object.assign({},i),{accessibilityProvider:i.accessibilityProvider&&new p(t,i.accessibilityProvider)})}class g{constructor(i,n,l,c,r={}){const s=()=>this.model,o=c.map(a=>new b(a,s));this.list=new w.List(i,n,l,o,h(s,r))}updateOptions(i){this.list.updateOptions(i)}getHTMLElement(){return this.list.getHTMLElement()}get onDidFocus(){return this.list.onDidFocus}get onDidDispose(){return this.list.onDidDispose}get onMouseDblClick(){return D.Event.map(this.list.onMouseDblClick,({element:i,index:n,browserEvent:l})=>({element:i===void 0?void 0:this._model.get(i),index:n,browserEvent:l}))}get onPointer(){return D.Event.map(this.list.onPointer,({element:i,index:n,browserEvent:l})=>({element:i===void 0?void 0:this._model.get(i),index:n,browserEvent:l}))}get onDidChangeSelection(){return D.Event.map(this.list.onDidChangeSelection,({elements:i,indexes:n,browserEvent:l})=>({elements:i.map(c=>this._model.get(c)),indexes:n,browserEvent:l}))}get model(){return this._model}set model(i){this._model=i,this.list.splice(0,this.list.length,(0,y.range)(i.length))}getFocus(){return this.list.getFocus()}getSelection(){return this.list.getSelection()}getSelectedElements(){return this.getSelection().map(i=>this.model.get(i))}style(i){this.list.style(i)}dispose(){this.list.dispose()}}e.PagedList=g}),define(te[346],ie([12]),{}),define(te[228],ie([1,0,7,114,67,19,29,4,2,111,137,20,346]),function(j,e,y,m,D,I,w,b,p,h,g,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SplitView=e.Sizing=void 0;const i={separatorBorder:w.Color.transparent};class n{constructor(d,u,f,S){this.container=d,this.view=u,this.disposable=S,this._cachedVisibleSize=void 0,typeof f=="number"?(this._size=f,this._cachedVisibleSize=void 0,d.classList.add("visible")):(this._size=0,this._cachedVisibleSize=f.cachedVisibleSize)}set size(d){this._size=d}get size(){return this._size}get visible(){return typeof this._cachedVisibleSize=="undefined"}setVisible(d,u){d!==this.visible&&(d?(this.size=(0,h.clamp)(this._cachedVisibleSize,this.viewMinimumSize,this.viewMaximumSize),this._cachedVisibleSize=void 0):(this._cachedVisibleSize=typeof u=="number"?u:this.size,this.size=0),this.container.classList.toggle("visible",d),this.view.setVisible&&this.view.setVisible(d))}get minimumSize(){return this.visible?this.view.minimumSize:0}get viewMinimumSize(){return this.view.minimumSize}get maximumSize(){return this.visible?this.view.maximumSize:0}get viewMaximumSize(){return this.view.maximumSize}get priority(){return this.view.priority}get snap(){return!!this.view.snap}set enabled(d){this.container.style.pointerEvents=d?"":"none"}layout(d,u){this.layoutContainer(d),this.view.layout(this.size,d,u)}dispose(){return this.disposable.dispose(),this.view}}class l extends n{layoutContainer(d){this.container.style.top=`${d}px`,this.container.style.height=`${this.size}px`}}class c extends n{layoutContainer(d){this.container.style.left=`${d}px`,this.container.style.width=`${this.size}px`}}var r;(function(a){a[a.Idle=0]="Idle",a[a.Busy=1]="Busy"})(r||(r={}));var s;(function(a){a.Distribute={type:"distribute"};function d(f){return{type:"split",index:f}}a.Split=d;function u(f){return{type:"invisible",cachedVisibleSize:f}}a.Invisible=u})(s=e.Sizing||(e.Sizing={}));class o extends p.Disposable{constructor(d,u={}){var f,S,v,C,_;super();this.size=0,this.contentSize=0,this.proportions=void 0,this.viewItems=[],this.sashItems=[],this.state=r.Idle,this._onDidSashChange=this._register(new b.Emitter),this._onDidSashReset=this._register(new b.Emitter),this._startSnappingEnabled=!0,this._endSnappingEnabled=!0,this.onDidSashChange=this._onDidSashChange.event,this.onDidSashReset=this._onDidSashReset.event,this.orientation=(f=u.orientation)!==null&&f!==void 0?f:0,this.inverseAltBehavior=(S=u.inverseAltBehavior)!==null&&S!==void 0?S:!1,this.proportionalLayout=(v=u.proportionalLayout)!==null&&v!==void 0?v:!0,this.getSashOrthogonalSize=u.getSashOrthogonalSize,this.el=document.createElement("div"),this.el.classList.add("monaco-split-view2"),this.el.classList.add(this.orientation===0?"vertical":"horizontal"),d.appendChild(this.el),this.sashContainer=(0,y.append)(this.el,(0,y.$)(".sash-container")),this.viewContainer=(0,y.$)(".split-view-container"),this.scrollable=new g.Scrollable({forceIntegerValues:!0,smoothScrollDuration:125,scheduleAtNextAnimationFrame:y.scheduleAtNextAnimationFrame}),this.scrollableElement=this._register(new D.SmoothScrollableElement(this.viewContainer,{vertical:this.orientation===0?(C=u.scrollbarVisibility)!==null&&C!==void 0?C:1:2,horizontal:this.orientation===1?(_=u.scrollbarVisibility)!==null&&_!==void 0?_:1:2},this.scrollable)),this.onDidScroll=this.scrollableElement.onScroll,this._register(this.onDidScroll(L=>{this.viewContainer.scrollTop=L.scrollTop,this.viewContainer.scrollLeft=L.scrollLeft})),(0,y.append)(this.el,this.scrollableElement.getDomNode()),this.style(u.styles||i),u.descriptor&&(this.size=u.descriptor.size,u.descriptor.views.forEach((L,E)=>{const N=t.isUndefined(L.visible)||L.visible?L.size:{type:"invisible",cachedVisibleSize:L.size},k=L.view;this.doAddView(k,N,E,!0)}),this.contentSize=this.viewItems.reduce((L,E)=>L+E.size,0),this.saveProportions())}get orthogonalStartSash(){return this._orthogonalStartSash}get orthogonalEndSash(){return this._orthogonalEndSash}get startSnappingEnabled(){return this._startSnappingEnabled}get endSnappingEnabled(){return this._endSnappingEnabled}set orthogonalStartSash(d){for(const u of this.sashItems)u.sash.orthogonalStartSash=d;this._orthogonalStartSash=d}set orthogonalEndSash(d){for(const u of this.sashItems)u.sash.orthogonalEndSash=d;this._orthogonalEndSash=d}set startSnappingEnabled(d){this._startSnappingEnabled!==d&&(this._startSnappingEnabled=d,this.updateSashEnablement())}set endSnappingEnabled(d){this._endSnappingEnabled!==d&&(this._endSnappingEnabled=d,this.updateSashEnablement())}style(d){d.separatorBorder.isTransparent()?(this.el.classList.remove("separator-border"),this.el.style.removeProperty("--separator-border")):(this.el.classList.add("separator-border"),this.el.style.setProperty("--separator-border",d.separatorBorder.toString()))}addView(d,u,f=this.viewItems.length,S){this.doAddView(d,u,f,S)}layout(d,u){const f=Math.max(this.size,this.contentSize);if(this.size=d,this.layoutContext=u,this.proportions)for(let S=0;S<this.viewItems.length;S++){const v=this.viewItems[S];v.size=(0,h.clamp)(Math.round(this.proportions[S]*d),v.minimumSize,v.maximumSize)}else{const S=(0,I.range)(this.viewItems.length),v=S.filter(_=>this.viewItems[_].priority===1),C=S.filter(_=>this.viewItems[_].priority===2);this.resize(this.viewItems.length-1,d-f,void 0,v,C)}this.distributeEmptySpace(),this.layoutViews()}saveProportions(){this.proportionalLayout&&this.contentSize>0&&(this.proportions=this.viewItems.map(d=>d.size/this.contentSize))}onSashStart({sash:d,start:u,alt:f}){for(const _ of this.viewItems)_.enabled=!1;const S=this.sashItems.findIndex(_=>_.sash===d),v=(0,p.combinedDisposable)((0,y.addDisposableListener)(document.body,"keydown",_=>C(this.sashDragState.current,_.altKey)),(0,y.addDisposableListener)(document.body,"keyup",()=>C(this.sashDragState.current,!1))),C=(_,L)=>{const E=this.viewItems.map(B=>B.size);let N=Number.NEGATIVE_INFINITY,k=Number.POSITIVE_INFINITY;if(this.inverseAltBehavior&&(L=!L),L)if(S===this.sashItems.length-1){const T=this.viewItems[S];N=(T.minimumSize-T.size)/2,k=(T.maximumSize-T.size)/2}else{const T=this.viewItems[S+1];N=(T.size-T.maximumSize)/2,k=(T.size-T.minimumSize)/2}let M,O;if(!L){const B=(0,I.range)(S,-1),T=(0,I.range)(S+1,this.viewItems.length),R=B.reduce((G,re)=>G+(this.viewItems[re].minimumSize-E[re]),0),P=B.reduce((G,re)=>G+(this.viewItems[re].viewMaximumSize-E[re]),0),F=T.length===0?Number.POSITIVE_INFINITY:T.reduce((G,re)=>G+(E[re]-this.viewItems[re].minimumSize),0),W=T.length===0?Number.NEGATIVE_INFINITY:T.reduce((G,re)=>G+(E[re]-this.viewItems[re].viewMaximumSize),0),A=Math.max(R,W),H=Math.min(F,P),q=this.findFirstSnapIndex(B),X=this.findFirstSnapIndex(T);if(typeof q=="number"){const G=this.viewItems[q],re=Math.floor(G.viewMinimumSize/2);M={index:q,limitDelta:G.visible?A-re:A+re,size:G.size}}if(typeof X=="number"){const G=this.viewItems[X],re=Math.floor(G.viewMinimumSize/2);O={index:X,limitDelta:G.visible?H+re:H-re,size:G.size}}}this.sashDragState={start:_,current:_,index:S,sizes:E,minDelta:N,maxDelta:k,alt:L,snapBefore:M,snapAfter:O,disposable:v}};C(u,f)}onSashChange({current:d}){const{index:u,start:f,sizes:S,alt:v,minDelta:C,maxDelta:_,snapBefore:L,snapAfter:E}=this.sashDragState;this.sashDragState.current=d;const N=d-f,k=this.resize(u,N,S,void 0,void 0,C,_,L,E);if(v){const M=u===this.sashItems.length-1,O=this.viewItems.map(W=>W.size),B=M?u:u+1,T=this.viewItems[B],R=T.size-T.maximumSize,P=T.size-T.minimumSize,F=M?u-1:u+1;this.resize(F,-k,O,void 0,void 0,R,P)}this.distributeEmptySpace(),this.layoutViews()}onSashEnd(d){this._onDidSashChange.fire(d),this.sashDragState.disposable.dispose(),this.saveProportions();for(const u of this.viewItems)u.enabled=!0}onViewChange(d,u){const f=this.viewItems.indexOf(d);f<0||f>=this.viewItems.length||(u=typeof u=="number"?u:d.size,u=(0,h.clamp)(u,d.minimumSize,d.maximumSize),this.inverseAltBehavior&&f>0?(this.resize(f-1,Math.floor((d.size-u)/2)),this.distributeEmptySpace(),this.layoutViews()):(d.size=u,this.relayout([f],void 0)))}resizeView(d,u){if(this.state!==r.Idle)throw new Error("Cant modify splitview");if(this.state=r.Busy,d<0||d>=this.viewItems.length)return;const f=(0,I.range)(this.viewItems.length).filter(_=>_!==d),S=[...f.filter(_=>this.viewItems[_].priority===1),d],v=f.filter(_=>this.viewItems[_].priority===2),C=this.viewItems[d];u=Math.round(u),u=(0,h.clamp)(u,C.minimumSize,Math.min(C.maximumSize,this.size)),C.size=u,this.relayout(S,v),this.state=r.Idle}distributeViewSizes(){const d=[];let u=0;for(const _ of this.viewItems)_.maximumSize-_.minimumSize>0&&(d.push(_),u+=_.size);const f=Math.floor(u/d.length);for(const _ of d)_.size=(0,h.clamp)(f,_.minimumSize,_.maximumSize);const S=(0,I.range)(this.viewItems.length),v=S.filter(_=>this.viewItems[_].priority===1),C=S.filter(_=>this.viewItems[_].priority===2);this.relayout(v,C)}getViewSize(d){return d<0||d>=this.viewItems.length?-1:this.viewItems[d].size}doAddView(d,u,f=this.viewItems.length,S){if(this.state!==r.Idle)throw new Error("Cant modify splitview");this.state=r.Busy;const v=(0,y.$)(".split-view-view");f===this.viewItems.length?this.viewContainer.appendChild(v):this.viewContainer.insertBefore(v,this.viewContainer.children.item(f));const C=d.onDidChange(M=>this.onViewChange(N,M)),_=(0,p.toDisposable)(()=>this.viewContainer.removeChild(v)),L=(0,p.combinedDisposable)(C,_);let E;typeof u=="number"?E=u:u.type==="split"?E=this.getViewSize(u.index)/2:u.type==="invisible"?E={cachedVisibleSize:u.cachedVisibleSize}:E=d.minimumSize;const N=this.orientation===0?new l(v,d,E,L):new c(v,d,E,L);if(this.viewItems.splice(f,0,N),this.viewItems.length>1){let M={orthogonalStartSash:this.orthogonalStartSash,orthogonalEndSash:this.orthogonalEndSash};const O=this.orientation===0?new m.Sash(this.sashContainer,{getHorizontalSashTop:G=>this.getSashPosition(G),getHorizontalSashWidth:this.getSashOrthogonalSize},Object.assign(Object.assign({},M),{orientation:1})):new m.Sash(this.sashContainer,{getVerticalSashLeft:G=>this.getSashPosition(G),getVerticalSashHeight:this.getSashOrthogonalSize},Object.assign(Object.assign({},M),{orientation:0})),B=this.orientation===0?G=>({sash:O,start:G.startY,current:G.currentY,alt:G.altKey}):G=>({sash:O,start:G.startX,current:G.currentX,alt:G.altKey}),R=b.Event.map(O.onDidStart,B)(this.onSashStart,this),F=b.Event.map(O.onDidChange,B)(this.onSashChange,this),A=b.Event.map(O.onDidEnd,()=>this.sashItems.findIndex(G=>G.sash===O))(this.onSashEnd,this),H=O.onDidReset(()=>{const G=this.sashItems.findIndex(x=>x.sash===O),re=(0,I.range)(G,-1),ae=(0,I.range)(G+1,this.viewItems.length),oe=this.findFirstSnapIndex(re),Z=this.findFirstSnapIndex(ae);typeof oe=="number"&&!this.viewItems[oe].visible||typeof Z=="number"&&!this.viewItems[Z].visible||this._onDidSashReset.fire(G)}),q=(0,p.combinedDisposable)(R,F,A,H,O),X={sash:O,disposable:q};this.sashItems.splice(f-1,0,X)}v.appendChild(d.element);let k;typeof u!="number"&&u.type==="split"&&(k=[u.index]),S||this.relayout([f],k),this.state=r.Idle,!S&&typeof u!="number"&&u.type==="distribute"&&this.distributeViewSizes()}relayout(d,u){const f=this.viewItems.reduce((S,v)=>S+v.size,0);this.resize(this.viewItems.length-1,this.size-f,void 0,d,u),this.distributeEmptySpace(),this.layoutViews(),this.saveProportions()}resize(d,u,f=this.viewItems.map(N=>N.size),S,v,C=Number.NEGATIVE_INFINITY,_=Number.POSITIVE_INFINITY,L,E){if(d<0||d>=this.viewItems.length)return 0;const N=(0,I.range)(d,-1),k=(0,I.range)(d+1,this.viewItems.length);if(v)for(const X of v)(0,I.pushToStart)(N,X),(0,I.pushToStart)(k,X);if(S)for(const X of S)(0,I.pushToEnd)(N,X),(0,I.pushToEnd)(k,X);const M=N.map(X=>this.viewItems[X]),O=N.map(X=>f[X]),B=k.map(X=>this.viewItems[X]),T=k.map(X=>f[X]),R=N.reduce((X,G)=>X+(this.viewItems[G].minimumSize-f[G]),0),P=N.reduce((X,G)=>X+(this.viewItems[G].maximumSize-f[G]),0),F=k.length===0?Number.POSITIVE_INFINITY:k.reduce((X,G)=>X+(f[G]-this.viewItems[G].minimumSize),0),W=k.length===0?Number.NEGATIVE_INFINITY:k.reduce((X,G)=>X+(f[G]-this.viewItems[G].maximumSize),0),A=Math.max(R,W,C),H=Math.min(F,P,_);let q=!1;if(L){const X=this.viewItems[L.index],G=u>=L.limitDelta;q=G!==X.visible,X.setVisible(G,L.size)}if(!q&&E){const X=this.viewItems[E.index],G=u<E.limitDelta;q=G!==X.visible,X.setVisible(G,E.size)}if(q)return this.resize(d,u,f,S,v,C,_);u=(0,h.clamp)(u,A,H);for(let X=0,G=u;X<M.length;X++){const re=M[X],ae=(0,h.clamp)(O[X]+G,re.minimumSize,re.maximumSize);G-=ae-O[X],re.size=ae}for(let X=0,G=u;X<B.length;X++){const re=B[X],ae=(0,h.clamp)(T[X]-G,re.minimumSize,re.maximumSize);G+=ae-T[X],re.size=ae}return u}distributeEmptySpace(d){const u=this.viewItems.reduce((_,L)=>_+L.size,0);let f=this.size-u;const S=(0,I.range)(this.viewItems.length-1,-1),v=S.filter(_=>this.viewItems[_].priority===1),C=S.filter(_=>this.viewItems[_].priority===2);for(const _ of C)(0,I.pushToStart)(S,_);for(const _ of v)(0,I.pushToEnd)(S,_);typeof d=="number"&&(0,I.pushToEnd)(S,d);for(let _=0;f!==0&&_<S.length;_++){const L=this.viewItems[S[_]],E=(0,h.clamp)(L.size+f,L.minimumSize,L.maximumSize);f-=E-L.size,L.size=E}}layoutViews(){this.contentSize=this.viewItems.reduce((u,f)=>u+f.size,0);let d=0;for(const u of this.viewItems)u.layout(d,this.layoutContext),d+=u.size;this.sashItems.forEach(u=>u.sash.layout()),this.updateSashEnablement(),this.updateScrollableElement()}updateScrollableElement(){this.orientation===0?this.scrollableElement.setScrollDimensions({height:this.size,scrollHeight:this.contentSize}):this.scrollableElement.setScrollDimensions({width:this.size,scrollWidth:this.contentSize})}updateSashEnablement(){let d=!1;const u=this.viewItems.map(L=>d=L.size-L.minimumSize>0||d);d=!1;const f=this.viewItems.map(L=>d=L.maximumSize-L.size>0||d),S=[...this.viewItems].reverse();d=!1;const v=S.map(L=>d=L.size-L.minimumSize>0||d).reverse();d=!1;const C=S.map(L=>d=L.maximumSize-L.size>0||d).reverse();let _=0;for(let L=0;L<this.sashItems.length;L++){const{sash:E}=this.sashItems[L];_+=this.viewItems[L].size;const k=!(u[L]&&C[L+1]),M=!(f[L]&&v[L+1]);if(k&&M){const O=(0,I.range)(L,-1),B=(0,I.range)(L+1,this.viewItems.length),T=this.findFirstSnapIndex(O),R=this.findFirstSnapIndex(B),P=typeof T=="number"&&!this.viewItems[T].visible,F=typeof R=="number"&&!this.viewItems[R].visible;P&&v[L]&&(_>0||this.startSnappingEnabled)?E.state=1:F&&u[L]&&(_<this.contentSize||this.endSnappingEnabled)?E.state=2:E.state=0}else k&&!M?E.state=1:!k&&M?E.state=2:E.state=3}}getSashPosition(d){let u=0;for(let f=0;f<this.sashItems.length;f++)if(u+=this.viewItems[f].size,this.sashItems[f].sash===d)return u;return 0}findFirstSnapIndex(d){for(const u of d){const f=this.viewItems[u];if(!!f.visible&&f.snap)return u}for(const u of d){const f=this.viewItems[u];if(f.visible&&f.maximumSize-f.minimumSize>0)return;if(!f.visible&&f.snap)return u}}dispose(){super.dispose(),this.viewItems.forEach(d=>d.dispose()),this.viewItems=[],this.sashItems.forEach(d=>d.disposable.dispose()),this.sashItems=[]}}e.SplitView=o}),define(te[347],ie([12]),{}),define(te[348],ie([1,0,7,115,228,4,2,347]),function(j,e,y,m,D,I,w){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Table=void 0;class b{constructor(i,n,l){this.columns=i,this.getColumnSize=l,this.templateId=b.TemplateId,this.renderedTemplates=new Set;const c=new Map(n.map(r=>[r.templateId,r]));this.renderers=[];for(const r of i){const s=c.get(r.templateId);if(!s)throw new Error(`Table cell renderer for template id ${r.templateId} not found.`);this.renderers.push(s)}}renderTemplate(i){const n=(0,y.append)(i,(0,y.$)(".monaco-table-tr")),l=[],c=[];for(let s=0;s<this.columns.length;s++){const o=this.renderers[s],a=(0,y.append)(n,(0,y.$)(".monaco-table-td",{"data-col-index":s}));a.style.width=`${this.getColumnSize(s)}px`,l.push(a),c.push(o.renderTemplate(a))}const r={container:i,cellContainers:l,cellTemplateData:c};return this.renderedTemplates.add(r),r}renderElement(i,n,l,c){for(let r=0;r<this.columns.length;r++){const o=this.columns[r].project(i);this.renderers[r].renderElement(o,n,l.cellTemplateData[r],c)}}disposeElement(i,n,l,c){for(let r=0;r<this.columns.length;r++){const s=this.renderers[r];if(s.disposeElement){const a=this.columns[r].project(i);s.disposeElement(a,n,l.cellTemplateData[r],c)}}}disposeTemplate(i){for(let n=0;n<this.columns.length;n++)this.renderers[n].disposeTemplate(i.cellTemplateData[n]);(0,y.clearNode)(i.container),this.renderedTemplates.delete(i)}layoutColumn(i,n){for(const{cellContainers:l}of this.renderedTemplates)l[i].style.width=`${n}px`}}b.TemplateId="row";function p(t){return{getHeight(i){return t.getHeight(i)},getTemplateId(){return b.TemplateId}}}class h{constructor(i,n){this.column=i,this.index=n,this._onDidLayout=new I.Emitter,this.onDidLayout=this._onDidLayout.event,this.element=(0,y.$)(".monaco-table-th",{"data-col-index":n,title:i.tooltip},i.label)}get minimumSize(){var i;return(i=this.column.minimumWidth)!==null&&i!==void 0?i:120}get maximumSize(){var i;return(i=this.column.maximumWidth)!==null&&i!==void 0?i:Number.POSITIVE_INFINITY}get onDidChange(){var i;return(i=this.column.onDidChangeWidthConstraints)!==null&&i!==void 0?i:I.Event.None}layout(i){this._onDidLayout.fire([this.index,i])}}class g{constructor(i,n,l,c,r,s){this.virtualDelegate=l,this.domId=`table_id_${++g.InstanceCount}`,this.disposables=new w.DisposableStore,this.cachedWidth=0,this.cachedHeight=0,this.domNode=(0,y.append)(n,(0,y.$)(`.monaco-table.${this.domId}`));const o=c.map((u,f)=>new h(u,f)),a={size:o.reduce((u,f)=>u+f.column.weight,0),views:o.map(u=>({size:u.column.weight,view:u}))};this.splitview=this.disposables.add(new D.SplitView(this.domNode,{orientation:1,scrollbarVisibility:2,getSashOrthogonalSize:()=>this.cachedHeight,descriptor:a})),this.splitview.el.style.height=`${l.headerRowHeight}px`,this.splitview.el.style.lineHeight=`${l.headerRowHeight}px`;const d=new b(c,r,u=>this.splitview.getViewSize(u));this.list=this.disposables.add(new m.List(i,this.domNode,p(l),[d],s)),I.Event.any(...o.map(u=>u.onDidLayout))(([u,f])=>d.layoutColumn(u,f),null,this.disposables),this.splitview.onDidSashReset(u=>{const f=c.reduce((v,C)=>v+C.weight,0),S=c[u].weight/f*this.cachedWidth;this.splitview.resizeView(u,S)},null,this.disposables),this.styleElement=(0,y.createStyleSheet)(this.domNode),this.style({})}get onDidChangeFocus(){return this.list.onDidChangeFocus}get onDidChangeSelection(){return this.list.onDidChangeSelection}get onMouseDblClick(){return this.list.onMouseDblClick}get onPointer(){return this.list.onPointer}get onDidFocus(){return this.list.onDidFocus}get onDidDispose(){return this.list.onDidDispose}updateOptions(i){this.list.updateOptions(i)}splice(i,n,l=[]){this.list.splice(i,n,l)}getHTMLElement(){return this.domNode}style(i){const n=[];n.push(`.monaco-table.${this.domId} > .monaco-split-view2 .monaco-sash.vertical::before {
|
||
top: ${this.virtualDelegate.headerRowHeight+1}px;
|
||
height: calc(100% - ${this.virtualDelegate.headerRowHeight}px);
|
||
}`),this.styleElement.textContent=n.join(`
|
||
`),this.list.style(i)}getSelectedElements(){return this.list.getSelectedElements()}getSelection(){return this.list.getSelection()}getFocus(){return this.list.getFocus()}dispose(){this.disposables.dispose()}}e.Table=g,g.InstanceCount=0}),define(te[349],ie([12]),{}),define(te[142],ie([12]),{}),define(te[229],ie([1,0,7,133,142]),function(j,e,y,m){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getIconClass=void 0;const D={},I=new m.IdGenerator("quick-input-button-icon-");function w(b){if(!b)return;let p;const h=b.dark.toString();return D[h]?p=D[h]:(p=I.nextId(),y.createCSSRule(`.${p}`,`background-image: ${y.asCSSUrl(b.light||b.dark)}`),y.createCSSRule(`.vs-dark .${p}, .hc-black .${p}`,`background-image: ${y.asCSSUrl(b.dark)}`),D[h]=p),p}e.getIconClass=w}),define(te[350],ie([12]),{}),define(te[351],ie([12]),{}),define(te[352],ie([12]),{}),define(te[353],ie([12]),{}),define(te[354],ie([12]),{}),define(te[355],ie([12]),{}),define(te[356],ie([12]),{}),define(te[357],ie([12]),{}),define(te[358],ie([12]),{}),define(te[359],ie([12]),{}),define(te[360],ie([12]),{}),define(te[361],ie([12]),{}),define(te[362],ie([12]),{}),define(te[363],ie([12]),{}),define(te[364],ie([12]),{}),define(te[365],ie([12]),{}),define(te[366],ie([12]),{}),define(te[367],ie([12]),{}),define(te[368],ie([12]),{}),define(te[369],ie([12]),{}),define(te[370],ie([12]),{}),define(te[371],ie([12]),{}),define(te[372],ie([12]),{}),define(te[373],ie([12]),{}),define(te[374],ie([12]),{}),define(te[375],ie([12]),{}),define(te[376],ie([12]),{}),define(te[377],ie([12]),{}),define(te[378],ie([12]),{}),define(te[379],ie([12]),{}),define(te[380],ie([12]),{}),define(te[381],ie([12]),{}),define(te[382],ie([12]),{}),define(te[383],ie([12]),{}),define(te[384],ie([12]),{}),define(te[385],ie([12]),{}),define(te[386],ie([12]),{}),define(te[387],ie([12]),{}),define(te[388],ie([12]),{}),define(te[389],ie([12]),{}),define(te[390],ie([12]),{}),define(te[391],ie([12]),{}),define(te[392],ie([12]),{}),define(te[393],ie([12]),{}),define(te[394],ie([12]),{}),define(te[395],ie([12]),{}),define(te[396],ie([12]),{}),define(te[230],ie([1,0,2,4]),function(j,e,y,m){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ElementSizeObserver=void 0;class D extends y.Disposable{constructor(w,b){super();this._onDidChange=this._register(new m.Emitter),this.onDidChange=this._onDidChange.event,this._referenceDomElement=w,this._width=-1,this._height=-1,this._resizeObserver=null,this.measureReferenceDomElement(!1,b)}dispose(){this.stopObserving(),super.dispose()}getWidth(){return this._width}getHeight(){return this._height}startObserving(){!this._resizeObserver&&this._referenceDomElement&&(this._resizeObserver=new ResizeObserver(w=>{w&&w[0]&&w[0].contentRect?this.observe({width:w[0].contentRect.width,height:w[0].contentRect.height}):this.observe()}),this._resizeObserver.observe(this._referenceDomElement))}stopObserving(){this._resizeObserver&&(this._resizeObserver.disconnect(),this._resizeObserver=null)}observe(w){this.measureReferenceDomElement(!0,w)}measureReferenceDomElement(w,b){let p=0,h=0;b?(p=b.width,h=b.height):this._referenceDomElement&&(p=this._referenceDomElement.clientWidth,h=this._referenceDomElement.clientHeight),p=Math.max(5,p),h=Math.max(5,h),(this._width!==p||this._height!==h)&&(this._width=p,this._height=h,w&&this._onDidChange.fire())}}e.ElementSizeObserver=D}),define(te[397],ie([1,0,214]),function(j,e,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.migrateOptions=void 0;function m(D){const I=D.wordWrap;I===!0?D.wordWrap="on":I===!1&&(D.wordWrap="off");const w=D.lineNumbers;w===!0?D.lineNumbers="on":w===!1&&(D.lineNumbers="off"),D.autoClosingBrackets===!1&&(D.autoClosingBrackets="never",D.autoClosingQuotes="never",D.autoSurround="never"),D.cursorBlinking==="visible"&&(D.cursorBlinking="solid");const h=D.renderWhitespace;h===!0?D.renderWhitespace="boundary":h===!1&&(D.renderWhitespace="none");const g=D.renderLineHighlight;g===!0?D.renderLineHighlight="line":g===!1&&(D.renderLineHighlight="none");const t=D.acceptSuggestionOnEnter;t===!0?D.acceptSuggestionOnEnter="on":t===!1&&(D.acceptSuggestionOnEnter="off");const i=D.tabCompletion;i===!1?D.tabCompletion="off":i===!0&&(D.tabCompletion="onlySnippets");const n=D.suggest;if(n&&typeof n.filteredTypes=="object"&&n.filteredTypes){const d={};d.method="showMethods",d.function="showFunctions",d.constructor="showConstructors",d.deprecated="showDeprecated",d.field="showFields",d.variable="showVariables",d.class="showClasses",d.struct="showStructs",d.interface="showInterfaces",d.module="showModules",d.property="showProperties",d.event="showEvents",d.operator="showOperators",d.unit="showUnits",d.value="showValues",d.constant="showConstants",d.enum="showEnums",d.enumMember="showEnumMembers",d.keyword="showKeywords",d.text="showWords",d.color="showColors",d.file="showFiles",d.reference="showReferences",d.folder="showFolders",d.typeParameter="showTypeParameters",d.snippet="showSnippets",(0,y.forEach)(d,u=>{const f=n.filteredTypes[u.key];f===!1&&(n[u.value]=f)})}const l=D.hover;l===!0?D.hover={enabled:!0}:l===!1&&(D.hover={enabled:!1});const c=D.parameterHints;c===!0?D.parameterHints={enabled:!0}:c===!1&&(D.parameterHints={enabled:!1});const r=D.autoIndent;r===!0?D.autoIndent="full":r===!1&&(D.autoIndent="advanced");const s=D.matchBrackets;s===!0?D.matchBrackets="always":s===!1&&(D.matchBrackets="never");const{renderIndentGuides:o,highlightActiveIndentGuide:a}=D;D.guides||(D.guides={}),o!==void 0&&(D.guides.indentation=!!o),a!==void 0&&(D.guides.highlightActiveIndentation=!!a)}e.migrateOptions=m}),define(te[231],ie([1,0,4]),function(j,e,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TabFocus=void 0;class m{constructor(){this._tabFocus=!1,this._onDidChangeTabFocus=new y.Emitter,this.onDidChangeTabFocus=this._onDidChangeTabFocus.event}getTabFocusMode(){return this._tabFocus}setTabFocusMode(I){this._tabFocus!==I&&(this._tabFocus=I,this._onDidChangeTabFocus.fire(this._tabFocus))}}e.TabFocus=new m}),define(te[143],ie([1,0]),function(j,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.StableEditorScrollState=void 0;class y{constructor(D,I,w){this._visiblePosition=D,this._visiblePositionScrollDelta=I,this._cursorPosition=w}static capture(D){let I=null,w=0;if(D.getScrollTop()!==0){const b=D.getVisibleRanges();if(b.length>0){I=b[0].getStartPosition();const p=D.getTopForPosition(I.lineNumber,I.column);w=D.getScrollTop()-p}}return new y(I,w,D.getPosition())}restore(D){if(this._visiblePosition){const I=D.getTopForPosition(this._visiblePosition.lineNumber,this._visiblePosition.column);D.setScrollTop(I+this._visiblePositionScrollDelta)}}restoreRelativeVerticalPositionOfCursor(D){const I=D.getPosition();if(!this._cursorPosition||!I)return;const w=D.getTopForLineNumber(I.lineNumber)-D.getTopForLineNumber(this._cursorPosition.lineNumber);D.setScrollTop(D.getScrollTop()+w)}}e.StableEditorScrollState=y}),define(te[116],ie([1,0]),function(j,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.VisibleRanges=e.HorizontalPosition=e.FloatHorizontalRange=e.HorizontalRange=e.LineVisibleRanges=e.RenderingContext=e.RestrictedRenderingContext=void 0;class y{constructor(g,t){this._restrictedRenderingContextBrand=void 0,this._viewLayout=g,this.viewportData=t,this.scrollWidth=this._viewLayout.getScrollWidth(),this.scrollHeight=this._viewLayout.getScrollHeight(),this.visibleRange=this.viewportData.visibleRange,this.bigNumbersDelta=this.viewportData.bigNumbersDelta;const i=this._viewLayout.getCurrentViewport();this.scrollTop=i.top,this.scrollLeft=i.left,this.viewportWidth=i.width,this.viewportHeight=i.height}getScrolledTopFromAbsoluteTop(g){return g-this.scrollTop}getVerticalOffsetForLineNumber(g){return this._viewLayout.getVerticalOffsetForLineNumber(g)}getDecorationsInViewport(){return this.viewportData.getDecorationsInViewport()}}e.RestrictedRenderingContext=y;class m extends y{constructor(g,t,i){super(g,t);this._renderingContextBrand=void 0,this._viewLines=i}linesVisibleRangesForRange(g,t){return this._viewLines.linesVisibleRangesForRange(g,t)}visibleRangeForPosition(g){return this._viewLines.visibleRangeForPosition(g)}}e.RenderingContext=m;class D{constructor(g,t,i){this.outsideRenderedLine=g,this.lineNumber=t,this.ranges=i}}e.LineVisibleRanges=D;class I{constructor(g,t){this._horizontalRangeBrand=void 0,this.left=Math.round(g),this.width=Math.round(t)}static from(g){const t=new Array(g.length);for(let i=0,n=g.length;i<n;i++){const l=g[i];t[i]=new I(l.left,l.width)}return t}toString(){return`[${this.left},${this.width}]`}}e.HorizontalRange=I;class w{constructor(g,t){this._floatHorizontalRangeBrand=void 0,this.left=g,this.width=t}toString(){return`[${this.left},${this.width}]`}static compare(g,t){return g.left-t.left}}e.FloatHorizontalRange=w;class b{constructor(g,t){this.outsideRenderedLine=g,this.originalLeft=t,this.left=Math.round(this.originalLeft)}}e.HorizontalPosition=b;class p{constructor(g,t){this.outsideRenderedLine=g,this.ranges=t}}e.VisibleRanges=p}),define(te[232],ie([1,0]),function(j,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ViewUserInputEvents=void 0;class y{constructor(D){this.onKeyDown=null,this.onKeyUp=null,this.onContextMenu=null,this.onMouseMove=null,this.onMouseLeave=null,this.onMouseDown=null,this.onMouseUp=null,this.onMouseDrag=null,this.onMouseDrop=null,this.onMouseDropCanceled=null,this.onMouseWheel=null,this._coordinatesConverter=D}emitKeyDown(D){this.onKeyDown&&this.onKeyDown(D)}emitKeyUp(D){this.onKeyUp&&this.onKeyUp(D)}emitContextMenu(D){this.onContextMenu&&this.onContextMenu(this._convertViewToModelMouseEvent(D))}emitMouseMove(D){this.onMouseMove&&this.onMouseMove(this._convertViewToModelMouseEvent(D))}emitMouseLeave(D){this.onMouseLeave&&this.onMouseLeave(this._convertViewToModelMouseEvent(D))}emitMouseDown(D){this.onMouseDown&&this.onMouseDown(this._convertViewToModelMouseEvent(D))}emitMouseUp(D){this.onMouseUp&&this.onMouseUp(this._convertViewToModelMouseEvent(D))}emitMouseDrag(D){this.onMouseDrag&&this.onMouseDrag(this._convertViewToModelMouseEvent(D))}emitMouseDrop(D){this.onMouseDrop&&this.onMouseDrop(this._convertViewToModelMouseEvent(D))}emitMouseDropCanceled(){this.onMouseDropCanceled&&this.onMouseDropCanceled()}emitMouseWheel(D){this.onMouseWheel&&this.onMouseWheel(D)}_convertViewToModelMouseEvent(D){return D.target?{event:D.event,target:this._convertViewToModelMouseTarget(D.target)}:D}_convertViewToModelMouseTarget(D){return y.convertViewToModelMouseTarget(D,this._coordinatesConverter)}static convertViewToModelMouseTarget(D,I){const w=Object.assign({},D);return w.position&&(w.position=I.convertViewPositionToModelPosition(w.position)),w.range&&(w.range=I.convertViewRangeToModelRange(w.range)),w}}e.ViewUserInputEvents=y}),define(te[398],ie([1,0,116]),function(j,e,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.RangeUtil=void 0;class m{static _createRange(){return this._handyReadyRange||(this._handyReadyRange=document.createRange()),this._handyReadyRange}static _detachRange(I,w){I.selectNodeContents(w)}static _readClientRects(I,w,b,p,h){const g=this._createRange();try{return g.setStart(I,w),g.setEnd(b,p),g.getClientRects()}catch{return null}finally{this._detachRange(g,h)}}static _mergeAdjacentRanges(I){if(I.length===1)return I;I.sort(y.FloatHorizontalRange.compare);const w=[];let b=0,p=I[0];for(let h=1,g=I.length;h<g;h++){const t=I[h];p.left+p.width+.9>=t.left?p.width=Math.max(p.width,t.left+t.width-p.left):(w[b++]=p,p=t)}return w[b++]=p,w}static _createHorizontalRangesFromClientRects(I,w,b){if(!I||I.length===0)return null;const p=[];for(let h=0,g=I.length;h<g;h++){const t=I[h];p[h]=new y.FloatHorizontalRange(Math.max(0,(t.left-w)/b),t.width/b)}return this._mergeAdjacentRanges(p)}static readHorizontalRanges(I,w,b,p,h,g,t,i){const n=0,l=I.children.length-1;if(n>l)return null;if(w=Math.min(l,Math.max(n,w)),p=Math.min(l,Math.max(n,p)),w===p&&b===h&&b===0&&!I.children[w].firstChild){const o=I.children[w].getClientRects();return this._createHorizontalRangesFromClientRects(o,g,t)}w!==p&&p>0&&h===0&&(p--,h=1073741824);let c=I.children[w].firstChild,r=I.children[p].firstChild;if((!c||!r)&&(!c&&b===0&&w>0&&(c=I.children[w-1].firstChild,b=1073741824),!r&&h===0&&p>0&&(r=I.children[p-1].firstChild,h=1073741824)),!c||!r)return null;b=Math.min(c.textContent.length,Math.max(0,b)),h=Math.min(r.textContent.length,Math.max(0,h));const s=this._readClientRects(c,b,r,h,i);return this._createHorizontalRangesFromClientRects(s,g,t)}}e.RangeUtil=m}),define(te[233],ie([1,0]),function(j,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getCharIndex=e.allCharCodes=void 0,e.allCharCodes=(()=>{const m=[];for(let D=32;D<=126;D++)m.push(D);return m.push(65533),m})();const y=(m,D)=>(m-=32,m<0||m>96?D<=2?(m+96)%96:96-1:m);e.getCharIndex=y}),define(te[399],ie([1,0,233,139]),function(j,e,y,m){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MinimapCharRenderer=void 0;class D{constructor(w,b){this.scale=b,this._minimapCharRendererBrand=void 0,this.charDataNormal=D.soften(w,12/15),this.charDataLight=D.soften(w,50/60)}static soften(w,b){const p=new Uint8ClampedArray(w.length);for(let h=0,g=w.length;h<g;h++)p[h]=(0,m.toUint8)(w[h]*b);return p}renderChar(w,b,p,h,g,t,i,n,l,c,r){const s=1*this.scale,o=2*this.scale,a=r?1:o;if(b+s>w.width||p+a>w.height){console.warn("bad render request outside image data");return}const d=c?this.charDataLight:this.charDataNormal,u=(0,y.getCharIndex)(h,l),f=w.width*4,S=i.r,v=i.g,C=i.b,_=g.r-S,L=g.g-v,E=g.b-C,N=Math.max(t,n),k=w.data;let M=u*s*o,O=p*f+b*4;for(let B=0;B<a;B++){let T=O;for(let R=0;R<s;R++){const P=d[M++]/255*(t/255);k[T++]=S+_*P,k[T++]=v+L*P,k[T++]=C+E*P,k[T++]=N}O+=f}}blockRenderChar(w,b,p,h,g,t,i,n){const l=1*this.scale,c=2*this.scale,r=n?1:c;if(b+l>w.width||p+r>w.height){console.warn("bad render request outside image data");return}const s=w.width*4,o=.5*(g/255),a=t.r,d=t.g,u=t.b,f=h.r-a,S=h.g-d,v=h.b-u,C=a+f*o,_=d+S*o,L=u+v*o,E=Math.max(g,i),N=w.data;let k=p*s+b*4;for(let M=0;M<r;M++){let O=k;for(let B=0;B<l;B++)N[O++]=C,N[O++]=_,N[O++]=L,N[O++]=E;k+=s}}}e.MinimapCharRenderer=D}),define(te[400],ie([1,0,88]),function(j,e,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.prebakedMiniMaps=void 0;const m={"0":0,"1":1,"2":2,"3":3,"4":4,"5":5,"6":6,"7":7,"8":8,"9":9,A:10,B:11,C:12,D:13,E:14,F:15},D=I=>{const w=new Uint8ClampedArray(I.length/2);for(let b=0;b<I.length;b+=2)w[b>>1]=m[I[b]]<<4|m[I[b+1]]&15;return w};e.prebakedMiniMaps={1:(0,y.once)(()=>D("0000511D6300CF609C709645A78432005642574171487021003C451900274D35D762755E8B629C5BA856AF57BA649530C167D1512A272A3F6038604460398526BCA2A968DB6F8957C768BE5FBE2FB467CF5D8D5B795DC7625B5DFF50DE64C466DB2FC47CD860A65E9A2EB96CB54CE06DA763AB2EA26860524D3763536601005116008177A8705E53AB738E6A982F88BAA35B5F5B626D9C636B449B737E5B7B678598869A662F6B5B8542706C704C80736A607578685B70594A49715A4522E792")),2:(0,y.once)(()=>D("000000000000000055394F383D2800008B8B1F210002000081B1CBCBCC820000847AAF6B9AAF2119BE08B8881AD60000A44FD07DCCF107015338130C00000000385972265F390B406E2437634B4B48031B12B8A0847000001E15B29A402F0000000000004B33460B00007A752C2A0000000000004D3900000084394B82013400ABA5CFC7AD9C0302A45A3E5A98AB000089A43382D97900008BA54AA087A70A0248A6A7AE6DBE0000BF6F94987EA40A01A06DCFA7A7A9030496C32F77891D0000A99FB1A0AFA80603B29AB9CA75930D010C0948354D3900000C0948354F37460D0028BE673D8400000000AF9D7B6E00002B007AA8933400007AA642675C2700007984CFB9C3985B768772A8A6B7B20000CAAECAAFC4B700009F94A6009F840009D09F9BA4CA9C0000CC8FC76DC87F0000C991C472A2000000A894A48CA7B501079BA2C9C69BA20000B19A5D3FA89000005CA6009DA2960901B0A7F0669FB200009D009E00B7890000DAD0F5D092820000D294D4C48BD10000B5A7A4A3B1A50402CAB6CBA6A2000000B5A7A4A3B1A8044FCDADD19D9CB00000B7778F7B8AAE0803C9AB5D3F5D3F00009EA09EA0BAB006039EA0989A8C7900009B9EF4D6B7C00000A9A7816CACA80000ABAC84705D3F000096DA635CDC8C00006F486F266F263D4784006124097B00374F6D2D6D2D6D4A3A95872322000000030000000000008D8939130000000000002E22A5C9CBC70600AB25C0B5C9B400061A2DB04CA67001082AA6BEBEBFC606002321DACBC19E03087AA08B6768380000282FBAC0B8CA7A88AD25BBA5A29900004C396C5894A6000040485A6E356E9442A32CD17EADA70000B4237923628600003E2DE9C1D7B500002F25BBA5A2990000231DB6AFB4A804023025C0B5CAB588062B2CBDBEC0C706882435A75CA20000002326BD6A82A908048B4B9A5A668000002423A09CB4BB060025259C9D8A7900001C1FCAB2C7C700002A2A9387ABA200002626A4A47D6E9D14333163A0C87500004B6F9C2D643A257049364936493647358A34438355497F1A0000A24C1D590000D38DFFBDD4CD3126"))}}),define(te[401],ie([1,0,399,233,400,139]),function(j,e,y,m,D,I){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MinimapCharRendererFactory=void 0;class w{static create(p,h){if(this.lastCreated&&p===this.lastCreated.scale&&h===this.lastFontFamily)return this.lastCreated;let g;return D.prebakedMiniMaps[p]?g=new y.MinimapCharRenderer(D.prebakedMiniMaps[p](),p):g=w.createFromSampleData(w.createSampleData(h).data,p),this.lastFontFamily=h,this.lastCreated=g,g}static createSampleData(p){const h=document.createElement("canvas"),g=h.getContext("2d");h.style.height=`${16}px`,h.height=16,h.width=96*10,h.style.width=96*10+"px",g.fillStyle="#ffffff",g.font=`bold ${16}px ${p}`,g.textBaseline="middle";let t=0;for(const i of m.allCharCodes)g.fillText(String.fromCharCode(i),t,16/2),t+=10;return g.getImageData(0,0,96*10,16)}static createFromSampleData(p,h){const g=16*10*4*96;if(p.length!==g)throw new Error("Unexpected source in MinimapCharRenderer");const t=w._downsample(p,h);return new y.MinimapCharRenderer(t,h)}static _downsampleChar(p,h,g,t,i){const n=1*i,l=2*i;let c=t,r=0;for(let s=0;s<l;s++){const o=s/l*16,a=(s+1)/l*16;for(let d=0;d<n;d++){const u=d/n*10,f=(d+1)/n*10;let S=0,v=0;for(let _=o;_<a;_++){const L=h+Math.floor(_)*3840,E=1-(_-Math.floor(_));for(let N=u;N<f;N++){const k=1-(N-Math.floor(N)),M=L+Math.floor(N)*4,O=k*E;v+=O,S+=p[M]*p[M+3]/255*O}}const C=S/v;r=Math.max(r,C),g[c++]=(0,I.toUint8)(C)}}return r}static _downsample(p,h){const g=2*h*1*h,t=g*96,i=new Uint8ClampedArray(t);let n=0,l=0,c=0;for(let r=0;r<96;r++)c=Math.max(c,this._downsampleChar(p,l,i,n,h)),n+=g,l+=10*4;if(c>0){const r=255/c;for(let s=0;s<t;s++)i[s]*=r}return i}}e.MinimapCharRendererFactory=w}),define(te[144],ie([1,0,4]),function(j,e,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.EditorZoom=void 0,e.EditorZoom=new class{constructor(){this._zoomLevel=0,this._onDidChangeZoomLevel=new y.Emitter,this.onDidChangeZoomLevel=this._onDidChangeZoomLevel.event}getZoomLevel(){return this._zoomLevel}setZoomLevel(m){m=Math.min(Math.max(-5,m),20),this._zoomLevel!==m&&(this._zoomLevel=m,this._onDidChangeZoomLevel.fire(this._zoomLevel))}}}),define(te[174],ie([1,0,17,144]),function(j,e,y,m){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.FontInfo=e.SERIALIZED_FONT_INFO_VERSION=e.BareFontInfo=void 0;const D=y.isMacintosh?1.5:1.35,I=8;class w{constructor(h){this._bareFontInfoBrand=void 0,this.pixelRatio=h.pixelRatio,this.fontFamily=String(h.fontFamily),this.fontWeight=String(h.fontWeight),this.fontSize=h.fontSize,this.fontFeatureSettings=h.fontFeatureSettings,this.lineHeight=h.lineHeight|0,this.letterSpacing=h.letterSpacing}static createFromValidatedSettings(h,g,t){const i=h.get(43),n=h.get(47),l=h.get(46),c=h.get(45),r=h.get(59),s=h.get(56);return w._create(i,n,l,c,r,s,g,t)}static _create(h,g,t,i,n,l,c,r){n===0?n=D*t:n<I&&(n=n*t),n=Math.round(n),n<I&&(n=I);const s=1+(r?0:m.EditorZoom.getZoomLevel()*.1);return t*=s,n*=s,new w({pixelRatio:c,fontFamily:h,fontWeight:g,fontSize:t,fontFeatureSettings:i,lineHeight:n,letterSpacing:l})}getId(){return`${this.pixelRatio}-${this.fontFamily}-${this.fontWeight}-${this.fontSize}-${this.fontFeatureSettings}-${this.lineHeight}-${this.letterSpacing}`}getMassagedFontFamily(h){const g=w._wrapInQuotes(this.fontFamily);return h&&this.fontFamily!==h?`${g}, ${h}`:g}static _wrapInQuotes(h){return/[,"']/.test(h)?h:/[+ ]/.test(h)?`"${h}"`:h}}e.BareFontInfo=w,e.SERIALIZED_FONT_INFO_VERSION=1;class b extends w{constructor(h,g){super(h);this._editorStylingBrand=void 0,this.version=e.SERIALIZED_FONT_INFO_VERSION,this.isTrusted=g,this.isMonospace=h.isMonospace,this.typicalHalfwidthCharacterWidth=h.typicalHalfwidthCharacterWidth,this.typicalFullwidthCharacterWidth=h.typicalFullwidthCharacterWidth,this.canUseHalfwidthRightwardsArrow=h.canUseHalfwidthRightwardsArrow,this.spaceWidth=h.spaceWidth,this.middotWidth=h.middotWidth,this.wsmiddotWidth=h.wsmiddotWidth,this.maxDigitWidth=h.maxDigitWidth}equals(h){return this.fontFamily===h.fontFamily&&this.fontWeight===h.fontWeight&&this.fontSize===h.fontSize&&this.fontFeatureSettings===h.fontFeatureSettings&&this.lineHeight===h.lineHeight&&this.letterSpacing===h.letterSpacing&&this.typicalHalfwidthCharacterWidth===h.typicalHalfwidthCharacterWidth&&this.typicalFullwidthCharacterWidth===h.typicalFullwidthCharacterWidth&&this.canUseHalfwidthRightwardsArrow===h.canUseHalfwidthRightwardsArrow&&this.spaceWidth===h.spaceWidth&&this.middotWidth===h.middotWidth&&this.wsmiddotWidth===h.wsmiddotWidth&&this.maxDigitWidth===h.maxDigitWidth}}e.FontInfo=b}),define(te[97],ie([1,0,139]),function(j,e,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CharacterSet=e.CharacterClassifier=void 0;class m{constructor(w){const b=(0,y.toUint8)(w);this._defaultValue=b,this._asciiMap=m._createAsciiMap(b),this._map=new Map}static _createAsciiMap(w){const b=new Uint8Array(256);for(let p=0;p<256;p++)b[p]=w;return b}set(w,b){const p=(0,y.toUint8)(b);w>=0&&w<256?this._asciiMap[w]=p:this._map.set(w,p)}get(w){return w>=0&&w<256?this._asciiMap[w]:this._map.get(w)||this._defaultValue}}e.CharacterClassifier=m;class D{constructor(){this._actual=new m(0)}add(w){this._actual.set(w,1)}has(w){return this._actual.get(w)===1}}e.CharacterSet=D}),define(te[68],ie([1,0,8]),function(j,e,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CursorColumns=void 0;class m{static _nextVisibleColumn(I,w,b){return I===9?m.nextRenderTabStop(w,b):y.isFullWidthCharacter(I)||y.isEmojiImprecise(I)?w+2:w+1}static visibleColumnFromColumn(I,w,b){const p=Math.min(w-1,I.length),h=I.substring(0,p),g=new y.GraphemeIterator(h);let t=0;for(;!g.eol();){const i=y.getNextCodePoint(h,p,g.offset);g.nextGraphemeLength(),t=this._nextVisibleColumn(i,t,b)}return t}static columnFromVisibleColumn(I,w,b){if(w<=0)return 1;const p=I.length,h=new y.GraphemeIterator(I);let g=0,t=1;for(;!h.eol();){const i=y.getNextCodePoint(I,p,h.offset);h.nextGraphemeLength();const n=this._nextVisibleColumn(i,g,b),l=h.offset+1;if(n>=w){const c=w-g;return n-w<c?l:t}g=n,t=l}return p+1}static nextRenderTabStop(I,w){return I+w-I%w}static nextIndentTabStop(I,w){return I+w-I%w}static prevRenderTabStop(I,w){return Math.max(0,I-1-(I-1)%w)}static prevIndentTabStop(I,w){return Math.max(0,I-1-(I-1)%w)}}e.CursorColumns=m}),define(te[117],ie([1,0]),function(j,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.countEOL=void 0;function y(m){let D=0,I=0,w=0,b=0;for(let p=0,h=m.length;p<h;p++){const g=m.charCodeAt(p);g===13?(D===0&&(I=p),D++,p+1<h&&m.charCodeAt(p+1)===10?(b|=2,p++):b|=3,w=p+1):g===10&&(b|=1,D===0&&(I=p),D++,w=p+1)}return D===0&&(I=m.length),[D,I,m.length-w,b]}e.countEOL=y}),define(te[11],ie([1,0]),function(j,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Position=void 0;class y{constructor(D,I){this.lineNumber=D,this.column=I}with(D=this.lineNumber,I=this.column){return D===this.lineNumber&&I===this.column?this:new y(D,I)}delta(D=0,I=0){return this.with(this.lineNumber+D,this.column+I)}equals(D){return y.equals(this,D)}static equals(D,I){return!D&&!I?!0:!!D&&!!I&&D.lineNumber===I.lineNumber&&D.column===I.column}isBefore(D){return y.isBefore(this,D)}static isBefore(D,I){return D.lineNumber<I.lineNumber?!0:I.lineNumber<D.lineNumber?!1:D.column<I.column}isBeforeOrEqual(D){return y.isBeforeOrEqual(this,D)}static isBeforeOrEqual(D,I){return D.lineNumber<I.lineNumber?!0:I.lineNumber<D.lineNumber?!1:D.column<=I.column}static compare(D,I){const w=D.lineNumber|0,b=I.lineNumber|0;if(w===b){const p=D.column|0,h=I.column|0;return p-h}return w-b}clone(){return new y(this.lineNumber,this.column)}toString(){return"("+this.lineNumber+","+this.column+")"}static lift(D){return new y(D.lineNumber,D.column)}static isIPosition(D){return D&&typeof D.lineNumber=="number"&&typeof D.column=="number"}}e.Position=y}),define(te[3],ie([1,0,11]),function(j,e,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Range=void 0;class m{constructor(I,w,b,p){I>b||I===b&&w>p?(this.startLineNumber=b,this.startColumn=p,this.endLineNumber=I,this.endColumn=w):(this.startLineNumber=I,this.startColumn=w,this.endLineNumber=b,this.endColumn=p)}isEmpty(){return m.isEmpty(this)}static isEmpty(I){return I.startLineNumber===I.endLineNumber&&I.startColumn===I.endColumn}containsPosition(I){return m.containsPosition(this,I)}static containsPosition(I,w){return!(w.lineNumber<I.startLineNumber||w.lineNumber>I.endLineNumber||w.lineNumber===I.startLineNumber&&w.column<I.startColumn||w.lineNumber===I.endLineNumber&&w.column>I.endColumn)}static strictContainsPosition(I,w){return!(w.lineNumber<I.startLineNumber||w.lineNumber>I.endLineNumber||w.lineNumber===I.startLineNumber&&w.column<=I.startColumn||w.lineNumber===I.endLineNumber&&w.column>=I.endColumn)}containsRange(I){return m.containsRange(this,I)}static containsRange(I,w){return!(w.startLineNumber<I.startLineNumber||w.endLineNumber<I.startLineNumber||w.startLineNumber>I.endLineNumber||w.endLineNumber>I.endLineNumber||w.startLineNumber===I.startLineNumber&&w.startColumn<I.startColumn||w.endLineNumber===I.endLineNumber&&w.endColumn>I.endColumn)}strictContainsRange(I){return m.strictContainsRange(this,I)}static strictContainsRange(I,w){return!(w.startLineNumber<I.startLineNumber||w.endLineNumber<I.startLineNumber||w.startLineNumber>I.endLineNumber||w.endLineNumber>I.endLineNumber||w.startLineNumber===I.startLineNumber&&w.startColumn<=I.startColumn||w.endLineNumber===I.endLineNumber&&w.endColumn>=I.endColumn)}plusRange(I){return m.plusRange(this,I)}static plusRange(I,w){let b,p,h,g;return w.startLineNumber<I.startLineNumber?(b=w.startLineNumber,p=w.startColumn):w.startLineNumber===I.startLineNumber?(b=w.startLineNumber,p=Math.min(w.startColumn,I.startColumn)):(b=I.startLineNumber,p=I.startColumn),w.endLineNumber>I.endLineNumber?(h=w.endLineNumber,g=w.endColumn):w.endLineNumber===I.endLineNumber?(h=w.endLineNumber,g=Math.max(w.endColumn,I.endColumn)):(h=I.endLineNumber,g=I.endColumn),new m(b,p,h,g)}intersectRanges(I){return m.intersectRanges(this,I)}static intersectRanges(I,w){let b=I.startLineNumber,p=I.startColumn,h=I.endLineNumber,g=I.endColumn,t=w.startLineNumber,i=w.startColumn,n=w.endLineNumber,l=w.endColumn;return b<t?(b=t,p=i):b===t&&(p=Math.max(p,i)),h>n?(h=n,g=l):h===n&&(g=Math.min(g,l)),b>h||b===h&&p>g?null:new m(b,p,h,g)}equalsRange(I){return m.equalsRange(this,I)}static equalsRange(I,w){return!!I&&!!w&&I.startLineNumber===w.startLineNumber&&I.startColumn===w.startColumn&&I.endLineNumber===w.endLineNumber&&I.endColumn===w.endColumn}getEndPosition(){return m.getEndPosition(this)}static getEndPosition(I){return new y.Position(I.endLineNumber,I.endColumn)}getStartPosition(){return m.getStartPosition(this)}static getStartPosition(I){return new y.Position(I.startLineNumber,I.startColumn)}toString(){return"["+this.startLineNumber+","+this.startColumn+" -> "+this.endLineNumber+","+this.endColumn+"]"}setEndPosition(I,w){return new m(this.startLineNumber,this.startColumn,I,w)}setStartPosition(I,w){return new m(I,w,this.endLineNumber,this.endColumn)}collapseToStart(){return m.collapseToStart(this)}static collapseToStart(I){return new m(I.startLineNumber,I.startColumn,I.startLineNumber,I.startColumn)}static fromPositions(I,w=I){return new m(I.lineNumber,I.column,w.lineNumber,w.column)}static lift(I){return I?new m(I.startLineNumber,I.startColumn,I.endLineNumber,I.endColumn):null}static isIRange(I){return I&&typeof I.startLineNumber=="number"&&typeof I.startColumn=="number"&&typeof I.endLineNumber=="number"&&typeof I.endColumn=="number"}static areIntersectingOrTouching(I,w){return!(I.endLineNumber<w.startLineNumber||I.endLineNumber===w.startLineNumber&&I.endColumn<w.startColumn||w.endLineNumber<I.startLineNumber||w.endLineNumber===I.startLineNumber&&w.endColumn<I.startColumn)}static areIntersecting(I,w){return!(I.endLineNumber<w.startLineNumber||I.endLineNumber===w.startLineNumber&&I.endColumn<=w.startColumn||w.endLineNumber<I.startLineNumber||w.endLineNumber===I.startLineNumber&&w.endColumn<=I.startColumn)}static compareRangesUsingStarts(I,w){if(I&&w){const h=I.startLineNumber|0,g=w.startLineNumber|0;if(h===g){const t=I.startColumn|0,i=w.startColumn|0;if(t===i){const n=I.endLineNumber|0,l=w.endLineNumber|0;if(n===l){const c=I.endColumn|0,r=w.endColumn|0;return c-r}return n-l}return t-i}return h-g}return(I?1:0)-(w?1:0)}static compareRangesUsingEnds(I,w){return I.endLineNumber===w.endLineNumber?I.endColumn===w.endColumn?I.startLineNumber===w.startLineNumber?I.startColumn-w.startColumn:I.startLineNumber-w.startLineNumber:I.endColumn-w.endColumn:I.endLineNumber-w.endLineNumber}static spansMultipleLines(I){return I.endLineNumber>I.startLineNumber}}e.Range=m}),define(te[234],ie([1,0,8,11,3]),function(j,e,y,m,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.PagedScreenReaderStrategy=e.TextAreaState=e._debugComposition=void 0,e._debugComposition=!1;class I{constructor(p,h,g,t,i){this.value=p,this.selectionStart=h,this.selectionEnd=g,this.selectionStartPosition=t,this.selectionEndPosition=i}toString(){return`[ <${this.value}>, selectionStart: ${this.selectionStart}, selectionEnd: ${this.selectionEnd}]`}static readFromTextArea(p){return new I(p.getValue(),p.getSelectionStart(),p.getSelectionEnd(),null,null)}collapseSelection(){return new I(this.value,this.value.length,this.value.length,null,null)}writeToTextArea(p,h,g){e._debugComposition&&console.log(`writeToTextArea ${p}: ${this.toString()}`),h.setValue(p,this.value),g&&h.setSelectionRange(p,this.selectionStart,this.selectionEnd)}deduceEditorPosition(p){if(p<=this.selectionStart){const t=this.value.substring(p,this.selectionStart);return this._finishDeduceEditorPosition(this.selectionStartPosition,t,-1)}if(p>=this.selectionEnd){const t=this.value.substring(this.selectionEnd,p);return this._finishDeduceEditorPosition(this.selectionEndPosition,t,1)}const h=this.value.substring(this.selectionStart,p);if(h.indexOf(String.fromCharCode(8230))===-1)return this._finishDeduceEditorPosition(this.selectionStartPosition,h,1);const g=this.value.substring(p,this.selectionEnd);return this._finishDeduceEditorPosition(this.selectionEndPosition,g,-1)}_finishDeduceEditorPosition(p,h,g){let t=0,i=-1;for(;(i=h.indexOf(`
|
||
`,i+1))!==-1;)t++;return[p,g*h.length,t]}static deduceInput(p,h,g){if(!p)return{text:"",replacePrevCharCnt:0,replaceNextCharCnt:0,positionDelta:0};e._debugComposition&&(console.log("------------------------deduceInput"),console.log(`PREVIOUS STATE: ${p.toString()}`),console.log(`CURRENT STATE: ${h.toString()}`));const t=Math.min(y.commonPrefixLength(p.value,h.value),p.selectionStart,h.selectionStart),i=Math.min(y.commonSuffixLength(p.value,h.value),p.value.length-p.selectionEnd,h.value.length-h.selectionEnd),n=p.value.substring(t,p.value.length-i),l=h.value.substring(t,h.value.length-i),c=p.selectionStart-t,r=p.selectionEnd-t,s=h.selectionStart-t,o=h.selectionEnd-t;if(e._debugComposition&&(console.log(`AFTER DIFFING PREVIOUS STATE: <${n}>, selectionStart: ${c}, selectionEnd: ${r}`),console.log(`AFTER DIFFING CURRENT STATE: <${l}>, selectionStart: ${s}, selectionEnd: ${o}`)),s===o){const d=p.selectionStart-t;return e._debugComposition&&console.log(`REMOVE PREVIOUS: ${d} chars`),{text:l,replacePrevCharCnt:d,replaceNextCharCnt:0,positionDelta:0}}const a=r-c;return{text:l,replacePrevCharCnt:a,replaceNextCharCnt:0,positionDelta:0}}static deduceAndroidCompositionInput(p,h){if(!p)return{text:"",replacePrevCharCnt:0,replaceNextCharCnt:0,positionDelta:0};if(e._debugComposition&&(console.log("------------------------deduceAndroidCompositionInput"),console.log(`PREVIOUS STATE: ${p.toString()}`),console.log(`CURRENT STATE: ${h.toString()}`)),p.value===h.value)return{text:"",replacePrevCharCnt:0,replaceNextCharCnt:0,positionDelta:h.selectionEnd-p.selectionEnd};const g=Math.min(y.commonPrefixLength(p.value,h.value),p.selectionEnd),t=Math.min(y.commonSuffixLength(p.value,h.value),p.value.length-p.selectionEnd),i=p.value.substring(g,p.value.length-t),n=h.value.substring(g,h.value.length-t),l=p.selectionStart-g,c=p.selectionEnd-g,r=h.selectionStart-g,s=h.selectionEnd-g;return e._debugComposition&&(console.log(`AFTER DIFFING PREVIOUS STATE: <${i}>, selectionStart: ${l}, selectionEnd: ${c}`),console.log(`AFTER DIFFING CURRENT STATE: <${n}>, selectionStart: ${r}, selectionEnd: ${s}`)),{text:n,replacePrevCharCnt:c,replaceNextCharCnt:i.length-c,positionDelta:s-n.length}}}e.TextAreaState=I,I.EMPTY=new I("",0,0,null,null);class w{static _getPageOfLine(p,h){return Math.floor((p-1)/h)}static _getRangeForPage(p,h){const g=p*h,t=g+1,i=g+h;return new D.Range(t,1,i+1,1)}static fromEditorSelection(p,h,g,t,i){const n=w._getPageOfLine(g.startLineNumber,t),l=w._getRangeForPage(n,t),c=w._getPageOfLine(g.endLineNumber,t),r=w._getRangeForPage(c,t),s=l.intersectRanges(new D.Range(1,1,g.startLineNumber,g.startColumn));let o=h.getValueInRange(s,1);const a=h.getLineCount(),d=h.getLineMaxColumn(a),u=r.intersectRanges(new D.Range(g.endLineNumber,g.endColumn,a,d));let f=h.getValueInRange(u,1),S;if(n===c||n+1===c)S=h.getValueInRange(g,1);else{const v=l.intersectRanges(g),C=r.intersectRanges(g);S=h.getValueInRange(v,1)+String.fromCharCode(8230)+h.getValueInRange(C,1)}if(i){const v=500;o.length>v&&(o=o.substring(o.length-v,o.length)),f.length>v&&(f=f.substring(0,v)),S.length>2*v&&(S=S.substring(0,v)+String.fromCharCode(8230)+S.substring(S.length-v,S.length))}return new I(o+S+f,o.length,o.length+S.length,new m.Position(g.startLineNumber,g.startColumn),new m.Position(g.endLineNumber,g.endColumn))}}e.PagedScreenReaderStrategy=w}),define(te[235],ie([1,0,213,4,2,39,3]),function(j,e,y,m,D,I,w){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DiffNavigator=void 0;const b={followsCaret:!0,ignoreCharChanges:!0,alwaysRevealFirst:!0};class p extends D.Disposable{constructor(g,t={}){super();this._onDidUpdate=this._register(new m.Emitter),this._editor=g,this._options=I.mixin(t,b,!1),this.disposed=!1,this.nextIdx=-1,this.ranges=[],this.ignoreSelectionChange=!1,this.revealFirst=Boolean(this._options.alwaysRevealFirst),this._register(this._editor.onDidDispose(()=>this.dispose())),this._register(this._editor.onDidUpdateDiff(()=>this._onDiffUpdated())),this._options.followsCaret&&this._register(this._editor.getModifiedEditor().onDidChangeCursorPosition(i=>{this.ignoreSelectionChange||(this.nextIdx=-1)})),this._options.alwaysRevealFirst&&this._register(this._editor.getModifiedEditor().onDidChangeModel(i=>{this.revealFirst=!0})),this._init()}_init(){!!this._editor.getLineChanges()}_onDiffUpdated(){this._init(),this._compute(this._editor.getLineChanges()),this.revealFirst&&this._editor.getLineChanges()!==null&&(this.revealFirst=!1,this.nextIdx=-1,this.next(1))}_compute(g){this.ranges=[],g&&g.forEach(t=>{!this._options.ignoreCharChanges&&t.charChanges?t.charChanges.forEach(i=>{this.ranges.push({rhs:!0,range:new w.Range(i.modifiedStartLineNumber,i.modifiedStartColumn,i.modifiedEndLineNumber,i.modifiedEndColumn)})}):t.modifiedEndLineNumber===0?this.ranges.push({rhs:!0,range:new w.Range(t.modifiedStartLineNumber,1,t.modifiedStartLineNumber+1,1)}):this.ranges.push({rhs:!0,range:new w.Range(t.modifiedStartLineNumber,1,t.modifiedEndLineNumber+1,1)})}),this.ranges.sort((t,i)=>w.Range.compareRangesUsingStarts(t.range,i.range)),this._onDidUpdate.fire(this)}_initIdx(g){let t=!1;const i=this._editor.getPosition();if(!i){this.nextIdx=0;return}for(let n=0,l=this.ranges.length;n<l&&!t;n++){const c=this.ranges[n].range;i.isBeforeOrEqual(c.getStartPosition())&&(this.nextIdx=n+(g?0:-1),t=!0)}t||(this.nextIdx=g?0:this.ranges.length-1),this.nextIdx<0&&(this.nextIdx=this.ranges.length-1)}_move(g,t){if(y.ok(!this.disposed,"Illegal State - diff navigator has been disposed"),!this.canNavigate())return;this.nextIdx===-1?this._initIdx(g):g?(this.nextIdx+=1,this.nextIdx>=this.ranges.length&&(this.nextIdx=0)):(this.nextIdx-=1,this.nextIdx<0&&(this.nextIdx=this.ranges.length-1));const i=this.ranges[this.nextIdx];this.ignoreSelectionChange=!0;try{const n=i.range.getStartPosition();this._editor.setPosition(n),this._editor.revealRangeInCenter(i.range,t)}finally{this.ignoreSelectionChange=!1}}canNavigate(){return this.ranges&&this.ranges.length>0}next(g=0){this._move(!0,g)}previous(g=0){this._move(!1,g)}dispose(){super.dispose(),this.ranges=[],this.disposed=!0}}e.DiffNavigator=p}),define(te[61],ie([1,0,3]),function(j,e,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.EditOperation=void 0;class m{static insert(I,w){return{range:new y.Range(I.lineNumber,I.column,I.lineNumber,I.column),text:w,forceMoveMarkers:!0}}static delete(I){return{range:I,text:null}}static replace(I,w){return{range:I,text:w}}static replaceMove(I,w){return{range:I,text:w,forceMoveMarkers:!0}}}e.EditOperation=m}),define(te[402],ie([1,0,8,61,3]),function(j,e,y,m,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.trimTrailingWhitespace=e.TrimTrailingWhitespaceCommand=void 0;class I{constructor(p,h){this._selection=p,this._cursors=h,this._selectionId=null}getEditOperations(p,h){const g=w(p,this._cursors);for(let t=0,i=g.length;t<i;t++){const n=g[t];h.addEditOperation(n.range,n.text)}this._selectionId=h.trackSelection(this._selection)}computeCursorState(p,h){return h.getTrackedSelection(this._selectionId)}}e.TrimTrailingWhitespaceCommand=I;function w(b,p){p.sort((n,l)=>n.lineNumber===l.lineNumber?n.column-l.column:n.lineNumber-l.lineNumber);for(let n=p.length-2;n>=0;n--)p[n].lineNumber===p[n+1].lineNumber&&p.splice(n,1);const h=[];let g=0,t=0;const i=p.length;for(let n=1,l=b.getLineCount();n<=l;n++){const c=b.getLineContent(n),r=c.length+1;let s=0;if(t<i&&p[t].lineNumber===n&&(s=p[t].column,t++,s===r)||c.length===0)continue;const o=y.lastNonWhitespaceIndex(c);let a=0;if(o===-1)a=1;else if(o!==c.length-1)a=o+2;else continue;a=Math.max(s,a),h[g++]=m.EditOperation.delete(new D.Range(n,a,n,r))}return h}e.trimTrailingWhitespace=w}),define(te[236],ie([1,0]),function(j,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.RGBA8=void 0;class y{constructor(D,I,w,b){this._rgba8Brand=void 0,this.r=y._clamp(D),this.g=y._clamp(I),this.b=y._clamp(w),this.a=y._clamp(b)}equals(D){return this.r===D.r&&this.g===D.g&&this.b===D.b&&this.a===D.a}static _clamp(D){return D<0?0:D>255?255:D|0}}e.RGBA8=y,y.Empty=new y(0,0,0,0)}),define(te[22],ie([1,0,11,3]),function(j,e,y,m){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Selection=void 0;class D extends m.Range{constructor(w,b,p,h){super(w,b,p,h);this.selectionStartLineNumber=w,this.selectionStartColumn=b,this.positionLineNumber=p,this.positionColumn=h}toString(){return"["+this.selectionStartLineNumber+","+this.selectionStartColumn+" -> "+this.positionLineNumber+","+this.positionColumn+"]"}equalsSelection(w){return D.selectionsEqual(this,w)}static selectionsEqual(w,b){return w.selectionStartLineNumber===b.selectionStartLineNumber&&w.selectionStartColumn===b.selectionStartColumn&&w.positionLineNumber===b.positionLineNumber&&w.positionColumn===b.positionColumn}getDirection(){return this.selectionStartLineNumber===this.startLineNumber&&this.selectionStartColumn===this.startColumn?0:1}setEndPosition(w,b){return this.getDirection()===0?new D(this.startLineNumber,this.startColumn,w,b):new D(w,b,this.startLineNumber,this.startColumn)}getPosition(){return new y.Position(this.positionLineNumber,this.positionColumn)}getSelectionStart(){return new y.Position(this.selectionStartLineNumber,this.selectionStartColumn)}setStartPosition(w,b){return this.getDirection()===0?new D(w,b,this.endLineNumber,this.endColumn):new D(this.endLineNumber,this.endColumn,w,b)}static fromPositions(w,b=w){return new D(w.lineNumber,w.column,b.lineNumber,b.column)}static fromRange(w,b){return b===0?new D(w.startLineNumber,w.startColumn,w.endLineNumber,w.endColumn):new D(w.endLineNumber,w.endColumn,w.startLineNumber,w.startColumn)}static liftSelection(w){return new D(w.selectionStartLineNumber,w.selectionStartColumn,w.positionLineNumber,w.positionColumn)}static selectionsArrEqual(w,b){if(w&&!b||!w&&b)return!1;if(!w&&!b)return!0;if(w.length!==b.length)return!1;for(let p=0,h=w.length;p<h;p++)if(!this.selectionsEqual(w[p],b[p]))return!1;return!0}static isISelection(w){return w&&typeof w.selectionStartLineNumber=="number"&&typeof w.selectionStartColumn=="number"&&typeof w.positionLineNumber=="number"&&typeof w.positionColumn=="number"}static createWithDirection(w,b,p,h,g){return g===0?new D(w,b,p,h):new D(p,h,w,b)}}e.Selection=D}),define(te[175],ie([1,0,34,7,46,10,4,2,135,8,234,22]),function(j,e,y,m,D,I,w,b,p,h,g,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TextAreaWrapper=e.TextAreaInput=e.InMemoryClipboardMetadataManager=e.CopyOptions=e.TextAreaSyntethicEvents=void 0;var i;(function(o){o.Tap="-monaco-textarea-synthetic-tap"})(i=e.TextAreaSyntethicEvents||(e.TextAreaSyntethicEvents={})),e.CopyOptions={forceCopyWithSyntaxHighlighting:!1};class n{constructor(){this._lastState=null}set(a,d){this._lastState={lastCopiedValue:a,data:d}}get(a){return this._lastState&&this._lastState.lastCopiedValue===a?this._lastState.data:(this._lastState=null,null)}}e.InMemoryClipboardMetadataManager=n,n.INSTANCE=new n;class l{constructor(){this._lastTypeTextLength=0}handleCompositionUpdate(a){a=a||"";const d={text:a,replacePrevCharCnt:this._lastTypeTextLength,replaceNextCharCnt:0,positionDelta:0};return this._lastTypeTextLength=a.length,d}}class c extends b.Disposable{constructor(a,d,u,f){super();this._host=a,this._textArea=d,this._OS=u,this._browser=f,this._onFocus=this._register(new w.Emitter),this.onFocus=this._onFocus.event,this._onBlur=this._register(new w.Emitter),this.onBlur=this._onBlur.event,this._onKeyDown=this._register(new w.Emitter),this.onKeyDown=this._onKeyDown.event,this._onKeyUp=this._register(new w.Emitter),this.onKeyUp=this._onKeyUp.event,this._onCut=this._register(new w.Emitter),this.onCut=this._onCut.event,this._onPaste=this._register(new w.Emitter),this.onPaste=this._onPaste.event,this._onType=this._register(new w.Emitter),this.onType=this._onType.event,this._onCompositionStart=this._register(new w.Emitter),this.onCompositionStart=this._onCompositionStart.event,this._onCompositionUpdate=this._register(new w.Emitter),this.onCompositionUpdate=this._onCompositionUpdate.event,this._onCompositionEnd=this._register(new w.Emitter),this.onCompositionEnd=this._onCompositionEnd.event,this._onSelectionChangeRequest=this._register(new w.Emitter),this.onSelectionChangeRequest=this._onSelectionChangeRequest.event,this._asyncTriggerCut=this._register(new I.RunOnceScheduler(()=>this._onCut.fire(),0)),this._asyncFocusGainWriteScreenReaderContent=this._register(new I.RunOnceScheduler(()=>this.writeScreenReaderContent("asyncFocusGain"),0)),this._textAreaState=g.TextAreaState.EMPTY,this._selectionChangeListener=null,this.writeScreenReaderContent("ctor"),this._hasFocus=!1,this._currentComposition=null;let S=null;this._register(this._textArea.onKeyDown(v=>{const C=new D.StandardKeyboardEvent(v);(C.keyCode===109||this._currentComposition&&C.keyCode===1)&&C.stopPropagation(),C.equals(9)&&C.preventDefault(),S=C,this._onKeyDown.fire(C)})),this._register(this._textArea.onKeyUp(v=>{const C=new D.StandardKeyboardEvent(v);this._onKeyUp.fire(C)})),this._register(this._textArea.onCompositionStart(v=>{g._debugComposition&&console.log("[compositionstart]",v);const C=new l;if(this._currentComposition){this._currentComposition=C;return}if(this._currentComposition=C,this._OS===2&&S&&S.equals(109)&&this._textAreaState.selectionStart===this._textAreaState.selectionEnd&&this._textAreaState.selectionStart>0&&this._textAreaState.value.substr(this._textAreaState.selectionStart-1,1)===v.data&&(S.code==="ArrowRight"||S.code==="ArrowLeft")){g._debugComposition&&console.log("[compositionstart] Handling long press case on macOS + arrow key",v),C.handleCompositionUpdate("x"),this._onCompositionStart.fire({data:v.data});return}if(this._browser.isAndroid){this._onCompositionStart.fire({data:v.data});return}this._onCompositionStart.fire({data:v.data})})),this._register(this._textArea.onCompositionUpdate(v=>{g._debugComposition&&console.log("[compositionupdate]",v);const C=this._currentComposition;if(!C)return;if(this._browser.isAndroid){const L=g.TextAreaState.readFromTextArea(this._textArea),E=g.TextAreaState.deduceAndroidCompositionInput(this._textAreaState,L);this._textAreaState=L,this._onType.fire(E),this._onCompositionUpdate.fire(v);return}const _=C.handleCompositionUpdate(v.data);this._textAreaState=g.TextAreaState.readFromTextArea(this._textArea),this._onType.fire(_),this._onCompositionUpdate.fire(v)})),this._register(this._textArea.onCompositionEnd(v=>{g._debugComposition&&console.log("[compositionend]",v);const C=this._currentComposition;if(!C)return;if(this._currentComposition=null,this._browser.isAndroid){const L=g.TextAreaState.readFromTextArea(this._textArea),E=g.TextAreaState.deduceAndroidCompositionInput(this._textAreaState,L);this._textAreaState=L,this._onType.fire(E),this._onCompositionEnd.fire();return}const _=C.handleCompositionUpdate(v.data);this._textAreaState=g.TextAreaState.readFromTextArea(this._textArea),this._onType.fire(_),this._onCompositionEnd.fire()})),this._register(this._textArea.onInput(v=>{if(g._debugComposition&&console.log("[input]",v),this._textArea.setIgnoreSelectionChangeTime("received input event"),this._currentComposition)return;const C=g.TextAreaState.readFromTextArea(this._textArea),_=g.TextAreaState.deduceInput(this._textAreaState,C,this._OS===2);_.replacePrevCharCnt===0&&_.text.length===1&&h.isHighSurrogate(_.text.charCodeAt(0))||(this._textAreaState=C,(_.text!==""||_.replacePrevCharCnt!==0||_.replaceNextCharCnt!==0||_.positionDelta!==0)&&this._onType.fire(_))})),this._register(this._textArea.onCut(v=>{this._textArea.setIgnoreSelectionChangeTime("received cut event"),this._ensureClipboardGetsEditorSelection(v),this._asyncTriggerCut.schedule()})),this._register(this._textArea.onCopy(v=>{this._ensureClipboardGetsEditorSelection(v)})),this._register(this._textArea.onPaste(v=>{if(this._textArea.setIgnoreSelectionChangeTime("received paste event"),v.preventDefault(),!v.clipboardData)return;let[C,_]=r.getTextData(v.clipboardData);!C||(_=_||n.INSTANCE.get(C),this._onPaste.fire({text:C,metadata:_}))})),this._register(this._textArea.onFocus(()=>{const v=this._hasFocus;this._setHasFocus(!0),this._browser.isSafari&&!v&&this._hasFocus&&this._asyncFocusGainWriteScreenReaderContent.schedule()})),this._register(this._textArea.onBlur(()=>{this._currentComposition&&(this._currentComposition=null,this.writeScreenReaderContent("blurWithoutCompositionEnd"),this._onCompositionEnd.fire()),this._setHasFocus(!1)})),this._register(this._textArea.onSyntheticTap(()=>{this._browser.isAndroid&&this._currentComposition&&(this._currentComposition=null,this.writeScreenReaderContent("tapWithoutCompositionEnd"),this._onCompositionEnd.fire())}))}_installSelectionChangeListener(){let a=0;return m.addDisposableListener(document,"selectionchange",d=>{if(!this._hasFocus||this._currentComposition||!this._browser.isChrome)return;const u=Date.now(),f=u-a;if(a=u,f<5)return;const S=u-this._textArea.getIgnoreSelectionChangeTime();if(this._textArea.resetSelectionChangeTime(),S<100||!this._textAreaState.selectionStartPosition||!this._textAreaState.selectionEndPosition)return;const v=this._textArea.getValue();if(this._textAreaState.value!==v)return;const C=this._textArea.getSelectionStart(),_=this._textArea.getSelectionEnd();if(this._textAreaState.selectionStart===C&&this._textAreaState.selectionEnd===_)return;const L=this._textAreaState.deduceEditorPosition(C),E=this._host.deduceModelPosition(L[0],L[1],L[2]),N=this._textAreaState.deduceEditorPosition(_),k=this._host.deduceModelPosition(N[0],N[1],N[2]),M=new t.Selection(E.lineNumber,E.column,k.lineNumber,k.column);this._onSelectionChangeRequest.fire(M)})}dispose(){super.dispose(),this._selectionChangeListener&&(this._selectionChangeListener.dispose(),this._selectionChangeListener=null)}focusTextArea(){this._setHasFocus(!0),this.refreshFocusState()}isFocused(){return this._hasFocus}refreshFocusState(){this._setHasFocus(this._textArea.hasFocus())}_setHasFocus(a){this._hasFocus!==a&&(this._hasFocus=a,this._selectionChangeListener&&(this._selectionChangeListener.dispose(),this._selectionChangeListener=null),this._hasFocus&&(this._selectionChangeListener=this._installSelectionChangeListener()),this._hasFocus&&this.writeScreenReaderContent("focusgain"),this._hasFocus?this._onFocus.fire():this._onBlur.fire())}_setAndWriteTextAreaState(a,d){this._hasFocus||(d=d.collapseSelection()),d.writeToTextArea(a,this._textArea,this._hasFocus),this._textAreaState=d}writeScreenReaderContent(a){this._currentComposition||this._setAndWriteTextAreaState(a,this._host.getScreenReaderContent(this._textAreaState))}_ensureClipboardGetsEditorSelection(a){const d=this._host.getDataToCopy(),u={version:1,isFromEmptySelection:d.isFromEmptySelection,multicursorText:d.multicursorText,mode:d.mode};n.INSTANCE.set(this._browser.isFirefox?d.text.replace(/\r\n/g,`
|
||
`):d.text,u),a.preventDefault(),a.clipboardData&&r.setTextData(a.clipboardData,d.text,d.html,u)}}e.TextAreaInput=c;class r{static getTextData(a){const d=a.getData(p.Mimes.text);let u=null;const f=a.getData("vscode-editor-data");if(typeof f=="string")try{u=JSON.parse(f),u.version!==1&&(u=null)}catch{}return[d,u]}static setTextData(a,d,u,f){a.setData(p.Mimes.text,d),typeof u=="string"&&a.setData("text/html",u),a.setData("vscode-editor-data",JSON.stringify(f))}}class s extends b.Disposable{constructor(a){super();this._actual=a,this.onKeyDown=this._register(m.createEventEmitter(this._actual,"keydown")).event,this.onKeyUp=this._register(m.createEventEmitter(this._actual,"keyup")).event,this.onCompositionStart=this._register(m.createEventEmitter(this._actual,"compositionstart")).event,this.onCompositionUpdate=this._register(m.createEventEmitter(this._actual,"compositionupdate")).event,this.onCompositionEnd=this._register(m.createEventEmitter(this._actual,"compositionend")).event,this.onInput=this._register(m.createEventEmitter(this._actual,"input")).event,this.onCut=this._register(m.createEventEmitter(this._actual,"cut")).event,this.onCopy=this._register(m.createEventEmitter(this._actual,"copy")).event,this.onPaste=this._register(m.createEventEmitter(this._actual,"paste")).event,this.onFocus=this._register(m.createEventEmitter(this._actual,"focus")).event,this.onBlur=this._register(m.createEventEmitter(this._actual,"blur")).event,this._onSyntheticTap=this._register(new w.Emitter),this.onSyntheticTap=this._onSyntheticTap.event,this._ignoreSelectionChangeTime=0,this._register(m.addDisposableListener(this._actual,i.Tap,()=>this._onSyntheticTap.fire()))}hasFocus(){const a=m.getShadowRoot(this._actual);return a?a.activeElement===this._actual:m.isInDOM(this._actual)?document.activeElement===this._actual:!1}setIgnoreSelectionChangeTime(a){this._ignoreSelectionChangeTime=Date.now()}getIgnoreSelectionChangeTime(){return this._ignoreSelectionChangeTime}resetSelectionChangeTime(){this._ignoreSelectionChangeTime=0}getValue(){return this._actual.value}setValue(a,d){const u=this._actual;u.value!==d&&(this.setIgnoreSelectionChangeTime("setValue"),u.value=d)}getSelectionStart(){return this._actual.selectionDirection==="backward"?this._actual.selectionEnd:this._actual.selectionStart}getSelectionEnd(){return this._actual.selectionDirection==="backward"?this._actual.selectionStart:this._actual.selectionEnd}setSelectionRange(a,d,u){const f=this._actual;let S=null;const v=m.getShadowRoot(f);v?S=v.activeElement:S=document.activeElement;const C=S===f,_=f.selectionStart,L=f.selectionEnd;if(C&&_===d&&L===u){y.isFirefox&&window.parent!==window&&f.focus();return}if(C){this.setIgnoreSelectionChangeTime("setSelectionRange"),f.setSelectionRange(d,u),y.isFirefox&&window.parent!==window&&f.focus();return}try{const E=m.saveParentsScrollTop(f);this.setIgnoreSelectionChangeTime("setSelectionRange"),f.focus(),f.setSelectionRange(d,u),m.restoreParentsScrollTop(f,E)}catch{}}}e.TextAreaWrapper=s}),define(te[98],ie([1,0,22]),function(j,e,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ReplaceCommandThatPreservesSelection=e.ReplaceCommandWithOffsetCursorState=e.ReplaceCommandWithoutChangingPosition=e.ReplaceCommandThatSelectsText=e.ReplaceCommand=void 0;class m{constructor(h,g,t=!1){this._range=h,this._text=g,this.insertsAutoWhitespace=t}getEditOperations(h,g){g.addTrackedEditOperation(this._range,this._text)}computeCursorState(h,g){const i=g.getInverseEditOperations()[0].range;return y.Selection.fromPositions(i.getEndPosition())}}e.ReplaceCommand=m;class D{constructor(h,g){this._range=h,this._text=g}getEditOperations(h,g){g.addTrackedEditOperation(this._range,this._text)}computeCursorState(h,g){const i=g.getInverseEditOperations()[0].range;return y.Selection.fromRange(i,0)}}e.ReplaceCommandThatSelectsText=D;class I{constructor(h,g,t=!1){this._range=h,this._text=g,this.insertsAutoWhitespace=t}getEditOperations(h,g){g.addTrackedEditOperation(this._range,this._text)}computeCursorState(h,g){const i=g.getInverseEditOperations()[0].range;return y.Selection.fromPositions(i.getStartPosition())}}e.ReplaceCommandWithoutChangingPosition=I;class w{constructor(h,g,t,i,n=!1){this._range=h,this._text=g,this._columnDeltaOffset=i,this._lineNumberDeltaOffset=t,this.insertsAutoWhitespace=n}getEditOperations(h,g){g.addTrackedEditOperation(this._range,this._text)}computeCursorState(h,g){const i=g.getInverseEditOperations()[0].range;return y.Selection.fromPositions(i.getEndPosition().delta(this._lineNumberDeltaOffset,this._columnDeltaOffset))}}e.ReplaceCommandWithOffsetCursorState=w;class b{constructor(h,g,t,i=!1){this._range=h,this._text=g,this._initialSelection=t,this._forceMoveMarkers=i,this._selectionId=null}getEditOperations(h,g){g.addTrackedEditOperation(this._range,this._text,this._forceMoveMarkers),this._selectionId=g.trackSelection(this._initialSelection)}computeCursorState(h,g){return g.getTrackedSelection(this._selectionId)}}e.ReplaceCommandThatPreservesSelection=b}),define(te[403],ie([1,0,3,22]),function(j,e,y,m){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SurroundSelectionCommand=void 0;class D{constructor(w,b,p){this._range=w,this._charBeforeSelection=b,this._charAfterSelection=p}getEditOperations(w,b){b.addTrackedEditOperation(new y.Range(this._range.startLineNumber,this._range.startColumn,this._range.startLineNumber,this._range.startColumn),this._charBeforeSelection),b.addTrackedEditOperation(new y.Range(this._range.endLineNumber,this._range.endColumn,this._range.endLineNumber,this._range.endColumn),this._charAfterSelection)}computeCursorState(w,b){const p=b.getInverseEditOperations(),h=p[0].range,g=p[1].range;return new m.Selection(h.endLineNumber,h.endColumn,g.endLineNumber,g.endColumn-this._charAfterSelection.length)}}e.SurroundSelectionCommand=D}),define(te[90],ie([1,0,8,17,110]),function(j,e,y,m,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.decodeUTF16LE=e.createStringBuilder=e.hasTextDecoder=e.getPlatformTextDecoder=void 0;let I;function w(){return I||(I=new TextDecoder("UTF-16LE")),I}let b;function p(){return b||(b=new TextDecoder("UTF-16BE")),b}let h;function g(){return h||(h=m.isLittleEndian()?w():p()),h}e.getPlatformTextDecoder=g,e.hasTextDecoder=typeof TextDecoder!="undefined",e.hasTextDecoder?(e.createStringBuilder=c=>new n(c),e.decodeUTF16LE=t):(e.createStringBuilder=c=>new l,e.decodeUTF16LE=i);function t(c,r,s){const o=new Uint16Array(c.buffer,r,s);return s>0&&(o[0]===65279||o[0]===65534)?i(c,r,s):w().decode(o)}function i(c,r,s){const o=[];let a=0;for(let d=0;d<s;d++){const u=D.readUInt16LE(c,r);r+=2,o[a++]=String.fromCharCode(u)}return o.join("")}class n{constructor(r){this._capacity=r|0,this._buffer=new Uint16Array(this._capacity),this._completedStrings=null,this._bufferLength=0}reset(){this._completedStrings=null,this._bufferLength=0}build(){return this._completedStrings!==null?(this._flushBuffer(),this._completedStrings.join("")):this._buildBuffer()}_buildBuffer(){if(this._bufferLength===0)return"";const r=new Uint16Array(this._buffer.buffer,0,this._bufferLength);return g().decode(r)}_flushBuffer(){const r=this._buildBuffer();this._bufferLength=0,this._completedStrings===null?this._completedStrings=[r]:this._completedStrings[this._completedStrings.length]=r}write1(r){const s=this._capacity-this._bufferLength;s<=1&&(s===0||y.isHighSurrogate(r))&&this._flushBuffer(),this._buffer[this._bufferLength++]=r}appendASCII(r){this._bufferLength===this._capacity&&this._flushBuffer(),this._buffer[this._bufferLength++]=r}appendASCIIString(r){const s=r.length;if(this._bufferLength+s>=this._capacity){this._flushBuffer(),this._completedStrings[this._completedStrings.length]=r;return}for(let o=0;o<s;o++)this._buffer[this._bufferLength++]=r.charCodeAt(o)}}class l{constructor(){this._pieces=[],this._piecesLen=0}reset(){this._pieces=[],this._piecesLen=0}build(){return this._pieces.join("")}write1(r){this._pieces[this._piecesLen++]=String.fromCharCode(r)}appendASCII(r){this._pieces[this._piecesLen++]=String.fromCharCode(r)}appendASCIIString(r){this._pieces[this._piecesLen++]=r}}}),define(te[176],ie([1,0,30,90]),function(j,e,y,m){"use strict";var D;Object.defineProperty(e,"__esModule",{value:!0}),e.VisibleLinesCollection=e.RenderedLinesCollection=void 0;class I{constructor(h){this._createLine=h,this._set(1,[])}flush(){this._set(1,[])}_set(h,g){this._lines=g,this._rendLineNumberStart=h}_get(){return{rendLineNumberStart:this._rendLineNumberStart,lines:this._lines}}getStartLineNumber(){return this._rendLineNumberStart}getEndLineNumber(){return this._rendLineNumberStart+this._lines.length-1}getCount(){return this._lines.length}getLine(h){const g=h-this._rendLineNumberStart;if(g<0||g>=this._lines.length)throw new Error("Illegal value for lineNumber");return this._lines[g]}onLinesDeleted(h,g){if(this.getCount()===0)return null;const t=this.getStartLineNumber(),i=this.getEndLineNumber();if(g<t){const r=g-h+1;return this._rendLineNumberStart-=r,null}if(h>i)return null;let n=0,l=0;for(let r=t;r<=i;r++){const s=r-this._rendLineNumberStart;h<=r&&r<=g&&(l===0?(n=s,l=1):l++)}if(h<t){let r=0;g<t?r=g-h+1:r=t-h,this._rendLineNumberStart-=r}return this._lines.splice(n,l)}onLinesChanged(h,g){if(this.getCount()===0)return!1;const t=this.getStartLineNumber(),i=this.getEndLineNumber();let n=!1;for(let l=h;l<=g;l++)l>=t&&l<=i&&(this._lines[l-this._rendLineNumberStart].onContentChanged(),n=!0);return n}onLinesInserted(h,g){if(this.getCount()===0)return null;const t=g-h+1,i=this.getStartLineNumber(),n=this.getEndLineNumber();if(h<=i)return this._rendLineNumberStart+=t,null;if(h>n)return null;if(t+h>n)return this._lines.splice(h-this._rendLineNumberStart,n-h+1);const l=[];for(let a=0;a<t;a++)l[a]=this._createLine();const c=h-this._rendLineNumberStart,r=this._lines.slice(0,c),s=this._lines.slice(c,this._lines.length-t),o=this._lines.slice(this._lines.length-t,this._lines.length);return this._lines=r.concat(l).concat(s),o}onTokensChanged(h){if(this.getCount()===0)return!1;const g=this.getStartLineNumber(),t=this.getEndLineNumber();let i=!1;for(let n=0,l=h.length;n<l;n++){const c=h[n];if(c.toLineNumber<g||c.fromLineNumber>t)continue;const r=Math.max(g,c.fromLineNumber),s=Math.min(t,c.toLineNumber);for(let o=r;o<=s;o++){const a=o-this._rendLineNumberStart;this._lines[a].onTokensChanged(),i=!0}}return i}}e.RenderedLinesCollection=I;class w{constructor(h){this._host=h,this.domNode=this._createDomNode(),this._linesCollection=new I(()=>this._host.createVisibleLine())}_createDomNode(){const h=(0,y.createFastDomNode)(document.createElement("div"));return h.setClassName("view-layer"),h.setPosition("absolute"),h.domNode.setAttribute("role","presentation"),h.domNode.setAttribute("aria-hidden","true"),h}onConfigurationChanged(h){return!!h.hasChanged(131)}onFlushed(h){return this._linesCollection.flush(),!0}onLinesChanged(h){return this._linesCollection.onLinesChanged(h.fromLineNumber,h.toLineNumber)}onLinesDeleted(h){const g=this._linesCollection.onLinesDeleted(h.fromLineNumber,h.toLineNumber);if(g)for(let t=0,i=g.length;t<i;t++){const n=g[t].getDomNode();n&&this.domNode.domNode.removeChild(n)}return!0}onLinesInserted(h){const g=this._linesCollection.onLinesInserted(h.fromLineNumber,h.toLineNumber);if(g)for(let t=0,i=g.length;t<i;t++){const n=g[t].getDomNode();n&&this.domNode.domNode.removeChild(n)}return!0}onScrollChanged(h){return h.scrollTopChanged}onTokensChanged(h){return this._linesCollection.onTokensChanged(h.ranges)}onZonesChanged(h){return!0}getStartLineNumber(){return this._linesCollection.getStartLineNumber()}getEndLineNumber(){return this._linesCollection.getEndLineNumber()}getVisibleLine(h){return this._linesCollection.getLine(h)}renderLines(h){const g=this._linesCollection._get(),t=new b(this.domNode.domNode,this._host,h),i={rendLineNumberStart:g.rendLineNumberStart,lines:g.lines,linesLength:g.lines.length},n=t.render(i,h.startLineNumber,h.endLineNumber,h.relativeVerticalOffset);this._linesCollection._set(n.rendLineNumberStart,n.lines)}}e.VisibleLinesCollection=w;class b{constructor(h,g,t){this.domNode=h,this.host=g,this.viewportData=t}render(h,g,t,i){const n={rendLineNumberStart:h.rendLineNumberStart,lines:h.lines.slice(0),linesLength:h.linesLength};if(n.rendLineNumberStart+n.linesLength-1<g||t<n.rendLineNumberStart){n.rendLineNumberStart=g,n.linesLength=t-g+1,n.lines=[];for(let l=g;l<=t;l++)n.lines[l-g]=this.host.createVisibleLine();return this._finishRendering(n,!0,i),n}if(this._renderUntouchedLines(n,Math.max(g-n.rendLineNumberStart,0),Math.min(t-n.rendLineNumberStart,n.linesLength-1),i,g),n.rendLineNumberStart>g){const l=g,c=Math.min(t,n.rendLineNumberStart-1);l<=c&&(this._insertLinesBefore(n,l,c,i,g),n.linesLength+=c-l+1)}else if(n.rendLineNumberStart<g){const l=Math.min(n.linesLength,g-n.rendLineNumberStart);l>0&&(this._removeLinesBefore(n,l),n.linesLength-=l)}if(n.rendLineNumberStart=g,n.rendLineNumberStart+n.linesLength-1<t){const l=n.rendLineNumberStart+n.linesLength,c=t;l<=c&&(this._insertLinesAfter(n,l,c,i,g),n.linesLength+=c-l+1)}else if(n.rendLineNumberStart+n.linesLength-1>t){const l=Math.max(0,t-n.rendLineNumberStart+1),r=n.linesLength-1-l+1;r>0&&(this._removeLinesAfter(n,r),n.linesLength-=r)}return this._finishRendering(n,!1,i),n}_renderUntouchedLines(h,g,t,i,n){const l=h.rendLineNumberStart,c=h.lines;for(let r=g;r<=t;r++){const s=l+r;c[r].layoutLine(s,i[s-n])}}_insertLinesBefore(h,g,t,i,n){const l=[];let c=0;for(let r=g;r<=t;r++)l[c++]=this.host.createVisibleLine();h.lines=l.concat(h.lines)}_removeLinesBefore(h,g){for(let t=0;t<g;t++){const i=h.lines[t].getDomNode();i&&this.domNode.removeChild(i)}h.lines.splice(0,g)}_insertLinesAfter(h,g,t,i,n){const l=[];let c=0;for(let r=g;r<=t;r++)l[c++]=this.host.createVisibleLine();h.lines=h.lines.concat(l)}_removeLinesAfter(h,g){const t=h.linesLength-g;for(let i=0;i<g;i++){const n=h.lines[t+i].getDomNode();n&&this.domNode.removeChild(n)}h.lines.splice(t,g)}_finishRenderingNewLines(h,g,t,i){b._ttPolicy&&(t=b._ttPolicy.createHTML(t));const n=this.domNode.lastChild;g||!n?this.domNode.innerHTML=t:n.insertAdjacentHTML("afterend",t);let l=this.domNode.lastChild;for(let c=h.linesLength-1;c>=0;c--){const r=h.lines[c];i[c]&&(r.setDomNode(l),l=l.previousSibling)}}_finishRenderingInvalidLines(h,g,t){const i=document.createElement("div");b._ttPolicy&&(g=b._ttPolicy.createHTML(g)),i.innerHTML=g;for(let n=0;n<h.linesLength;n++){const l=h.lines[n];if(t[n]){const c=i.firstChild,r=l.getDomNode();r.parentNode.replaceChild(c,r),l.setDomNode(c)}}}_finishRendering(h,g,t){const i=b._sb,n=h.linesLength,l=h.lines,c=h.rendLineNumberStart,r=[];{i.reset();let s=!1;for(let o=0;o<n;o++){const a=l[o];r[o]=!1,!(a.getDomNode()||!a.renderLine(o+c,t[o],this.viewportData,i))&&(r[o]=!0,s=!0)}s&&this._finishRenderingNewLines(h,g,i.build(),r)}{i.reset();let s=!1;const o=[];for(let a=0;a<n;a++){const d=l[a];o[a]=!1,!(r[a]||!d.renderLine(a+c,t[a],this.viewportData,i))&&(o[a]=!0,s=!0)}s&&this._finishRenderingInvalidLines(h,i.build(),o)}}}b._ttPolicy=(D=window.trustedTypes)===null||D===void 0?void 0:D.createPolicy("editorViewLayer",{createHTML:p=>p}),b._sb=(0,m.createStringBuilder)(1e5)}),define(te[237],ie([1,0,110,90]),function(j,e,y,m){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.compressConsecutiveTextChanges=e.TextChange=void 0;function D(p){return p.replace(/\n/g,"\\n").replace(/\r/g,"\\r")}class I{constructor(h,g,t,i){this.oldPosition=h,this.oldText=g,this.newPosition=t,this.newText=i}get oldLength(){return this.oldText.length}get oldEnd(){return this.oldPosition+this.oldText.length}get newLength(){return this.newText.length}get newEnd(){return this.newPosition+this.newText.length}toString(){return this.oldText.length===0?`(insert@${this.oldPosition} "${D(this.newText)}")`:this.newText.length===0?`(delete@${this.oldPosition} "${D(this.oldText)}")`:`(replace@${this.oldPosition} "${D(this.oldText)}" with "${D(this.newText)}")`}static _writeStringSize(h){return 4+2*h.length}static _writeString(h,g,t){const i=g.length;y.writeUInt32BE(h,i,t),t+=4;for(let n=0;n<i;n++)y.writeUInt16LE(h,g.charCodeAt(n),t),t+=2;return t}static _readString(h,g){const t=y.readUInt32BE(h,g);return g+=4,(0,m.decodeUTF16LE)(h,g,t)}writeSize(){return 4+4+I._writeStringSize(this.oldText)+I._writeStringSize(this.newText)}write(h,g){return y.writeUInt32BE(h,this.oldPosition,g),g+=4,y.writeUInt32BE(h,this.newPosition,g),g+=4,g=I._writeString(h,this.oldText,g),g=I._writeString(h,this.newText,g),g}static read(h,g,t){const i=y.readUInt32BE(h,g);g+=4;const n=y.readUInt32BE(h,g);g+=4;const l=I._readString(h,g);g+=I._writeStringSize(l);const c=I._readString(h,g);return g+=I._writeStringSize(c),t.push(new I(i,l,n,c)),g}}e.TextChange=I;function w(p,h){return p===null||p.length===0?h:new b(p,h).compress()}e.compressConsecutiveTextChanges=w;class b{constructor(h,g){this._prevEdits=h,this._currEdits=g,this._result=[],this._resultLen=0,this._prevLen=this._prevEdits.length,this._prevDeltaOffset=0,this._currLen=this._currEdits.length,this._currDeltaOffset=0}compress(){let h=0,g=0,t=this._getPrev(h),i=this._getCurr(g);for(;h<this._prevLen||g<this._currLen;){if(t===null){this._acceptCurr(i),i=this._getCurr(++g);continue}if(i===null){this._acceptPrev(t),t=this._getPrev(++h);continue}if(i.oldEnd<=t.newPosition){this._acceptCurr(i),i=this._getCurr(++g);continue}if(t.newEnd<=i.oldPosition){this._acceptPrev(t),t=this._getPrev(++h);continue}if(i.oldPosition<t.newPosition){const[s,o]=b._splitCurr(i,t.newPosition-i.oldPosition);this._acceptCurr(s),i=o;continue}if(t.newPosition<i.oldPosition){const[s,o]=b._splitPrev(t,i.oldPosition-t.newPosition);this._acceptPrev(s),t=o;continue}let c,r;if(i.oldEnd===t.newEnd)c=t,r=i,t=this._getPrev(++h),i=this._getCurr(++g);else if(i.oldEnd<t.newEnd){const[s,o]=b._splitPrev(t,i.oldLength);c=s,r=i,t=o,i=this._getCurr(++g)}else{const[s,o]=b._splitCurr(i,t.newLength);c=t,r=s,t=this._getPrev(++h),i=o}this._result[this._resultLen++]=new I(c.oldPosition,c.oldText,r.newPosition,r.newText),this._prevDeltaOffset+=c.newLength-c.oldLength,this._currDeltaOffset+=r.newLength-r.oldLength}const n=b._merge(this._result);return b._removeNoOps(n)}_acceptCurr(h){this._result[this._resultLen++]=b._rebaseCurr(this._prevDeltaOffset,h),this._currDeltaOffset+=h.newLength-h.oldLength}_getCurr(h){return h<this._currLen?this._currEdits[h]:null}_acceptPrev(h){this._result[this._resultLen++]=b._rebasePrev(this._currDeltaOffset,h),this._prevDeltaOffset+=h.newLength-h.oldLength}_getPrev(h){return h<this._prevLen?this._prevEdits[h]:null}static _rebaseCurr(h,g){return new I(g.oldPosition-h,g.oldText,g.newPosition,g.newText)}static _rebasePrev(h,g){return new I(g.oldPosition,g.oldText,g.newPosition+h,g.newText)}static _splitPrev(h,g){const t=h.newText.substr(0,g),i=h.newText.substr(g);return[new I(h.oldPosition,h.oldText,h.newPosition,t),new I(h.oldEnd,"",h.newPosition+g,i)]}static _splitCurr(h,g){const t=h.oldText.substr(0,g),i=h.oldText.substr(g);return[new I(h.oldPosition,t,h.newPosition,h.newText),new I(h.oldPosition+g,i,h.newEnd,"")]}static _merge(h){if(h.length===0)return h;const g=[];let t=0,i=h[0];for(let n=1;n<h.length;n++){const l=h[n];i.oldEnd===l.oldPosition?i=new I(i.oldPosition,i.oldText+l.oldText,i.newPosition,i.newText+l.newText):(g[t++]=i,i=l)}return g[t++]=i,g}static _removeNoOps(h){if(h.length===0)return h;const g=[];let t=0;for(let i=0;i<h.length;i++){const n=h[i];n.oldText!==n.newText&&(g[t++]=n)}return g}}}),define(te[145],ie([1,0]),function(j,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.EDITOR_MODEL_DEFAULTS=void 0,e.EDITOR_MODEL_DEFAULTS={tabSize:4,indentSize:4,insertSpaces:!0,detectIndentation:!0,trimAutoWhitespace:!0,largeFileOptimizations:!0,bracketPairColorizationOptions:{enabled:!1}}}),define(te[118],ie([1,0,97]),function(j,e,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getMapForWordSeparators=e.WordCharacterClassifier=void 0;class m extends y.CharacterClassifier{constructor(w){super(0);for(let b=0,p=w.length;b<p;b++)this.set(w.charCodeAt(b),2);this.set(32,1),this.set(9,1)}}e.WordCharacterClassifier=m;function D(I){const w={};return b=>(w.hasOwnProperty(b)||(w[b]=I(b)),w[b])}e.getMapForWordSeparators=D(I=>new m(I))}),define(te[146],ie([1,0]),function(j,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getWordAtText=e.ensureValidWordDefinition=e.DEFAULT_WORD_REGEXP=e.USUAL_WORD_SEPARATORS=void 0,e.USUAL_WORD_SEPARATORS="`~!@#$%^&*()-=+[{]}\\|;:'\",.<>/?";function y(b=""){let p="(-?\\d*\\.\\d\\w*)|([^";for(const h of e.USUAL_WORD_SEPARATORS)b.indexOf(h)>=0||(p+="\\"+h);return p+="\\s]+)",new RegExp(p,"g")}e.DEFAULT_WORD_REGEXP=y();function m(b){let p=e.DEFAULT_WORD_REGEXP;if(b&&b instanceof RegExp)if(b.global)p=b;else{let h="g";b.ignoreCase&&(h+="i"),b.multiline&&(h+="m"),b.unicode&&(h+="u"),p=new RegExp(b.source,h)}return p.lastIndex=0,p}e.ensureValidWordDefinition=m;const D={maxLen:1e3,windowSize:15,timeBudget:150};function I(b,p,h,g,t=D){if(h.length>t.maxLen){let r=b-t.maxLen/2;return r<0?r=0:g+=r,h=h.substring(r,b+t.maxLen/2),I(b,p,h,g,t)}const i=Date.now(),n=b-1-g;let l=-1,c=null;for(let r=1;!(Date.now()-i>=t.timeBudget);r++){const s=n-t.windowSize*r;p.lastIndex=Math.max(0,s);const o=w(p,h,n,l);if(!o&&c||(c=o,s<=0))break;l=s}if(c){const r={word:c[0],startColumn:g+1+c.index,endColumn:g+1+c.index+c[0].length};return p.lastIndex=0,r}return null}e.getWordAtText=I;function w(b,p,h,g){let t;for(;t=b.exec(p);){const i=t.index||0;if(i<=h&&b.lastIndex>=h)return t;if(g>0&&i>g)return null}return null}}),define(te[238],ie([1,0,68]),function(j,e,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AtomicTabMoveOperations=void 0;class m{static whitespaceVisibleColumn(I,w,b){const p=I.length;let h=0,g=-1,t=-1;for(let i=0;i<p;i++){if(i===w)return[g,t,h];switch(h%b==0&&(g=i,t=h),I.charCodeAt(i)){case 32:h+=1;break;case 9:h=y.CursorColumns.nextRenderTabStop(h,b);break;default:return[-1,-1,-1]}}return w===p?[g,t,h]:[-1,-1,-1]}static atomicPosition(I,w,b,p){const h=I.length,[g,t,i]=m.whitespaceVisibleColumn(I,w,b);if(i===-1)return-1;let n;switch(p){case 0:n=!0;break;case 1:n=!1;break;case 2:if(i%b==0)return w;n=i%b<=b/2;break}if(n){if(g===-1)return-1;let r=t;for(let s=g;s<h;++s){if(r===t+b)return g;switch(I.charCodeAt(s)){case 32:r+=1;break;case 9:r=y.CursorColumns.nextRenderTabStop(r,b);break;default:return-1}}return r===t+b?g:-1}const l=y.CursorColumns.nextRenderTabStop(i,b);let c=i;for(let r=w;r<h;r++){if(c===l)return r;switch(I.charCodeAt(r)){case 32:c+=1;break;case 9:c=y.CursorColumns.nextRenderTabStop(c,b);break;default:return-1}}return c===l?h:-1}}e.AtomicTabMoveOperations=m}),define(te[404],ie([1,0,138,8]),function(j,e,y,m){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DiffComputer=void 0;const D=3;function I(c,r,s,o){return new y.LcsDiff(c,r,s).ComputeDiff(o)}class w{constructor(r){const s=[],o=[];for(let a=0,d=r.length;a<d;a++)s[a]=i(r[a],1),o[a]=n(r[a],1);this.lines=r,this._startColumns=s,this._endColumns=o}getElements(){const r=[];for(let s=0,o=this.lines.length;s<o;s++)r[s]=this.lines[s].substring(this._startColumns[s]-1,this._endColumns[s]-1);return r}getStrictElement(r){return this.lines[r]}getStartLineNumber(r){return r+1}getEndLineNumber(r){return r+1}createCharSequence(r,s,o){const a=[],d=[],u=[];let f=0;for(let S=s;S<=o;S++){const v=this.lines[S],C=r?this._startColumns[S]:1,_=r?this._endColumns[S]:v.length+1;for(let L=C;L<_;L++)a[f]=v.charCodeAt(L-1),d[f]=S+1,u[f]=L,f++}return new b(a,d,u)}}class b{constructor(r,s,o){this._charCodes=r,this._lineNumbers=s,this._columns=o}getElements(){return this._charCodes}getStartLineNumber(r){return this._lineNumbers[r]}getStartColumn(r){return this._columns[r]}getEndLineNumber(r){return this._lineNumbers[r]}getEndColumn(r){return this._columns[r]+1}}class p{constructor(r,s,o,a,d,u,f,S){this.originalStartLineNumber=r,this.originalStartColumn=s,this.originalEndLineNumber=o,this.originalEndColumn=a,this.modifiedStartLineNumber=d,this.modifiedStartColumn=u,this.modifiedEndLineNumber=f,this.modifiedEndColumn=S}static createFromDiffChange(r,s,o){let a,d,u,f,S,v,C,_;return r.originalLength===0?(a=0,d=0,u=0,f=0):(a=s.getStartLineNumber(r.originalStart),d=s.getStartColumn(r.originalStart),u=s.getEndLineNumber(r.originalStart+r.originalLength-1),f=s.getEndColumn(r.originalStart+r.originalLength-1)),r.modifiedLength===0?(S=0,v=0,C=0,_=0):(S=o.getStartLineNumber(r.modifiedStart),v=o.getStartColumn(r.modifiedStart),C=o.getEndLineNumber(r.modifiedStart+r.modifiedLength-1),_=o.getEndColumn(r.modifiedStart+r.modifiedLength-1)),new p(a,d,u,f,S,v,C,_)}}function h(c){if(c.length<=1)return c;const r=[c[0]];let s=r[0];for(let o=1,a=c.length;o<a;o++){const d=c[o],u=d.originalStart-(s.originalStart+s.originalLength),f=d.modifiedStart-(s.modifiedStart+s.modifiedLength);Math.min(u,f)<D?(s.originalLength=d.originalStart+d.originalLength-s.originalStart,s.modifiedLength=d.modifiedStart+d.modifiedLength-s.modifiedStart):(r.push(d),s=d)}return r}class g{constructor(r,s,o,a,d){this.originalStartLineNumber=r,this.originalEndLineNumber=s,this.modifiedStartLineNumber=o,this.modifiedEndLineNumber=a,this.charChanges=d}static createFromDiffResult(r,s,o,a,d,u,f){let S,v,C,_,L;if(s.originalLength===0?(S=o.getStartLineNumber(s.originalStart)-1,v=0):(S=o.getStartLineNumber(s.originalStart),v=o.getEndLineNumber(s.originalStart+s.originalLength-1)),s.modifiedLength===0?(C=a.getStartLineNumber(s.modifiedStart)-1,_=0):(C=a.getStartLineNumber(s.modifiedStart),_=a.getEndLineNumber(s.modifiedStart+s.modifiedLength-1)),u&&s.originalLength>0&&s.originalLength<20&&s.modifiedLength>0&&s.modifiedLength<20&&d()){const E=o.createCharSequence(r,s.originalStart,s.originalStart+s.originalLength-1),N=a.createCharSequence(r,s.modifiedStart,s.modifiedStart+s.modifiedLength-1);let k=I(E,N,d,!0).changes;f&&(k=h(k)),L=[];for(let M=0,O=k.length;M<O;M++)L.push(p.createFromDiffChange(k[M],E,N))}return new g(S,v,C,_,L)}}class t{constructor(r,s,o){this.shouldComputeCharChanges=o.shouldComputeCharChanges,this.shouldPostProcessCharChanges=o.shouldPostProcessCharChanges,this.shouldIgnoreTrimWhitespace=o.shouldIgnoreTrimWhitespace,this.shouldMakePrettyDiff=o.shouldMakePrettyDiff,this.originalLines=r,this.modifiedLines=s,this.original=new w(r),this.modified=new w(s),this.continueLineDiff=l(o.maxComputationTime),this.continueCharDiff=l(o.maxComputationTime===0?0:Math.min(o.maxComputationTime,5e3))}computeDiff(){if(this.original.lines.length===1&&this.original.lines[0].length===0)return this.modified.lines.length===1&&this.modified.lines[0].length===0?{quitEarly:!1,changes:[]}:{quitEarly:!1,changes:[{originalStartLineNumber:1,originalEndLineNumber:1,modifiedStartLineNumber:1,modifiedEndLineNumber:this.modified.lines.length,charChanges:[{modifiedEndColumn:0,modifiedEndLineNumber:0,modifiedStartColumn:0,modifiedStartLineNumber:0,originalEndColumn:0,originalEndLineNumber:0,originalStartColumn:0,originalStartLineNumber:0}]}]};if(this.modified.lines.length===1&&this.modified.lines[0].length===0)return{quitEarly:!1,changes:[{originalStartLineNumber:1,originalEndLineNumber:this.original.lines.length,modifiedStartLineNumber:1,modifiedEndLineNumber:1,charChanges:[{modifiedEndColumn:0,modifiedEndLineNumber:0,modifiedStartColumn:0,modifiedStartLineNumber:0,originalEndColumn:0,originalEndLineNumber:0,originalStartColumn:0,originalStartLineNumber:0}]}]};const r=I(this.original,this.modified,this.continueLineDiff,this.shouldMakePrettyDiff),s=r.changes,o=r.quitEarly;if(this.shouldIgnoreTrimWhitespace){const f=[];for(let S=0,v=s.length;S<v;S++)f.push(g.createFromDiffResult(this.shouldIgnoreTrimWhitespace,s[S],this.original,this.modified,this.continueCharDiff,this.shouldComputeCharChanges,this.shouldPostProcessCharChanges));return{quitEarly:o,changes:f}}const a=[];let d=0,u=0;for(let f=-1,S=s.length;f<S;f++){const v=f+1<S?s[f+1]:null,C=v?v.originalStart:this.originalLines.length,_=v?v.modifiedStart:this.modifiedLines.length;for(;d<C&&u<_;){const L=this.originalLines[d],E=this.modifiedLines[u];if(L!==E){{let N=i(L,1),k=i(E,1);for(;N>1&&k>1;){const M=L.charCodeAt(N-2),O=E.charCodeAt(k-2);if(M!==O)break;N--,k--}(N>1||k>1)&&this._pushTrimWhitespaceCharChange(a,d+1,1,N,u+1,1,k)}{let N=n(L,1),k=n(E,1);const M=L.length+1,O=E.length+1;for(;N<M&&k<O;){const B=L.charCodeAt(N-1),T=L.charCodeAt(k-1);if(B!==T)break;N++,k++}(N<M||k<O)&&this._pushTrimWhitespaceCharChange(a,d+1,N,M,u+1,k,O)}}d++,u++}v&&(a.push(g.createFromDiffResult(this.shouldIgnoreTrimWhitespace,v,this.original,this.modified,this.continueCharDiff,this.shouldComputeCharChanges,this.shouldPostProcessCharChanges)),d+=v.originalLength,u+=v.modifiedLength)}return{quitEarly:o,changes:a}}_pushTrimWhitespaceCharChange(r,s,o,a,d,u,f){if(this._mergeTrimWhitespaceCharChange(r,s,o,a,d,u,f))return;let S;this.shouldComputeCharChanges&&(S=[new p(s,o,s,a,d,u,d,f)]),r.push(new g(s,s,d,d,S))}_mergeTrimWhitespaceCharChange(r,s,o,a,d,u,f){const S=r.length;if(S===0)return!1;const v=r[S-1];return v.originalEndLineNumber===0||v.modifiedEndLineNumber===0?!1:v.originalEndLineNumber+1===s&&v.modifiedEndLineNumber+1===d?(v.originalEndLineNumber=s,v.modifiedEndLineNumber=d,this.shouldComputeCharChanges&&v.charChanges&&v.charChanges.push(new p(s,o,s,a,d,u,d,f)),!0):!1}}e.DiffComputer=t;function i(c,r){const s=m.firstNonWhitespaceIndex(c);return s===-1?r:s+1}function n(c,r){const s=m.lastNonWhitespaceIndex(c);return s===-1?r:s+2}function l(c){if(c===0)return()=>!0;const r=Date.now();return()=>Date.now()-r<c}}),define(te[239],ie([1,0]),function(j,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.InternalEditorAction=void 0;class y{constructor(D,I,w,b,p,h){this.id=D,this.label=I,this.alias=w,this._precondition=b,this._run=p,this._contextKeyService=h}isSupported(){return this._contextKeyService.contextMatchesRules(this._precondition)}run(){return this.isSupported()?this._run():Promise.resolve(void 0)}}e.InternalEditorAction=y}),define(te[147],ie([1,0]),function(j,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.EditorType=void 0,e.EditorType={ICodeEditor:"vs.editor.ICodeEditor",IDiffEditor:"vs.editor.IDiffEditor"}}),define(te[148],ie([1,0,147]),function(j,e,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getCodeEditor=e.isDiffEditor=e.isCodeEditor=void 0;function m(w){return w&&typeof w.getEditorType=="function"?w.getEditorType()===y.EditorType.ICodeEditor:!1}e.isCodeEditor=m;function D(w){return w&&typeof w.getEditorType=="function"?w.getEditorType()===y.EditorType.IDiffEditor:!1}e.isDiffEditor=D;function I(w){return m(w)?w:D(w)?w.getModifiedEditor():null}e.getCodeEditor=I}),define(te[405],ie([1,0,215,82]),function(j,e,y,m){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.score=void 0;function D(I,w,b,p){if(Array.isArray(I)){let h=0;for(const g of I){const t=D(g,w,b,p);if(t===10)return t;t>h&&(h=t)}return h}else{if(typeof I=="string")return p?I==="*"?5:I===b?10:0:0;if(I){const{language:h,pattern:g,scheme:t,hasAccessToAllModels:i}=I;if(!p&&!i)return 0;let n=0;if(t)if(t===w.scheme)n=10;else if(t==="*")n=5;else return 0;if(h)if(h===b)n=10;else if(h==="*")n=Math.max(n,5);else return 0;if(g){let l;if(typeof g=="string"?l=g:l=Object.assign(Object.assign({},g),{base:(0,m.normalize)(g.base)}),l===w.fsPath||(0,y.match)(l,w.fsPath))n=10;else return 0}return n}else return 0}}e.score=D}),define(te[119],ie([1,0]),function(j,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AutoClosingPairs=e.StandardAutoClosingPairConditional=e.IndentAction=void 0;var y;(function(w){w[w.None=0]="None",w[w.Indent=1]="Indent",w[w.IndentOutdent=2]="IndentOutdent",w[w.Outdent=3]="Outdent"})(y=e.IndentAction||(e.IndentAction={}));class m{constructor(b){if(this._neutralCharacter=null,this._neutralCharacterSearched=!1,this.open=b.open,this.close=b.close,this._inString=!0,this._inComment=!0,this._inRegEx=!0,Array.isArray(b.notIn))for(let p=0,h=b.notIn.length;p<h;p++)switch(b.notIn[p]){case"string":this._inString=!1;break;case"comment":this._inComment=!1;break;case"regex":this._inRegEx=!1;break}}isOK(b){switch(b){case 0:return!0;case 1:return this._inComment;case 2:return this._inString;case 3:return this._inRegEx}}shouldAutoClose(b,p){if(b.getTokenCount()===0)return!0;const h=b.findTokenIndexAtOffset(p-2),g=b.getStandardTokenType(h);return this.isOK(g)}_findNeutralCharacterInRange(b,p){for(let h=b;h<=p;h++){const g=String.fromCharCode(h);if(!this.open.includes(g)&&!this.close.includes(g))return g}return null}findNeutralCharacter(){return this._neutralCharacterSearched||(this._neutralCharacterSearched=!0,this._neutralCharacter||(this._neutralCharacter=this._findNeutralCharacterInRange(48,57)),this._neutralCharacter||(this._neutralCharacter=this._findNeutralCharacterInRange(97,122)),this._neutralCharacter||(this._neutralCharacter=this._findNeutralCharacterInRange(65,90))),this._neutralCharacter}}e.StandardAutoClosingPairConditional=m;class D{constructor(b){this.autoClosingPairsOpenByStart=new Map,this.autoClosingPairsOpenByEnd=new Map,this.autoClosingPairsCloseByStart=new Map,this.autoClosingPairsCloseByEnd=new Map,this.autoClosingPairsCloseSingleChar=new Map;for(const p of b)I(this.autoClosingPairsOpenByStart,p.open.charAt(0),p),I(this.autoClosingPairsOpenByEnd,p.open.charAt(p.open.length-1),p),I(this.autoClosingPairsCloseByStart,p.close.charAt(0),p),I(this.autoClosingPairsCloseByEnd,p.close.charAt(p.close.length-1),p),p.close.length===1&&p.open.length===1&&I(this.autoClosingPairsCloseSingleChar,p.close,p)}}e.AutoClosingPairs=D;function I(w,b,p){w.has(b)?w.get(b).push(p):w.set(b,[p])}}),define(te[406],ie([1,0,97]),function(j,e,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.computeLinks=e.LinkComputer=e.StateMachine=e.Uint8Matrix=void 0;class m{constructor(i,n,l){const c=new Uint8Array(i*n);for(let r=0,s=i*n;r<s;r++)c[r]=l;this._data=c,this.rows=i,this.cols=n}get(i,n){return this._data[i*this.cols+n]}set(i,n,l){this._data[i*this.cols+n]=l}}e.Uint8Matrix=m;class D{constructor(i){let n=0,l=0;for(let r=0,s=i.length;r<s;r++){const[o,a,d]=i[r];a>n&&(n=a),o>l&&(l=o),d>l&&(l=d)}n++,l++;const c=new m(l,n,0);for(let r=0,s=i.length;r<s;r++){const[o,a,d]=i[r];c.set(o,a,d)}this._states=c,this._maxCharCode=n}nextState(i,n){return n<0||n>=this._maxCharCode?0:this._states.get(i,n)}}e.StateMachine=D;let I=null;function w(){return I===null&&(I=new D([[1,104,2],[1,72,2],[1,102,6],[1,70,6],[2,116,3],[2,84,3],[3,116,4],[3,84,4],[4,112,5],[4,80,5],[5,115,9],[5,83,9],[5,58,10],[6,105,7],[6,73,7],[7,108,8],[7,76,8],[8,101,9],[8,69,9],[9,58,10],[10,47,11],[11,47,12]])),I}let b=null;function p(){if(b===null){b=new y.CharacterClassifier(0);const t=` <>'"\u3001\u3002\uFF61\uFF64\uFF0C\uFF0E\uFF1A\uFF1B\u2018\u3008\u300C\u300E\u3014\uFF08\uFF3B\uFF5B\uFF62\uFF63\uFF5D\uFF3D\uFF09\u3015\u300F\u300D\u3009\u2019\uFF40\uFF5E\u2026`;for(let n=0;n<t.length;n++)b.set(t.charCodeAt(n),1);const i=".,;";for(let n=0;n<i.length;n++)b.set(i.charCodeAt(n),2)}return b}class h{static _createLink(i,n,l,c,r){let s=r-1;do{const o=n.charCodeAt(s);if(i.get(o)!==2)break;s--}while(s>c);if(c>0){const o=n.charCodeAt(c-1),a=n.charCodeAt(s);(o===40&&a===41||o===91&&a===93||o===123&&a===125)&&s--}return{range:{startLineNumber:l,startColumn:c+1,endLineNumber:l,endColumn:s+2},url:n.substring(c,s+1)}}static computeLinks(i,n=w()){const l=p(),c=[];for(let r=1,s=i.getLineCount();r<=s;r++){const o=i.getLineContent(r),a=o.length;let d=0,u=0,f=0,S=1,v=!1,C=!1,_=!1,L=!1;for(;d<a;){let E=!1;const N=o.charCodeAt(d);if(S===13){let k;switch(N){case 40:v=!0,k=0;break;case 41:k=v?0:1;break;case 91:_=!0,C=!0,k=0;break;case 93:_=!1,k=C?0:1;break;case 123:L=!0,k=0;break;case 125:k=L?0:1;break;case 39:k=f===34||f===96?0:1;break;case 34:k=f===39||f===96?0:1;break;case 96:k=f===39||f===34?0:1;break;case 42:k=f===42?1:0;break;case 124:k=f===124?1:0;break;case 32:k=_?0:1;break;default:k=l.get(N)}k===1&&(c.push(h._createLink(l,o,r,u,d)),E=!0)}else if(S===12){let k;N===91?(C=!0,k=0):k=l.get(N),k===1?E=!0:S=13}else S=n.nextState(S,N),S===0&&(E=!0);E&&(S=1,v=!1,C=!1,L=!1,u=d+1,f=N),d++}S===13&&c.push(h._createLink(l,o,r,u,a))}return c}}e.LinkComputer=h;function g(t){return!t||typeof t.getLineCount!="function"||typeof t.getLineContent!="function"?[]:h.computeLinks(t)}e.computeLinks=g}),define(te[120],ie([1,0]),function(j,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ignoreBracketsInToken=e.ScopedLineTokens=e.createScopedLineTokens=void 0;function y(I,w){const b=I.getCount(),p=I.findTokenIndexAtOffset(w),h=I.getLanguageId(p);let g=p;for(;g+1<b&&I.getLanguageId(g+1)===h;)g++;let t=p;for(;t>0&&I.getLanguageId(t-1)===h;)t--;return new m(I,h,t,g+1,I.getStartOffset(t),I.getEndOffset(g))}e.createScopedLineTokens=y;class m{constructor(w,b,p,h,g,t){this._scopedLineTokensBrand=void 0,this._actual=w,this.languageId=b,this._firstTokenIndex=p,this._lastTokenIndex=h,this.firstCharOffset=g,this._lastCharOffset=t}getLineContent(){return this._actual.getLineContent().substring(this.firstCharOffset,this._lastCharOffset)}getActualLineContentBefore(w){return this._actual.getLineContent().substring(0,this.firstCharOffset+w)}getTokenCount(){return this._lastTokenIndex-this._firstTokenIndex}findTokenIndexAtOffset(w){return this._actual.findTokenIndexAtOffset(w+this.firstCharOffset)-this._firstTokenIndex}getStandardTokenType(w){return this._actual.getStandardTokenType(w+this._firstTokenIndex)}}e.ScopedLineTokens=m;function D(I){return(I&3)!=0}e.ignoreBracketsInToken=D}),define(te[407],ie([1,0,119]),function(j,e,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CharacterPairSupport=void 0;class m{constructor(w){if(w.autoClosingPairs?this._autoClosingPairs=w.autoClosingPairs.map(b=>new y.StandardAutoClosingPairConditional(b)):w.brackets?this._autoClosingPairs=w.brackets.map(b=>new y.StandardAutoClosingPairConditional({open:b[0],close:b[1]})):this._autoClosingPairs=[],w.colorizedBracketPairs?this._colorizedBracketPairs=D(w.colorizedBracketPairs.map(b=>[b[0],b[1]])):w.brackets?this._colorizedBracketPairs=D(w.brackets.map(b=>[b[0],b[1]]).filter(b=>!(b[0]==="<"&&b[1]===">"))):this._colorizedBracketPairs=[],w.__electricCharacterSupport&&w.__electricCharacterSupport.docComment){const b=w.__electricCharacterSupport.docComment;this._autoClosingPairs.push(new y.StandardAutoClosingPairConditional({open:b.open,close:b.close||""}))}this._autoCloseBefore=typeof w.autoCloseBefore=="string"?w.autoCloseBefore:m.DEFAULT_AUTOCLOSE_BEFORE_LANGUAGE_DEFINED,this._surroundingPairs=w.surroundingPairs||this._autoClosingPairs}getAutoClosingPairs(){return this._autoClosingPairs}getAutoCloseBeforeSet(){return this._autoCloseBefore}getSurroundingPairs(){return this._surroundingPairs}getColorizedBrackets(){return this._colorizedBracketPairs}}e.CharacterPairSupport=m,m.DEFAULT_AUTOCLOSE_BEFORE_LANGUAGE_DEFINED=`;:.,=}])>
|
||
`;function D(I){return I.filter(([w,b])=>w!==""&&b!=="")}}),define(te[408],ie([1,0]),function(j,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IndentRulesSupport=void 0;function y(D){return D.global&&(D.lastIndex=0),!0}class m{constructor(I){this._indentationRules=I}shouldIncrease(I){return!!(this._indentationRules&&this._indentationRules.increaseIndentPattern&&y(this._indentationRules.increaseIndentPattern)&&this._indentationRules.increaseIndentPattern.test(I))}shouldDecrease(I){return!!(this._indentationRules&&this._indentationRules.decreaseIndentPattern&&y(this._indentationRules.decreaseIndentPattern)&&this._indentationRules.decreaseIndentPattern.test(I))}shouldIndentNextLine(I){return!!(this._indentationRules&&this._indentationRules.indentNextLinePattern&&y(this._indentationRules.indentNextLinePattern)&&this._indentationRules.indentNextLinePattern.test(I))}shouldIgnore(I){return!!(this._indentationRules&&this._indentationRules.unIndentedLinePattern&&y(this._indentationRules.unIndentedLinePattern)&&this._indentationRules.unIndentedLinePattern.test(I))}getIndentMetadata(I){let w=0;return this.shouldIncrease(I)&&(w+=1),this.shouldDecrease(I)&&(w+=2),this.shouldIndentNextLine(I)&&(w+=4),this.shouldIgnore(I)&&(w+=8),w}}e.IndentRulesSupport=m}),define(te[409],ie([1,0]),function(j,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BasicInplaceReplace=void 0;class y{constructor(){this._defaultValueSet=[["true","false"],["True","False"],["Private","Public","Friend","ReadOnly","Partial","Protected","WriteOnly"],["public","protected","private"]]}navigateValueSet(D,I,w,b,p){if(D&&I){const h=this.doNavigateValueSet(I,p);if(h)return{range:D,value:h}}if(w&&b){const h=this.doNavigateValueSet(b,p);if(h)return{range:w,value:h}}return null}doNavigateValueSet(D,I){const w=this.numberReplace(D,I);return w!==null?w:this.textReplace(D,I)}numberReplace(D,I){const w=Math.pow(10,D.length-(D.lastIndexOf(".")+1));let b=Number(D),p=parseFloat(D);return!isNaN(b)&&!isNaN(p)&&b===p?b===0&&!I?null:(b=Math.floor(b*w),b+=I?w:-w,String(b/w)):null}textReplace(D,I){return this.valueSetsReplace(this._defaultValueSet,D,I)}valueSetsReplace(D,I,w){let b=null;for(let p=0,h=D.length;b===null&&p<h;p++)b=this.valueSetReplace(D[p],I,w);return b}valueSetReplace(D,I,w){let b=D.indexOf(I);return b>=0?(b+=w?1:-1,b<0?b=D.length-1:b%=D.length,D[b]):null}}e.BasicInplaceReplace=y,y.INSTANCE=new y}),define(te[410],ie([1,0,13,8,119]),function(j,e,y,m,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.OnEnterSupport=void 0;class I{constructor(b){b=b||{},b.brackets=b.brackets||[["(",")"],["{","}"],["[","]"]],this._brackets=[],b.brackets.forEach(p=>{const h=I._createOpenBracketRegExp(p[0]),g=I._createCloseBracketRegExp(p[1]);h&&g&&this._brackets.push({open:p[0],openRegExp:h,close:p[1],closeRegExp:g})}),this._regExpRules=b.onEnterRules||[]}onEnter(b,p,h,g){if(b>=3)for(let t=0,i=this._regExpRules.length;t<i;t++){const n=this._regExpRules[t];if([{reg:n.beforeText,text:h},{reg:n.afterText,text:g},{reg:n.previousLineText,text:p}].every(c=>c.reg?(c.reg.lastIndex=0,c.reg.test(c.text)):!0))return n.action}if(b>=2&&h.length>0&&g.length>0)for(let t=0,i=this._brackets.length;t<i;t++){const n=this._brackets[t];if(n.openRegExp.test(h)&&n.closeRegExp.test(g))return{indentAction:D.IndentAction.IndentOutdent}}if(b>=2&&h.length>0){for(let t=0,i=this._brackets.length;t<i;t++)if(this._brackets[t].openRegExp.test(h))return{indentAction:D.IndentAction.Indent}}return null}static _createOpenBracketRegExp(b){let p=m.escapeRegExpCharacters(b);return/\B/.test(p.charAt(0))||(p="\\b"+p),p+="\\s*$",I._safeRegExp(p)}static _createCloseBracketRegExp(b){let p=m.escapeRegExpCharacters(b);return/\B/.test(p.charAt(p.length-1))||(p=p+"\\b"),p="^\\s*"+p,I._safeRegExp(p)}static _safeRegExp(b){try{return new RegExp(b)}catch(p){return(0,y.onUnexpectedError)(p),null}}}e.OnEnterSupport=I}),define(te[177],ie([1,0,8,90,3]),function(j,e,y,m,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BracketsUtils=e.RichEditBrackets=e.RichEditBracket=void 0;class I{constructor(d,u,f,S,v,C){this._richEditBracketBrand=void 0,this.languageId=d,this.index=u,this.open=f,this.close=S,this.forwardRegex=v,this.reversedRegex=C,this._openSet=I._toSet(this.open),this._closeSet=I._toSet(this.close)}isOpen(d){return this._openSet.has(d)}isClose(d){return this._closeSet.has(d)}static _toSet(d){const u=new Set;for(const f of d)u.add(f);return u}}e.RichEditBracket=I;function w(a){const d=a.length;a=a.map(C=>[C[0].toLowerCase(),C[1].toLowerCase()]);const u=[];for(let C=0;C<d;C++)u[C]=C;const f=(C,_)=>{const[L,E]=C,[N,k]=_;return L===N||L===k||E===N||E===k},S=(C,_)=>{const L=Math.min(C,_),E=Math.max(C,_);for(let N=0;N<d;N++)u[N]===E&&(u[N]=L)};for(let C=0;C<d;C++){const _=a[C];for(let L=C+1;L<d;L++){const E=a[L];f(_,E)&&S(u[C],u[L])}}const v=[];for(let C=0;C<d;C++){const _=[],L=[];for(let E=0;E<d;E++)if(u[E]===C){const[N,k]=a[E];_.push(N),L.push(k)}_.length>0&&v.push({open:_,close:L})}return v}class b{constructor(d,u){this._richEditBracketsBrand=void 0;const f=w(u);this.brackets=f.map((S,v)=>new I(d,v,S.open,S.close,t(S.open,S.close,f,v),i(S.open,S.close,f,v))),this.forwardRegex=n(this.brackets),this.reversedRegex=l(this.brackets),this.textIsBracket={},this.textIsOpenBracket={},this.maxBracketLength=0;for(const S of this.brackets){for(const v of S.open)this.textIsBracket[v]=S,this.textIsOpenBracket[v]=!0,this.maxBracketLength=Math.max(this.maxBracketLength,v.length);for(const v of S.close)this.textIsBracket[v]=S,this.textIsOpenBracket[v]=!1,this.maxBracketLength=Math.max(this.maxBracketLength,v.length)}}}e.RichEditBrackets=b;function p(a,d,u,f){for(let S=0,v=d.length;S<v;S++){if(S===u)continue;const C=d[S];for(const _ of C.open)_.indexOf(a)>=0&&f.push(_);for(const _ of C.close)_.indexOf(a)>=0&&f.push(_)}}function h(a,d){return a.length-d.length}function g(a){if(a.length<=1)return a;const d=[],u=new Set;for(const f of a)u.has(f)||(d.push(f),u.add(f));return d}function t(a,d,u,f){let S=[];S=S.concat(a),S=S.concat(d);for(let v=0,C=S.length;v<C;v++)p(S[v],u,f,S);return S=g(S),S.sort(h),S.reverse(),r(S)}function i(a,d,u,f){let S=[];S=S.concat(a),S=S.concat(d);for(let v=0,C=S.length;v<C;v++)p(S[v],u,f,S);return S=g(S),S.sort(h),S.reverse(),r(S.map(s))}function n(a){let d=[];for(const u of a){for(const f of u.open)d.push(f);for(const f of u.close)d.push(f)}return d=g(d),r(d)}function l(a){let d=[];for(const u of a){for(const f of u.open)d.push(f);for(const f of u.close)d.push(f)}return d=g(d),r(d.map(s))}function c(a){const d=/^[\w ]+$/.test(a);return a=y.escapeRegExpCharacters(a),d?`\\b${a}\\b`:a}function r(a){const d=`(${a.map(c).join(")|(")})`;return y.createRegExp(d,!0)}const s=function(){function a(f){if(m.hasTextDecoder){const S=new Uint16Array(f.length);let v=0;for(let C=f.length-1;C>=0;C--)S[v++]=f.charCodeAt(C);return m.getPlatformTextDecoder().decode(S)}else{const S=[];let v=0;for(let C=f.length-1;C>=0;C--)S[v++]=f.charAt(C);return S.join("")}}let d=null,u=null;return function(S){return d!==S&&(d=S,u=a(d)),u}}();class o{static _findPrevBracketInText(d,u,f,S){const v=f.match(d);if(!v)return null;const C=f.length-(v.index||0),_=v[0].length,L=S+C;return new D.Range(u,L-_+1,u,L+1)}static findPrevBracketInRange(d,u,f,S,v){const _=s(f).substring(f.length-v,f.length-S);return this._findPrevBracketInText(d,u,_,S)}static findNextBracketInText(d,u,f,S){const v=f.match(d);if(!v)return null;const C=v.index||0,_=v[0].length;if(_===0)return null;const L=S+C;return new D.Range(u,L+1,u,L+1+_)}static findNextBracketInRange(d,u,f,S,v){const C=f.substring(S,v);return this.findNextBracketInText(d,u,C,S)}}e.BracketsUtils=o}),define(te[411],ie([1,0,19,120,177]),function(j,e,y,m,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BracketElectricCharacterSupport=void 0;class I{constructor(b){this._richEditBrackets=b}getElectricCharacters(){const b=[];if(this._richEditBrackets)for(const p of this._richEditBrackets.brackets)for(const h of p.close){const g=h.charAt(h.length-1);b.push(g)}return(0,y.distinct)(b)}onElectricCharacter(b,p,h){if(!this._richEditBrackets||this._richEditBrackets.brackets.length===0)return null;const g=p.findTokenIndexAtOffset(h-1);if((0,m.ignoreBracketsInToken)(p.getStandardTokenType(g)))return null;const t=this._richEditBrackets.reversedRegex,i=p.getLineContent().substring(0,h-1)+b,n=D.BracketsUtils.findPrevBracketInRange(t,1,i,0,i.length);if(!n)return null;const l=i.substring(n.startColumn-1,n.endColumn-1).toLowerCase();if(this._richEditBrackets.textIsOpenBracket[l])return null;const r=p.getActualLineContentBefore(n.startColumn-1);return/^\s*$/.test(r)?{matchOpenBracket:l}:null}}e.BracketElectricCharacterSupport=I}),define(te[412],ie([1,0,29]),function(j,e,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.generateTokensCSSForColorMap=e.ThemeTrieElement=e.ThemeTrieElementRule=e.strcmp=e.toStandardTokenType=e.TokenTheme=e.ColorMap=e.parseTokenTheme=e.ParsedTokenThemeRule=void 0;class m{constructor(r,s,o,a,d){this._parsedThemeRuleBrand=void 0,this.token=r,this.index=s,this.fontStyle=o,this.foreground=a,this.background=d}}e.ParsedTokenThemeRule=m;function D(c){if(!c||!Array.isArray(c))return[];const r=[];let s=0;for(let o=0,a=c.length;o<a;o++){const d=c[o];let u=-1;if(typeof d.fontStyle=="string"){u=0;const v=d.fontStyle.split(" ");for(let C=0,_=v.length;C<_;C++)switch(v[C]){case"italic":u=u|1;break;case"bold":u=u|2;break;case"underline":u=u|4;break;case"strikethrough":u=u|8;break}}let f=null;typeof d.foreground=="string"&&(f=d.foreground);let S=null;typeof d.background=="string"&&(S=d.background),r[s++]=new m(d.token||"",o,u,f,S)}return r}e.parseTokenTheme=D;function I(c,r){c.sort((C,_)=>{const L=t(C.token,_.token);return L!==0?L:C.index-_.index});let s=0,o="000000",a="ffffff";for(;c.length>=1&&c[0].token==="";){const C=c.shift();C.fontStyle!==-1&&(s=C.fontStyle),C.foreground!==null&&(o=C.foreground),C.background!==null&&(a=C.background)}const d=new b;for(let C of r)d.getId(C);const u=d.getId(o),f=d.getId(a),S=new i(s,u,f),v=new n(S);for(let C=0,_=c.length;C<_;C++){const L=c[C];v.insert(L.token,L.fontStyle,d.getId(L.foreground),d.getId(L.background))}return new p(d,v)}const w=/^#?([0-9A-Fa-f]{6})([0-9A-Fa-f]{2})?$/;class b{constructor(){this._lastColorId=0,this._id2color=[],this._color2id=new Map}getId(r){if(r===null)return 0;const s=r.match(w);if(!s)throw new Error("Illegal value for token color: "+r);r=s[1].toUpperCase();let o=this._color2id.get(r);return o||(o=++this._lastColorId,this._color2id.set(r,o),this._id2color[o]=y.Color.fromHex("#"+r),o)}getColorMap(){return this._id2color.slice(0)}}e.ColorMap=b;class p{constructor(r,s){this._colorMap=r,this._root=s,this._cache=new Map}static createFromRawTokenTheme(r,s){return this.createFromParsedTokenTheme(D(r),s)}static createFromParsedTokenTheme(r,s){return I(r,s)}getColorMap(){return this._colorMap.getColorMap()}_match(r){return this._root.match(r)}match(r,s){let o=this._cache.get(s);if(typeof o=="undefined"){const a=this._match(s),d=g(s);o=(a.metadata|d<<8)>>>0,this._cache.set(s,o)}return(o|r<<0)>>>0}}e.TokenTheme=p;const h=/\b(comment|string|regex|regexp)\b/;function g(c){const r=c.match(h);if(!r)return 0;switch(r[1]){case"comment":return 1;case"string":return 2;case"regex":return 3;case"regexp":return 3}throw new Error("Unexpected match for standard token type!")}e.toStandardTokenType=g;function t(c,r){return c<r?-1:c>r?1:0}e.strcmp=t;class i{constructor(r,s,o){this._themeTrieElementRuleBrand=void 0,this._fontStyle=r,this._foreground=s,this._background=o,this.metadata=(this._fontStyle<<10|this._foreground<<14|this._background<<23)>>>0}clone(){return new i(this._fontStyle,this._foreground,this._background)}acceptOverwrite(r,s,o){r!==-1&&(this._fontStyle=r),s!==0&&(this._foreground=s),o!==0&&(this._background=o),this.metadata=(this._fontStyle<<10|this._foreground<<14|this._background<<23)>>>0}}e.ThemeTrieElementRule=i;class n{constructor(r){this._themeTrieElementBrand=void 0,this._mainRule=r,this._children=new Map}match(r){if(r==="")return this._mainRule;const s=r.indexOf(".");let o,a;s===-1?(o=r,a=""):(o=r.substring(0,s),a=r.substring(s+1));const d=this._children.get(o);return typeof d!="undefined"?d.match(a):this._mainRule}insert(r,s,o,a){if(r===""){this._mainRule.acceptOverwrite(s,o,a);return}const d=r.indexOf(".");let u,f;d===-1?(u=r,f=""):(u=r.substring(0,d),f=r.substring(d+1));let S=this._children.get(u);typeof S=="undefined"&&(S=new n(this._mainRule.clone()),this._children.set(u,S)),S.insert(f,s,o,a)}}e.ThemeTrieElement=n;function l(c){const r=[];for(let s=1,o=c.length;s<o;s++){const a=c[s];r[s]=`.mtk${s} { color: ${a}; }`}return r.push(".mtki { font-style: italic; }"),r.push(".mtkb { font-weight: bold; }"),r.push(".mtku { text-decoration: underline; text-underline-position: under; }"),r.push(".mtks { text-decoration: line-through; }"),r.push(".mtks.mtku { text-decoration: underline line-through; text-underline-position: under; }"),r.join(`
|
||
`)}e.generateTokensCSSForColorMap=l}),define(te[49],ie([1,0,39]),function(j,e,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.shouldSynchronizeModel=e.ApplyEditsResult=e.SearchData=e.ValidAnnotatedEditOperation=e.FindMatch=e.TextModelResolvedOptions=e.InjectedTextCursorStops=e.MinimapPosition=e.OverviewRulerLane=void 0;var m;(function(i){i[i.Left=1]="Left",i[i.Center=2]="Center",i[i.Right=4]="Right",i[i.Full=7]="Full"})(m=e.OverviewRulerLane||(e.OverviewRulerLane={}));var D;(function(i){i[i.Inline=1]="Inline",i[i.Gutter=2]="Gutter"})(D=e.MinimapPosition||(e.MinimapPosition={}));var I;(function(i){i[i.Both=0]="Both",i[i.Right=1]="Right",i[i.Left=2]="Left",i[i.None=3]="None"})(I=e.InjectedTextCursorStops||(e.InjectedTextCursorStops={}));class w{constructor(n){this._textModelResolvedOptionsBrand=void 0,this.tabSize=Math.max(1,n.tabSize|0),this.indentSize=n.tabSize|0,this.insertSpaces=Boolean(n.insertSpaces),this.defaultEOL=n.defaultEOL|0,this.trimAutoWhitespace=Boolean(n.trimAutoWhitespace),this.bracketPairColorizationOptions=n.bracketPairColorizationOptions}equals(n){return this.tabSize===n.tabSize&&this.indentSize===n.indentSize&&this.insertSpaces===n.insertSpaces&&this.defaultEOL===n.defaultEOL&&this.trimAutoWhitespace===n.trimAutoWhitespace&&(0,y.equals)(this.bracketPairColorizationOptions,n.bracketPairColorizationOptions)}createChangeEvent(n){return{tabSize:this.tabSize!==n.tabSize,indentSize:this.indentSize!==n.indentSize,insertSpaces:this.insertSpaces!==n.insertSpaces,trimAutoWhitespace:this.trimAutoWhitespace!==n.trimAutoWhitespace}}}e.TextModelResolvedOptions=w;class b{constructor(n,l){this._findMatchBrand=void 0,this.range=n,this.matches=l}}e.FindMatch=b;class p{constructor(n,l,c,r,s,o){this.identifier=n,this.range=l,this.text=c,this.forceMoveMarkers=r,this.isAutoWhitespaceEdit=s,this._isTracked=o}}e.ValidAnnotatedEditOperation=p;class h{constructor(n,l,c){this.regex=n,this.wordSeparators=l,this.simpleSearch=c}}e.SearchData=h;class g{constructor(n,l,c){this.reverseEdits=n,this.changes=l,this.trimAutoWhitespaceLineNumbers=c}}e.ApplyEditsResult=g;function t(i){return!i.isTooLargeForSyncing()&&!i.isForSimpleWidget}e.shouldSynchronizeModel=t}),define(te[413],ie([1,0,4,2,49,405]),function(j,e,y,m,D,I){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.LanguageFeatureRegistry=void 0;function w(p){return typeof p=="string"?!1:Array.isArray(p)?p.every(w):!!p.exclusive}class b{constructor(){this._clock=0,this._entries=[],this._onDidChange=new y.Emitter}get onDidChange(){return this._onDidChange.event}register(h,g){let t={selector:h,provider:g,_score:-1,_time:this._clock++};return this._entries.push(t),this._lastCandidate=void 0,this._onDidChange.fire(this._entries.length),(0,m.toDisposable)(()=>{if(t){const i=this._entries.indexOf(t);i>=0&&(this._entries.splice(i,1),this._lastCandidate=void 0,this._onDidChange.fire(this._entries.length),t=void 0)}})}has(h){return this.all(h).length>0}all(h){if(!h)return[];this._updateScores(h);const g=[];for(let t of this._entries)t._score>0&&g.push(t.provider);return g}ordered(h){const g=[];return this._orderedForEach(h,t=>g.push(t.provider)),g}orderedGroups(h){const g=[];let t,i;return this._orderedForEach(h,n=>{t&&i===n._score?t.push(n.provider):(i=n._score,t=[n.provider],g.push(t))}),g}_orderedForEach(h,g){if(!!h){this._updateScores(h);for(const t of this._entries)t._score>0&&g(t)}}_updateScores(h){const g={uri:h.uri.toString(),language:h.getLanguageId()};if(!(this._lastCandidate&&this._lastCandidate.language===g.language&&this._lastCandidate.uri===g.uri)){this._lastCandidate=g;for(let t of this._entries)if(t._score=(0,I.score)(t.selector,h.uri,h.getLanguageId(),(0,D.shouldSynchronizeModel)(h)),w(t.selector)&&t._score>0){for(let i of this._entries)i._score=0;t._score=1e3;break}this._entries.sort(b._compareByScoreAndTime)}}static _compareByScoreAndTime(h,g){return h._score<g._score?1:h._score>g._score?-1:h._time<g._time?1:h._time>g._time?-1:0}}e.LanguageFeatureRegistry=b}),define(te[83],ie([1,0,8,3]),function(j,e,y,m){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.lengthOfString=e.lengthsToRange=e.positionToLength=e.lengthGreaterThanEqual=e.lengthLessThanEqual=e.lengthLessThan=e.lengthDiffNonNegative=e.lengthAdd=e.lengthGetColumnCountIfZeroLineCount=e.lengthGetLineCount=e.lengthToObj=e.toLength=e.lengthIsZero=e.lengthZero=e.lengthDiff=e.LengthObj=void 0;class D{constructor(u,f){this.lineCount=u,this.columnCount=f}toString(){return`${this.lineCount},${this.columnCount}`}}e.LengthObj=D,D.zero=new D(0,0);function I(d,u,f,S){return d!==f?p(f-d,S):p(0,S-u)}e.lengthDiff=I,e.lengthZero=0;function w(d){return d===0}e.lengthIsZero=w;const b=Math.pow(2,26);function p(d,u){return d*b+u}e.toLength=p;function h(d){const u=d,f=Math.floor(u/b),S=u-f*b;return new D(f,S)}e.lengthToObj=h;function g(d){return Math.floor(d/b)}e.lengthGetLineCount=g;function t(d){return d}e.lengthGetColumnCountIfZeroLineCount=t;function i(d,u){return u<b?d+u:d-d%b+u}e.lengthAdd=i;function n(d,u){const f=d,S=u;if(S-f<=0)return e.lengthZero;const C=Math.floor(f/b),_=Math.floor(S/b),L=S-_*b;if(C===_){const E=f-C*b;return p(0,L-E)}else return p(_-C,L)}e.lengthDiffNonNegative=n;function l(d,u){return d<u}e.lengthLessThan=l;function c(d,u){return d<=u}e.lengthLessThanEqual=c;function r(d,u){return d>=u}e.lengthGreaterThanEqual=r;function s(d){return p(d.lineNumber-1,d.column-1)}e.positionToLength=s;function o(d,u){const f=d,S=Math.floor(f/b),v=f-S*b,C=u,_=Math.floor(C/b),L=C-_*b;return new m.Range(S+1,v+1,_+1,L+1)}e.lengthsToRange=o;function a(d){const u=(0,y.splitLines)(d);return p(u.length-1,u[u.length-1].length)}e.lengthOfString=a}),define(te[240],ie([1,0,83]),function(j,e,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BeforeEditPositionMapper=e.TextEditInfo=void 0;class m{constructor(b,p,h){this.startOffset=b,this.endOffset=p,this.newLength=h}}e.TextEditInfo=m;class D{constructor(b,p){this.documentLength=p,this.nextEditIdx=0,this.deltaOldToNewLineCount=0,this.deltaOldToNewColumnCount=0,this.deltaLineIdxInOld=-1,this.edits=b.map(h=>I.from(h))}getOffsetBeforeChange(b){return this.adjustNextEdit(b),this.translateCurToOld(b)}getDistanceToNextChange(b){this.adjustNextEdit(b);const p=this.edits[this.nextEditIdx],h=p?this.translateOldToCur(p.offsetObj):this.documentLength;return(0,y.lengthDiffNonNegative)(b,h)}translateOldToCur(b){return b.lineCount===this.deltaLineIdxInOld?(0,y.toLength)(b.lineCount+this.deltaOldToNewLineCount,b.columnCount+this.deltaOldToNewColumnCount):(0,y.toLength)(b.lineCount+this.deltaOldToNewLineCount,b.columnCount)}translateCurToOld(b){const p=(0,y.lengthToObj)(b);return p.lineCount-this.deltaOldToNewLineCount===this.deltaLineIdxInOld?(0,y.toLength)(p.lineCount-this.deltaOldToNewLineCount,p.columnCount-this.deltaOldToNewColumnCount):(0,y.toLength)(p.lineCount-this.deltaOldToNewLineCount,p.columnCount)}adjustNextEdit(b){for(;this.nextEditIdx<this.edits.length;){const p=this.edits[this.nextEditIdx],h=this.translateOldToCur(p.endOffsetAfterObj);if((0,y.lengthLessThanEqual)(h,b)){this.nextEditIdx++;const g=(0,y.lengthToObj)(h),t=(0,y.lengthToObj)(this.translateOldToCur(p.endOffsetBeforeObj)),i=g.lineCount-t.lineCount;this.deltaOldToNewLineCount+=i;const n=this.deltaLineIdxInOld===p.endOffsetBeforeObj.lineCount?this.deltaOldToNewColumnCount:0,l=g.columnCount-t.columnCount;this.deltaOldToNewColumnCount=n+l,this.deltaLineIdxInOld=p.endOffsetBeforeObj.lineCount}else break}}}e.BeforeEditPositionMapper=D;class I{constructor(b,p,h){this.endOffsetBeforeObj=(0,y.lengthToObj)(p),this.endOffsetAfterObj=(0,y.lengthToObj)((0,y.lengthAdd)(b,h)),this.offsetObj=(0,y.lengthToObj)(b)}static from(b){return new I(b.startOffset,b.endOffset,b.newLength)}}}),define(te[414],ie([1,0,83]),function(j,e,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.NodeReader=void 0;class m{constructor(b){this.lastOffset=y.lengthZero,this.nextNodes=[b],this.offsets=[y.lengthZero],this.idxs=[]}readLongestNodeAt(b,p){if((0,y.lengthLessThan)(b,this.lastOffset))throw new Error("Invalid offset");for(this.lastOffset=b;;){const h=I(this.nextNodes);if(!h)return;const g=I(this.offsets);if((0,y.lengthLessThan)(b,g))return;if((0,y.lengthLessThan)(g,b))if((0,y.lengthAdd)(g,h.length)<=b)this.nextNodeAfterCurrent();else{const t=D(h);t!==-1?(this.nextNodes.push(h.getChild(t)),this.offsets.push(g),this.idxs.push(t)):this.nextNodeAfterCurrent()}else{if(p(h))return this.nextNodeAfterCurrent(),h;{const t=D(h);if(t===-1){this.nextNodeAfterCurrent();return}else this.nextNodes.push(h.getChild(t)),this.offsets.push(g),this.idxs.push(t)}}}}nextNodeAfterCurrent(){for(;;){const b=I(this.offsets),p=I(this.nextNodes);if(this.nextNodes.pop(),this.offsets.pop(),this.idxs.length===0)break;const h=I(this.nextNodes),g=D(h,this.idxs[this.idxs.length-1]);if(g!==-1){this.nextNodes.push(h.getChild(g)),this.offsets.push((0,y.lengthAdd)(b,p.length)),this.idxs[this.idxs.length-1]=g;break}else this.idxs.pop()}}}e.NodeReader=m;function D(w,b=-1){for(;;){if(b++,b>=w.childrenLength)return-1;if(w.getChild(b))return b}}function I(w){return w.length>0?w[w.length-1]:void 0}}),define(te[99],ie([1,0]),function(j,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DenseKeyProvider=e.identityKeyProvider=e.SmallImmutableSet=void 0;const y=new Array;class m{constructor(w,b){this.items=w,this.additionalItems=b}static create(w,b){if(w<=128&&b.length===0){let p=m.cache[w];return p||(p=new m(w,b),m.cache[w]=p),p}return new m(w,b)}static getEmpty(){return this.empty}add(w,b){const p=b.getKey(w);let h=p>>5;if(h===0){const t=1<<p|this.items;return t===this.items?this:m.create(t,this.additionalItems)}h--;const g=this.additionalItems.slice(0);for(;g.length<h;)g.push(0);return g[h]|=1<<(p&31),m.create(this.items,g)}merge(w){const b=this.items|w.items;if(this.additionalItems===y&&w.additionalItems===y)return b===this.items?this:b===w.items?w:m.create(b,y);const p=new Array;for(let h=0;h<Math.max(this.additionalItems.length,w.additionalItems.length);h++){const g=this.additionalItems[h]||0,t=w.additionalItems[h]||0;p.push(g|t)}return m.create(b,p)}intersects(w){if((this.items&w.items)!=0)return!0;for(let b=0;b<Math.min(this.additionalItems.length,w.additionalItems.length);b++)if((this.additionalItems[b]&w.additionalItems[b])!=0)return!0;return!1}}e.SmallImmutableSet=m,m.cache=new Array(129),m.empty=m.create(0,y),e.identityKeyProvider={getKey(I){return I}};class D{constructor(){this.items=new Map}getKey(w){let b=this.items.get(w);return b===void 0&&(b=this.items.size,this.items.set(w,b)),b}}e.DenseKeyProvider=D}),define(te[149],ie([1,0,68,83,99]),function(j,e,y,m,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.InvalidBracketAstNode=e.BracketAstNode=e.TextAstNode=e.ListAstNode=e.PairAstNode=void 0;class I{constructor(o){this._length=o}get length(){return this._length}}class w extends I{constructor(o,a,d,u,f){super(o);this.openingBracket=a,this.child=d,this.closingBracket=u,this.missingOpeningBracketIds=f}static create(o,a,d){let u=o.length;return a&&(u=(0,m.lengthAdd)(u,a.length)),d&&(u=(0,m.lengthAdd)(u,d.length)),new w(u,o,a,d,a?a.missingOpeningBracketIds:D.SmallImmutableSet.getEmpty())}get kind(){return 2}get listHeight(){return 0}get childrenLength(){return 3}getChild(o){switch(o){case 0:return this.openingBracket;case 1:return this.child;case 2:return this.closingBracket}throw new Error("Invalid child index")}get children(){const o=new Array;return o.push(this.openingBracket),this.child&&o.push(this.child),this.closingBracket&&o.push(this.closingBracket),o}canBeReused(o){return!(this.closingBracket===null||o.intersects(this.missingOpeningBracketIds))}deepClone(){return new w(this.length,this.openingBracket.deepClone(),this.child&&this.child.deepClone(),this.closingBracket&&this.closingBracket.deepClone(),this.missingOpeningBracketIds)}computeMinIndentation(o,a){return this.child?this.child.computeMinIndentation((0,m.lengthAdd)(o,this.openingBracket.length),a):Number.MAX_SAFE_INTEGER}}e.PairAstNode=w;class b extends I{constructor(o,a,d){super(o);this.listHeight=a,this._missingOpeningBracketIds=d,this.cachedMinIndentation=-1}static create23(o,a,d,u=!1){let f=o.length,S=o.missingOpeningBracketIds;if(o.listHeight!==a.listHeight)throw new Error("Invalid list heights");if(f=(0,m.lengthAdd)(f,a.length),S=S.merge(a.missingOpeningBracketIds),d){if(o.listHeight!==d.listHeight)throw new Error("Invalid list heights");f=(0,m.lengthAdd)(f,d.length),S=S.merge(d.missingOpeningBracketIds)}return u?new h(f,o.listHeight+1,o,a,d,S):new p(f,o.listHeight+1,o,a,d,S)}static getEmpty(){return new t(m.lengthZero,0,[],D.SmallImmutableSet.getEmpty())}get kind(){return 4}get missingOpeningBracketIds(){return this._missingOpeningBracketIds}throwIfImmutable(){}makeLastElementMutable(){this.throwIfImmutable();const o=this.childrenLength;if(o===0)return;const a=this.getChild(o-1),d=a.kind===4?a.toMutable():a;return a!==d&&this.setChild(o-1,d),d}makeFirstElementMutable(){if(this.throwIfImmutable(),this.childrenLength===0)return;const a=this.getChild(0),d=a.kind===4?a.toMutable():a;return a!==d&&this.setChild(0,d),d}canBeReused(o){if(o.intersects(this.missingOpeningBracketIds))return!1;let a=this,d;for(;a.kind===4&&(d=a.childrenLength)>0;)a=a.getChild(d-1);return a.canBeReused(o)}handleChildrenChanged(){this.throwIfImmutable();const o=this.childrenLength;let a=this.getChild(0).length,d=this.getChild(0).missingOpeningBracketIds;for(let u=1;u<o;u++){const f=this.getChild(u);a=(0,m.lengthAdd)(a,f.length),d=d.merge(f.missingOpeningBracketIds)}this._length=a,this._missingOpeningBracketIds=d,this.cachedMinIndentation=-1}computeMinIndentation(o,a){if(this.cachedMinIndentation!==-1)return this.cachedMinIndentation;let d=Number.MAX_SAFE_INTEGER,u=o;for(let f=0;f<this.childrenLength;f++){const S=this.getChild(f);S&&(d=Math.min(d,S.computeMinIndentation(u,a)),u=(0,m.lengthAdd)(u,S.length))}return this.cachedMinIndentation=d,d}}e.ListAstNode=b;class p extends b{constructor(o,a,d,u,f,S){super(o,a,S);this._item1=d,this._item2=u,this._item3=f}get childrenLength(){return this._item3!==null?3:2}getChild(o){switch(o){case 0:return this._item1;case 1:return this._item2;case 2:return this._item3}throw new Error("Invalid child index")}setChild(o,a){switch(o){case 0:this._item1=a;return;case 1:this._item2=a;return;case 2:this._item3=a;return}throw new Error("Invalid child index")}get children(){return this._item3?[this._item1,this._item2,this._item3]:[this._item1,this._item2]}get item1(){return this._item1}get item2(){return this._item2}get item3(){return this._item3}deepClone(){return new p(this.length,this.listHeight,this._item1.deepClone(),this._item2.deepClone(),this._item3?this._item3.deepClone():null,this.missingOpeningBracketIds)}appendChildOfSameHeight(o){if(this._item3)throw new Error("Cannot append to a full (2,3) tree node");this.throwIfImmutable(),this._item3=o,this.handleChildrenChanged()}unappendChild(){if(!this._item3)throw new Error("Cannot remove from a non-full (2,3) tree node");this.throwIfImmutable();const o=this._item3;return this._item3=null,this.handleChildrenChanged(),o}prependChildOfSameHeight(o){if(this._item3)throw new Error("Cannot prepend to a full (2,3) tree node");this.throwIfImmutable(),this._item3=this._item2,this._item2=this._item1,this._item1=o,this.handleChildrenChanged()}unprependChild(){if(!this._item3)throw new Error("Cannot remove from a non-full (2,3) tree node");this.throwIfImmutable();const o=this._item1;return this._item1=this._item2,this._item2=this._item3,this._item3=null,this.handleChildrenChanged(),o}toMutable(){return this}}class h extends p{toMutable(){return new p(this.length,this.listHeight,this.item1,this.item2,this.item3,this.missingOpeningBracketIds)}throwIfImmutable(){throw new Error("this instance is immutable")}}class g extends b{constructor(o,a,d,u){super(o,a,u);this._children=d}get childrenLength(){return this._children.length}getChild(o){return this._children[o]}setChild(o,a){this._children[o]=a}get children(){return this._children}deepClone(){const o=new Array(this._children.length);for(let a=0;a<this._children.length;a++)o[a]=this._children[a].deepClone();return new g(this.length,this.listHeight,o,this.missingOpeningBracketIds)}appendChildOfSameHeight(o){this.throwIfImmutable(),this._children.push(o),this.handleChildrenChanged()}unappendChild(){this.throwIfImmutable();const o=this._children.pop();return this.handleChildrenChanged(),o}prependChildOfSameHeight(o){this.throwIfImmutable(),this._children.unshift(o),this.handleChildrenChanged()}unprependChild(){this.throwIfImmutable();const o=this._children.shift();return this.handleChildrenChanged(),o}toMutable(){return this}}class t extends g{toMutable(){return new g(this.length,this.listHeight,[...this.children],this.missingOpeningBracketIds)}throwIfImmutable(){throw new Error("this instance is immutable")}}const i=[];class n extends I{get listHeight(){return 0}get childrenLength(){return 0}getChild(o){return null}get children(){return i}deepClone(){return this}}class l extends n{get kind(){return 0}get missingOpeningBracketIds(){return D.SmallImmutableSet.getEmpty()}canBeReused(o){return!0}computeMinIndentation(o,a){const d=(0,m.lengthToObj)(o),u=(d.columnCount===0?d.lineCount:d.lineCount+1)+1,f=(0,m.lengthGetLineCount)((0,m.lengthAdd)(o,this.length))+1;let S=Number.MAX_SAFE_INTEGER;for(let v=u;v<=f;v++){const C=a.getLineFirstNonWhitespaceColumn(v),_=a.getLineContent(v);if(C===0)continue;const L=y.CursorColumns.visibleColumnFromColumn(_,C,a.getOptions().tabSize);S=Math.min(S,L)}return S}}e.TextAstNode=l;class c extends n{constructor(o,a,d){super(o);this.languageId=a,this.bracketIds=d}static create(o,a,d){return new c(o,a,d)}get kind(){return 1}get missingOpeningBracketIds(){return D.SmallImmutableSet.getEmpty()}canBeReused(o){return!1}computeMinIndentation(o,a){return Number.MAX_SAFE_INTEGER}}e.BracketAstNode=c;class r extends n{constructor(o,a){super(a);this.missingOpeningBracketIds=o}get kind(){return 3}canBeReused(o){return!o.intersects(this.missingOpeningBracketIds)}computeMinIndentation(o,a){return Number.MAX_SAFE_INTEGER}}e.InvalidBracketAstNode=r}),define(te[415],ie([1,0,149]),function(j,e,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.concat23TreesOfSameHeight=e.concat23Trees=void 0;function m(h){if(h.length===0)return null;if(h.length===1)return h[0];let g=0;function t(){if(g>=h.length)return null;const c=g,r=h[c].listHeight;for(g++;g<h.length&&h[g].listHeight===r;)g++;return g-c>=2?D(c===0&&g===h.length?h:h.slice(c,g),!1):h[c]}let i=t(),n=t();if(!n)return i;for(let c=t();c;c=t())I(i,n)<=I(n,c)?(i=w(i,n),n=c):n=w(n,c);return w(i,n)}e.concat23Trees=m;function D(h,g=!1){if(h.length===0)return null;if(h.length===1)return h[0];let t=h.length;for(;t>3;){const i=t>>1;for(let n=0;n<i;n++){const l=n<<1;h[n]=y.ListAstNode.create23(h[l],h[l+1],l+3===t?h[l+2]:null,g)}t=i}return y.ListAstNode.create23(h[0],h[1],t>=3?h[2]:null,g)}e.concat23TreesOfSameHeight=D;function I(h,g){return Math.abs(h.listHeight-g.listHeight)}function w(h,g){return h.listHeight===g.listHeight?y.ListAstNode.create23(h,g,null,!1):h.listHeight>g.listHeight?b(h,g):p(g,h)}function b(h,g){h=h.toMutable();let t=h;const i=new Array;let n;for(;;){if(g.listHeight===t.listHeight){n=g;break}if(t.kind!==4)throw new Error("unexpected");i.push(t),t=t.makeLastElementMutable()}for(let l=i.length-1;l>=0;l--){const c=i[l];n?c.childrenLength>=3?n=y.ListAstNode.create23(c.unappendChild(),n,null,!1):(c.appendChildOfSameHeight(n),n=void 0):c.handleChildrenChanged()}return n?y.ListAstNode.create23(h,n,null,!1):h}function p(h,g){h=h.toMutable();let t=h;const i=new Array;for(;g.listHeight!==t.listHeight;){if(t.kind!==4)throw new Error("unexpected");i.push(t),t=t.makeFirstElementMutable()}let n=g;for(let l=i.length-1;l>=0;l--){const c=i[l];n?c.childrenLength>=3?n=y.ListAstNode.create23(n,c.unprependChild(),null,!1):(c.prependChildOfSameHeight(n),n=void 0):c.handleChildrenChanged()}return n?y.ListAstNode.create23(n,h,null,!1):h}}),define(te[241],ie([1,0,149,240,99,83,415,414]),function(j,e,y,m,D,I,w,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.parseDocument=void 0;function p(g,t,i,n){return new h(g,t,i,n).parseDocument()}e.parseDocument=p;class h{constructor(t,i,n,l){if(this.tokenizer=t,this.createImmutableLists=l,this._itemsConstructed=0,this._itemsFromCache=0,n&&l)throw new Error("Not supported");this.oldNodeReader=n?new b.NodeReader(n):void 0,this.positionMapper=new m.BeforeEditPositionMapper(i,t.length)}parseDocument(){this._itemsConstructed=0,this._itemsFromCache=0;let t=this.parseList(D.SmallImmutableSet.getEmpty());return t||(t=y.ListAstNode.getEmpty()),t}parseList(t){const i=new Array;for(;;){const l=this.tokenizer.peek();if(!l||l.kind===2&&l.bracketIds.intersects(t))break;const c=this.parseChild(t);c.kind===4&&c.childrenLength===0||i.push(c)}return this.oldNodeReader?(0,w.concat23Trees)(i):(0,w.concat23TreesOfSameHeight)(i,this.createImmutableLists)}parseChild(t){if(this.oldNodeReader){const n=this.positionMapper.getDistanceToNextChange(this.tokenizer.offset);if(!(0,I.lengthIsZero)(n)){const l=this.oldNodeReader.readLongestNodeAt(this.positionMapper.getOffsetBeforeChange(this.tokenizer.offset),c=>(0,I.lengthLessThan)(c.length,n)?c.canBeReused(t):!1);if(l)return this._itemsFromCache++,this.tokenizer.skip(l.length),l}}this._itemsConstructed++;const i=this.tokenizer.read();switch(i.kind){case 2:return new y.InvalidBracketAstNode(i.bracketIds,i.length);case 0:return i.astNode;case 1:{const n=t.merge(i.bracketIds),l=this.parseList(n),c=this.tokenizer.peek();return c&&c.kind===2&&(c.bracketId===i.bracketId||c.bracketIds.intersects(i.bracketIds))?(this.tokenizer.read(),y.PairAstNode.create(i.astNode,l,c.astNode)):y.PairAstNode.create(i.astNode,l,null)}default:throw new Error("unexpected")}}}}),define(te[416],ie([1,0]),function(j,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.guessIndentation=void 0;class y{constructor(){this.spacesDiff=0,this.looksLikeAlignment=!1}}function m(I,w,b,p,h){h.spacesDiff=0,h.looksLikeAlignment=!1;let g;for(g=0;g<w&&g<p;g++){const s=I.charCodeAt(g),o=b.charCodeAt(g);if(s!==o)break}let t=0,i=0;for(let s=g;s<w;s++)I.charCodeAt(s)===32?t++:i++;let n=0,l=0;for(let s=g;s<p;s++)b.charCodeAt(s)===32?n++:l++;if(t>0&&i>0||n>0&&l>0)return;const c=Math.abs(i-l),r=Math.abs(t-n);if(c===0){h.spacesDiff=r,r>0&&0<=n-1&&n-1<I.length&&n<b.length&&b.charCodeAt(n)!==32&&I.charCodeAt(n-1)===32&&I.charCodeAt(I.length-1)===44&&(h.looksLikeAlignment=!0);return}if(r%c==0){h.spacesDiff=r/c;return}}function D(I,w,b){const p=Math.min(I.getLineCount(),1e4);let h=0,g=0,t="",i=0;const n=[2,4,6,8,3,5,7],l=8,c=[0,0,0,0,0,0,0,0,0],r=new y;for(let a=1;a<=p;a++){const d=I.getLineLength(a),u=I.getLineContent(a),f=d<=65536;let S=!1,v=0,C=0,_=0;for(let E=0,N=d;E<N;E++){const k=f?u.charCodeAt(E):I.getLineCharCode(a,E);if(k===9)_++;else if(k===32)C++;else{S=!0,v=E;break}}if(!S||(_>0?h++:C>1&&g++,m(t,i,u,v,r),r.looksLikeAlignment&&!(b&&w===r.spacesDiff)))continue;const L=r.spacesDiff;L<=l&&c[L]++,t=u,i=v}let s=b;h!==g&&(s=h<g);let o=w;if(s){let a=s?0:.1*p;n.forEach(d=>{const u=c[d];u>a&&(a=u,o=d)}),o===4&&c[4]>0&&c[2]>0&&c[2]>=c[4]/2&&(o=2)}return{insertSpaces:s,tabSize:o}}e.guessIndentation=D}),define(te[417],ie([1,0]),function(j,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.intervalCompare=e.recomputeMaxEnd=e.nodeAcceptEdit=e.IntervalTree=e.SENTINEL=e.IntervalNode=e.getNodeColor=void 0;function y(T){return(T.metadata&1)>>>0}e.getNodeColor=y;function m(T,R){T.metadata=T.metadata&254|R<<0}function D(T){return(T.metadata&2)>>>1==1}function I(T,R){T.metadata=T.metadata&253|(R?1:0)<<1}function w(T){return(T.metadata&4)>>>2==1}function b(T,R){T.metadata=T.metadata&251|(R?1:0)<<2}function p(T){return(T.metadata&24)>>>3}function h(T,R){T.metadata=T.metadata&231|R<<3}function g(T){return(T.metadata&32)>>>5==1}function t(T,R){T.metadata=T.metadata&223|(R?1:0)<<5}class i{constructor(R,P,F){this.metadata=0,this.parent=this,this.left=this,this.right=this,m(this,1),this.start=P,this.end=F,this.delta=0,this.maxEnd=F,this.id=R,this.ownerId=0,this.options=null,b(this,!1),h(this,1),t(this,!1),this.cachedVersionId=0,this.cachedAbsoluteStart=P,this.cachedAbsoluteEnd=F,this.range=null,I(this,!1)}reset(R,P,F,W){this.start=P,this.end=F,this.maxEnd=F,this.cachedVersionId=R,this.cachedAbsoluteStart=P,this.cachedAbsoluteEnd=F,this.range=W}setOptions(R){this.options=R;const P=this.options.className;b(this,P==="squiggly-error"||P==="squiggly-warning"||P==="squiggly-info"),h(this,this.options.stickiness),t(this,this.options.collapseOnReplaceEdit)}setCachedOffsets(R,P,F){this.cachedVersionId!==F&&(this.range=null),this.cachedVersionId=F,this.cachedAbsoluteStart=R,this.cachedAbsoluteEnd=P}detach(){this.parent=null,this.left=null,this.right=null}}e.IntervalNode=i,e.SENTINEL=new i(null,0,0),e.SENTINEL.parent=e.SENTINEL,e.SENTINEL.left=e.SENTINEL,e.SENTINEL.right=e.SENTINEL,m(e.SENTINEL,0);class n{constructor(){this.root=e.SENTINEL,this.requestNormalizeDelta=!1}intervalSearch(R,P,F,W,A){return this.root===e.SENTINEL?[]:f(this,R,P,F,W,A)}search(R,P,F){return this.root===e.SENTINEL?[]:u(this,R,P,F)}collectNodesFromOwner(R){return a(this,R)}collectNodesPostOrder(){return d(this)}insert(R){S(this,R),this._normalizeDeltaIfNecessary()}delete(R){C(this,R),this._normalizeDeltaIfNecessary()}resolveNode(R,P){const F=R;let W=0;for(;R!==this.root;)R===R.parent.right&&(W+=R.parent.delta),R=R.parent;const A=F.start+W,H=F.end+W;F.setCachedOffsets(A,H,P)}acceptReplace(R,P,F,W){const A=s(this,R,R+P);for(let H=0,q=A.length;H<q;H++){const X=A[H];C(this,X)}this._normalizeDeltaIfNecessary(),o(this,R,R+P,F),this._normalizeDeltaIfNecessary();for(let H=0,q=A.length;H<q;H++){const X=A[H];X.start=X.cachedAbsoluteStart,X.end=X.cachedAbsoluteEnd,r(X,R,R+P,F,W),X.maxEnd=X.end,S(this,X)}this._normalizeDeltaIfNecessary()}_normalizeDeltaIfNecessary(){!this.requestNormalizeDelta||(this.requestNormalizeDelta=!1,l(this))}}e.IntervalTree=n;function l(T){let R=T.root,P=0;for(;R!==e.SENTINEL;){if(R.left!==e.SENTINEL&&!D(R.left)){R=R.left;continue}if(R.right!==e.SENTINEL&&!D(R.right)){P+=R.delta,R=R.right;continue}R.start=P+R.start,R.end=P+R.end,R.delta=0,M(R),I(R,!0),I(R.left,!1),I(R.right,!1),R===R.parent.right&&(P-=R.parent.delta),R=R.parent}I(T.root,!1)}function c(T,R,P,F){return T<P?!0:T>P||F===1?!1:F===2?!0:R}function r(T,R,P,F,W){const A=p(T),H=A===0||A===2,q=A===1||A===2,X=P-R,G=F,re=Math.min(X,G),ae=T.start;let oe=!1;const Z=T.end;let x=!1;R<=ae&&Z<=P&&g(T)&&(T.start=R,oe=!0,T.end=R,x=!0);{const Q=W?1:X>0?2:0;!oe&&c(ae,H,R,Q)&&(oe=!0),!x&&c(Z,q,R,Q)&&(x=!0)}if(re>0&&!W){const Q=X>G?2:0;!oe&&c(ae,H,R+re,Q)&&(oe=!0),!x&&c(Z,q,R+re,Q)&&(x=!0)}{const Q=W?1:0;!oe&&c(ae,H,P,Q)&&(T.start=R+G,oe=!0),!x&&c(Z,q,P,Q)&&(T.end=R+G,x=!0)}const U=G-X;oe||(T.start=Math.max(0,ae+U)),x||(T.end=Math.max(0,Z+U)),T.start>T.end&&(T.end=T.start)}e.nodeAcceptEdit=r;function s(T,R,P){let F=T.root,W=0,A=0,H=0,q=0;const X=[];let G=0;for(;F!==e.SENTINEL;){if(D(F)){I(F.left,!1),I(F.right,!1),F===F.parent.right&&(W-=F.parent.delta),F=F.parent;continue}if(!D(F.left)){if(A=W+F.maxEnd,A<R){I(F,!0);continue}if(F.left!==e.SENTINEL){F=F.left;continue}}if(H=W+F.start,H>P){I(F,!0);continue}if(q=W+F.end,q>=R&&(F.setCachedOffsets(H,q,0),X[G++]=F),I(F,!0),F.right!==e.SENTINEL&&!D(F.right)){W+=F.delta,F=F.right;continue}}return I(T.root,!1),X}function o(T,R,P,F){let W=T.root,A=0,H=0,q=0;const X=F-(P-R);for(;W!==e.SENTINEL;){if(D(W)){I(W.left,!1),I(W.right,!1),W===W.parent.right&&(A-=W.parent.delta),M(W),W=W.parent;continue}if(!D(W.left)){if(H=A+W.maxEnd,H<R){I(W,!0);continue}if(W.left!==e.SENTINEL){W=W.left;continue}}if(q=A+W.start,q>P){W.start+=X,W.end+=X,W.delta+=X,(W.delta<-1073741824||W.delta>1073741824)&&(T.requestNormalizeDelta=!0),I(W,!0);continue}if(I(W,!0),W.right!==e.SENTINEL&&!D(W.right)){A+=W.delta,W=W.right;continue}}I(T.root,!1)}function a(T,R){let P=T.root;const F=[];let W=0;for(;P!==e.SENTINEL;){if(D(P)){I(P.left,!1),I(P.right,!1),P=P.parent;continue}if(P.left!==e.SENTINEL&&!D(P.left)){P=P.left;continue}if(P.ownerId===R&&(F[W++]=P),I(P,!0),P.right!==e.SENTINEL&&!D(P.right)){P=P.right;continue}}return I(T.root,!1),F}function d(T){let R=T.root;const P=[];let F=0;for(;R!==e.SENTINEL;){if(D(R)){I(R.left,!1),I(R.right,!1),R=R.parent;continue}if(R.left!==e.SENTINEL&&!D(R.left)){R=R.left;continue}if(R.right!==e.SENTINEL&&!D(R.right)){R=R.right;continue}P[F++]=R,I(R,!0)}return I(T.root,!1),P}function u(T,R,P,F){let W=T.root,A=0,H=0,q=0;const X=[];let G=0;for(;W!==e.SENTINEL;){if(D(W)){I(W.left,!1),I(W.right,!1),W===W.parent.right&&(A-=W.parent.delta),W=W.parent;continue}if(W.left!==e.SENTINEL&&!D(W.left)){W=W.left;continue}H=A+W.start,q=A+W.end,W.setCachedOffsets(H,q,F);let re=!0;if(R&&W.ownerId&&W.ownerId!==R&&(re=!1),P&&w(W)&&(re=!1),re&&(X[G++]=W),I(W,!0),W.right!==e.SENTINEL&&!D(W.right)){A+=W.delta,W=W.right;continue}}return I(T.root,!1),X}function f(T,R,P,F,W,A){let H=T.root,q=0,X=0,G=0,re=0;const ae=[];let oe=0;for(;H!==e.SENTINEL;){if(D(H)){I(H.left,!1),I(H.right,!1),H===H.parent.right&&(q-=H.parent.delta),H=H.parent;continue}if(!D(H.left)){if(X=q+H.maxEnd,X<R){I(H,!0);continue}if(H.left!==e.SENTINEL){H=H.left;continue}}if(G=q+H.start,G>P){I(H,!0);continue}if(re=q+H.end,re>=R){H.setCachedOffsets(G,re,A);let Z=!0;F&&H.ownerId&&H.ownerId!==F&&(Z=!1),W&&w(H)&&(Z=!1),Z&&(ae[oe++]=H)}if(I(H,!0),H.right!==e.SENTINEL&&!D(H.right)){q+=H.delta,H=H.right;continue}}return I(T.root,!1),ae}function S(T,R){if(T.root===e.SENTINEL)return R.parent=e.SENTINEL,R.left=e.SENTINEL,R.right=e.SENTINEL,m(R,0),T.root=R,T.root;v(T,R),O(R.parent);let P=R;for(;P!==T.root&&y(P.parent)===1;)if(P.parent===P.parent.parent.left){const F=P.parent.parent.right;y(F)===1?(m(P.parent,0),m(F,0),m(P.parent.parent,1),P=P.parent.parent):(P===P.parent.right&&(P=P.parent,E(T,P)),m(P.parent,0),m(P.parent.parent,1),N(T,P.parent.parent))}else{const F=P.parent.parent.left;y(F)===1?(m(P.parent,0),m(F,0),m(P.parent.parent,1),P=P.parent.parent):(P===P.parent.left&&(P=P.parent,N(T,P)),m(P.parent,0),m(P.parent.parent,1),E(T,P.parent.parent))}return m(T.root,0),R}function v(T,R){let P=0,F=T.root;const W=R.start,A=R.end;for(;;)if(B(W,A,F.start+P,F.end+P)<0)if(F.left===e.SENTINEL){R.start-=P,R.end-=P,R.maxEnd-=P,F.left=R;break}else F=F.left;else if(F.right===e.SENTINEL){R.start-=P+F.delta,R.end-=P+F.delta,R.maxEnd-=P+F.delta,F.right=R;break}else P+=F.delta,F=F.right;R.parent=F,R.left=e.SENTINEL,R.right=e.SENTINEL,m(R,1)}function C(T,R){let P,F;if(R.left===e.SENTINEL?(P=R.right,F=R,P.delta+=R.delta,(P.delta<-1073741824||P.delta>1073741824)&&(T.requestNormalizeDelta=!0),P.start+=R.delta,P.end+=R.delta):R.right===e.SENTINEL?(P=R.left,F=R):(F=_(R.right),P=F.right,P.start+=F.delta,P.end+=F.delta,P.delta+=F.delta,(P.delta<-1073741824||P.delta>1073741824)&&(T.requestNormalizeDelta=!0),F.start+=R.delta,F.end+=R.delta,F.delta=R.delta,(F.delta<-1073741824||F.delta>1073741824)&&(T.requestNormalizeDelta=!0)),F===T.root){T.root=P,m(P,0),R.detach(),L(),M(P),T.root.parent=e.SENTINEL;return}const W=y(F)===1;if(F===F.parent.left?F.parent.left=P:F.parent.right=P,F===R?P.parent=F.parent:(F.parent===R?P.parent=F:P.parent=F.parent,F.left=R.left,F.right=R.right,F.parent=R.parent,m(F,y(R)),R===T.root?T.root=F:R===R.parent.left?R.parent.left=F:R.parent.right=F,F.left!==e.SENTINEL&&(F.left.parent=F),F.right!==e.SENTINEL&&(F.right.parent=F)),R.detach(),W){O(P.parent),F!==R&&(O(F),O(F.parent)),L();return}O(P),O(P.parent),F!==R&&(O(F),O(F.parent));let A;for(;P!==T.root&&y(P)===0;)P===P.parent.left?(A=P.parent.right,y(A)===1&&(m(A,0),m(P.parent,1),E(T,P.parent),A=P.parent.right),y(A.left)===0&&y(A.right)===0?(m(A,1),P=P.parent):(y(A.right)===0&&(m(A.left,0),m(A,1),N(T,A),A=P.parent.right),m(A,y(P.parent)),m(P.parent,0),m(A.right,0),E(T,P.parent),P=T.root)):(A=P.parent.left,y(A)===1&&(m(A,0),m(P.parent,1),N(T,P.parent),A=P.parent.left),y(A.left)===0&&y(A.right)===0?(m(A,1),P=P.parent):(y(A.left)===0&&(m(A.right,0),m(A,1),E(T,A),A=P.parent.left),m(A,y(P.parent)),m(P.parent,0),m(A.left,0),N(T,P.parent),P=T.root));m(P,0),L()}function _(T){for(;T.left!==e.SENTINEL;)T=T.left;return T}function L(){e.SENTINEL.parent=e.SENTINEL,e.SENTINEL.delta=0,e.SENTINEL.start=0,e.SENTINEL.end=0}function E(T,R){const P=R.right;P.delta+=R.delta,(P.delta<-1073741824||P.delta>1073741824)&&(T.requestNormalizeDelta=!0),P.start+=R.delta,P.end+=R.delta,R.right=P.left,P.left!==e.SENTINEL&&(P.left.parent=R),P.parent=R.parent,R.parent===e.SENTINEL?T.root=P:R===R.parent.left?R.parent.left=P:R.parent.right=P,P.left=R,R.parent=P,M(R),M(P)}function N(T,R){const P=R.left;R.delta-=P.delta,(R.delta<-1073741824||R.delta>1073741824)&&(T.requestNormalizeDelta=!0),R.start-=P.delta,R.end-=P.delta,R.left=P.right,P.right!==e.SENTINEL&&(P.right.parent=R),P.parent=R.parent,R.parent===e.SENTINEL?T.root=P:R===R.parent.right?R.parent.right=P:R.parent.left=P,P.right=R,R.parent=P,M(R),M(P)}function k(T){let R=T.end;if(T.left!==e.SENTINEL){const P=T.left.maxEnd;P>R&&(R=P)}if(T.right!==e.SENTINEL){const P=T.right.maxEnd+T.delta;P>R&&(R=P)}return R}function M(T){T.maxEnd=k(T)}e.recomputeMaxEnd=M;function O(T){for(;T!==e.SENTINEL;){const R=k(T);if(T.maxEnd===R)return;T.maxEnd=R,T=T.parent}}function B(T,R,P,F){return T===P?R-F:T-P}e.intervalCompare=B}),define(te[418],ie([1,0]),function(j,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.recomputeTreeMetadata=e.updateTreeMetadata=e.fixInsert=e.rbDelete=e.rightRotate=e.leftRotate=e.resetSentinel=e.calculateLF=e.calculateSize=e.righttest=e.leftest=e.SENTINEL=e.TreeNode=void 0;class y{constructor(c,r){this.piece=c,this.color=r,this.size_left=0,this.lf_left=0,this.parent=this,this.left=this,this.right=this}next(){if(this.right!==e.SENTINEL)return m(this.right);let c=this;for(;c.parent!==e.SENTINEL&&c.parent.left!==c;)c=c.parent;return c.parent===e.SENTINEL?e.SENTINEL:c.parent}prev(){if(this.left!==e.SENTINEL)return D(this.left);let c=this;for(;c.parent!==e.SENTINEL&&c.parent.right!==c;)c=c.parent;return c.parent===e.SENTINEL?e.SENTINEL:c.parent}detach(){this.parent=null,this.left=null,this.right=null}}e.TreeNode=y,e.SENTINEL=new y(null,0),e.SENTINEL.parent=e.SENTINEL,e.SENTINEL.left=e.SENTINEL,e.SENTINEL.right=e.SENTINEL,e.SENTINEL.color=0;function m(l){for(;l.left!==e.SENTINEL;)l=l.left;return l}e.leftest=m;function D(l){for(;l.right!==e.SENTINEL;)l=l.right;return l}e.righttest=D;function I(l){return l===e.SENTINEL?0:l.size_left+l.piece.length+I(l.right)}e.calculateSize=I;function w(l){return l===e.SENTINEL?0:l.lf_left+l.piece.lineFeedCnt+w(l.right)}e.calculateLF=w;function b(){e.SENTINEL.parent=e.SENTINEL}e.resetSentinel=b;function p(l,c){const r=c.right;r.size_left+=c.size_left+(c.piece?c.piece.length:0),r.lf_left+=c.lf_left+(c.piece?c.piece.lineFeedCnt:0),c.right=r.left,r.left!==e.SENTINEL&&(r.left.parent=c),r.parent=c.parent,c.parent===e.SENTINEL?l.root=r:c.parent.left===c?c.parent.left=r:c.parent.right=r,r.left=c,c.parent=r}e.leftRotate=p;function h(l,c){const r=c.left;c.left=r.right,r.right!==e.SENTINEL&&(r.right.parent=c),r.parent=c.parent,c.size_left-=r.size_left+(r.piece?r.piece.length:0),c.lf_left-=r.lf_left+(r.piece?r.piece.lineFeedCnt:0),c.parent===e.SENTINEL?l.root=r:c===c.parent.right?c.parent.right=r:c.parent.left=r,r.right=c,c.parent=r}e.rightRotate=h;function g(l,c){let r,s;if(c.left===e.SENTINEL?(s=c,r=s.right):c.right===e.SENTINEL?(s=c,r=s.left):(s=m(c.right),r=s.right),s===l.root){l.root=r,r.color=0,c.detach(),b(),l.root.parent=e.SENTINEL;return}const o=s.color===1;if(s===s.parent.left?s.parent.left=r:s.parent.right=r,s===c?(r.parent=s.parent,n(l,r)):(s.parent===c?r.parent=s:r.parent=s.parent,n(l,r),s.left=c.left,s.right=c.right,s.parent=c.parent,s.color=c.color,c===l.root?l.root=s:c===c.parent.left?c.parent.left=s:c.parent.right=s,s.left!==e.SENTINEL&&(s.left.parent=s),s.right!==e.SENTINEL&&(s.right.parent=s),s.size_left=c.size_left,s.lf_left=c.lf_left,n(l,s)),c.detach(),r.parent.left===r){const d=I(r),u=w(r);if(d!==r.parent.size_left||u!==r.parent.lf_left){const f=d-r.parent.size_left,S=u-r.parent.lf_left;r.parent.size_left=d,r.parent.lf_left=u,i(l,r.parent,f,S)}}if(n(l,r.parent),o){b();return}let a;for(;r!==l.root&&r.color===0;)r===r.parent.left?(a=r.parent.right,a.color===1&&(a.color=0,r.parent.color=1,p(l,r.parent),a=r.parent.right),a.left.color===0&&a.right.color===0?(a.color=1,r=r.parent):(a.right.color===0&&(a.left.color=0,a.color=1,h(l,a),a=r.parent.right),a.color=r.parent.color,r.parent.color=0,a.right.color=0,p(l,r.parent),r=l.root)):(a=r.parent.left,a.color===1&&(a.color=0,r.parent.color=1,h(l,r.parent),a=r.parent.left),a.left.color===0&&a.right.color===0?(a.color=1,r=r.parent):(a.left.color===0&&(a.right.color=0,a.color=1,p(l,a),a=r.parent.left),a.color=r.parent.color,r.parent.color=0,a.left.color=0,h(l,r.parent),r=l.root));r.color=0,b()}e.rbDelete=g;function t(l,c){for(n(l,c);c!==l.root&&c.parent.color===1;)if(c.parent===c.parent.parent.left){const r=c.parent.parent.right;r.color===1?(c.parent.color=0,r.color=0,c.parent.parent.color=1,c=c.parent.parent):(c===c.parent.right&&(c=c.parent,p(l,c)),c.parent.color=0,c.parent.parent.color=1,h(l,c.parent.parent))}else{const r=c.parent.parent.left;r.color===1?(c.parent.color=0,r.color=0,c.parent.parent.color=1,c=c.parent.parent):(c===c.parent.left&&(c=c.parent,h(l,c)),c.parent.color=0,c.parent.parent.color=1,p(l,c.parent.parent))}l.root.color=0}e.fixInsert=t;function i(l,c,r,s){for(;c!==l.root&&c!==e.SENTINEL;)c.parent.left===c&&(c.parent.size_left+=r,c.parent.lf_left+=s),c=c.parent}e.updateTreeMetadata=i;function n(l,c){let r=0,s=0;if(c!==l.root){for(;c!==l.root&&c===c.parent.right;)c=c.parent;if(c!==l.root)for(c=c.parent,r=I(c.left)-c.size_left,s=w(c.left)-c.lf_left,c.size_left+=r,c.lf_left+=s;c!==l.root&&(r!==0||s!==0);)c.parent.left===c&&(c.parent.size_left+=r,c.parent.lf_left+=s),c=c.parent}}e.recomputeTreeMetadata=n}),define(te[242],ie([1,0,19,139]),function(j,e,y,m){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.PrefixSumIndexOfResult=e.ConstantTimePrefixSumComputer=e.PrefixSumComputer=void 0;class D{constructor(p){this.values=p,this.prefixSum=new Uint32Array(p.length),this.prefixSumValidIndex=new Int32Array(1),this.prefixSumValidIndex[0]=-1}insertValues(p,h){p=(0,m.toUint32)(p);const g=this.values,t=this.prefixSum,i=h.length;return i===0?!1:(this.values=new Uint32Array(g.length+i),this.values.set(g.subarray(0,p),0),this.values.set(g.subarray(p),p+i),this.values.set(h,p),p-1<this.prefixSumValidIndex[0]&&(this.prefixSumValidIndex[0]=p-1),this.prefixSum=new Uint32Array(this.values.length),this.prefixSumValidIndex[0]>=0&&this.prefixSum.set(t.subarray(0,this.prefixSumValidIndex[0]+1)),!0)}setValue(p,h){return p=(0,m.toUint32)(p),h=(0,m.toUint32)(h),this.values[p]===h?!1:(this.values[p]=h,p-1<this.prefixSumValidIndex[0]&&(this.prefixSumValidIndex[0]=p-1),!0)}removeValues(p,h){p=(0,m.toUint32)(p),h=(0,m.toUint32)(h);const g=this.values,t=this.prefixSum;if(p>=g.length)return!1;const i=g.length-p;return h>=i&&(h=i),h===0?!1:(this.values=new Uint32Array(g.length-h),this.values.set(g.subarray(0,p),0),this.values.set(g.subarray(p+h),p),this.prefixSum=new Uint32Array(this.values.length),p-1<this.prefixSumValidIndex[0]&&(this.prefixSumValidIndex[0]=p-1),this.prefixSumValidIndex[0]>=0&&this.prefixSum.set(t.subarray(0,this.prefixSumValidIndex[0]+1)),!0)}getTotalSum(){return this.values.length===0?0:this._getPrefixSum(this.values.length-1)}getPrefixSum(p){return p<0?0:(p=(0,m.toUint32)(p),this._getPrefixSum(p))}_getPrefixSum(p){if(p<=this.prefixSumValidIndex[0])return this.prefixSum[p];let h=this.prefixSumValidIndex[0]+1;h===0&&(this.prefixSum[0]=this.values[0],h++),p>=this.values.length&&(p=this.values.length-1);for(let g=h;g<=p;g++)this.prefixSum[g]=this.prefixSum[g-1]+this.values[g];return this.prefixSumValidIndex[0]=Math.max(this.prefixSumValidIndex[0],p),this.prefixSum[p]}getIndexOf(p){p=Math.floor(p),this.getTotalSum();let h=0,g=this.values.length-1,t=0,i=0,n=0;for(;h<=g;)if(t=h+(g-h)/2|0,i=this.prefixSum[t],n=i-this.values[t],p<n)g=t-1;else if(p>=i)h=t+1;else break;return new w(t,p-n)}}e.PrefixSumComputer=D;class I{constructor(p){this._values=p,this._isValid=!1,this._validEndIndex=-1,this._prefixSum=[],this._indexBySum=[]}getTotalSum(){return this._ensureValid(),this._indexBySum.length}getPrefixSum(p){return this._ensureValid(),p===0?0:this._prefixSum[p-1]}getIndexOf(p){this._ensureValid();const h=this._indexBySum[p],g=h>0?this._prefixSum[h-1]:0;return new w(h,p-g)}removeValues(p,h){this._values.splice(p,h),this._invalidate(p)}insertValues(p,h){this._values=(0,y.arrayInsert)(this._values,p,h),this._invalidate(p)}_invalidate(p){this._isValid=!1,this._validEndIndex=Math.min(this._validEndIndex,p-1)}_ensureValid(){if(!this._isValid){for(let p=this._validEndIndex+1,h=this._values.length;p<h;p++){const g=this._values[p],t=p>0?this._prefixSum[p-1]:0;this._prefixSum[p]=t+g;for(let i=0;i<g;i++)this._indexBySum[t+i]=p}this._prefixSum.length=this._values.length,this._indexBySum.length=this._prefixSum[this._prefixSum.length-1],this._isValid=!0,this._validEndIndex=this._values.length-1}}setValue(p,h){this._values[p]!==h&&(this._values[p]=h,this._invalidate(p))}}e.ConstantTimePrefixSumComputer=I;class w{constructor(p,h){this.index=p,this.remainder=h,this._prefixSumIndexOfResultBrand=void 0,this.index=p,this.remainder=h}}e.PrefixSumIndexOfResult=w}),define(te[419],ie([1,0,8,11,242]),function(j,e,y,m,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MirrorTextModel=void 0;class I{constructor(b,p,h,g){this._uri=b,this._lines=p,this._eol=h,this._versionId=g,this._lineStarts=null,this._cachedTextValue=null}dispose(){this._lines.length=0}get version(){return this._versionId}getText(){return this._cachedTextValue===null&&(this._cachedTextValue=this._lines.join(this._eol)),this._cachedTextValue}onEvents(b){b.eol&&b.eol!==this._eol&&(this._eol=b.eol,this._lineStarts=null);const p=b.changes;for(const h of p)this._acceptDeleteRange(h.range),this._acceptInsertText(new m.Position(h.range.startLineNumber,h.range.startColumn),h.text);this._versionId=b.versionId,this._cachedTextValue=null}_ensureLineStarts(){if(!this._lineStarts){const b=this._eol.length,p=this._lines.length,h=new Uint32Array(p);for(let g=0;g<p;g++)h[g]=this._lines[g].length+b;this._lineStarts=new D.PrefixSumComputer(h)}}_setLineText(b,p){this._lines[b]=p,this._lineStarts&&this._lineStarts.setValue(b,this._lines[b].length+this._eol.length)}_acceptDeleteRange(b){if(b.startLineNumber===b.endLineNumber){if(b.startColumn===b.endColumn)return;this._setLineText(b.startLineNumber-1,this._lines[b.startLineNumber-1].substring(0,b.startColumn-1)+this._lines[b.startLineNumber-1].substring(b.endColumn-1));return}this._setLineText(b.startLineNumber-1,this._lines[b.startLineNumber-1].substring(0,b.startColumn-1)+this._lines[b.endLineNumber-1].substring(b.endColumn-1)),this._lines.splice(b.startLineNumber,b.endLineNumber-b.startLineNumber),this._lineStarts&&this._lineStarts.removeValues(b.startLineNumber,b.endLineNumber-b.startLineNumber)}_acceptInsertText(b,p){if(p.length===0)return;const h=(0,y.splitLines)(p);if(h.length===1){this._setLineText(b.lineNumber-1,this._lines[b.lineNumber-1].substring(0,b.column-1)+h[0]+this._lines[b.lineNumber-1].substring(b.column-1));return}h[h.length-1]+=this._lines[b.lineNumber-1].substring(b.column-1),this._setLineText(b.lineNumber-1,this._lines[b.lineNumber-1].substring(0,b.column-1)+h[0]);const g=new Uint32Array(h.length-1);for(let t=1;t<h.length;t++)this._lines.splice(b.lineNumber+t-1,0,h[t]),g[t-1]=h[t].length+this._eol.length;this._lineStarts&&this._lineStarts.insertValues(b.lineNumber,g)}}e.MirrorTextModel=I}),define(te[420],ie([1,0]),function(j,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TextModelPart=void 0;class y{constructor(){this._isDisposed=!1}dispose(){this._isDisposed=!0}assertNotDisposed(){if(this._isDisposed)throw new Error("TextModelPart is disposed!")}}e.TextModelPart=y}),define(te[150],ie([1,0,8,118,11,3,49]),function(j,e,y,m,D,I,w){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Searcher=e.isValidMatch=e.TextModelSearch=e.createFindMatch=e.isMultilineRegexSource=e.SearchParams=void 0;const b=999;class p{constructor(o,a,d,u){this.searchString=o,this.isRegex=a,this.matchCase=d,this.wordSeparators=u}parseSearchRequest(){if(this.searchString==="")return null;let o;this.isRegex?o=h(this.searchString):o=this.searchString.indexOf(`
|
||
`)>=0;let a=null;try{a=y.createRegExp(this.searchString,this.isRegex,{matchCase:this.matchCase,wholeWord:!1,multiline:o,global:!0,unicode:!0})}catch{return null}if(!a)return null;let d=!this.isRegex&&!o;return d&&this.searchString.toLowerCase()!==this.searchString.toUpperCase()&&(d=this.matchCase),new w.SearchData(a,this.wordSeparators?(0,m.getMapForWordSeparators)(this.wordSeparators):null,d?this.searchString:null)}}e.SearchParams=p;function h(s){if(!s||s.length===0)return!1;for(let o=0,a=s.length;o<a;o++)if(s.charCodeAt(o)===92){if(o++,o>=a)break;const u=s.charCodeAt(o);if(u===110||u===114||u===87)return!0}return!1}e.isMultilineRegexSource=h;function g(s,o,a){if(!a)return new w.FindMatch(s,null);const d=[];for(let u=0,f=o.length;u<f;u++)d[u]=o[u];return new w.FindMatch(s,d)}e.createFindMatch=g;class t{constructor(o){const a=[];let d=0;for(let u=0,f=o.length;u<f;u++)o.charCodeAt(u)===10&&(a[d++]=u);this._lineFeedsOffsets=a}findLineFeedCountBeforeOffset(o){const a=this._lineFeedsOffsets;let d=0,u=a.length-1;if(u===-1||o<=a[0])return 0;for(;d<u;){const f=d+((u-d)/2>>0);a[f]>=o?u=f-1:a[f+1]>=o?(d=f,u=f):d=f+1}return d+1}}class i{static findMatches(o,a,d,u,f){const S=a.parseSearchRequest();return S?S.regex.multiline?this._doFindMatchesMultiline(o,d,new r(S.wordSeparators,S.regex),u,f):this._doFindMatchesLineByLine(o,d,S,u,f):[]}static _getMultilineMatchRange(o,a,d,u,f,S){let v,C=0;u?(C=u.findLineFeedCountBeforeOffset(f),v=a+f+C):v=a+f;let _;if(u){const k=u.findLineFeedCountBeforeOffset(f+S.length)-C;_=v+S.length+k}else _=v+S.length;const L=o.getPositionAt(v),E=o.getPositionAt(_);return new I.Range(L.lineNumber,L.column,E.lineNumber,E.column)}static _doFindMatchesMultiline(o,a,d,u,f){const S=o.getOffsetAt(a.getStartPosition()),v=o.getValueInRange(a,1),C=o.getEOL()===`\r
|
||
`?new t(v):null,_=[];let L=0,E;for(d.reset(0);E=d.next(v);)if(_[L++]=g(this._getMultilineMatchRange(o,S,v,C,E.index,E[0]),E,u),L>=f)return _;return _}static _doFindMatchesLineByLine(o,a,d,u,f){const S=[];let v=0;if(a.startLineNumber===a.endLineNumber){const _=o.getLineContent(a.startLineNumber).substring(a.startColumn-1,a.endColumn-1);return v=this._findMatchesInLine(d,_,a.startLineNumber,a.startColumn-1,v,S,u,f),S}const C=o.getLineContent(a.startLineNumber).substring(a.startColumn-1);v=this._findMatchesInLine(d,C,a.startLineNumber,a.startColumn-1,v,S,u,f);for(let _=a.startLineNumber+1;_<a.endLineNumber&&v<f;_++)v=this._findMatchesInLine(d,o.getLineContent(_),_,0,v,S,u,f);if(v<f){const _=o.getLineContent(a.endLineNumber).substring(0,a.endColumn-1);v=this._findMatchesInLine(d,_,a.endLineNumber,0,v,S,u,f)}return S}static _findMatchesInLine(o,a,d,u,f,S,v,C){const _=o.wordSeparators;if(!v&&o.simpleSearch){const N=o.simpleSearch,k=N.length,M=a.length;let O=-k;for(;(O=a.indexOf(N,O+k))!==-1;)if((!_||c(_,a,M,O,k))&&(S[f++]=new w.FindMatch(new I.Range(d,O+1+u,d,O+1+k+u),null),f>=C))return f;return f}const L=new r(o.wordSeparators,o.regex);let E;L.reset(0);do if(E=L.next(a),E&&(S[f++]=g(new I.Range(d,E.index+1+u,d,E.index+1+E[0].length+u),E,v),f>=C))return f;while(E);return f}static findNextMatch(o,a,d,u){const f=a.parseSearchRequest();if(!f)return null;const S=new r(f.wordSeparators,f.regex);return f.regex.multiline?this._doFindNextMatchMultiline(o,d,S,u):this._doFindNextMatchLineByLine(o,d,S,u)}static _doFindNextMatchMultiline(o,a,d,u){const f=new D.Position(a.lineNumber,1),S=o.getOffsetAt(f),v=o.getLineCount(),C=o.getValueInRange(new I.Range(f.lineNumber,f.column,v,o.getLineMaxColumn(v)),1),_=o.getEOL()===`\r
|
||
`?new t(C):null;d.reset(a.column-1);let L=d.next(C);return L?g(this._getMultilineMatchRange(o,S,C,_,L.index,L[0]),L,u):a.lineNumber!==1||a.column!==1?this._doFindNextMatchMultiline(o,new D.Position(1,1),d,u):null}static _doFindNextMatchLineByLine(o,a,d,u){const f=o.getLineCount(),S=a.lineNumber,v=o.getLineContent(S),C=this._findFirstMatchInLine(d,v,S,a.column,u);if(C)return C;for(let _=1;_<=f;_++){const L=(S+_-1)%f,E=o.getLineContent(L+1),N=this._findFirstMatchInLine(d,E,L+1,1,u);if(N)return N}return null}static _findFirstMatchInLine(o,a,d,u,f){o.reset(u-1);const S=o.next(a);return S?g(new I.Range(d,S.index+1,d,S.index+1+S[0].length),S,f):null}static findPreviousMatch(o,a,d,u){const f=a.parseSearchRequest();if(!f)return null;const S=new r(f.wordSeparators,f.regex);return f.regex.multiline?this._doFindPreviousMatchMultiline(o,d,S,u):this._doFindPreviousMatchLineByLine(o,d,S,u)}static _doFindPreviousMatchMultiline(o,a,d,u){const f=this._doFindMatchesMultiline(o,new I.Range(1,1,a.lineNumber,a.column),d,u,10*b);if(f.length>0)return f[f.length-1];const S=o.getLineCount();return a.lineNumber!==S||a.column!==o.getLineMaxColumn(S)?this._doFindPreviousMatchMultiline(o,new D.Position(S,o.getLineMaxColumn(S)),d,u):null}static _doFindPreviousMatchLineByLine(o,a,d,u){const f=o.getLineCount(),S=a.lineNumber,v=o.getLineContent(S).substring(0,a.column-1),C=this._findLastMatchInLine(d,v,S,u);if(C)return C;for(let _=1;_<=f;_++){const L=(f+S-_-1)%f,E=o.getLineContent(L+1),N=this._findLastMatchInLine(d,E,L+1,u);if(N)return N}return null}static _findLastMatchInLine(o,a,d,u){let f=null,S;for(o.reset(0);S=o.next(a);)f=g(new I.Range(d,S.index+1,d,S.index+1+S[0].length),S,u);return f}}e.TextModelSearch=i;function n(s,o,a,d,u){if(d===0)return!0;const f=o.charCodeAt(d-1);if(s.get(f)!==0||f===13||f===10)return!0;if(u>0){const S=o.charCodeAt(d);if(s.get(S)!==0)return!0}return!1}function l(s,o,a,d,u){if(d+u===a)return!0;const f=o.charCodeAt(d+u);if(s.get(f)!==0||f===13||f===10)return!0;if(u>0){const S=o.charCodeAt(d+u-1);if(s.get(S)!==0)return!0}return!1}function c(s,o,a,d,u){return n(s,o,a,d,u)&&l(s,o,a,d,u)}e.isValidMatch=c;class r{constructor(o,a){this._wordSeparators=o,this._searchRegex=a,this._prevMatchStartIndex=-1,this._prevMatchLength=0}reset(o){this._searchRegex.lastIndex=o,this._prevMatchStartIndex=-1,this._prevMatchLength=0}next(o){const a=o.length;let d;do{if(this._prevMatchStartIndex+this._prevMatchLength===a||(d=this._searchRegex.exec(o),!d))return null;const u=d.index,f=d[0].length;if(u===this._prevMatchStartIndex&&f===this._prevMatchLength){if(f===0){y.getNextCodePoint(o,a,this._searchRegex.lastIndex)>65535?this._searchRegex.lastIndex+=2:this._searchRegex.lastIndex+=1;continue}return null}if(this._prevMatchStartIndex=u,this._prevMatchLength=f,!this._wordSeparators||c(this._wordSeparators,o,a,u,f))return d}while(d);return null}}e.Searcher=r}),define(te[243],ie([1,0,3,150,8,20]),function(j,e,y,m,D,I){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.UnicodeTextModelHighlighter=void 0;class w{static computeUnicodeHighlights(g,t,i){const n=i?i.startLineNumber:1,l=i?i.endLineNumber:g.getLineCount(),c=new p(t),r=c.getCandidateCodePoints();let s;r==="allNonBasicAscii"?s=new RegExp("[^\\t\\n\\r\\x20-\\x7E]","g"):s=new RegExp(`${b(Array.from(r))}`,"g");const o=new m.Searcher(null,s),a=[];let d=!1,u,f=0,S=0,v=0;e:for(let C=n,_=l;C<=_;C++){const L=g.getLineContent(C),E=L.length;o.reset(0);do if(u=o.next(L),u){let N=u.index,k=u.index+u[0].length;if(N>0){const B=L.charCodeAt(N-1);D.isHighSurrogate(B)&&N--}if(k+1<E){const B=L.charCodeAt(k-1);D.isHighSurrogate(B)&&k++}const M=L.substring(N,k),O=c.shouldHighlightNonBasicASCII(M);if(O!==0){O===3?f++:O===2?S++:O===1?v++:(0,I.assertNever)(O);const B=1e3;if(a.length>=B){d=!0;break e}a.push(new y.Range(C,N+1,C,k+1))}}while(u)}return{ranges:a,hasMore:d,ambiguousCharacterCount:f,invisibleCharacterCount:S,nonBasicAsciiCharacterCount:v}}static computeUnicodeHighlightReason(g,t){const i=new p(t);switch(i.shouldHighlightNonBasicASCII(g)){case 0:return null;case 2:return{kind:1};case 3:{const l=g.codePointAt(0),c=i.ambiguousCharacters.getPrimaryConfusable(l),r=D.AmbiguousCharacters.getLocales().filter(s=>!D.AmbiguousCharacters.getInstance(new Set([...t.allowedLocales,s])).isAmbiguous(l));return{kind:0,confusableWith:String.fromCodePoint(c),notAmbiguousInLocales:r}}case 1:return{kind:2}}}}e.UnicodeTextModelHighlighter=w;function b(h,g){return`[${D.escapeRegExpCharacters(h.map(i=>String.fromCodePoint(i)).join(""))}]`}class p{constructor(g){this.options=g,this.allowedCodePoints=new Set(g.allowedCodePoints),this.ambiguousCharacters=D.AmbiguousCharacters.getInstance(new Set(g.allowedLocales))}getCandidateCodePoints(){if(this.options.nonBasicASCII)return"allNonBasicAscii";const g=new Set;if(this.options.invisibleCharacters)for(const t of D.InvisibleCharacters.codePoints)g.add(t);if(this.options.ambiguousCharacters)for(const t of this.ambiguousCharacters.getConfusableCodePoints())g.add(t);for(const t of this.allowedCodePoints)g.delete(t);return g}shouldHighlightNonBasicASCII(g){const t=g.codePointAt(0);return this.allowedCodePoints.has(t)?0:this.options.nonBasicASCII?1:this.options.invisibleCharacters&&!(g===" "||g===`
|
||
`||g===" ")&&D.InvisibleCharacters.isInvisibleCharacter(t)?2:this.options.ambiguousCharacters&&this.ambiguousCharacters.isAmbiguous(t)?3:0}}}),define(te[244],ie([1,0,11,3,49,418,150]),function(j,e,y,m,D,I,w){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.PieceTreeBase=e.StringBuffer=e.Piece=e.createLineStarts=e.createLineStartsFast=e.LineStarts=e.createUintArray=e.AverageBufferSize=void 0,e.AverageBufferSize=65535;function b(r){let s;return r[r.length-1]<65536?s=new Uint16Array(r.length):s=new Uint32Array(r.length),s.set(r,0),s}e.createUintArray=b;class p{constructor(s,o,a,d,u){this.lineStarts=s,this.cr=o,this.lf=a,this.crlf=d,this.isBasicASCII=u}}e.LineStarts=p;function h(r,s=!0){const o=[0];let a=1;for(let d=0,u=r.length;d<u;d++){const f=r.charCodeAt(d);f===13?d+1<u&&r.charCodeAt(d+1)===10?(o[a++]=d+2,d++):o[a++]=d+1:f===10&&(o[a++]=d+1)}return s?b(o):o}e.createLineStartsFast=h;function g(r,s){r.length=0,r[0]=0;let o=1,a=0,d=0,u=0,f=!0;for(let v=0,C=s.length;v<C;v++){const _=s.charCodeAt(v);_===13?v+1<C&&s.charCodeAt(v+1)===10?(u++,r[o++]=v+2,v++):(a++,r[o++]=v+1):_===10?(d++,r[o++]=v+1):f&&_!==9&&(_<32||_>126)&&(f=!1)}const S=new p(b(r),a,d,u,f);return r.length=0,S}e.createLineStarts=g;class t{constructor(s,o,a,d,u){this.bufferIndex=s,this.start=o,this.end=a,this.lineFeedCnt=d,this.length=u}}e.Piece=t;class i{constructor(s,o){this.buffer=s,this.lineStarts=o}}e.StringBuffer=i;class n{constructor(s,o){this._pieces=[],this._tree=s,this._BOM=o,this._index=0,s.root!==I.SENTINEL&&s.iterate(s.root,a=>(a!==I.SENTINEL&&this._pieces.push(a.piece),!0))}read(){return this._pieces.length===0?this._index===0?(this._index++,this._BOM):null:this._index>this._pieces.length-1?null:this._index===0?this._BOM+this._tree.getPieceContent(this._pieces[this._index++]):this._tree.getPieceContent(this._pieces[this._index++])}}class l{constructor(s){this._limit=s,this._cache=[]}get(s){for(let o=this._cache.length-1;o>=0;o--){const a=this._cache[o];if(a.nodeStartOffset<=s&&a.nodeStartOffset+a.node.piece.length>=s)return a}return null}get2(s){for(let o=this._cache.length-1;o>=0;o--){const a=this._cache[o];if(a.nodeStartLineNumber&&a.nodeStartLineNumber<s&&a.nodeStartLineNumber+a.node.piece.lineFeedCnt>=s)return a}return null}set(s){this._cache.length>=this._limit&&this._cache.shift(),this._cache.push(s)}validate(s){let o=!1;const a=this._cache;for(let d=0;d<a.length;d++){const u=a[d];if(u.node.parent===null||u.nodeStartOffset>=s){a[d]=null,o=!0;continue}}if(o){const d=[];for(const u of a)u!==null&&d.push(u);this._cache=d}}}class c{constructor(s,o,a){this.create(s,o,a)}create(s,o,a){this._buffers=[new i("",[0])],this._lastChangeBufferPos={line:0,column:0},this.root=I.SENTINEL,this._lineCnt=1,this._length=0,this._EOL=o,this._EOLLength=o.length,this._EOLNormalized=a;let d=null;for(let u=0,f=s.length;u<f;u++)if(s[u].buffer.length>0){s[u].lineStarts||(s[u].lineStarts=h(s[u].buffer));const S=new t(u+1,{line:0,column:0},{line:s[u].lineStarts.length-1,column:s[u].buffer.length-s[u].lineStarts[s[u].lineStarts.length-1]},s[u].lineStarts.length-1,s[u].buffer.length);this._buffers.push(s[u]),d=this.rbInsertRight(d,S)}this._searchCache=new l(1),this._lastVisitedLine={lineNumber:0,value:""},this.computeBufferMetadata()}normalizeEOL(s){const o=e.AverageBufferSize,a=o-Math.floor(o/3),d=a*2;let u="",f=0;const S=[];if(this.iterate(this.root,v=>{const C=this.getNodeContent(v),_=C.length;if(f<=a||f+_<d)return u+=C,f+=_,!0;const L=u.replace(/\r\n|\r|\n/g,s);return S.push(new i(L,h(L))),u=C,f=_,!0}),f>0){const v=u.replace(/\r\n|\r|\n/g,s);S.push(new i(v,h(v)))}this.create(S,s,!0)}getEOL(){return this._EOL}setEOL(s){this._EOL=s,this._EOLLength=this._EOL.length,this.normalizeEOL(s)}createSnapshot(s){return new n(this,s)}getOffsetAt(s,o){let a=0,d=this.root;for(;d!==I.SENTINEL;)if(d.left!==I.SENTINEL&&d.lf_left+1>=s)d=d.left;else{if(d.lf_left+d.piece.lineFeedCnt+1>=s)return a+=d.size_left,a+=this.getAccumulatedValue(d,s-d.lf_left-2)+o-1;s-=d.lf_left+d.piece.lineFeedCnt,a+=d.size_left+d.piece.length,d=d.right}return a}getPositionAt(s){s=Math.floor(s),s=Math.max(0,s);let o=this.root,a=0;const d=s;for(;o!==I.SENTINEL;)if(o.size_left!==0&&o.size_left>=s)o=o.left;else if(o.size_left+o.piece.length>=s){const u=this.getIndexOf(o,s-o.size_left);if(a+=o.lf_left+u.index,u.index===0){const f=this.getOffsetAt(a+1,1),S=d-f;return new y.Position(a+1,S+1)}return new y.Position(a+1,u.remainder+1)}else if(s-=o.size_left+o.piece.length,a+=o.lf_left+o.piece.lineFeedCnt,o.right===I.SENTINEL){const u=this.getOffsetAt(a+1,1),f=d-s-u;return new y.Position(a+1,f+1)}else o=o.right;return new y.Position(1,1)}getValueInRange(s,o){if(s.startLineNumber===s.endLineNumber&&s.startColumn===s.endColumn)return"";const a=this.nodeAt2(s.startLineNumber,s.startColumn),d=this.nodeAt2(s.endLineNumber,s.endColumn),u=this.getValueInRange2(a,d);return o?o!==this._EOL||!this._EOLNormalized?u.replace(/\r\n|\r|\n/g,o):o===this.getEOL()&&this._EOLNormalized?u:u.replace(/\r\n|\r|\n/g,o):u}getValueInRange2(s,o){if(s.node===o.node){const S=s.node,v=this._buffers[S.piece.bufferIndex].buffer,C=this.offsetInBuffer(S.piece.bufferIndex,S.piece.start);return v.substring(C+s.remainder,C+o.remainder)}let a=s.node;const d=this._buffers[a.piece.bufferIndex].buffer,u=this.offsetInBuffer(a.piece.bufferIndex,a.piece.start);let f=d.substring(u+s.remainder,u+a.piece.length);for(a=a.next();a!==I.SENTINEL;){const S=this._buffers[a.piece.bufferIndex].buffer,v=this.offsetInBuffer(a.piece.bufferIndex,a.piece.start);if(a===o.node){f+=S.substring(v,v+o.remainder);break}else f+=S.substr(v,a.piece.length);a=a.next()}return f}getLinesContent(){const s=[];let o=0,a="",d=!1;return this.iterate(this.root,u=>{if(u===I.SENTINEL)return!0;const f=u.piece;let S=f.length;if(S===0)return!0;const v=this._buffers[f.bufferIndex].buffer,C=this._buffers[f.bufferIndex].lineStarts,_=f.start.line,L=f.end.line;let E=C[_]+f.start.column;if(d&&(v.charCodeAt(E)===10&&(E++,S--),s[o++]=a,a="",d=!1,S===0))return!0;if(_===L)return!this._EOLNormalized&&v.charCodeAt(E+S-1)===13?(d=!0,a+=v.substr(E,S-1)):a+=v.substr(E,S),!0;a+=this._EOLNormalized?v.substring(E,Math.max(E,C[_+1]-this._EOLLength)):v.substring(E,C[_+1]).replace(/(\r\n|\r|\n)$/,""),s[o++]=a;for(let N=_+1;N<L;N++)a=this._EOLNormalized?v.substring(C[N],C[N+1]-this._EOLLength):v.substring(C[N],C[N+1]).replace(/(\r\n|\r|\n)$/,""),s[o++]=a;return!this._EOLNormalized&&v.charCodeAt(C[L]+f.end.column-1)===13?(d=!0,f.end.column===0?o--:a=v.substr(C[L],f.end.column-1)):a=v.substr(C[L],f.end.column),!0}),d&&(s[o++]=a,a=""),s[o++]=a,s}getLength(){return this._length}getLineCount(){return this._lineCnt}getLineContent(s){return this._lastVisitedLine.lineNumber===s?this._lastVisitedLine.value:(this._lastVisitedLine.lineNumber=s,s===this._lineCnt?this._lastVisitedLine.value=this.getLineRawContent(s):this._EOLNormalized?this._lastVisitedLine.value=this.getLineRawContent(s,this._EOLLength):this._lastVisitedLine.value=this.getLineRawContent(s).replace(/(\r\n|\r|\n)$/,""),this._lastVisitedLine.value)}_getCharCode(s){if(s.remainder===s.node.piece.length){const o=s.node.next();if(!o)return 0;const a=this._buffers[o.piece.bufferIndex],d=this.offsetInBuffer(o.piece.bufferIndex,o.piece.start);return a.buffer.charCodeAt(d)}else{const o=this._buffers[s.node.piece.bufferIndex],d=this.offsetInBuffer(s.node.piece.bufferIndex,s.node.piece.start)+s.remainder;return o.buffer.charCodeAt(d)}}getLineCharCode(s,o){const a=this.nodeAt2(s,o+1);return this._getCharCode(a)}getLineLength(s){if(s===this.getLineCount()){const o=this.getOffsetAt(s,1);return this.getLength()-o}return this.getOffsetAt(s+1,1)-this.getOffsetAt(s,1)-this._EOLLength}findMatchesInNode(s,o,a,d,u,f,S,v,C,_,L){const E=this._buffers[s.piece.bufferIndex],N=this.offsetInBuffer(s.piece.bufferIndex,s.piece.start),k=this.offsetInBuffer(s.piece.bufferIndex,u),M=this.offsetInBuffer(s.piece.bufferIndex,f);let O;const B={line:0,column:0};let T,R;o._wordSeparators?(T=E.buffer.substring(k,M),R=P=>P+k,o.reset(0)):(T=E.buffer,R=P=>P,o.reset(k));do if(O=o.next(T),O){if(R(O.index)>=M)return _;this.positionInBuffer(s,R(O.index)-N,B);const P=this.getLineFeedCnt(s.piece.bufferIndex,u,B),F=B.line===u.line?B.column-u.column+d:B.column+1,W=F+O[0].length;if(L[_++]=(0,w.createFindMatch)(new m.Range(a+P,F,a+P,W),O,v),R(O.index)+O[0].length>=M||_>=C)return _}while(O);return _}findMatchesLineByLine(s,o,a,d){const u=[];let f=0;const S=new w.Searcher(o.wordSeparators,o.regex);let v=this.nodeAt2(s.startLineNumber,s.startColumn);if(v===null)return[];const C=this.nodeAt2(s.endLineNumber,s.endColumn);if(C===null)return[];let _=this.positionInBuffer(v.node,v.remainder);const L=this.positionInBuffer(C.node,C.remainder);if(v.node===C.node)return this.findMatchesInNode(v.node,S,s.startLineNumber,s.startColumn,_,L,o,a,d,f,u),u;let E=s.startLineNumber,N=v.node;for(;N!==C.node;){const M=this.getLineFeedCnt(N.piece.bufferIndex,_,N.piece.end);if(M>=1){const B=this._buffers[N.piece.bufferIndex].lineStarts,T=this.offsetInBuffer(N.piece.bufferIndex,N.piece.start),R=B[_.line+M],P=E===s.startLineNumber?s.startColumn:1;if(f=this.findMatchesInNode(N,S,E,P,_,this.positionInBuffer(N,R-T),o,a,d,f,u),f>=d)return u;E+=M}const O=E===s.startLineNumber?s.startColumn-1:0;if(E===s.endLineNumber){const B=this.getLineContent(E).substring(O,s.endColumn-1);return f=this._findMatchesInLine(o,S,B,s.endLineNumber,O,f,u,a,d),u}if(f=this._findMatchesInLine(o,S,this.getLineContent(E).substr(O),E,O,f,u,a,d),f>=d)return u;E++,v=this.nodeAt2(E,1),N=v.node,_=this.positionInBuffer(v.node,v.remainder)}if(E===s.endLineNumber){const M=E===s.startLineNumber?s.startColumn-1:0,O=this.getLineContent(E).substring(M,s.endColumn-1);return f=this._findMatchesInLine(o,S,O,s.endLineNumber,M,f,u,a,d),u}const k=E===s.startLineNumber?s.startColumn:1;return f=this.findMatchesInNode(C.node,S,E,k,_,L,o,a,d,f,u),u}_findMatchesInLine(s,o,a,d,u,f,S,v,C){const _=s.wordSeparators;if(!v&&s.simpleSearch){const E=s.simpleSearch,N=E.length,k=a.length;let M=-N;for(;(M=a.indexOf(E,M+N))!==-1;)if((!_||(0,w.isValidMatch)(_,a,k,M,N))&&(S[f++]=new D.FindMatch(new m.Range(d,M+1+u,d,M+1+N+u),null),f>=C))return f;return f}let L;o.reset(0);do if(L=o.next(a),L&&(S[f++]=(0,w.createFindMatch)(new m.Range(d,L.index+1+u,d,L.index+1+L[0].length+u),L,v),f>=C))return f;while(L);return f}insert(s,o,a=!1){if(this._EOLNormalized=this._EOLNormalized&&a,this._lastVisitedLine.lineNumber=0,this._lastVisitedLine.value="",this.root!==I.SENTINEL){const{node:d,remainder:u,nodeStartOffset:f}=this.nodeAt(s),S=d.piece,v=S.bufferIndex,C=this.positionInBuffer(d,u);if(d.piece.bufferIndex===0&&S.end.line===this._lastChangeBufferPos.line&&S.end.column===this._lastChangeBufferPos.column&&f+S.length===s&&o.length<e.AverageBufferSize){this.appendToNode(d,o),this.computeBufferMetadata();return}if(f===s)this.insertContentToNodeLeft(o,d),this._searchCache.validate(s);else if(f+d.piece.length>s){const _=[];let L=new t(S.bufferIndex,C,S.end,this.getLineFeedCnt(S.bufferIndex,C,S.end),this.offsetInBuffer(v,S.end)-this.offsetInBuffer(v,C));if(this.shouldCheckCRLF()&&this.endWithCR(o)&&this.nodeCharCodeAt(d,u)===10){const M={line:L.start.line+1,column:0};L=new t(L.bufferIndex,M,L.end,this.getLineFeedCnt(L.bufferIndex,M,L.end),L.length-1),o+=`
|
||
`}if(this.shouldCheckCRLF()&&this.startWithLF(o))if(this.nodeCharCodeAt(d,u-1)===13){const M=this.positionInBuffer(d,u-1);this.deleteNodeTail(d,M),o="\r"+o,d.piece.length===0&&_.push(d)}else this.deleteNodeTail(d,C);else this.deleteNodeTail(d,C);const E=this.createNewPieces(o);L.length>0&&this.rbInsertRight(d,L);let N=d;for(let k=0;k<E.length;k++)N=this.rbInsertRight(N,E[k]);this.deleteNodes(_)}else this.insertContentToNodeRight(o,d)}else{const d=this.createNewPieces(o);let u=this.rbInsertLeft(null,d[0]);for(let f=1;f<d.length;f++)u=this.rbInsertRight(u,d[f])}this.computeBufferMetadata()}delete(s,o){if(this._lastVisitedLine.lineNumber=0,this._lastVisitedLine.value="",o<=0||this.root===I.SENTINEL)return;const a=this.nodeAt(s),d=this.nodeAt(s+o),u=a.node,f=d.node;if(u===f){const E=this.positionInBuffer(u,a.remainder),N=this.positionInBuffer(u,d.remainder);if(a.nodeStartOffset===s){if(o===u.piece.length){const k=u.next();(0,I.rbDelete)(this,u),this.validateCRLFWithPrevNode(k),this.computeBufferMetadata();return}this.deleteNodeHead(u,N),this._searchCache.validate(s),this.validateCRLFWithPrevNode(u),this.computeBufferMetadata();return}if(a.nodeStartOffset+u.piece.length===s+o){this.deleteNodeTail(u,E),this.validateCRLFWithNextNode(u),this.computeBufferMetadata();return}this.shrinkNode(u,E,N),this.computeBufferMetadata();return}const S=[],v=this.positionInBuffer(u,a.remainder);this.deleteNodeTail(u,v),this._searchCache.validate(s),u.piece.length===0&&S.push(u);const C=this.positionInBuffer(f,d.remainder);this.deleteNodeHead(f,C),f.piece.length===0&&S.push(f);const _=u.next();for(let E=_;E!==I.SENTINEL&&E!==f;E=E.next())S.push(E);const L=u.piece.length===0?u.prev():u;this.deleteNodes(S),this.validateCRLFWithNextNode(L),this.computeBufferMetadata()}insertContentToNodeLeft(s,o){const a=[];if(this.shouldCheckCRLF()&&this.endWithCR(s)&&this.startWithLF(o)){const f=o.piece,S={line:f.start.line+1,column:0},v=new t(f.bufferIndex,S,f.end,this.getLineFeedCnt(f.bufferIndex,S,f.end),f.length-1);o.piece=v,s+=`
|
||
`,(0,I.updateTreeMetadata)(this,o,-1,-1),o.piece.length===0&&a.push(o)}const d=this.createNewPieces(s);let u=this.rbInsertLeft(o,d[d.length-1]);for(let f=d.length-2;f>=0;f--)u=this.rbInsertLeft(u,d[f]);this.validateCRLFWithPrevNode(u),this.deleteNodes(a)}insertContentToNodeRight(s,o){this.adjustCarriageReturnFromNext(s,o)&&(s+=`
|
||
`);const a=this.createNewPieces(s),d=this.rbInsertRight(o,a[0]);let u=d;for(let f=1;f<a.length;f++)u=this.rbInsertRight(u,a[f]);this.validateCRLFWithPrevNode(d)}positionInBuffer(s,o,a){const d=s.piece,u=s.piece.bufferIndex,f=this._buffers[u].lineStarts,v=f[d.start.line]+d.start.column+o;let C=d.start.line,_=d.end.line,L=0,E=0,N=0;for(;C<=_&&(L=C+(_-C)/2|0,N=f[L],L!==_);)if(E=f[L+1],v<N)_=L-1;else if(v>=E)C=L+1;else break;return a?(a.line=L,a.column=v-N,null):{line:L,column:v-N}}getLineFeedCnt(s,o,a){if(a.column===0)return a.line-o.line;const d=this._buffers[s].lineStarts;if(a.line===d.length-1)return a.line-o.line;const u=d[a.line+1],f=d[a.line]+a.column;if(u>f+1)return a.line-o.line;const S=f-1;return this._buffers[s].buffer.charCodeAt(S)===13?a.line-o.line+1:a.line-o.line}offsetInBuffer(s,o){return this._buffers[s].lineStarts[o.line]+o.column}deleteNodes(s){for(let o=0;o<s.length;o++)(0,I.rbDelete)(this,s[o])}createNewPieces(s){if(s.length>e.AverageBufferSize){const _=[];for(;s.length>e.AverageBufferSize;){const E=s.charCodeAt(e.AverageBufferSize-1);let N;E===13||E>=55296&&E<=56319?(N=s.substring(0,e.AverageBufferSize-1),s=s.substring(e.AverageBufferSize-1)):(N=s.substring(0,e.AverageBufferSize),s=s.substring(e.AverageBufferSize));const k=h(N);_.push(new t(this._buffers.length,{line:0,column:0},{line:k.length-1,column:N.length-k[k.length-1]},k.length-1,N.length)),this._buffers.push(new i(N,k))}const L=h(s);return _.push(new t(this._buffers.length,{line:0,column:0},{line:L.length-1,column:s.length-L[L.length-1]},L.length-1,s.length)),this._buffers.push(new i(s,L)),_}let o=this._buffers[0].buffer.length;const a=h(s,!1);let d=this._lastChangeBufferPos;if(this._buffers[0].lineStarts[this._buffers[0].lineStarts.length-1]===o&&o!==0&&this.startWithLF(s)&&this.endWithCR(this._buffers[0].buffer)){this._lastChangeBufferPos={line:this._lastChangeBufferPos.line,column:this._lastChangeBufferPos.column+1},d=this._lastChangeBufferPos;for(let _=0;_<a.length;_++)a[_]+=o+1;this._buffers[0].lineStarts=this._buffers[0].lineStarts.concat(a.slice(1)),this._buffers[0].buffer+="_"+s,o+=1}else{if(o!==0)for(let _=0;_<a.length;_++)a[_]+=o;this._buffers[0].lineStarts=this._buffers[0].lineStarts.concat(a.slice(1)),this._buffers[0].buffer+=s}const u=this._buffers[0].buffer.length,f=this._buffers[0].lineStarts.length-1,S=u-this._buffers[0].lineStarts[f],v={line:f,column:S},C=new t(0,d,v,this.getLineFeedCnt(0,d,v),u-o);return this._lastChangeBufferPos=v,[C]}getLineRawContent(s,o=0){let a=this.root,d="";const u=this._searchCache.get2(s);if(u){a=u.node;const f=this.getAccumulatedValue(a,s-u.nodeStartLineNumber-1),S=this._buffers[a.piece.bufferIndex].buffer,v=this.offsetInBuffer(a.piece.bufferIndex,a.piece.start);if(u.nodeStartLineNumber+a.piece.lineFeedCnt===s)d=S.substring(v+f,v+a.piece.length);else{const C=this.getAccumulatedValue(a,s-u.nodeStartLineNumber);return S.substring(v+f,v+C-o)}}else{let f=0;const S=s;for(;a!==I.SENTINEL;)if(a.left!==I.SENTINEL&&a.lf_left>=s-1)a=a.left;else if(a.lf_left+a.piece.lineFeedCnt>s-1){const v=this.getAccumulatedValue(a,s-a.lf_left-2),C=this.getAccumulatedValue(a,s-a.lf_left-1),_=this._buffers[a.piece.bufferIndex].buffer,L=this.offsetInBuffer(a.piece.bufferIndex,a.piece.start);return f+=a.size_left,this._searchCache.set({node:a,nodeStartOffset:f,nodeStartLineNumber:S-(s-1-a.lf_left)}),_.substring(L+v,L+C-o)}else if(a.lf_left+a.piece.lineFeedCnt===s-1){const v=this.getAccumulatedValue(a,s-a.lf_left-2),C=this._buffers[a.piece.bufferIndex].buffer,_=this.offsetInBuffer(a.piece.bufferIndex,a.piece.start);d=C.substring(_+v,_+a.piece.length);break}else s-=a.lf_left+a.piece.lineFeedCnt,f+=a.size_left+a.piece.length,a=a.right}for(a=a.next();a!==I.SENTINEL;){const f=this._buffers[a.piece.bufferIndex].buffer;if(a.piece.lineFeedCnt>0){const S=this.getAccumulatedValue(a,0),v=this.offsetInBuffer(a.piece.bufferIndex,a.piece.start);return d+=f.substring(v,v+S-o),d}else{const S=this.offsetInBuffer(a.piece.bufferIndex,a.piece.start);d+=f.substr(S,a.piece.length)}a=a.next()}return d}computeBufferMetadata(){let s=this.root,o=1,a=0;for(;s!==I.SENTINEL;)o+=s.lf_left+s.piece.lineFeedCnt,a+=s.size_left+s.piece.length,s=s.right;this._lineCnt=o,this._length=a,this._searchCache.validate(this._length)}getIndexOf(s,o){const a=s.piece,d=this.positionInBuffer(s,o),u=d.line-a.start.line;if(this.offsetInBuffer(a.bufferIndex,a.end)-this.offsetInBuffer(a.bufferIndex,a.start)===o){const f=this.getLineFeedCnt(s.piece.bufferIndex,a.start,d);if(f!==u)return{index:f,remainder:0}}return{index:u,remainder:d.column}}getAccumulatedValue(s,o){if(o<0)return 0;const a=s.piece,d=this._buffers[a.bufferIndex].lineStarts,u=a.start.line+o+1;return u>a.end.line?d[a.end.line]+a.end.column-d[a.start.line]-a.start.column:d[u]-d[a.start.line]-a.start.column}deleteNodeTail(s,o){const a=s.piece,d=a.lineFeedCnt,u=this.offsetInBuffer(a.bufferIndex,a.end),f=o,S=this.offsetInBuffer(a.bufferIndex,f),v=this.getLineFeedCnt(a.bufferIndex,a.start,f),C=v-d,_=S-u,L=a.length+_;s.piece=new t(a.bufferIndex,a.start,f,v,L),(0,I.updateTreeMetadata)(this,s,_,C)}deleteNodeHead(s,o){const a=s.piece,d=a.lineFeedCnt,u=this.offsetInBuffer(a.bufferIndex,a.start),f=o,S=this.getLineFeedCnt(a.bufferIndex,f,a.end),v=this.offsetInBuffer(a.bufferIndex,f),C=S-d,_=u-v,L=a.length+_;s.piece=new t(a.bufferIndex,f,a.end,S,L),(0,I.updateTreeMetadata)(this,s,_,C)}shrinkNode(s,o,a){const d=s.piece,u=d.start,f=d.end,S=d.length,v=d.lineFeedCnt,C=o,_=this.getLineFeedCnt(d.bufferIndex,d.start,C),L=this.offsetInBuffer(d.bufferIndex,o)-this.offsetInBuffer(d.bufferIndex,u);s.piece=new t(d.bufferIndex,d.start,C,_,L),(0,I.updateTreeMetadata)(this,s,L-S,_-v);const E=new t(d.bufferIndex,a,f,this.getLineFeedCnt(d.bufferIndex,a,f),this.offsetInBuffer(d.bufferIndex,f)-this.offsetInBuffer(d.bufferIndex,a)),N=this.rbInsertRight(s,E);this.validateCRLFWithPrevNode(N)}appendToNode(s,o){this.adjustCarriageReturnFromNext(o,s)&&(o+=`
|
||
`);const a=this.shouldCheckCRLF()&&this.startWithLF(o)&&this.endWithCR(s),d=this._buffers[0].buffer.length;this._buffers[0].buffer+=o;const u=h(o,!1);for(let N=0;N<u.length;N++)u[N]+=d;if(a){const N=this._buffers[0].lineStarts[this._buffers[0].lineStarts.length-2];this._buffers[0].lineStarts.pop(),this._lastChangeBufferPos={line:this._lastChangeBufferPos.line-1,column:d-N}}this._buffers[0].lineStarts=this._buffers[0].lineStarts.concat(u.slice(1));const f=this._buffers[0].lineStarts.length-1,S=this._buffers[0].buffer.length-this._buffers[0].lineStarts[f],v={line:f,column:S},C=s.piece.length+o.length,_=s.piece.lineFeedCnt,L=this.getLineFeedCnt(0,s.piece.start,v),E=L-_;s.piece=new t(s.piece.bufferIndex,s.piece.start,v,L,C),this._lastChangeBufferPos=v,(0,I.updateTreeMetadata)(this,s,o.length,E)}nodeAt(s){let o=this.root;const a=this._searchCache.get(s);if(a)return{node:a.node,nodeStartOffset:a.nodeStartOffset,remainder:s-a.nodeStartOffset};let d=0;for(;o!==I.SENTINEL;)if(o.size_left>s)o=o.left;else if(o.size_left+o.piece.length>=s){d+=o.size_left;const u={node:o,remainder:s-o.size_left,nodeStartOffset:d};return this._searchCache.set(u),u}else s-=o.size_left+o.piece.length,d+=o.size_left+o.piece.length,o=o.right;return null}nodeAt2(s,o){let a=this.root,d=0;for(;a!==I.SENTINEL;)if(a.left!==I.SENTINEL&&a.lf_left>=s-1)a=a.left;else if(a.lf_left+a.piece.lineFeedCnt>s-1){const u=this.getAccumulatedValue(a,s-a.lf_left-2),f=this.getAccumulatedValue(a,s-a.lf_left-1);return d+=a.size_left,{node:a,remainder:Math.min(u+o-1,f),nodeStartOffset:d}}else if(a.lf_left+a.piece.lineFeedCnt===s-1){const u=this.getAccumulatedValue(a,s-a.lf_left-2);if(u+o-1<=a.piece.length)return{node:a,remainder:u+o-1,nodeStartOffset:d};o-=a.piece.length-u;break}else s-=a.lf_left+a.piece.lineFeedCnt,d+=a.size_left+a.piece.length,a=a.right;for(a=a.next();a!==I.SENTINEL;){if(a.piece.lineFeedCnt>0){const u=this.getAccumulatedValue(a,0),f=this.offsetOfNode(a);return{node:a,remainder:Math.min(o-1,u),nodeStartOffset:f}}else if(a.piece.length>=o-1){const u=this.offsetOfNode(a);return{node:a,remainder:o-1,nodeStartOffset:u}}else o-=a.piece.length;a=a.next()}return null}nodeCharCodeAt(s,o){if(s.piece.lineFeedCnt<1)return-1;const a=this._buffers[s.piece.bufferIndex],d=this.offsetInBuffer(s.piece.bufferIndex,s.piece.start)+o;return a.buffer.charCodeAt(d)}offsetOfNode(s){if(!s)return 0;let o=s.size_left;for(;s!==this.root;)s.parent.right===s&&(o+=s.parent.size_left+s.parent.piece.length),s=s.parent;return o}shouldCheckCRLF(){return!(this._EOLNormalized&&this._EOL===`
|
||
`)}startWithLF(s){if(typeof s=="string")return s.charCodeAt(0)===10;if(s===I.SENTINEL||s.piece.lineFeedCnt===0)return!1;const o=s.piece,a=this._buffers[o.bufferIndex].lineStarts,d=o.start.line,u=a[d]+o.start.column;return d===a.length-1||a[d+1]>u+1?!1:this._buffers[o.bufferIndex].buffer.charCodeAt(u)===10}endWithCR(s){return typeof s=="string"?s.charCodeAt(s.length-1)===13:s===I.SENTINEL||s.piece.lineFeedCnt===0?!1:this.nodeCharCodeAt(s,s.piece.length-1)===13}validateCRLFWithPrevNode(s){if(this.shouldCheckCRLF()&&this.startWithLF(s)){const o=s.prev();this.endWithCR(o)&&this.fixCRLF(o,s)}}validateCRLFWithNextNode(s){if(this.shouldCheckCRLF()&&this.endWithCR(s)){const o=s.next();this.startWithLF(o)&&this.fixCRLF(s,o)}}fixCRLF(s,o){const a=[],d=this._buffers[s.piece.bufferIndex].lineStarts;let u;s.piece.end.column===0?u={line:s.piece.end.line-1,column:d[s.piece.end.line]-d[s.piece.end.line-1]-1}:u={line:s.piece.end.line,column:s.piece.end.column-1};const f=s.piece.length-1,S=s.piece.lineFeedCnt-1;s.piece=new t(s.piece.bufferIndex,s.piece.start,u,S,f),(0,I.updateTreeMetadata)(this,s,-1,-1),s.piece.length===0&&a.push(s);const v={line:o.piece.start.line+1,column:0},C=o.piece.length-1,_=this.getLineFeedCnt(o.piece.bufferIndex,v,o.piece.end);o.piece=new t(o.piece.bufferIndex,v,o.piece.end,_,C),(0,I.updateTreeMetadata)(this,o,-1,-1),o.piece.length===0&&a.push(o);const L=this.createNewPieces(`\r
|
||
`);this.rbInsertRight(s,L[0]);for(let E=0;E<a.length;E++)(0,I.rbDelete)(this,a[E])}adjustCarriageReturnFromNext(s,o){if(this.shouldCheckCRLF()&&this.endWithCR(s)){const a=o.next();if(this.startWithLF(a)){if(s+=`
|
||
`,a.piece.length===1)(0,I.rbDelete)(this,a);else{const d=a.piece,u={line:d.start.line+1,column:0},f=d.length-1,S=this.getLineFeedCnt(d.bufferIndex,u,d.end);a.piece=new t(d.bufferIndex,u,d.end,S,f),(0,I.updateTreeMetadata)(this,a,-1,-1)}return!0}}return!1}iterate(s,o){if(s===I.SENTINEL)return o(I.SENTINEL);const a=this.iterate(s.left,o);return a&&o(s)&&this.iterate(s.right,o)}getNodeContent(s){if(s===I.SENTINEL)return"";const o=this._buffers[s.piece.bufferIndex];let a;const d=s.piece,u=this.offsetInBuffer(d.bufferIndex,d.start),f=this.offsetInBuffer(d.bufferIndex,d.end);return a=o.buffer.substring(u,f),a}getPieceContent(s){const o=this._buffers[s.bufferIndex],a=this.offsetInBuffer(s.bufferIndex,s.start),d=this.offsetInBuffer(s.bufferIndex,s.end);return o.buffer.substring(a,d)}rbInsertRight(s,o){const a=new I.TreeNode(o,1);if(a.left=I.SENTINEL,a.right=I.SENTINEL,a.parent=I.SENTINEL,a.size_left=0,a.lf_left=0,this.root===I.SENTINEL)this.root=a,a.color=0;else if(s.right===I.SENTINEL)s.right=a,a.parent=s;else{const u=(0,I.leftest)(s.right);u.left=a,a.parent=u}return(0,I.fixInsert)(this,a),a}rbInsertLeft(s,o){const a=new I.TreeNode(o,1);if(a.left=I.SENTINEL,a.right=I.SENTINEL,a.parent=I.SENTINEL,a.size_left=0,a.lf_left=0,this.root===I.SENTINEL)this.root=a,a.color=0;else if(s.left===I.SENTINEL)s.left=a,a.parent=s;else{const d=(0,I.righttest)(s.left);d.right=a,a.parent=d}return(0,I.fixInsert)(this,a),a}}e.PieceTreeBase=c}),define(te[245],ie([1,0,4,8,3,49,244,117,237,2]),function(j,e,y,m,D,I,w,b,p,h){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.PieceTreeTextBuffer=void 0;class g extends h.Disposable{constructor(i,n,l,c,r,s,o){super();this._onDidChangeContent=this._register(new y.Emitter),this._BOM=n,this._mightContainNonBasicASCII=!s,this._mightContainRTL=c,this._mightContainUnusualLineTerminators=r,this._pieceTree=new w.PieceTreeBase(i,l,o)}mightContainRTL(){return this._mightContainRTL}mightContainUnusualLineTerminators(){return this._mightContainUnusualLineTerminators}resetMightContainUnusualLineTerminators(){this._mightContainUnusualLineTerminators=!1}mightContainNonBasicASCII(){return this._mightContainNonBasicASCII}getBOM(){return this._BOM}getEOL(){return this._pieceTree.getEOL()}createSnapshot(i){return this._pieceTree.createSnapshot(i?this._BOM:"")}getOffsetAt(i,n){return this._pieceTree.getOffsetAt(i,n)}getPositionAt(i){return this._pieceTree.getPositionAt(i)}getRangeAt(i,n){const l=i+n,c=this.getPositionAt(i),r=this.getPositionAt(l);return new D.Range(c.lineNumber,c.column,r.lineNumber,r.column)}getValueInRange(i,n=0){if(i.isEmpty())return"";const l=this._getEndOfLine(n);return this._pieceTree.getValueInRange(i,l)}getValueLengthInRange(i,n=0){if(i.isEmpty())return 0;if(i.startLineNumber===i.endLineNumber)return i.endColumn-i.startColumn;const l=this.getOffsetAt(i.startLineNumber,i.startColumn);return this.getOffsetAt(i.endLineNumber,i.endColumn)-l}getCharacterCountInRange(i,n=0){if(this._mightContainNonBasicASCII){let l=0;const c=i.startLineNumber,r=i.endLineNumber;for(let s=c;s<=r;s++){const o=this.getLineContent(s),a=s===c?i.startColumn-1:0,d=s===r?i.endColumn-1:o.length;for(let u=a;u<d;u++)m.isHighSurrogate(o.charCodeAt(u))?(l=l+1,u=u+1):l=l+1}return l+=this._getEndOfLine(n).length*(r-c),l}return this.getValueLengthInRange(i,n)}getLength(){return this._pieceTree.getLength()}getLineCount(){return this._pieceTree.getLineCount()}getLinesContent(){return this._pieceTree.getLinesContent()}getLineContent(i){return this._pieceTree.getLineContent(i)}getLineCharCode(i,n){return this._pieceTree.getLineCharCode(i,n)}getLineLength(i){return this._pieceTree.getLineLength(i)}getLineFirstNonWhitespaceColumn(i){const n=m.firstNonWhitespaceIndex(this.getLineContent(i));return n===-1?0:n+1}getLineLastNonWhitespaceColumn(i){const n=m.lastNonWhitespaceIndex(this.getLineContent(i));return n===-1?0:n+2}_getEndOfLine(i){switch(i){case 1:return`
|
||
`;case 2:return`\r
|
||
`;case 0:return this.getEOL();default:throw new Error("Unknown EOL preference")}}setEOL(i){this._pieceTree.setEOL(i)}applyEdits(i,n,l){let c=this._mightContainRTL,r=this._mightContainUnusualLineTerminators,s=this._mightContainNonBasicASCII,o=!0,a=[];for(let _=0;_<i.length;_++){const L=i[_];o&&L._isTracked&&(o=!1);const E=L.range;if(L.text){let B=!0;s||(B=!m.isBasicASCII(L.text),s=B),!c&&B&&(c=m.containsRTL(L.text)),!r&&B&&(r=m.containsUnusualLineTerminators(L.text))}let N="",k=0,M=0,O=0;if(L.text){let B;[k,M,O,B]=(0,b.countEOL)(L.text);const T=this.getEOL();B===0||B===(T===`\r
|
||
`?2:1)?N=L.text:N=L.text.replace(/\r\n|\r|\n/g,T)}a[_]={sortIndex:_,identifier:L.identifier||null,range:E,rangeOffset:this.getOffsetAt(E.startLineNumber,E.startColumn),rangeLength:this.getValueLengthInRange(E),text:N,eolCount:k,firstLineLength:M,lastLineLength:O,forceMoveMarkers:Boolean(L.forceMoveMarkers),isAutoWhitespaceEdit:L.isAutoWhitespaceEdit||!1}}a.sort(g._sortOpsAscending);let d=!1;for(let _=0,L=a.length-1;_<L;_++){const E=a[_].range.getEndPosition(),N=a[_+1].range.getStartPosition();if(N.isBeforeOrEqual(E)){if(N.isBefore(E))throw new Error("Overlapping ranges are not allowed!");d=!0}}o&&(a=this._reduceOperations(a));const u=l||n?g._getInverseEditRanges(a):[],f=[];if(n)for(let _=0;_<a.length;_++){const L=a[_],E=u[_];if(L.isAutoWhitespaceEdit&&L.range.isEmpty())for(let N=E.startLineNumber;N<=E.endLineNumber;N++){let k="";N===E.startLineNumber&&(k=this.getLineContent(L.range.startLineNumber),m.firstNonWhitespaceIndex(k)!==-1)||f.push({lineNumber:N,oldContent:k})}}let S=null;if(l){let _=0;S=[];for(let L=0;L<a.length;L++){const E=a[L],N=u[L],k=this.getValueInRange(E.range),M=E.rangeOffset+_;_+=E.text.length-k.length,S[L]={sortIndex:E.sortIndex,identifier:E.identifier,range:N,text:k,textChange:new p.TextChange(E.rangeOffset,k,M,E.text)}}d||S.sort((L,E)=>L.sortIndex-E.sortIndex)}this._mightContainRTL=c,this._mightContainUnusualLineTerminators=r,this._mightContainNonBasicASCII=s;const v=this._doApplyEdits(a);let C=null;if(n&&f.length>0){f.sort((_,L)=>L.lineNumber-_.lineNumber),C=[];for(let _=0,L=f.length;_<L;_++){const E=f[_].lineNumber;if(_>0&&f[_-1].lineNumber===E)continue;const N=f[_].oldContent,k=this.getLineContent(E);k.length===0||k===N||m.firstNonWhitespaceIndex(k)!==-1||C.push(E)}}return this._onDidChangeContent.fire(),new I.ApplyEditsResult(S,v,C)}_reduceOperations(i){return i.length<1e3?i:[this._toSingleEditOperation(i)]}_toSingleEditOperation(i){let n=!1;const l=i[0].range,c=i[i.length-1].range,r=new D.Range(l.startLineNumber,l.startColumn,c.endLineNumber,c.endColumn);let s=l.startLineNumber,o=l.startColumn;const a=[];for(let v=0,C=i.length;v<C;v++){const _=i[v],L=_.range;n=n||_.forceMoveMarkers,a.push(this.getValueInRange(new D.Range(s,o,L.startLineNumber,L.startColumn))),_.text.length>0&&a.push(_.text),s=L.endLineNumber,o=L.endColumn}const d=a.join(""),[u,f,S]=(0,b.countEOL)(d);return{sortIndex:0,identifier:i[0].identifier,range:r,rangeOffset:this.getOffsetAt(r.startLineNumber,r.startColumn),rangeLength:this.getValueLengthInRange(r,0),text:d,eolCount:u,firstLineLength:f,lastLineLength:S,forceMoveMarkers:n,isAutoWhitespaceEdit:!1}}_doApplyEdits(i){i.sort(g._sortOpsDescending);const n=[];for(let l=0;l<i.length;l++){const c=i[l],r=c.range.startLineNumber,s=c.range.startColumn,o=c.range.endLineNumber,a=c.range.endColumn;if(r===o&&s===a&&c.text.length===0)continue;c.text?(this._pieceTree.delete(c.rangeOffset,c.rangeLength),this._pieceTree.insert(c.rangeOffset,c.text,!0)):this._pieceTree.delete(c.rangeOffset,c.rangeLength);const d=new D.Range(r,s,o,a);n.push({range:d,rangeLength:c.rangeLength,text:c.text,rangeOffset:c.rangeOffset,forceMoveMarkers:c.forceMoveMarkers})}return n}findMatchesLineByLine(i,n,l,c){return this._pieceTree.findMatchesLineByLine(i,n,l,c)}static _getInverseEditRanges(i){const n=[];let l=0,c=0,r=null;for(let s=0,o=i.length;s<o;s++){const a=i[s];let d,u;r?r.range.endLineNumber===a.range.startLineNumber?(d=l,u=c+(a.range.startColumn-r.range.endColumn)):(d=l+(a.range.startLineNumber-r.range.endLineNumber),u=a.range.startColumn):(d=a.range.startLineNumber,u=a.range.startColumn);let f;if(a.text.length>0){const S=a.eolCount+1;S===1?f=new D.Range(d,u,d,u+a.firstLineLength):f=new D.Range(d,u,d+S-1,a.lastLineLength+1)}else f=new D.Range(d,u,d,u);l=f.endLineNumber,c=f.endColumn,n.push(f),r=a}return n}static _sortOpsAscending(i,n){const l=D.Range.compareRangesUsingEnds(i.range,n.range);return l===0?i.sortIndex-n.sortIndex:l}static _sortOpsDescending(i,n){const l=D.Range.compareRangesUsingEnds(i.range,n.range);return l===0?n.sortIndex-i.sortIndex:-l}}e.PieceTreeTextBuffer=g}),define(te[421],ie([1,0,8,244,245]),function(j,e,y,m,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.PieceTreeTextBufferBuilder=e.PieceTreeTextBufferFactory=void 0;class I{constructor(p,h,g,t,i,n,l,c,r){this._chunks=p,this._bom=h,this._cr=g,this._lf=t,this._crlf=i,this._containsRTL=n,this._containsUnusualLineTerminators=l,this._isBasicASCII=c,this._normalizeEOL=r}_getEOL(p){const h=this._cr+this._lf+this._crlf,g=this._cr+this._crlf;return h===0?p===1?`
|
||
`:`\r
|
||
`:g>h/2?`\r
|
||
`:`
|
||
`}create(p){const h=this._getEOL(p),g=this._chunks;if(this._normalizeEOL&&(h===`\r
|
||
`&&(this._cr>0||this._lf>0)||h===`
|
||
`&&(this._cr>0||this._crlf>0)))for(let i=0,n=g.length;i<n;i++){const l=g[i].buffer.replace(/\r\n|\r|\n/g,h),c=(0,m.createLineStartsFast)(l);g[i]=new m.StringBuffer(l,c)}const t=new D.PieceTreeTextBuffer(g,this._bom,h,this._containsRTL,this._containsUnusualLineTerminators,this._isBasicASCII,this._normalizeEOL);return{textBuffer:t,disposable:t}}}e.PieceTreeTextBufferFactory=I;class w{constructor(){this.chunks=[],this.BOM="",this._hasPreviousChar=!1,this._previousChar=0,this._tmpLineStarts=[],this.cr=0,this.lf=0,this.crlf=0,this.containsRTL=!1,this.containsUnusualLineTerminators=!1,this.isBasicASCII=!0}acceptChunk(p){if(p.length===0)return;this.chunks.length===0&&y.startsWithUTF8BOM(p)&&(this.BOM=y.UTF8_BOM_CHARACTER,p=p.substr(1));const h=p.charCodeAt(p.length-1);h===13||h>=55296&&h<=56319?(this._acceptChunk1(p.substr(0,p.length-1),!1),this._hasPreviousChar=!0,this._previousChar=h):(this._acceptChunk1(p,!1),this._hasPreviousChar=!1,this._previousChar=h)}_acceptChunk1(p,h){!h&&p.length===0||(this._hasPreviousChar?this._acceptChunk2(String.fromCharCode(this._previousChar)+p):this._acceptChunk2(p))}_acceptChunk2(p){const h=(0,m.createLineStarts)(this._tmpLineStarts,p);this.chunks.push(new m.StringBuffer(p,h.lineStarts)),this.cr+=h.cr,this.lf+=h.lf,this.crlf+=h.crlf,this.isBasicASCII&&(this.isBasicASCII=h.isBasicASCII),!this.isBasicASCII&&!this.containsRTL&&(this.containsRTL=y.containsRTL(p)),!this.isBasicASCII&&!this.containsUnusualLineTerminators&&(this.containsUnusualLineTerminators=y.containsUnusualLineTerminators(p))}finish(p=!0){return this._finish(),new I(this.chunks,this.BOM,this.cr,this.lf,this.crlf,this.containsRTL,this.containsUnusualLineTerminators,this.isBasicASCII,p)}_finish(){if(this.chunks.length===0&&this._acceptChunk1("",!0),this._hasPreviousChar){this._hasPreviousChar=!1;const p=this.chunks[this.chunks.length-1];p.buffer+=String.fromCharCode(this._previousChar);const h=(0,m.createLineStartsFast)(p.buffer);p.lineStarts=h,this._previousChar===13&&this.cr++}}}e.PieceTreeTextBufferBuilder=w}),define(te[178],ie([1,0]),function(j,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.computeIndentLevel=void 0;function y(m,D){let I=0,w=0;const b=m.length;for(;w<b;){const p=m.charCodeAt(w);if(p===32)I++;else if(p===9)I=I-I%D+D;else break;w++}return w===b?-1:I}e.computeIndentLevel=y}),define(te[422],ie([1,0,215,135,48,82,41,8]),function(j,e,y,m,D,I,w,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getMimeTypes=e.clearLanguageAssociations=e.registerLanguageAssociation=void 0;let p=[],h=[],g=[];function t(s,o=!1){const a=i(s);p.push(a),a.userConfigured?g.push(a):h.push(a),o&&!a.userConfigured&&p.forEach(d=>{d.mime===a.mime||d.userConfigured||(a.extension&&d.extension===a.extension&&console.warn(`Overwriting extension <<${a.extension}>> to now point to mime <<${a.mime}>>`),a.filename&&d.filename===a.filename&&console.warn(`Overwriting filename <<${a.filename}>> to now point to mime <<${a.mime}>>`),a.filepattern&&d.filepattern===a.filepattern&&console.warn(`Overwriting filepattern <<${a.filepattern}>> to now point to mime <<${a.mime}>>`),a.firstline&&d.firstline===a.firstline&&console.warn(`Overwriting firstline <<${a.firstline}>> to now point to mime <<${a.mime}>>`))})}e.registerLanguageAssociation=t;function i(s){return{id:s.id,mime:s.mime,filename:s.filename,extension:s.extension,filepattern:s.filepattern,firstline:s.firstline,userConfigured:s.userConfigured,filenameLowercase:s.filename?s.filename.toLowerCase():void 0,extensionLowercase:s.extension?s.extension.toLowerCase():void 0,filepatternLowercase:s.filepattern?(0,y.parse)(s.filepattern.toLowerCase()):void 0,filepatternOnPath:s.filepattern?s.filepattern.indexOf(I.posix.sep)>=0:!1}}function n(s){s?(p=p.filter(o=>!o.userConfigured),g=[]):(p=[],h=[],g=[])}e.clearLanguageAssociations=n;function l(s,o){let a;if(s)switch(s.scheme){case D.Schemas.file:a=s.fsPath;break;case D.Schemas.data:{a=w.DataUri.parseMetaData(s).get(w.DataUri.META_DATA_LABEL);break}default:a=s.path}if(!a)return[m.Mimes.unknown];a=a.toLowerCase();const d=(0,I.basename)(a),u=c(a,d,g);if(u)return[u,m.Mimes.text];const f=c(a,d,h);if(f)return[f,m.Mimes.text];if(o){const S=r(o);if(S)return[S,m.Mimes.text]}return[m.Mimes.unknown]}e.getMimeTypes=l;function c(s,o,a){var d;let u,f,S;for(let v=a.length-1;v>=0;v--){const C=a[v];if(o===C.filenameLowercase){u=C;break}if(C.filepattern&&(!f||C.filepattern.length>f.filepattern.length)){const _=C.filepatternOnPath?s:o;((d=C.filepatternLowercase)===null||d===void 0?void 0:d.call(C,_))&&(f=C)}C.extension&&(!S||C.extension.length>S.extension.length)&&o.endsWith(C.extensionLowercase)&&(S=C)}if(u)return u.mime;if(f)return f.mime;if(S)return S.mime}function r(s){if((0,b.startsWithUTF8BOM)(s)&&(s=s.substr(1)),s.length>0)for(let o=p.length-1;o>=0;o--){const a=p[o];if(!a.firstline)continue;const d=s.match(a.firstline);if(d&&d.length>0)return a.mime}}}),define(te[423],ie([1,0,110,17]),function(j,e,y,m){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.encodeSemanticTokensDto=void 0;function D(p){for(let h=0,g=p.length;h<g;h+=4){const t=p[h+0],i=p[h+1],n=p[h+2],l=p[h+3];p[h+0]=l,p[h+1]=n,p[h+2]=i,p[h+3]=t}}function I(p){const h=new Uint8Array(p.buffer,p.byteOffset,p.length*4);return m.isLittleEndian()||D(h),y.VSBuffer.wrap(h)}function w(p){const h=new Uint32Array(b(p));let g=0;if(h[g++]=p.id,p.type==="full")h[g++]=1,h[g++]=p.data.length,h.set(p.data,g),g+=p.data.length;else{h[g++]=2,h[g++]=p.deltas.length;for(const t of p.deltas)h[g++]=t.start,h[g++]=t.deleteCount,t.data?(h[g++]=t.data.length,h.set(t.data,g),g+=t.data.length):h[g++]=0}return I(h)}e.encodeSemanticTokensDto=w;function b(p){let h=0;if(h+=1+1,p.type==="full")h+=1+p.data.length;else{h+=1,h+=(1+1+1)*p.deltas.length;for(const g of p.deltas)g.data&&(h+=g.data.length)}return h}}),define(te[179],ie([1,0]),function(j,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.WrappingIndent=e.TrackedRangeStickiness=e.TextEditorCursorStyle=e.TextEditorCursorBlinkingStyle=e.SymbolTag=e.SymbolKind=e.SignatureHelpTriggerKind=e.SelectionDirection=e.ScrollbarVisibility=e.ScrollType=e.RenderMinimap=e.RenderLineNumbersType=e.PositionAffinity=e.OverviewRulerLane=e.OverlayWidgetPositionPreference=e.MouseTargetType=e.MinimapPosition=e.MarkerTag=e.MarkerSeverity=e.KeyCode=e.InlineCompletionTriggerKind=e.InlayHintKind=e.InjectedTextCursorStops=e.IndentAction=e.EndOfLineSequence=e.EndOfLinePreference=e.EditorOption=e.EditorAutoIndentStrategy=e.DocumentHighlightKind=e.DefaultEndOfLine=e.CursorChangeReason=e.ContentWidgetPositionPreference=e.CompletionTriggerKind=e.CompletionItemTag=e.CompletionItemKind=e.CompletionItemInsertTextRule=e.AccessibilitySupport=void 0;var y;(function(A){A[A.Unknown=0]="Unknown",A[A.Disabled=1]="Disabled",A[A.Enabled=2]="Enabled"})(y=e.AccessibilitySupport||(e.AccessibilitySupport={}));var m;(function(A){A[A.KeepWhitespace=1]="KeepWhitespace",A[A.InsertAsSnippet=4]="InsertAsSnippet"})(m=e.CompletionItemInsertTextRule||(e.CompletionItemInsertTextRule={}));var D;(function(A){A[A.Method=0]="Method",A[A.Function=1]="Function",A[A.Constructor=2]="Constructor",A[A.Field=3]="Field",A[A.Variable=4]="Variable",A[A.Class=5]="Class",A[A.Struct=6]="Struct",A[A.Interface=7]="Interface",A[A.Module=8]="Module",A[A.Property=9]="Property",A[A.Event=10]="Event",A[A.Operator=11]="Operator",A[A.Unit=12]="Unit",A[A.Value=13]="Value",A[A.Constant=14]="Constant",A[A.Enum=15]="Enum",A[A.EnumMember=16]="EnumMember",A[A.Keyword=17]="Keyword",A[A.Text=18]="Text",A[A.Color=19]="Color",A[A.File=20]="File",A[A.Reference=21]="Reference",A[A.Customcolor=22]="Customcolor",A[A.Folder=23]="Folder",A[A.TypeParameter=24]="TypeParameter",A[A.User=25]="User",A[A.Issue=26]="Issue",A[A.Snippet=27]="Snippet"})(D=e.CompletionItemKind||(e.CompletionItemKind={}));var I;(function(A){A[A.Deprecated=1]="Deprecated"})(I=e.CompletionItemTag||(e.CompletionItemTag={}));var w;(function(A){A[A.Invoke=0]="Invoke",A[A.TriggerCharacter=1]="TriggerCharacter",A[A.TriggerForIncompleteCompletions=2]="TriggerForIncompleteCompletions"})(w=e.CompletionTriggerKind||(e.CompletionTriggerKind={}));var b;(function(A){A[A.EXACT=0]="EXACT",A[A.ABOVE=1]="ABOVE",A[A.BELOW=2]="BELOW"})(b=e.ContentWidgetPositionPreference||(e.ContentWidgetPositionPreference={}));var p;(function(A){A[A.NotSet=0]="NotSet",A[A.ContentFlush=1]="ContentFlush",A[A.RecoverFromMarkers=2]="RecoverFromMarkers",A[A.Explicit=3]="Explicit",A[A.Paste=4]="Paste",A[A.Undo=5]="Undo",A[A.Redo=6]="Redo"})(p=e.CursorChangeReason||(e.CursorChangeReason={}));var h;(function(A){A[A.LF=1]="LF",A[A.CRLF=2]="CRLF"})(h=e.DefaultEndOfLine||(e.DefaultEndOfLine={}));var g;(function(A){A[A.Text=0]="Text",A[A.Read=1]="Read",A[A.Write=2]="Write"})(g=e.DocumentHighlightKind||(e.DocumentHighlightKind={}));var t;(function(A){A[A.None=0]="None",A[A.Keep=1]="Keep",A[A.Brackets=2]="Brackets",A[A.Advanced=3]="Advanced",A[A.Full=4]="Full"})(t=e.EditorAutoIndentStrategy||(e.EditorAutoIndentStrategy={}));var i;(function(A){A[A.acceptSuggestionOnCommitCharacter=0]="acceptSuggestionOnCommitCharacter",A[A.acceptSuggestionOnEnter=1]="acceptSuggestionOnEnter",A[A.accessibilitySupport=2]="accessibilitySupport",A[A.accessibilityPageSize=3]="accessibilityPageSize",A[A.ariaLabel=4]="ariaLabel",A[A.autoClosingBrackets=5]="autoClosingBrackets",A[A.autoClosingDelete=6]="autoClosingDelete",A[A.autoClosingOvertype=7]="autoClosingOvertype",A[A.autoClosingQuotes=8]="autoClosingQuotes",A[A.autoIndent=9]="autoIndent",A[A.automaticLayout=10]="automaticLayout",A[A.autoSurround=11]="autoSurround",A[A.bracketPairColorization=12]="bracketPairColorization",A[A.guides=13]="guides",A[A.codeLens=14]="codeLens",A[A.codeLensFontFamily=15]="codeLensFontFamily",A[A.codeLensFontSize=16]="codeLensFontSize",A[A.colorDecorators=17]="colorDecorators",A[A.columnSelection=18]="columnSelection",A[A.comments=19]="comments",A[A.contextmenu=20]="contextmenu",A[A.copyWithSyntaxHighlighting=21]="copyWithSyntaxHighlighting",A[A.cursorBlinking=22]="cursorBlinking",A[A.cursorSmoothCaretAnimation=23]="cursorSmoothCaretAnimation",A[A.cursorStyle=24]="cursorStyle",A[A.cursorSurroundingLines=25]="cursorSurroundingLines",A[A.cursorSurroundingLinesStyle=26]="cursorSurroundingLinesStyle",A[A.cursorWidth=27]="cursorWidth",A[A.disableLayerHinting=28]="disableLayerHinting",A[A.disableMonospaceOptimizations=29]="disableMonospaceOptimizations",A[A.domReadOnly=30]="domReadOnly",A[A.dragAndDrop=31]="dragAndDrop",A[A.emptySelectionClipboard=32]="emptySelectionClipboard",A[A.extraEditorClassName=33]="extraEditorClassName",A[A.fastScrollSensitivity=34]="fastScrollSensitivity",A[A.find=35]="find",A[A.fixedOverflowWidgets=36]="fixedOverflowWidgets",A[A.folding=37]="folding",A[A.foldingStrategy=38]="foldingStrategy",A[A.foldingHighlight=39]="foldingHighlight",A[A.foldingImportsByDefault=40]="foldingImportsByDefault",A[A.foldingMaximumRegions=41]="foldingMaximumRegions",A[A.unfoldOnClickAfterEndOfLine=42]="unfoldOnClickAfterEndOfLine",A[A.fontFamily=43]="fontFamily",A[A.fontInfo=44]="fontInfo",A[A.fontLigatures=45]="fontLigatures",A[A.fontSize=46]="fontSize",A[A.fontWeight=47]="fontWeight",A[A.formatOnPaste=48]="formatOnPaste",A[A.formatOnType=49]="formatOnType",A[A.glyphMargin=50]="glyphMargin",A[A.gotoLocation=51]="gotoLocation",A[A.hideCursorInOverviewRuler=52]="hideCursorInOverviewRuler",A[A.hover=53]="hover",A[A.inDiffEditor=54]="inDiffEditor",A[A.inlineSuggest=55]="inlineSuggest",A[A.letterSpacing=56]="letterSpacing",A[A.lightbulb=57]="lightbulb",A[A.lineDecorationsWidth=58]="lineDecorationsWidth",A[A.lineHeight=59]="lineHeight",A[A.lineNumbers=60]="lineNumbers",A[A.lineNumbersMinChars=61]="lineNumbersMinChars",A[A.linkedEditing=62]="linkedEditing",A[A.links=63]="links",A[A.matchBrackets=64]="matchBrackets",A[A.minimap=65]="minimap",A[A.mouseStyle=66]="mouseStyle",A[A.mouseWheelScrollSensitivity=67]="mouseWheelScrollSensitivity",A[A.mouseWheelZoom=68]="mouseWheelZoom",A[A.multiCursorMergeOverlapping=69]="multiCursorMergeOverlapping",A[A.multiCursorModifier=70]="multiCursorModifier",A[A.multiCursorPaste=71]="multiCursorPaste",A[A.occurrencesHighlight=72]="occurrencesHighlight",A[A.overviewRulerBorder=73]="overviewRulerBorder",A[A.overviewRulerLanes=74]="overviewRulerLanes",A[A.padding=75]="padding",A[A.parameterHints=76]="parameterHints",A[A.peekWidgetDefaultFocus=77]="peekWidgetDefaultFocus",A[A.definitionLinkOpensInPeek=78]="definitionLinkOpensInPeek",A[A.quickSuggestions=79]="quickSuggestions",A[A.quickSuggestionsDelay=80]="quickSuggestionsDelay",A[A.readOnly=81]="readOnly",A[A.renameOnType=82]="renameOnType",A[A.renderControlCharacters=83]="renderControlCharacters",A[A.renderFinalNewline=84]="renderFinalNewline",A[A.renderLineHighlight=85]="renderLineHighlight",A[A.renderLineHighlightOnlyWhenFocus=86]="renderLineHighlightOnlyWhenFocus",A[A.renderValidationDecorations=87]="renderValidationDecorations",A[A.renderWhitespace=88]="renderWhitespace",A[A.revealHorizontalRightPadding=89]="revealHorizontalRightPadding",A[A.roundedSelection=90]="roundedSelection",A[A.rulers=91]="rulers",A[A.scrollbar=92]="scrollbar",A[A.scrollBeyondLastColumn=93]="scrollBeyondLastColumn",A[A.scrollBeyondLastLine=94]="scrollBeyondLastLine",A[A.scrollPredominantAxis=95]="scrollPredominantAxis",A[A.selectionClipboard=96]="selectionClipboard",A[A.selectionHighlight=97]="selectionHighlight",A[A.selectOnLineNumbers=98]="selectOnLineNumbers",A[A.showFoldingControls=99]="showFoldingControls",A[A.showUnused=100]="showUnused",A[A.snippetSuggestions=101]="snippetSuggestions",A[A.smartSelect=102]="smartSelect",A[A.smoothScrolling=103]="smoothScrolling",A[A.stickyTabStops=104]="stickyTabStops",A[A.stopRenderingLineAfter=105]="stopRenderingLineAfter",A[A.suggest=106]="suggest",A[A.suggestFontSize=107]="suggestFontSize",A[A.suggestLineHeight=108]="suggestLineHeight",A[A.suggestOnTriggerCharacters=109]="suggestOnTriggerCharacters",A[A.suggestSelection=110]="suggestSelection",A[A.tabCompletion=111]="tabCompletion",A[A.tabIndex=112]="tabIndex",A[A.unicodeHighlighting=113]="unicodeHighlighting",A[A.unusualLineTerminators=114]="unusualLineTerminators",A[A.useShadowDOM=115]="useShadowDOM",A[A.useTabStops=116]="useTabStops",A[A.wordSeparators=117]="wordSeparators",A[A.wordWrap=118]="wordWrap",A[A.wordWrapBreakAfterCharacters=119]="wordWrapBreakAfterCharacters",A[A.wordWrapBreakBeforeCharacters=120]="wordWrapBreakBeforeCharacters",A[A.wordWrapColumn=121]="wordWrapColumn",A[A.wordWrapOverride1=122]="wordWrapOverride1",A[A.wordWrapOverride2=123]="wordWrapOverride2",A[A.wrappingIndent=124]="wrappingIndent",A[A.wrappingStrategy=125]="wrappingStrategy",A[A.showDeprecated=126]="showDeprecated",A[A.inlayHints=127]="inlayHints",A[A.editorClassName=128]="editorClassName",A[A.pixelRatio=129]="pixelRatio",A[A.tabFocusMode=130]="tabFocusMode",A[A.layoutInfo=131]="layoutInfo",A[A.wrappingInfo=132]="wrappingInfo"})(i=e.EditorOption||(e.EditorOption={}));var n;(function(A){A[A.TextDefined=0]="TextDefined",A[A.LF=1]="LF",A[A.CRLF=2]="CRLF"})(n=e.EndOfLinePreference||(e.EndOfLinePreference={}));var l;(function(A){A[A.LF=0]="LF",A[A.CRLF=1]="CRLF"})(l=e.EndOfLineSequence||(e.EndOfLineSequence={}));var c;(function(A){A[A.None=0]="None",A[A.Indent=1]="Indent",A[A.IndentOutdent=2]="IndentOutdent",A[A.Outdent=3]="Outdent"})(c=e.IndentAction||(e.IndentAction={}));var r;(function(A){A[A.Both=0]="Both",A[A.Right=1]="Right",A[A.Left=2]="Left",A[A.None=3]="None"})(r=e.InjectedTextCursorStops||(e.InjectedTextCursorStops={}));var s;(function(A){A[A.Other=0]="Other",A[A.Type=1]="Type",A[A.Parameter=2]="Parameter"})(s=e.InlayHintKind||(e.InlayHintKind={}));var o;(function(A){A[A.Automatic=0]="Automatic",A[A.Explicit=1]="Explicit"})(o=e.InlineCompletionTriggerKind||(e.InlineCompletionTriggerKind={}));var a;(function(A){A[A.DependsOnKbLayout=-1]="DependsOnKbLayout",A[A.Unknown=0]="Unknown",A[A.Backspace=1]="Backspace",A[A.Tab=2]="Tab",A[A.Enter=3]="Enter",A[A.Shift=4]="Shift",A[A.Ctrl=5]="Ctrl",A[A.Alt=6]="Alt",A[A.PauseBreak=7]="PauseBreak",A[A.CapsLock=8]="CapsLock",A[A.Escape=9]="Escape",A[A.Space=10]="Space",A[A.PageUp=11]="PageUp",A[A.PageDown=12]="PageDown",A[A.End=13]="End",A[A.Home=14]="Home",A[A.LeftArrow=15]="LeftArrow",A[A.UpArrow=16]="UpArrow",A[A.RightArrow=17]="RightArrow",A[A.DownArrow=18]="DownArrow",A[A.Insert=19]="Insert",A[A.Delete=20]="Delete",A[A.Digit0=21]="Digit0",A[A.Digit1=22]="Digit1",A[A.Digit2=23]="Digit2",A[A.Digit3=24]="Digit3",A[A.Digit4=25]="Digit4",A[A.Digit5=26]="Digit5",A[A.Digit6=27]="Digit6",A[A.Digit7=28]="Digit7",A[A.Digit8=29]="Digit8",A[A.Digit9=30]="Digit9",A[A.KeyA=31]="KeyA",A[A.KeyB=32]="KeyB",A[A.KeyC=33]="KeyC",A[A.KeyD=34]="KeyD",A[A.KeyE=35]="KeyE",A[A.KeyF=36]="KeyF",A[A.KeyG=37]="KeyG",A[A.KeyH=38]="KeyH",A[A.KeyI=39]="KeyI",A[A.KeyJ=40]="KeyJ",A[A.KeyK=41]="KeyK",A[A.KeyL=42]="KeyL",A[A.KeyM=43]="KeyM",A[A.KeyN=44]="KeyN",A[A.KeyO=45]="KeyO",A[A.KeyP=46]="KeyP",A[A.KeyQ=47]="KeyQ",A[A.KeyR=48]="KeyR",A[A.KeyS=49]="KeyS",A[A.KeyT=50]="KeyT",A[A.KeyU=51]="KeyU",A[A.KeyV=52]="KeyV",A[A.KeyW=53]="KeyW",A[A.KeyX=54]="KeyX",A[A.KeyY=55]="KeyY",A[A.KeyZ=56]="KeyZ",A[A.Meta=57]="Meta",A[A.ContextMenu=58]="ContextMenu",A[A.F1=59]="F1",A[A.F2=60]="F2",A[A.F3=61]="F3",A[A.F4=62]="F4",A[A.F5=63]="F5",A[A.F6=64]="F6",A[A.F7=65]="F7",A[A.F8=66]="F8",A[A.F9=67]="F9",A[A.F10=68]="F10",A[A.F11=69]="F11",A[A.F12=70]="F12",A[A.F13=71]="F13",A[A.F14=72]="F14",A[A.F15=73]="F15",A[A.F16=74]="F16",A[A.F17=75]="F17",A[A.F18=76]="F18",A[A.F19=77]="F19",A[A.NumLock=78]="NumLock",A[A.ScrollLock=79]="ScrollLock",A[A.Semicolon=80]="Semicolon",A[A.Equal=81]="Equal",A[A.Comma=82]="Comma",A[A.Minus=83]="Minus",A[A.Period=84]="Period",A[A.Slash=85]="Slash",A[A.Backquote=86]="Backquote",A[A.BracketLeft=87]="BracketLeft",A[A.Backslash=88]="Backslash",A[A.BracketRight=89]="BracketRight",A[A.Quote=90]="Quote",A[A.OEM_8=91]="OEM_8",A[A.IntlBackslash=92]="IntlBackslash",A[A.Numpad0=93]="Numpad0",A[A.Numpad1=94]="Numpad1",A[A.Numpad2=95]="Numpad2",A[A.Numpad3=96]="Numpad3",A[A.Numpad4=97]="Numpad4",A[A.Numpad5=98]="Numpad5",A[A.Numpad6=99]="Numpad6",A[A.Numpad7=100]="Numpad7",A[A.Numpad8=101]="Numpad8",A[A.Numpad9=102]="Numpad9",A[A.NumpadMultiply=103]="NumpadMultiply",A[A.NumpadAdd=104]="NumpadAdd",A[A.NUMPAD_SEPARATOR=105]="NUMPAD_SEPARATOR",A[A.NumpadSubtract=106]="NumpadSubtract",A[A.NumpadDecimal=107]="NumpadDecimal",A[A.NumpadDivide=108]="NumpadDivide",A[A.KEY_IN_COMPOSITION=109]="KEY_IN_COMPOSITION",A[A.ABNT_C1=110]="ABNT_C1",A[A.ABNT_C2=111]="ABNT_C2",A[A.AudioVolumeMute=112]="AudioVolumeMute",A[A.AudioVolumeUp=113]="AudioVolumeUp",A[A.AudioVolumeDown=114]="AudioVolumeDown",A[A.BrowserSearch=115]="BrowserSearch",A[A.BrowserHome=116]="BrowserHome",A[A.BrowserBack=117]="BrowserBack",A[A.BrowserForward=118]="BrowserForward",A[A.MediaTrackNext=119]="MediaTrackNext",A[A.MediaTrackPrevious=120]="MediaTrackPrevious",A[A.MediaStop=121]="MediaStop",A[A.MediaPlayPause=122]="MediaPlayPause",A[A.LaunchMediaPlayer=123]="LaunchMediaPlayer",A[A.LaunchMail=124]="LaunchMail",A[A.LaunchApp2=125]="LaunchApp2",A[A.MAX_VALUE=126]="MAX_VALUE"})(a=e.KeyCode||(e.KeyCode={}));var d;(function(A){A[A.Hint=1]="Hint",A[A.Info=2]="Info",A[A.Warning=4]="Warning",A[A.Error=8]="Error"})(d=e.MarkerSeverity||(e.MarkerSeverity={}));var u;(function(A){A[A.Unnecessary=1]="Unnecessary",A[A.Deprecated=2]="Deprecated"})(u=e.MarkerTag||(e.MarkerTag={}));var f;(function(A){A[A.Inline=1]="Inline",A[A.Gutter=2]="Gutter"})(f=e.MinimapPosition||(e.MinimapPosition={}));var S;(function(A){A[A.UNKNOWN=0]="UNKNOWN",A[A.TEXTAREA=1]="TEXTAREA",A[A.GUTTER_GLYPH_MARGIN=2]="GUTTER_GLYPH_MARGIN",A[A.GUTTER_LINE_NUMBERS=3]="GUTTER_LINE_NUMBERS",A[A.GUTTER_LINE_DECORATIONS=4]="GUTTER_LINE_DECORATIONS",A[A.GUTTER_VIEW_ZONE=5]="GUTTER_VIEW_ZONE",A[A.CONTENT_TEXT=6]="CONTENT_TEXT",A[A.CONTENT_EMPTY=7]="CONTENT_EMPTY",A[A.CONTENT_VIEW_ZONE=8]="CONTENT_VIEW_ZONE",A[A.CONTENT_WIDGET=9]="CONTENT_WIDGET",A[A.OVERVIEW_RULER=10]="OVERVIEW_RULER",A[A.SCROLLBAR=11]="SCROLLBAR",A[A.OVERLAY_WIDGET=12]="OVERLAY_WIDGET",A[A.OUTSIDE_EDITOR=13]="OUTSIDE_EDITOR"})(S=e.MouseTargetType||(e.MouseTargetType={}));var v;(function(A){A[A.TOP_RIGHT_CORNER=0]="TOP_RIGHT_CORNER",A[A.BOTTOM_RIGHT_CORNER=1]="BOTTOM_RIGHT_CORNER",A[A.TOP_CENTER=2]="TOP_CENTER"})(v=e.OverlayWidgetPositionPreference||(e.OverlayWidgetPositionPreference={}));var C;(function(A){A[A.Left=1]="Left",A[A.Center=2]="Center",A[A.Right=4]="Right",A[A.Full=7]="Full"})(C=e.OverviewRulerLane||(e.OverviewRulerLane={}));var _;(function(A){A[A.Left=0]="Left",A[A.Right=1]="Right",A[A.None=2]="None"})(_=e.PositionAffinity||(e.PositionAffinity={}));var L;(function(A){A[A.Off=0]="Off",A[A.On=1]="On",A[A.Relative=2]="Relative",A[A.Interval=3]="Interval",A[A.Custom=4]="Custom"})(L=e.RenderLineNumbersType||(e.RenderLineNumbersType={}));var E;(function(A){A[A.None=0]="None",A[A.Text=1]="Text",A[A.Blocks=2]="Blocks"})(E=e.RenderMinimap||(e.RenderMinimap={}));var N;(function(A){A[A.Smooth=0]="Smooth",A[A.Immediate=1]="Immediate"})(N=e.ScrollType||(e.ScrollType={}));var k;(function(A){A[A.Auto=1]="Auto",A[A.Hidden=2]="Hidden",A[A.Visible=3]="Visible"})(k=e.ScrollbarVisibility||(e.ScrollbarVisibility={}));var M;(function(A){A[A.LTR=0]="LTR",A[A.RTL=1]="RTL"})(M=e.SelectionDirection||(e.SelectionDirection={}));var O;(function(A){A[A.Invoke=1]="Invoke",A[A.TriggerCharacter=2]="TriggerCharacter",A[A.ContentChange=3]="ContentChange"})(O=e.SignatureHelpTriggerKind||(e.SignatureHelpTriggerKind={}));var B;(function(A){A[A.File=0]="File",A[A.Module=1]="Module",A[A.Namespace=2]="Namespace",A[A.Package=3]="Package",A[A.Class=4]="Class",A[A.Method=5]="Method",A[A.Property=6]="Property",A[A.Field=7]="Field",A[A.Constructor=8]="Constructor",A[A.Enum=9]="Enum",A[A.Interface=10]="Interface",A[A.Function=11]="Function",A[A.Variable=12]="Variable",A[A.Constant=13]="Constant",A[A.String=14]="String",A[A.Number=15]="Number",A[A.Boolean=16]="Boolean",A[A.Array=17]="Array",A[A.Object=18]="Object",A[A.Key=19]="Key",A[A.Null=20]="Null",A[A.EnumMember=21]="EnumMember",A[A.Struct=22]="Struct",A[A.Event=23]="Event",A[A.Operator=24]="Operator",A[A.TypeParameter=25]="TypeParameter"})(B=e.SymbolKind||(e.SymbolKind={}));var T;(function(A){A[A.Deprecated=1]="Deprecated"})(T=e.SymbolTag||(e.SymbolTag={}));var R;(function(A){A[A.Hidden=0]="Hidden",A[A.Blink=1]="Blink",A[A.Smooth=2]="Smooth",A[A.Phase=3]="Phase",A[A.Expand=4]="Expand",A[A.Solid=5]="Solid"})(R=e.TextEditorCursorBlinkingStyle||(e.TextEditorCursorBlinkingStyle={}));var P;(function(A){A[A.Line=1]="Line",A[A.Block=2]="Block",A[A.Underline=3]="Underline",A[A.LineThin=4]="LineThin",A[A.BlockOutline=5]="BlockOutline",A[A.UnderlineThin=6]="UnderlineThin"})(P=e.TextEditorCursorStyle||(e.TextEditorCursorStyle={}));var F;(function(A){A[A.AlwaysGrowsWhenTypingAtEdges=0]="AlwaysGrowsWhenTypingAtEdges",A[A.NeverGrowsWhenTypingAtEdges=1]="NeverGrowsWhenTypingAtEdges",A[A.GrowsOnlyWhenTypingBefore=2]="GrowsOnlyWhenTypingBefore",A[A.GrowsOnlyWhenTypingAfter=3]="GrowsOnlyWhenTypingAfter"})(F=e.TrackedRangeStickiness||(e.TrackedRangeStickiness={}));var W;(function(A){A[A.None=0]="None",A[A.Same=1]="Same",A[A.Indent=2]="Indent",A[A.DeepIndent=3]="DeepIndent"})(W=e.WrappingIndent||(e.WrappingIndent={}))}),define(te[424],ie([1,0]),function(j,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BracketPairWithMinIndentationInfo=e.BracketPairInfo=e.BracketInfo=void 0;class y{constructor(w,b,p){this.range=w,this.nestingLevel=b,this.isInvalid=p}}e.BracketInfo=y;class m{constructor(w,b,p,h){this.range=w,this.openingBracketRange=b,this.closingBracketRange=p,this.nestingLevel=h}}e.BracketPairInfo=m;class D extends m{constructor(w,b,p,h,g){super(w,b,p,h);this.minVisibleColumnIndentation=g}}e.BracketPairWithMinIndentationInfo=D}),define(te[91],ie([1,0]),function(j,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.InternalModelContentChangeEvent=e.ModelInjectedTextChangedEvent=e.ModelRawContentChangedEvent=e.ModelRawEOLChanged=e.ModelRawLinesInserted=e.ModelRawLinesDeleted=e.ModelRawLineChanged=e.LineInjectedText=e.ModelRawFlush=void 0;class y{constructor(){this.changeType=1}}e.ModelRawFlush=y;class m{constructor(i,n,l,c,r){this.ownerId=i,this.lineNumber=n,this.column=l,this.options=c,this.order=r}static applyInjectedText(i,n){if(!n||n.length===0)return i;let l="",c=0;for(const r of n)l+=i.substring(c,r.column-1),c=r.column-1,l+=r.options.content;return l+=i.substring(c),l}static fromDecorations(i){const n=[];for(const l of i)l.options.before&&l.options.before.content.length>0&&n.push(new m(l.ownerId,l.range.startLineNumber,l.range.startColumn,l.options.before,0)),l.options.after&&l.options.after.content.length>0&&n.push(new m(l.ownerId,l.range.endLineNumber,l.range.endColumn,l.options.after,1));return n.sort((l,c)=>l.lineNumber===c.lineNumber?l.column===c.column?l.order-c.order:l.column-c.column:l.lineNumber-c.lineNumber),n}}e.LineInjectedText=m;class D{constructor(i,n,l){this.changeType=2,this.lineNumber=i,this.detail=n,this.injectedText=l}}e.ModelRawLineChanged=D;class I{constructor(i,n){this.changeType=3,this.fromLineNumber=i,this.toLineNumber=n}}e.ModelRawLinesDeleted=I;class w{constructor(i,n,l,c){this.changeType=4,this.injectedTexts=c,this.fromLineNumber=i,this.toLineNumber=n,this.detail=l}}e.ModelRawLinesInserted=w;class b{constructor(){this.changeType=5}}e.ModelRawEOLChanged=b;class p{constructor(i,n,l,c){this.changes=i,this.versionId=n,this.isUndoing=l,this.isRedoing=c,this.resultingSelection=null}containsEvent(i){for(let n=0,l=this.changes.length;n<l;n++)if(this.changes[n].changeType===i)return!0;return!1}static merge(i,n){const l=[].concat(i.changes).concat(n.changes),c=n.versionId,r=i.isUndoing||n.isUndoing,s=i.isRedoing||n.isRedoing;return new p(l,c,r,s)}}e.ModelRawContentChangedEvent=p;class h{constructor(i){this.changes=i}}e.ModelInjectedTextChangedEvent=h;class g{constructor(i,n){this.rawContentChangedEvent=i,this.contentChangedEvent=n}merge(i){const n=p.merge(this.rawContentChangedEvent,i.rawContentChangedEvent),l=g._mergeChangeEvents(this.contentChangedEvent,i.contentChangedEvent);return new g(n,l)}static _mergeChangeEvents(i,n){const l=[].concat(i.changes).concat(n.changes),c=n.eol,r=n.versionId,s=i.isUndoing||n.isUndoing,o=i.isRedoing||n.isRedoing,a=i.isFlush||n.isFlush;return{changes:l,eol:c,versionId:r,isUndoing:s,isRedoing:o,isFlush:a}}}e.InternalModelContentChangeEvent=g}),define(te[180],ie([1,0]),function(j,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IndentGuideHorizontalLine=e.IndentGuide=e.HorizontalGuidesState=void 0;var y;(function(I){I[I.Disabled=0]="Disabled",I[I.EnabledForActive=1]="EnabledForActive",I[I.Enabled=2]="Enabled"})(y=e.HorizontalGuidesState||(e.HorizontalGuidesState={}));class m{constructor(w,b,p){this.visibleColumn=w,this.className=b,this.horizontalLine=p}}e.IndentGuide=m;class D{constructor(w,b){this.top=w,this.endColumn=b}}e.IndentGuideHorizontalLine=D}),define(te[246],ie([1,0,19,8,68,3,420,178,180]),function(j,e,y,m,D,I,w,b,p){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BracketPairGuidesClassNames=e.GuidesTextModelPart=void 0;class h extends w.TextModelPart{constructor(i,n){super();this.textModel=i,this.languageConfigurationService=n}getLanguageConfiguration(i){return this.languageConfigurationService.getLanguageConfiguration(i)}_computeIndentLevel(i){return(0,b.computeIndentLevel)(this.textModel.getLineContent(i+1),this.textModel.getOptions().tabSize)}getActiveIndentGuide(i,n,l){this.assertNotDisposed();const c=this.textModel.getLineCount();if(i<1||i>c)throw new Error("Illegal value for lineNumber");const r=this.getLanguageConfiguration(this.textModel.getLanguageId()).foldingRules,s=Boolean(r&&r.offSide);let o=-2,a=-1,d=-2,u=-1;const f=T=>{if(o!==-1&&(o===-2||o>T-1)){o=-1,a=-1;for(let R=T-2;R>=0;R--){const P=this._computeIndentLevel(R);if(P>=0){o=R,a=P;break}}}if(d===-2){d=-1,u=-1;for(let R=T;R<c;R++){const P=this._computeIndentLevel(R);if(P>=0){d=R,u=P;break}}}};let S=-2,v=-1,C=-2,_=-1;const L=T=>{if(S===-2){S=-1,v=-1;for(let R=T-2;R>=0;R--){const P=this._computeIndentLevel(R);if(P>=0){S=R,v=P;break}}}if(C!==-1&&(C===-2||C<T-1)){C=-1,_=-1;for(let R=T;R<c;R++){const P=this._computeIndentLevel(R);if(P>=0){C=R,_=P;break}}}};let E=0,N=!0,k=0,M=!0,O=0,B=0;for(let T=0;N||M;T++){const R=i-T,P=i+T;T>1&&(R<1||R<n)&&(N=!1),T>1&&(P>c||P>l)&&(M=!1),T>5e4&&(N=!1,M=!1);let F=-1;if(N&&R>=1){const A=this._computeIndentLevel(R-1);A>=0?(d=R-1,u=A,F=Math.ceil(A/this.textModel.getOptions().indentSize)):(f(R),F=this._getIndentLevelForWhitespaceLine(s,a,u))}let W=-1;if(M&&P<=c){const A=this._computeIndentLevel(P-1);A>=0?(S=P-1,v=A,W=Math.ceil(A/this.textModel.getOptions().indentSize)):(L(P),W=this._getIndentLevelForWhitespaceLine(s,v,_))}if(T===0){B=F;continue}if(T===1){if(P<=c&&W>=0&&B+1===W){N=!1,E=P,k=P,O=W;continue}if(R>=1&&F>=0&&F-1===B){M=!1,E=R,k=R,O=F;continue}if(E=i,k=i,O=B,O===0)return{startLineNumber:E,endLineNumber:k,indent:O}}N&&(F>=O?E=R:N=!1),M&&(W>=O?k=P:M=!1)}return{startLineNumber:E,endLineNumber:k,indent:O}}getLinesBracketGuides(i,n,l,c){var r,s,o,a,d;const u=[],f=this.textModel.bracketPairs.getBracketPairsInRangeWithMinIndentation(new I.Range(i,1,n,this.textModel.getLineMaxColumn(n)));let S;if(l&&f.length>0){const E=i<=l.lineNumber&&l.lineNumber<=n?f.filter(N=>I.Range.strictContainsPosition(N.range,l)):this.textModel.bracketPairs.getBracketPairsInRange(I.Range.fromPositions(l));S=(r=(0,y.findLast)(E,N=>N.range.startLineNumber!==N.range.endLineNumber))===null||r===void 0?void 0:r.range}const v=new y.ArrayQueue(f),C=new Array,_=new Array,L=new g;for(let E=i;E<=n;E++){let N=new Array;_.length>0&&(N=N.concat(_),_.length=0),u.push(N);for(const M of v.takeWhile(O=>O.openingBracketRange.startLineNumber<=E)||[]){if(M.range.startLineNumber===M.range.endLineNumber)continue;const O=Math.min(this.getVisibleColumnFromPosition(M.openingBracketRange.getStartPosition()),this.getVisibleColumnFromPosition((o=(s=M.closingBracketRange)===null||s===void 0?void 0:s.getStartPosition())!==null&&o!==void 0?o:M.range.getEndPosition()),M.minVisibleColumnIndentation+1);let B=!1;M.closingBracketRange&&m.firstNonWhitespaceIndex(this.textModel.getLineContent(M.closingBracketRange.startLineNumber))<M.closingBracketRange.startColumn-1&&(B=!0);const T=M.openingBracketRange.getStartPosition(),R=(d=(a=M.closingBracketRange)===null||a===void 0?void 0:a.getStartPosition())!==null&&d!==void 0?d:M.range.getEndPosition();M.closingBracketRange===void 0?C[M.nestingLevel]=null:C[M.nestingLevel]={nestingLevel:M.nestingLevel,guideVisibleColumn:O,start:T,visibleStartColumn:this.getVisibleColumnFromPosition(T),end:R,visibleEndColumn:this.getVisibleColumnFromPosition(R),bracketPair:M,renderHorizontalEndLineAtTheBottom:B}}for(const M of C){if(!M)continue;const O=S&&M.bracketPair.range.equalsRange(S),B=L.getInlineClassNameOfLevel(M.nestingLevel)+(c.highlightActive&&O?" "+L.activeClassName:"");(O&&c.horizontalGuides!==p.HorizontalGuidesState.Disabled||c.includeInactive&&c.horizontalGuides===p.HorizontalGuidesState.Enabled)&&(M.start.lineNumber===E&&M.guideVisibleColumn<M.visibleStartColumn&&N.push(new p.IndentGuide(M.guideVisibleColumn,B,new p.IndentGuideHorizontalLine(!1,M.start.column))),M.end.lineNumber===E+1&&M.guideVisibleColumn<M.visibleEndColumn&&_.push(new p.IndentGuide(M.guideVisibleColumn,B,new p.IndentGuideHorizontalLine(!M.renderHorizontalEndLineAtTheBottom,M.end.column))))}let k=Number.MAX_SAFE_INTEGER;for(let M=C.length-1;M>=0;M--){const O=C[M];if(!O)continue;const B=c.highlightActive&&S&&O.bracketPair.range.equalsRange(S),T=L.getInlineClassNameOfLevel(O.nestingLevel)+(B?" "+L.activeClassName:"");(B||c.includeInactive)&&O.renderHorizontalEndLineAtTheBottom&&O.end.lineNumber===E+1&&_.push(new p.IndentGuide(O.guideVisibleColumn,T,null)),!(O.end.lineNumber<=E||O.start.lineNumber>=E)&&(O.guideVisibleColumn>=k&&!B||(k=O.guideVisibleColumn,(B||c.includeInactive)&&N.push(new p.IndentGuide(O.guideVisibleColumn,T,null))))}N.sort((M,O)=>M.visibleColumn-O.visibleColumn)}return u}getVisibleColumnFromPosition(i){return D.CursorColumns.visibleColumnFromColumn(this.textModel.getLineContent(i.lineNumber),i.column,this.textModel.getOptions().tabSize)+1}getLinesIndentGuides(i,n){this.assertNotDisposed();const l=this.textModel.getLineCount();if(i<1||i>l)throw new Error("Illegal value for startLineNumber");if(n<1||n>l)throw new Error("Illegal value for endLineNumber");const c=this.textModel.getOptions(),r=this.getLanguageConfiguration(this.textModel.getLanguageId()).foldingRules,s=Boolean(r&&r.offSide),o=new Array(n-i+1);let a=-2,d=-1,u=-2,f=-1;for(let S=i;S<=n;S++){const v=S-i,C=this._computeIndentLevel(S-1);if(C>=0){a=S-1,d=C,o[v]=Math.ceil(C/c.indentSize);continue}if(a===-2){a=-1,d=-1;for(let _=S-2;_>=0;_--){const L=this._computeIndentLevel(_);if(L>=0){a=_,d=L;break}}}if(u!==-1&&(u===-2||u<S-1)){u=-1,f=-1;for(let _=S;_<l;_++){const L=this._computeIndentLevel(_);if(L>=0){u=_,f=L;break}}}o[v]=this._getIndentLevelForWhitespaceLine(s,d,f)}return o}_getIndentLevelForWhitespaceLine(i,n,l){const c=this.textModel.getOptions();return n===-1||l===-1?0:n<l?1+Math.floor(n/c.indentSize):n===l||i?Math.ceil(l/c.indentSize):1+Math.floor(l/c.indentSize)}}e.GuidesTextModelPart=h;class g{constructor(){this.activeClassName="indent-active"}getInlineClassNameOfLevel(i){return`bracket-indent-guide lvl-${i%30}`}}e.BracketPairGuidesClassNames=g}),define(te[425],ie([1,0,4,2]),function(j,e,y,m){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TokenizationRegistry=void 0;class D{constructor(){this._map=new Map,this._factories=new Map,this._onDidChange=new y.Emitter,this.onDidChange=this._onDidChange.event,this._colorMap=null}fire(b){this._onDidChange.fire({changedLanguages:b,changedColorMap:!1})}register(b,p){return this._map.set(b,p),this.fire([b]),(0,m.toDisposable)(()=>{this._map.get(b)===p&&(this._map.delete(b),this.fire([b]))})}registerFactory(b,p){var h;(h=this._factories.get(b))===null||h===void 0||h.dispose();const g=new I(this,b,p);return this._factories.set(b,g),(0,m.toDisposable)(()=>{const t=this._factories.get(b);!t||t!==g||(this._factories.delete(b),t.dispose())})}getOrCreate(b){return ye(this,void 0,void 0,function*(){const p=this.get(b);if(p)return p;const h=this._factories.get(b);return!h||h.isResolved?null:(yield h.resolve(),this.get(b))})}get(b){return this._map.get(b)||null}isResolved(b){if(this.get(b))return!0;const h=this._factories.get(b);return!!(!h||h.isResolved)}setColorMap(b){this._colorMap=b,this._onDidChange.fire({changedLanguages:Array.from(this._map.keys()),changedColorMap:!0})}getColorMap(){return this._colorMap}getDefaultBackground(){return this._colorMap&&this._colorMap.length>2?this._colorMap[2]:null}}e.TokenizationRegistry=D;class I extends m.Disposable{constructor(b,p,h){super();this._registry=b,this._languageId=p,this._factory=h,this._isDisposed=!1,this._resolvePromise=null,this._isResolved=!1}get isResolved(){return this._isResolved}dispose(){this._isDisposed=!0,super.dispose()}resolve(){return ye(this,void 0,void 0,function*(){return this._resolvePromise||(this._resolvePromise=this._create()),this._resolvePromise})}_create(){return ye(this,void 0,void 0,function*(){const b=yield Promise.resolve(this._factory.createTokenizationSupport());this._isResolved=!0,b&&!this._isDisposed&&this._register(this._registry.register(this._languageId,b))})}}}),define(te[18],ie([1,0,25,3,413,425,27]),function(j,e,y,m,D,I,w){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TokenizationRegistry=e.DocumentRangeSemanticTokensProviderRegistry=e.DocumentSemanticTokensProviderRegistry=e.FoldingRangeProviderRegistry=e.SelectionRangeRegistry=e.ColorProviderRegistry=e.LinkProviderRegistry=e.OnTypeFormattingEditProviderRegistry=e.DocumentRangeFormattingEditProviderRegistry=e.DocumentFormattingEditProviderRegistry=e.CodeActionProviderRegistry=e.InlayHintsProviderRegistry=e.CodeLensProviderRegistry=e.TypeDefinitionProviderRegistry=e.ImplementationProviderRegistry=e.DeclarationProviderRegistry=e.DefinitionProviderRegistry=e.LinkedEditingRangeProviderRegistry=e.DocumentHighlightProviderRegistry=e.DocumentSymbolProviderRegistry=e.InlineValuesProviderRegistry=e.EvaluatableExpressionProviderRegistry=e.HoverProviderRegistry=e.SignatureHelpProviderRegistry=e.InlineCompletionsProviderRegistry=e.CompletionProviderRegistry=e.RenameProviderRegistry=e.ReferenceProviderRegistry=e.InlayHintKind=e.Command=e.FoldingRangeKind=e.SymbolKinds=e.isLocationLink=e.DocumentHighlightKind=e.SignatureHelpTriggerKind=e.InlineCompletionTriggerKind=e.CompletionItemKinds=e.EncodedTokenizationResult=e.TokenizationResult=e.Token=e.TokenMetadata=void 0;class b{static getLanguageId(u){return(u&255)>>>0}static getTokenType(u){return(u&768)>>>8}static getFontStyle(u){return(u&15360)>>>10}static getForeground(u){return(u&8372224)>>>14}static getBackground(u){return(u&4286578688)>>>23}static getClassNameFromMetadata(u){const f=this.getForeground(u);let S="mtk"+f;const v=this.getFontStyle(u);return v&1&&(S+=" mtki"),v&2&&(S+=" mtkb"),v&4&&(S+=" mtku"),v&8&&(S+=" mtks"),S}static getInlineStyleFromMetadata(u,f){const S=this.getForeground(u),v=this.getFontStyle(u);let C=`color: ${f[S]};`;v&1&&(C+="font-style: italic;"),v&2&&(C+="font-weight: bold;");let _="";return v&4&&(_+=" underline"),v&8&&(_+=" line-through"),_&&(C+=`text-decoration:${_};`),C}static getPresentationFromMetadata(u){const f=this.getForeground(u),S=this.getFontStyle(u);return{foreground:f,italic:Boolean(S&1),bold:Boolean(S&2),underline:Boolean(S&4),strikethrough:Boolean(S&8)}}}e.TokenMetadata=b;class p{constructor(u,f,S){this._tokenBrand=void 0,this.offset=u,this.type=f,this.language=S}toString(){return"("+this.offset+", "+this.type+")"}}e.Token=p;class h{constructor(u,f){this._tokenizationResultBrand=void 0,this.tokens=u,this.endState=f}}e.TokenizationResult=h;class g{constructor(u,f){this._encodedTokenizationResultBrand=void 0,this.tokens=u,this.endState=f}}e.EncodedTokenizationResult=g;var t;(function(d){const u=new Map;u.set(0,w.Codicon.symbolMethod),u.set(1,w.Codicon.symbolFunction),u.set(2,w.Codicon.symbolConstructor),u.set(3,w.Codicon.symbolField),u.set(4,w.Codicon.symbolVariable),u.set(5,w.Codicon.symbolClass),u.set(6,w.Codicon.symbolStruct),u.set(7,w.Codicon.symbolInterface),u.set(8,w.Codicon.symbolModule),u.set(9,w.Codicon.symbolProperty),u.set(10,w.Codicon.symbolEvent),u.set(11,w.Codicon.symbolOperator),u.set(12,w.Codicon.symbolUnit),u.set(13,w.Codicon.symbolValue),u.set(15,w.Codicon.symbolEnum),u.set(14,w.Codicon.symbolConstant),u.set(15,w.Codicon.symbolEnum),u.set(16,w.Codicon.symbolEnumMember),u.set(17,w.Codicon.symbolKeyword),u.set(27,w.Codicon.symbolSnippet),u.set(18,w.Codicon.symbolText),u.set(19,w.Codicon.symbolColor),u.set(20,w.Codicon.symbolFile),u.set(21,w.Codicon.symbolReference),u.set(22,w.Codicon.symbolCustomColor),u.set(23,w.Codicon.symbolFolder),u.set(24,w.Codicon.symbolTypeParameter),u.set(25,w.Codicon.account),u.set(26,w.Codicon.issues);function f(C){let _=u.get(C);return _||(console.info("No codicon found for CompletionItemKind "+C),_=w.Codicon.symbolProperty),_}d.toIcon=f;const S=new Map;S.set("method",0),S.set("function",1),S.set("constructor",2),S.set("field",3),S.set("variable",4),S.set("class",5),S.set("struct",6),S.set("interface",7),S.set("module",8),S.set("property",9),S.set("event",10),S.set("operator",11),S.set("unit",12),S.set("value",13),S.set("constant",14),S.set("enum",15),S.set("enum-member",16),S.set("enumMember",16),S.set("keyword",17),S.set("snippet",27),S.set("text",18),S.set("color",19),S.set("file",20),S.set("reference",21),S.set("customcolor",22),S.set("folder",23),S.set("type-parameter",24),S.set("typeParameter",24),S.set("account",25),S.set("issue",26);function v(C,_){let L=S.get(C);return typeof L=="undefined"&&!_&&(L=9),L}d.fromString=v})(t=e.CompletionItemKinds||(e.CompletionItemKinds={}));var i;(function(d){d[d.Automatic=0]="Automatic",d[d.Explicit=1]="Explicit"})(i=e.InlineCompletionTriggerKind||(e.InlineCompletionTriggerKind={}));var n;(function(d){d[d.Invoke=1]="Invoke",d[d.TriggerCharacter=2]="TriggerCharacter",d[d.ContentChange=3]="ContentChange"})(n=e.SignatureHelpTriggerKind||(e.SignatureHelpTriggerKind={}));var l;(function(d){d[d.Text=0]="Text",d[d.Read=1]="Read",d[d.Write=2]="Write"})(l=e.DocumentHighlightKind||(e.DocumentHighlightKind={}));function c(d){return d&&y.URI.isUri(d.uri)&&m.Range.isIRange(d.range)&&(m.Range.isIRange(d.originSelectionRange)||m.Range.isIRange(d.targetSelectionRange))}e.isLocationLink=c;var r;(function(d){const u=new Map;u.set(0,w.Codicon.symbolFile),u.set(1,w.Codicon.symbolModule),u.set(2,w.Codicon.symbolNamespace),u.set(3,w.Codicon.symbolPackage),u.set(4,w.Codicon.symbolClass),u.set(5,w.Codicon.symbolMethod),u.set(6,w.Codicon.symbolProperty),u.set(7,w.Codicon.symbolField),u.set(8,w.Codicon.symbolConstructor),u.set(9,w.Codicon.symbolEnum),u.set(10,w.Codicon.symbolInterface),u.set(11,w.Codicon.symbolFunction),u.set(12,w.Codicon.symbolVariable),u.set(13,w.Codicon.symbolConstant),u.set(14,w.Codicon.symbolString),u.set(15,w.Codicon.symbolNumber),u.set(16,w.Codicon.symbolBoolean),u.set(17,w.Codicon.symbolArray),u.set(18,w.Codicon.symbolObject),u.set(19,w.Codicon.symbolKey),u.set(20,w.Codicon.symbolNull),u.set(21,w.Codicon.symbolEnumMember),u.set(22,w.Codicon.symbolStruct),u.set(23,w.Codicon.symbolEvent),u.set(24,w.Codicon.symbolOperator),u.set(25,w.Codicon.symbolTypeParameter);function f(S){let v=u.get(S);return v||(console.info("No codicon found for SymbolKind "+S),v=w.Codicon.symbolProperty),v}d.toIcon=f})(r=e.SymbolKinds||(e.SymbolKinds={}));class s{constructor(u){this.value=u}}e.FoldingRangeKind=s,s.Comment=new s("comment"),s.Imports=new s("imports"),s.Region=new s("region");var o;(function(d){function u(f){return!f||typeof f!="object"?!1:typeof f.id=="string"&&typeof f.title=="string"}d.is=u})(o=e.Command||(e.Command={}));var a;(function(d){d[d.Other=0]="Other",d[d.Type=1]="Type",d[d.Parameter=2]="Parameter"})(a=e.InlayHintKind||(e.InlayHintKind={})),e.ReferenceProviderRegistry=new D.LanguageFeatureRegistry,e.RenameProviderRegistry=new D.LanguageFeatureRegistry,e.CompletionProviderRegistry=new D.LanguageFeatureRegistry,e.InlineCompletionsProviderRegistry=new D.LanguageFeatureRegistry,e.SignatureHelpProviderRegistry=new D.LanguageFeatureRegistry,e.HoverProviderRegistry=new D.LanguageFeatureRegistry,e.EvaluatableExpressionProviderRegistry=new D.LanguageFeatureRegistry,e.InlineValuesProviderRegistry=new D.LanguageFeatureRegistry,e.DocumentSymbolProviderRegistry=new D.LanguageFeatureRegistry,e.DocumentHighlightProviderRegistry=new D.LanguageFeatureRegistry,e.LinkedEditingRangeProviderRegistry=new D.LanguageFeatureRegistry,e.DefinitionProviderRegistry=new D.LanguageFeatureRegistry,e.DeclarationProviderRegistry=new D.LanguageFeatureRegistry,e.ImplementationProviderRegistry=new D.LanguageFeatureRegistry,e.TypeDefinitionProviderRegistry=new D.LanguageFeatureRegistry,e.CodeLensProviderRegistry=new D.LanguageFeatureRegistry,e.InlayHintsProviderRegistry=new D.LanguageFeatureRegistry,e.CodeActionProviderRegistry=new D.LanguageFeatureRegistry,e.DocumentFormattingEditProviderRegistry=new D.LanguageFeatureRegistry,e.DocumentRangeFormattingEditProviderRegistry=new D.LanguageFeatureRegistry,e.OnTypeFormattingEditProviderRegistry=new D.LanguageFeatureRegistry,e.LinkProviderRegistry=new D.LanguageFeatureRegistry,e.ColorProviderRegistry=new D.LanguageFeatureRegistry,e.SelectionRangeRegistry=new D.LanguageFeatureRegistry,e.FoldingRangeProviderRegistry=new D.LanguageFeatureRegistry,e.DocumentSemanticTokensProviderRegistry=new D.LanguageFeatureRegistry,e.DocumentRangeSemanticTokensProviderRegistry=new D.LanguageFeatureRegistry,e.TokenizationRegistry=new I.TokenizationRegistry}),define(te[121],ie([1,0,18]),function(j,e,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.nullTokenizeEncoded=e.nullTokenize=e.NullState=void 0,e.NullState=new class{clone(){return this}equals(I){return this===I}};function m(I,w){return new y.TokenizationResult([new y.Token(0,"",I)],w)}e.nullTokenize=m;function D(I,w){const b=new Uint32Array(2);return b[0]=0,b[1]=(I<<0|0<<8|0<<10|1<<14|2<<23)>>>0,new y.EncodedTokenizationResult(b,w===null?e.NullState:w)}e.nullTokenizeEncoded=D}),define(te[181],ie([1,0,13,18,149,83,99]),function(j,e,y,m,D,I,w){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.FastTokenizer=e.TextBufferTokenizer=e.Token=void 0;class b{constructor(i,n,l,c,r){this.length=i,this.kind=n,this.bracketId=l,this.bracketIds=c,this.astNode=r}}e.Token=b;class p{constructor(i,n){this.textModel=i,this.bracketTokens=n,this.reader=new h(this.textModel,this.bracketTokens),this._offset=I.lengthZero,this.didPeek=!1,this.peeked=null,this.textBufferLineCount=i.getLineCount(),this.textBufferLastLineLength=i.getLineLength(this.textBufferLineCount)}get offset(){return this._offset}get length(){return(0,I.toLength)(this.textBufferLineCount,this.textBufferLastLineLength)}skip(i){this.didPeek=!1,this._offset=(0,I.lengthAdd)(this._offset,i);const n=(0,I.lengthToObj)(this._offset);this.reader.setPosition(n.lineCount,n.columnCount)}read(){let i;return this.peeked?(this.didPeek=!1,i=this.peeked):i=this.reader.read(),i&&(this._offset=(0,I.lengthAdd)(this._offset,i.length)),i}peek(){return this.didPeek||(this.peeked=this.reader.read(),this.didPeek=!0),this.peeked}}e.TextBufferTokenizer=p;class h{constructor(i,n){this.textModel=i,this.bracketTokens=n,this.lineIdx=0,this.line=null,this.lineCharOffset=0,this.lineTokens=null,this.lineTokenOffset=0,this.peekedToken=null,this.textBufferLineCount=i.getLineCount(),this.textBufferLastLineLength=i.getLineLength(this.textBufferLineCount)}setPosition(i,n){i===this.lineIdx?(this.lineCharOffset=n,this.lineTokenOffset=this.lineCharOffset===0?0:this.lineTokens.findTokenIndexAtOffset(this.lineCharOffset)):(this.lineIdx=i,this.lineCharOffset=n,this.line=null),this.peekedToken=null}read(){if(this.peekedToken){const r=this.peekedToken;return this.peekedToken=null,this.lineCharOffset+=(0,I.lengthGetColumnCountIfZeroLineCount)(r.length),r}if(this.lineIdx>this.textBufferLineCount-1||this.lineIdx===this.textBufferLineCount-1&&this.lineCharOffset>=this.textBufferLastLineLength)return null;this.line===null&&(this.lineTokens=this.textModel.getLineTokens(this.lineIdx+1),this.line=this.lineTokens.getLineContent(),this.lineTokenOffset=this.lineCharOffset===0?0:this.lineTokens.findTokenIndexAtOffset(this.lineCharOffset));const i=this.lineIdx,n=this.lineCharOffset;let l=0;for(;;){const r=this.lineTokens,s=r.getCount();let o=null;if(this.lineTokenOffset<s){const a=r.getMetadata(this.lineTokenOffset);for(;this.lineTokenOffset+1<s&&a===r.getMetadata(this.lineTokenOffset+1);)this.lineTokenOffset++;const d=m.TokenMetadata.getTokenType(a)===0,u=r.getEndOffset(this.lineTokenOffset);if(d&&u!==this.lineCharOffset){const f=r.getLanguageId(this.lineTokenOffset),S=this.line.substring(this.lineCharOffset,u),v=this.bracketTokens.getSingleLanguageBracketTokens(f),C=v.regExpGlobal;if(C){C.lastIndex=0;const _=C.exec(S);_&&(o=v.getToken(_[0]),o&&(this.lineCharOffset+=_.index))}}if(l+=u-this.lineCharOffset,o)if(i!==this.lineIdx||n!==this.lineCharOffset){this.peekedToken=o;break}else return this.lineCharOffset+=(0,I.lengthGetColumnCountIfZeroLineCount)(o.length),o;else this.lineTokenOffset++,this.lineCharOffset=u}else if(this.lineIdx===this.textBufferLineCount-1||(this.lineIdx++,this.lineTokens=this.textModel.getLineTokens(this.lineIdx+1),this.lineTokenOffset=0,this.line=this.lineTokens.getLineContent(),this.lineCharOffset=0,l+=33,l>1e3))break;if(l>1500)break}const c=(0,I.lengthDiff)(i,n,this.lineIdx,this.lineCharOffset);return new b(c,0,-1,w.SmallImmutableSet.getEmpty(),new D.TextAstNode(c))}}class g{constructor(i,n){this.text=i,this._offset=I.lengthZero,this.idx=0;const c=n.getRegExpStr()?new RegExp(n.getRegExpStr()+`|
|
||
`,"g"):null,r=[];let s,o=0,a=0,d=0,u=0;const f=new Array;for(let C=0;C<60;C++)f.push(new b((0,I.toLength)(0,C),0,-1,w.SmallImmutableSet.getEmpty(),new D.TextAstNode((0,I.toLength)(0,C))));const S=new Array;for(let C=0;C<60;C++)S.push(new b((0,I.toLength)(1,C),0,-1,w.SmallImmutableSet.getEmpty(),new D.TextAstNode((0,I.toLength)(1,C))));if(c)for(c.lastIndex=0;(s=c.exec(i))!==null;){const C=s.index,_=s[0];if(_===`
|
||
`)o++,a=C+1;else{if(d!==C){let L;if(u===o){const E=C-d;if(E<f.length)L=f[E];else{const N=(0,I.toLength)(0,E);L=new b(N,0,-1,w.SmallImmutableSet.getEmpty(),new D.TextAstNode(N))}}else{const E=o-u,N=C-a;if(E===1&&N<S.length)L=S[N];else{const k=(0,I.toLength)(E,N);L=new b(k,0,-1,w.SmallImmutableSet.getEmpty(),new D.TextAstNode(k))}}r.push(L)}r.push(n.getToken(_)),d=C+_.length,u=o}}const v=i.length;if(d!==v){const C=u===o?(0,I.toLength)(0,v-d):(0,I.toLength)(o-u,v-a);r.push(new b(C,0,-1,w.SmallImmutableSet.getEmpty(),new D.TextAstNode(C)))}this.length=(0,I.toLength)(o,v-a),this.tokens=r}get offset(){return this._offset}read(){return this.tokens[this.idx++]||null}peek(){return this.tokens[this.idx]||null}skip(i){throw new y.NotSupportedError}}e.FastTokenizer=g}),define(te[247],ie([1,0,8,149,83,99,181]),function(j,e,y,m,D,I,w){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.LanguageAgnosticBracketTokens=e.BracketTokens=void 0;class b{constructor(t){this.map=t,this.hasRegExp=!1,this._regExpGlobal=null}static createFromLanguage(t,i){function n(o,a){return i.getKey(`${o}:::${a}`)}const l=t.characterPair.getColorizedBrackets(),c=new Map,r=new Set;for(const[o,a]of l){r.add(o);let d=c.get(a);const u=n(t.languageId,o);d||(d={openingBrackets:I.SmallImmutableSet.getEmpty(),first:u},c.set(a,d)),d.openingBrackets=d.openingBrackets.add(u,I.identityKeyProvider)}const s=new Map;for(const[o,a]of c){const d=(0,D.toLength)(0,o.length);s.set(o,new w.Token(d,2,a.first,a.openingBrackets,m.BracketAstNode.create(d,t.languageId,a.openingBrackets)))}for(const o of r){const a=(0,D.toLength)(0,o.length),d=n(t.languageId,o),u=I.SmallImmutableSet.getEmpty().add(d,I.identityKeyProvider);s.set(o,new w.Token(a,1,d,u,m.BracketAstNode.create(a,t.languageId,u)))}return new b(s)}getRegExpStr(){if(this.isEmpty)return null;{const t=[...this.map.keys()];return t.sort(),t.reverse(),t.map(i=>p(i)).join("|")}}get regExpGlobal(){if(!this.hasRegExp){const t=this.getRegExpStr();this._regExpGlobal=t?new RegExp(t,"g"):null,this.hasRegExp=!0}return this._regExpGlobal}getToken(t){return this.map.get(t)}findClosingTokenText(t){for(const[i,n]of this.map)if(n.bracketIds.intersects(t))return i}get isEmpty(){return this.map.size===0}}e.BracketTokens=b;function p(g){const t=(0,y.escapeRegExpCharacters)(g);return/^[\w ]+$/.test(g)?`\\b${t}\\b`:t}class h{constructor(t,i){this.denseKeyProvider=t,this.getLanguageConfiguration=i,this.languageIdToBracketTokens=new Map}didLanguageChange(t){const i=this.languageIdToBracketTokens.get(t);if(!i)return!1;const n=b.createFromLanguage(this.getLanguageConfiguration(t),this.denseKeyProvider).getRegExpStr();return i.getRegExpStr()!==n}getSingleLanguageBracketTokens(t){let i=this.languageIdToBracketTokens.get(t);return i||(i=b.createFromLanguage(this.getLanguageConfiguration(t),this.denseKeyProvider),this.languageIdToBracketTokens.set(t,i)),i}}e.LanguageAgnosticBracketTokens=h}),define(te[426],ie([1,0,4,2,3,424,240,247,83,241,99,181]),function(j,e,y,m,D,I,w,b,p,h,g,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BracketPairsTree=void 0;class i extends m.Disposable{constructor(s,o){super();if(this.textModel=s,this.getLanguageConfiguration=o,this.didChangeEmitter=new y.Emitter,this.denseKeyProvider=new g.DenseKeyProvider,this.brackets=new b.LanguageAgnosticBracketTokens(this.denseKeyProvider,this.getLanguageConfiguration),this.onDidChange=this.didChangeEmitter.event,this._register(s.onBackgroundTokenizationStateChanged(()=>{if(s.backgroundTokenizationState===2){const a=this.initialAstWithoutTokens===void 0;this.initialAstWithoutTokens=void 0,a||this.didChangeEmitter.fire()}})),this._register(s.onDidChangeTokens(({ranges:a})=>{const d=a.map(u=>new w.TextEditInfo((0,p.toLength)(u.fromLineNumber-1,0),(0,p.toLength)(u.toLineNumber,0),(0,p.toLength)(u.toLineNumber-u.fromLineNumber+1,0)));this.astWithTokens=this.parseDocumentFromTextBuffer(d,this.astWithTokens,!1),this.initialAstWithoutTokens||this.didChangeEmitter.fire()})),s.backgroundTokenizationState===0){const a=this.brackets.getSingleLanguageBracketTokens(this.textModel.getLanguageId()),d=new t.FastTokenizer(this.textModel.getValue(),a);this.initialAstWithoutTokens=(0,h.parseDocument)(d,[],void 0,!0),this.astWithTokens=this.initialAstWithoutTokens}else s.backgroundTokenizationState===2?(this.initialAstWithoutTokens=void 0,this.astWithTokens=this.parseDocumentFromTextBuffer([],void 0,!1)):s.backgroundTokenizationState===1&&(this.initialAstWithoutTokens=this.parseDocumentFromTextBuffer([],void 0,!0),this.astWithTokens=this.initialAstWithoutTokens)}didLanguageChange(s){return this.brackets.didLanguageChange(s)}handleContentChanged(s){const o=s.changes.map(a=>{const d=D.Range.lift(a.range);return new w.TextEditInfo((0,p.positionToLength)(d.getStartPosition()),(0,p.positionToLength)(d.getEndPosition()),(0,p.lengthOfString)(a.text))}).reverse();this.astWithTokens=this.parseDocumentFromTextBuffer(o,this.astWithTokens,!1),this.initialAstWithoutTokens&&(this.initialAstWithoutTokens=this.parseDocumentFromTextBuffer(o,this.initialAstWithoutTokens,!1))}parseDocumentFromTextBuffer(s,o,a){const u=!1?o==null?void 0:o.deepClone():o,f=new t.TextBufferTokenizer(this.textModel,this.brackets);return(0,h.parseDocument)(f,s,u,a)}getBracketsInRange(s){const o=(0,p.toLength)(s.startLineNumber-1,s.startColumn-1),a=(0,p.toLength)(s.endLineNumber-1,s.endColumn-1),d=new Array,u=this.initialAstWithoutTokens||this.astWithTokens;return n(u,p.lengthZero,u.length,o,a,d),d}getBracketPairsInRange(s,o){const a=new Array,d=(0,p.positionToLength)(s.getStartPosition()),u=(0,p.positionToLength)(s.getEndPosition()),f=this.initialAstWithoutTokens||this.astWithTokens,S=new l(a,o,this.textModel);return c(f,p.lengthZero,f.length,d,u,S),a}}e.BracketPairsTree=i;function n(r,s,o,a,d,u,f=0){if(r.kind===1){const S=(0,p.lengthsToRange)(s,o);u.push(new I.BracketInfo(S,f-1,!1))}else if(r.kind===3){const S=(0,p.lengthsToRange)(s,o);u.push(new I.BracketInfo(S,f-1,!0))}else if(r.kind===4)for(const S of r.children)o=(0,p.lengthAdd)(s,S.length),(0,p.lengthLessThanEqual)(s,d)&&(0,p.lengthGreaterThanEqual)(o,a)&&n(S,s,o,a,d,u,f),s=o;else if(r.kind===2){f++;{const S=r.openingBracket;o=(0,p.lengthAdd)(s,S.length),(0,p.lengthLessThanEqual)(s,d)&&(0,p.lengthGreaterThanEqual)(o,a)&&n(S,s,o,a,d,u,f),s=o}if(r.child){const S=r.child;o=(0,p.lengthAdd)(s,S.length),(0,p.lengthLessThanEqual)(s,d)&&(0,p.lengthGreaterThanEqual)(o,a)&&n(S,s,o,a,d,u,f),s=o}if(r.closingBracket){const S=r.closingBracket;o=(0,p.lengthAdd)(s,S.length),(0,p.lengthLessThanEqual)(s,d)&&(0,p.lengthGreaterThanEqual)(o,a)&&n(S,s,o,a,d,u,f),s=o}}}class l{constructor(s,o,a){this.result=s,this.includeMinIndentation=o,this.textModel=a}}function c(r,s,o,a,d,u,f=0){var S;if(r.kind===2){const C=(0,p.lengthAdd)(s,r.openingBracket.length);let _=-1;u.includeMinIndentation&&(_=r.computeMinIndentation(s,u.textModel)),u.result.push(new I.BracketPairWithMinIndentationInfo((0,p.lengthsToRange)(s,o),(0,p.lengthsToRange)(s,C),r.closingBracket?(0,p.lengthsToRange)((0,p.lengthAdd)(C,((S=r.child)===null||S===void 0?void 0:S.length)||p.lengthZero),o):void 0,f,_)),f++}let v=s;for(const C of r.children){const _=v;v=(0,p.lengthAdd)(v,C.length),(0,p.lengthLessThanEqual)(_,d)&&(0,p.lengthLessThanEqual)(a,v)&&c(C,_,v,a,d,u,f)}}}),define(te[427],ie([1,0,4,2,426,120,177]),function(j,e,y,m,D,I,w){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BracketPairsTextModelPart=void 0;class b extends m.Disposable{constructor(i,n){super();this.textModel=i,this.languageConfigurationService=n,this.bracketPairsTree=this._register(new m.MutableDisposable),this.onDidChangeEmitter=new y.Emitter,this.onDidChange=this.onDidChangeEmitter.event,this.bracketsRequested=!1,this._register(i.onDidChangeOptions(l=>{this.bracketPairsTree.clear(),this.updateBracketPairsTree()})),this._register(i.onDidChangeLanguage(l=>{this.bracketPairsTree.clear(),this.updateBracketPairsTree()})),this._register(this.languageConfigurationService.onDidChange(l=>{var c;(!l.languageId||((c=this.bracketPairsTree.value)===null||c===void 0?void 0:c.object.didLanguageChange(l.languageId)))&&(this.bracketPairsTree.clear(),this.updateBracketPairsTree())}))}get isDocumentSupported(){const i=5e4*100;return this.textModel.getValueLength()<=i}updateBracketPairsTree(){if(this.bracketsRequested&&this.isDocumentSupported){if(!this.bracketPairsTree.value){const i=new m.DisposableStore;this.bracketPairsTree.value=p(i.add(new D.BracketPairsTree(this.textModel,n=>this.languageConfigurationService.getLanguageConfiguration(n))),i),i.add(this.bracketPairsTree.value.object.onDidChange(n=>this.onDidChangeEmitter.fire(n))),this.onDidChangeEmitter.fire()}}else this.bracketPairsTree.value&&(this.bracketPairsTree.clear(),this.onDidChangeEmitter.fire())}handleContentChanged(i){var n;(n=this.bracketPairsTree.value)===null||n===void 0||n.object.handleContentChanged(i)}getBracketPairsInRange(i){var n;return this.bracketsRequested=!0,this.updateBracketPairsTree(),((n=this.bracketPairsTree.value)===null||n===void 0?void 0:n.object.getBracketPairsInRange(i,!1))||[]}getBracketPairsInRangeWithMinIndentation(i){var n;return this.bracketsRequested=!0,this.updateBracketPairsTree(),((n=this.bracketPairsTree.value)===null||n===void 0?void 0:n.object.getBracketPairsInRange(i,!0))||[]}getBracketsInRange(i){var n;return this.bracketsRequested=!0,this.updateBracketPairsTree(),((n=this.bracketPairsTree.value)===null||n===void 0?void 0:n.object.getBracketsInRange(i))||[]}findMatchingBracketUp(i,n){const l=i.toLowerCase(),c=this.textModel.validatePosition(n),r=this.textModel.getLanguageIdAtPosition(c.lineNumber,c.column),s=this.languageConfigurationService.getLanguageConfiguration(r).brackets;if(!s)return null;const o=s.textIsBracket[l];return o?g(this._findMatchingBracketUp(o,c,null)):null}matchBracket(i){return this._matchBracket(this.textModel.validatePosition(i))}_establishBracketSearchOffsets(i,n,l,c){const r=n.getCount(),s=n.getLanguageId(c);let o=Math.max(0,i.column-1-l.maxBracketLength);for(let d=c-1;d>=0;d--){const u=n.getEndOffset(d);if(u<=o)break;if((0,I.ignoreBracketsInToken)(n.getStandardTokenType(d))||n.getLanguageId(d)!==s){o=u;break}}let a=Math.min(n.getLineContent().length,i.column-1+l.maxBracketLength);for(let d=c+1;d<r;d++){const u=n.getStartOffset(d);if(u>=a)break;if((0,I.ignoreBracketsInToken)(n.getStandardTokenType(d))||n.getLanguageId(d)!==s){a=u;break}}return{searchStartOffset:o,searchEndOffset:a}}_matchBracket(i){const n=i.lineNumber,l=this.textModel.getLineTokens(n),c=this.textModel.getLineContent(n),r=l.findTokenIndexAtOffset(i.column-1);if(r<0)return null;const s=this.languageConfigurationService.getLanguageConfiguration(l.getLanguageId(r)).brackets;if(s&&!(0,I.ignoreBracketsInToken)(l.getStandardTokenType(r))){let{searchStartOffset:o,searchEndOffset:a}=this._establishBracketSearchOffsets(i,l,s,r),d=null;for(;;){const u=w.BracketsUtils.findNextBracketInRange(s.forwardRegex,n,c,o,a);if(!u)break;if(u.startColumn<=i.column&&i.column<=u.endColumn){const f=c.substring(u.startColumn-1,u.endColumn-1).toLowerCase(),S=this._matchFoundBracket(u,s.textIsBracket[f],s.textIsOpenBracket[f],null);if(S){if(S instanceof h)return null;d=S}}o=u.endColumn-1}if(d)return d}if(r>0&&l.getStartOffset(r)===i.column-1){const o=r-1,a=this.languageConfigurationService.getLanguageConfiguration(l.getLanguageId(o)).brackets;if(a&&!(0,I.ignoreBracketsInToken)(l.getStandardTokenType(o))){const{searchStartOffset:d,searchEndOffset:u}=this._establishBracketSearchOffsets(i,l,a,o),f=w.BracketsUtils.findPrevBracketInRange(a.reversedRegex,n,c,d,u);if(f&&f.startColumn<=i.column&&i.column<=f.endColumn){const S=c.substring(f.startColumn-1,f.endColumn-1).toLowerCase(),v=this._matchFoundBracket(f,a.textIsBracket[S],a.textIsOpenBracket[S],null);if(v)return v instanceof h?null:v}}}return null}_matchFoundBracket(i,n,l,c){if(!n)return null;const r=l?this._findMatchingBracketDown(n,i.getEndPosition(),c):this._findMatchingBracketUp(n,i.getStartPosition(),c);return r?r instanceof h?r:[i,r]:null}_findMatchingBracketUp(i,n,l){const c=i.languageId,r=i.reversedRegex;let s=-1,o=0;const a=(d,u,f,S)=>{for(;;){if(l&&++o%100==0&&!l())return h.INSTANCE;const v=w.BracketsUtils.findPrevBracketInRange(r,d,u,f,S);if(!v)break;const C=u.substring(v.startColumn-1,v.endColumn-1).toLowerCase();if(i.isOpen(C)?s++:i.isClose(C)&&s--,s===0)return v;S=v.startColumn-1}return null};for(let d=n.lineNumber;d>=1;d--){const u=this.textModel.getLineTokens(d),f=u.getCount(),S=this.textModel.getLineContent(d);let v=f-1,C=S.length,_=S.length;d===n.lineNumber&&(v=u.findTokenIndexAtOffset(n.column-1),C=n.column-1,_=n.column-1);let L=!0;for(;v>=0;v--){const E=u.getLanguageId(v)===c&&!(0,I.ignoreBracketsInToken)(u.getStandardTokenType(v));if(E)L?C=u.getStartOffset(v):(C=u.getStartOffset(v),_=u.getEndOffset(v));else if(L&&C!==_){const N=a(d,S,C,_);if(N)return N}L=E}if(L&&C!==_){const E=a(d,S,C,_);if(E)return E}}return null}_findMatchingBracketDown(i,n,l){const c=i.languageId,r=i.forwardRegex;let s=1,o=0;const a=(u,f,S,v)=>{for(;;){if(l&&++o%100==0&&!l())return h.INSTANCE;const C=w.BracketsUtils.findNextBracketInRange(r,u,f,S,v);if(!C)break;const _=f.substring(C.startColumn-1,C.endColumn-1).toLowerCase();if(i.isOpen(_)?s++:i.isClose(_)&&s--,s===0)return C;S=C.endColumn-1}return null},d=this.textModel.getLineCount();for(let u=n.lineNumber;u<=d;u++){const f=this.textModel.getLineTokens(u),S=f.getCount(),v=this.textModel.getLineContent(u);let C=0,_=0,L=0;u===n.lineNumber&&(C=f.findTokenIndexAtOffset(n.column-1),_=n.column-1,L=n.column-1);let E=!0;for(;C<S;C++){const N=f.getLanguageId(C)===c&&!(0,I.ignoreBracketsInToken)(f.getStandardTokenType(C));if(N)E||(_=f.getStartOffset(C)),L=f.getEndOffset(C);else if(E&&_!==L){const k=a(u,v,_,L);if(k)return k}E=N}if(E&&_!==L){const N=a(u,v,_,L);if(N)return N}}return null}findPrevBracket(i){const n=this.textModel.validatePosition(i);let l=null,c=null;for(let r=n.lineNumber;r>=1;r--){const s=this.textModel.getLineTokens(r),o=s.getCount(),a=this.textModel.getLineContent(r);let d=o-1,u=a.length,f=a.length;if(r===n.lineNumber){d=s.findTokenIndexAtOffset(n.column-1),u=n.column-1,f=n.column-1;const v=s.getLanguageId(d);l!==v&&(l=v,c=this.languageConfigurationService.getLanguageConfiguration(l).brackets)}let S=!0;for(;d>=0;d--){const v=s.getLanguageId(d);if(l!==v){if(c&&S&&u!==f){const _=w.BracketsUtils.findPrevBracketInRange(c.reversedRegex,r,a,u,f);if(_)return this._toFoundBracket(c,_);S=!1}l=v,c=this.languageConfigurationService.getLanguageConfiguration(l).brackets}const C=!!c&&!(0,I.ignoreBracketsInToken)(s.getStandardTokenType(d));if(C)S?u=s.getStartOffset(d):(u=s.getStartOffset(d),f=s.getEndOffset(d));else if(c&&S&&u!==f){const _=w.BracketsUtils.findPrevBracketInRange(c.reversedRegex,r,a,u,f);if(_)return this._toFoundBracket(c,_)}S=C}if(c&&S&&u!==f){const v=w.BracketsUtils.findPrevBracketInRange(c.reversedRegex,r,a,u,f);if(v)return this._toFoundBracket(c,v)}}return null}findNextBracket(i){const n=this.textModel.validatePosition(i),l=this.textModel.getLineCount();let c=null,r=null;for(let s=n.lineNumber;s<=l;s++){const o=this.textModel.getLineTokens(s),a=o.getCount(),d=this.textModel.getLineContent(s);let u=0,f=0,S=0;if(s===n.lineNumber){u=o.findTokenIndexAtOffset(n.column-1),f=n.column-1,S=n.column-1;const C=o.getLanguageId(u);c!==C&&(c=C,r=this.languageConfigurationService.getLanguageConfiguration(c).brackets)}let v=!0;for(;u<a;u++){const C=o.getLanguageId(u);if(c!==C){if(r&&v&&f!==S){const L=w.BracketsUtils.findNextBracketInRange(r.forwardRegex,s,d,f,S);if(L)return this._toFoundBracket(r,L);v=!1}c=C,r=this.languageConfigurationService.getLanguageConfiguration(c).brackets}const _=!!r&&!(0,I.ignoreBracketsInToken)(o.getStandardTokenType(u));if(_)v||(f=o.getStartOffset(u)),S=o.getEndOffset(u);else if(r&&v&&f!==S){const L=w.BracketsUtils.findNextBracketInRange(r.forwardRegex,s,d,f,S);if(L)return this._toFoundBracket(r,L)}v=_}if(r&&v&&f!==S){const C=w.BracketsUtils.findNextBracketInRange(r.forwardRegex,s,d,f,S);if(C)return this._toFoundBracket(r,C)}}return null}findEnclosingBrackets(i,n){let l;if(typeof n=="undefined")l=null;else{const v=Date.now();l=()=>Date.now()-v<=n}const c=this.textModel.validatePosition(i),r=this.textModel.getLineCount(),s=new Map;let o=[];const a=(v,C)=>{if(!s.has(v)){const _=[];for(let L=0,E=C?C.brackets.length:0;L<E;L++)_[L]=0;s.set(v,_)}o=s.get(v)};let d=0;const u=(v,C,_,L,E)=>{for(;;){if(l&&++d%100==0&&!l())return h.INSTANCE;const N=w.BracketsUtils.findNextBracketInRange(v.forwardRegex,C,_,L,E);if(!N)break;const k=_.substring(N.startColumn-1,N.endColumn-1).toLowerCase(),M=v.textIsBracket[k];if(M&&(M.isOpen(k)?o[M.index]++:M.isClose(k)&&o[M.index]--,o[M.index]===-1))return this._matchFoundBracket(N,M,!1,l);L=N.endColumn-1}return null};let f=null,S=null;for(let v=c.lineNumber;v<=r;v++){const C=this.textModel.getLineTokens(v),_=C.getCount(),L=this.textModel.getLineContent(v);let E=0,N=0,k=0;if(v===c.lineNumber){E=C.findTokenIndexAtOffset(c.column-1),N=c.column-1,k=c.column-1;const O=C.getLanguageId(E);f!==O&&(f=O,S=this.languageConfigurationService.getLanguageConfiguration(f).brackets,a(f,S))}let M=!0;for(;E<_;E++){const O=C.getLanguageId(E);if(f!==O){if(S&&M&&N!==k){const T=u(S,v,L,N,k);if(T)return g(T);M=!1}f=O,S=this.languageConfigurationService.getLanguageConfiguration(f).brackets,a(f,S)}const B=!!S&&!(0,I.ignoreBracketsInToken)(C.getStandardTokenType(E));if(B)M||(N=C.getStartOffset(E)),k=C.getEndOffset(E);else if(S&&M&&N!==k){const T=u(S,v,L,N,k);if(T)return g(T)}M=B}if(S&&M&&N!==k){const O=u(S,v,L,N,k);if(O)return g(O)}}return null}_toFoundBracket(i,n){if(!n)return null;let l=this.textModel.getValueInRange(n);l=l.toLowerCase();const c=i.textIsBracket[l];return c?{range:n,open:c.open,close:c.close,isOpen:i.textIsOpenBracket[l]}:null}}e.BracketPairsTextModelPart=b;function p(t,i){return{object:t,dispose:()=>i==null?void 0:i.dispose()}}class h{constructor(){this._searchCanceledBrand=void 0}}h.INSTANCE=new h;function g(t){return t instanceof h?null:t}}),define(te[428],ie([1,0,247,83,241,99,181]),function(j,e,y,m,D,I,w){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.fixBracketsInLine=void 0;function b(h,g){const t=new I.DenseKeyProvider,i=new y.LanguageAgnosticBracketTokens(t,o=>g.getLanguageConfiguration(o)),n=new w.TextBufferTokenizer(new p([h]),i),l=(0,D.parseDocument)(n,[],void 0,!0);let c="";const r=h.getLineContent();function s(o,a){if(o.kind===2)s(o.openingBracket,a),a=(0,m.lengthAdd)(a,o.openingBracket.length),o.child&&(s(o.child,a),a=(0,m.lengthAdd)(a,o.child.length)),o.closingBracket?(s(o.closingBracket,a),a=(0,m.lengthAdd)(a,o.closingBracket.length)):c+=i.getSingleLanguageBracketTokens(o.openingBracket.languageId).findClosingTokenText(o.openingBracket.bracketIds);else if(o.kind!==3){if(o.kind===0||o.kind===1)c+=r.substring((0,m.lengthGetColumnCountIfZeroLineCount)(a),(0,m.lengthGetColumnCountIfZeroLineCount)((0,m.lengthAdd)(a,o.length)));else if(o.kind===4)for(const d of o.children)s(d,a),a=(0,m.lengthAdd)(a,d.length)}}return s(l,m.lengthZero),c}e.fixBracketsInLine=b;class p{constructor(g){this.lines=g}getLineCount(){return this.lines.length}getLineLength(g){return this.lines[g-1].getLineContent().length}getLineTokens(g){return this.lines[g-1]}}}),define(te[248],ie([1,0,21,4,55,25,11,3,22,18,179]),function(j,e,y,m,D,I,w,b,p,h,g){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.createMonacoBaseAPI=e.KeyMod=void 0;class t{static chord(l,c){return(0,D.KeyChord)(l,c)}}e.KeyMod=t,t.CtrlCmd=2048,t.Shift=1024,t.Alt=512,t.WinCtrl=256;function i(){return{editor:void 0,languages:void 0,CancellationTokenSource:y.CancellationTokenSource,Emitter:m.Emitter,KeyCode:g.KeyCode,KeyMod:t,Position:w.Position,Range:b.Range,Selection:p.Selection,SelectionDirection:g.SelectionDirection,MarkerSeverity:g.MarkerSeverity,MarkerTag:g.MarkerTag,Uri:I.URI,Token:h.Token}}e.createMonacoBaseAPI=i}),define(te[429],ie([1,0,138,17,25,11,3,404,419,146,406,409,248,20,65,243]),function(j,e,y,m,D,I,w,b,p,h,g,t,i,n,l,c){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.create=e.EditorSimpleWorker=e.MirrorModel=void 0;class r extends p.MirrorTextModel{get uri(){return this._uri}get eol(){return this._eol}getValue(){return this.getText()}getLinesContent(){return this._lines.slice(0)}getLineCount(){return this._lines.length}getLineContent(d){return this._lines[d-1]}getWordAtPosition(d,u){const f=(0,h.getWordAtText)(d.column,(0,h.ensureValidWordDefinition)(u),this._lines[d.lineNumber-1],0);return f?new w.Range(d.lineNumber,f.startColumn,d.lineNumber,f.endColumn):null}words(d){const u=this._lines,f=this._wordenize.bind(this);let S=0,v="",C=0,_=[];return{*[Symbol.iterator](){for(;;)if(C<_.length){const L=v.substring(_[C].start,_[C].end);C+=1,yield L}else if(S<u.length)v=u[S],_=f(v,d),C=0,S+=1;else break}}}getLineWords(d,u){const f=this._lines[d-1],S=this._wordenize(f,u),v=[];for(const C of S)v.push({word:f.substring(C.start,C.end),startColumn:C.start+1,endColumn:C.end+1});return v}_wordenize(d,u){const f=[];let S;for(u.lastIndex=0;(S=u.exec(d))&&S[0].length!==0;)f.push({start:S.index,end:S.index+S[0].length});return f}getValueInRange(d){if(d=this._validateRange(d),d.startLineNumber===d.endLineNumber)return this._lines[d.startLineNumber-1].substring(d.startColumn-1,d.endColumn-1);const u=this._eol,f=d.startLineNumber-1,S=d.endLineNumber-1,v=[];v.push(this._lines[f].substring(d.startColumn-1));for(let C=f+1;C<S;C++)v.push(this._lines[C]);return v.push(this._lines[S].substring(0,d.endColumn-1)),v.join(u)}offsetAt(d){return d=this._validatePosition(d),this._ensureLineStarts(),this._lineStarts.getPrefixSum(d.lineNumber-2)+(d.column-1)}positionAt(d){d=Math.floor(d),d=Math.max(0,d),this._ensureLineStarts();const u=this._lineStarts.getIndexOf(d),f=this._lines[u.index].length;return{lineNumber:1+u.index,column:1+Math.min(u.remainder,f)}}_validateRange(d){const u=this._validatePosition({lineNumber:d.startLineNumber,column:d.startColumn}),f=this._validatePosition({lineNumber:d.endLineNumber,column:d.endColumn});return u.lineNumber!==d.startLineNumber||u.column!==d.startColumn||f.lineNumber!==d.endLineNumber||f.column!==d.endColumn?{startLineNumber:u.lineNumber,startColumn:u.column,endLineNumber:f.lineNumber,endColumn:f.column}:d}_validatePosition(d){if(!I.Position.isIPosition(d))throw new Error("bad position");let{lineNumber:u,column:f}=d,S=!1;if(u<1)u=1,f=1,S=!0;else if(u>this._lines.length)u=this._lines.length,f=this._lines[u-1].length+1,S=!0;else{const v=this._lines[u-1].length+1;f<1?(f=1,S=!0):f>v&&(f=v,S=!0)}return S?{lineNumber:u,column:f}:d}}e.MirrorModel=r;class s{constructor(d,u){this._host=d,this._models=Object.create(null),this._foreignModuleFactory=u,this._foreignModule=null}dispose(){this._models=Object.create(null)}_getModel(d){return this._models[d]}_getModels(){const d=[];return Object.keys(this._models).forEach(u=>d.push(this._models[u])),d}acceptNewModel(d){this._models[d.url]=new r(D.URI.parse(d.url),d.lines,d.EOL,d.versionId)}acceptModelChanged(d,u){if(!this._models[d])return;this._models[d].onEvents(u)}acceptRemovedModel(d){!this._models[d]||delete this._models[d]}computeUnicodeHighlights(d,u,f){return ye(this,void 0,void 0,function*(){const S=this._getModel(d);return S?c.UnicodeTextModelHighlighter.computeUnicodeHighlights(S,u,f):{ranges:[],hasMore:!1,ambiguousCharacterCount:0,invisibleCharacterCount:0,nonBasicAsciiCharacterCount:0}})}computeDiff(d,u,f,S){return ye(this,void 0,void 0,function*(){const v=this._getModel(d),C=this._getModel(u);if(!v||!C)return null;const _=v.getLinesContent(),L=C.getLinesContent(),N=new b.DiffComputer(_,L,{shouldComputeCharChanges:!0,shouldPostProcessCharChanges:!0,shouldIgnoreTrimWhitespace:f,shouldMakePrettyDiff:!0,maxComputationTime:S}).computeDiff(),k=N.changes.length>0?!1:this._modelsAreIdentical(v,C);return{quitEarly:N.quitEarly,identical:k,changes:N.changes}})}_modelsAreIdentical(d,u){const f=d.getLineCount(),S=u.getLineCount();if(f!==S)return!1;for(let v=1;v<=f;v++){const C=d.getLineContent(v),_=u.getLineContent(v);if(C!==_)return!1}return!0}computeMoreMinimalEdits(d,u){return ye(this,void 0,void 0,function*(){const f=this._getModel(d);if(!f)return u;const S=[];let v;u=u.slice(0).sort((C,_)=>{if(C.range&&_.range)return w.Range.compareRangesUsingStarts(C.range,_.range);const L=C.range?0:1,E=_.range?0:1;return L-E});for(let{range:C,text:_,eol:L}of u){if(typeof L=="number"&&(v=L),w.Range.isEmpty(C)&&!_)continue;const E=f.getValueInRange(C);if(_=_.replace(/\r\n|\n|\r/g,f.eol),E===_)continue;if(Math.max(_.length,E.length)>s._diffLimit){S.push({range:C,text:_});continue}const N=(0,y.stringDiff)(E,_,!1),k=f.offsetAt(w.Range.lift(C).getStartPosition());for(const M of N){const O=f.positionAt(k+M.originalStart),B=f.positionAt(k+M.originalStart+M.originalLength),T={text:_.substr(M.modifiedStart,M.modifiedLength),range:{startLineNumber:O.lineNumber,startColumn:O.column,endLineNumber:B.lineNumber,endColumn:B.column}};f.getValueInRange(T.range)!==T.text&&S.push(T)}}return typeof v=="number"&&S.push({eol:v,text:"",range:{startLineNumber:0,startColumn:0,endLineNumber:0,endColumn:0}}),S})}computeLinks(d){return ye(this,void 0,void 0,function*(){const u=this._getModel(d);return u?(0,g.computeLinks)(u):null})}textualSuggest(d,u,f,S){return ye(this,void 0,void 0,function*(){const v=new l.StopWatch(!0),C=new RegExp(f,S),_=new Set;e:for(let L of d){const E=this._getModel(L);if(!!E){for(let N of E.words(C))if(!(N===u||!isNaN(Number(N)))&&(_.add(N),_.size>s._suggestionsLimit))break e}}return{words:Array.from(_),duration:v.elapsed()}})}computeWordRanges(d,u,f,S){return ye(this,void 0,void 0,function*(){const v=this._getModel(d);if(!v)return Object.create(null);const C=new RegExp(f,S),_=Object.create(null);for(let L=u.startLineNumber;L<u.endLineNumber;L++){const E=v.getLineWords(L,C);for(const N of E){if(!isNaN(Number(N.word)))continue;let k=_[N.word];k||(k=[],_[N.word]=k),k.push({startLineNumber:L,startColumn:N.startColumn,endLineNumber:L,endColumn:N.endColumn})}}return _})}navigateValueSet(d,u,f,S,v){return ye(this,void 0,void 0,function*(){const C=this._getModel(d);if(!C)return null;const _=new RegExp(S,v);u.startColumn===u.endColumn&&(u={startLineNumber:u.startLineNumber,startColumn:u.startColumn,endLineNumber:u.endLineNumber,endColumn:u.endColumn+1});const L=C.getValueInRange(u),E=C.getWordAtPosition({lineNumber:u.startLineNumber,column:u.startColumn},_);if(!E)return null;const N=C.getValueInRange(E);return t.BasicInplaceReplace.INSTANCE.navigateValueSet(u,L,E,N,f)})}loadForeignModule(d,u,f){const S=(_,L)=>this._host.fhr(_,L),C={host:n.createProxyObject(f,S),getMirrorModels:()=>this._getModels()};return this._foreignModuleFactory?(this._foreignModule=this._foreignModuleFactory(C,u),Promise.resolve(n.getAllMethodNames(this._foreignModule))):new Promise((_,L)=>{j([d],E=>{this._foreignModule=E.create(C,u),_(n.getAllMethodNames(this._foreignModule))},L)})}fmr(d,u){if(!this._foreignModule||typeof this._foreignModule[d]!="function")return Promise.reject(new Error("Missing requestHandler or method: "+d));try{return Promise.resolve(this._foreignModule[d].apply(this._foreignModule,u))}catch(f){return Promise.reject(f)}}}e.EditorSimpleWorker=s,s._diffLimit=1e5,s._suggestionsLimit=1e4;function o(a){return new s(a,null)}e.create=o,typeof importScripts=="function"&&(m.globals.monaco=(0,i.createMonacoBaseAPI)())}),define(te[430],ie([1,0]),function(j,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ContiguousMultilineTokens=void 0;class y{constructor(D,I){this._startLineNumber=D,this._tokens=I}get startLineNumber(){return this._startLineNumber}get endLineNumber(){return this._startLineNumber+this._tokens.length-1}getLineTokens(D){return this._tokens[D-this._startLineNumber]}appendLineTokens(D){this._tokens.push(D)}}e.ContiguousMultilineTokens=y}),define(te[431],ie([1,0,430]),function(j,e,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ContiguousMultilineTokensBuilder=void 0;class m{constructor(){this._tokens=[]}add(I,w){if(this._tokens.length>0){const b=this._tokens[this._tokens.length-1];if(b.endLineNumber+1===I){b.appendLineTokens(w);return}}this._tokens.push(new y.ContiguousMultilineTokens(I,[w]))}finalize(){return this._tokens}}e.ContiguousMultilineTokensBuilder=m}),define(te[75],ie([1,0,18]),function(j,e,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.LineTokens=void 0;class m{constructor(w,b,p){this._lineTokensBrand=void 0,this._tokens=w,this._tokensCount=this._tokens.length>>>1,this._text=b,this._languageIdCodec=p}static createEmpty(w,b){const p=m.defaultTokenMetadata,h=new Uint32Array(2);return h[0]=w.length,h[1]=p,new m(h,w,b)}equals(w){return w instanceof m?this.slicedEquals(w,0,this._tokensCount):!1}slicedEquals(w,b,p){if(this._text!==w._text||this._tokensCount!==w._tokensCount)return!1;const h=b<<1,g=h+(p<<1);for(let t=h;t<g;t++)if(this._tokens[t]!==w._tokens[t])return!1;return!0}getLineContent(){return this._text}getCount(){return this._tokensCount}getStartOffset(w){return w>0?this._tokens[w-1<<1]:0}getMetadata(w){return this._tokens[(w<<1)+1]}getLanguageId(w){const b=this._tokens[(w<<1)+1],p=y.TokenMetadata.getLanguageId(b);return this._languageIdCodec.decodeLanguageId(p)}getStandardTokenType(w){const b=this._tokens[(w<<1)+1];return y.TokenMetadata.getTokenType(b)}getForeground(w){const b=this._tokens[(w<<1)+1];return y.TokenMetadata.getForeground(b)}getClassName(w){const b=this._tokens[(w<<1)+1];return y.TokenMetadata.getClassNameFromMetadata(b)}getInlineStyle(w,b){const p=this._tokens[(w<<1)+1];return y.TokenMetadata.getInlineStyleFromMetadata(p,b)}getPresentation(w){const b=this._tokens[(w<<1)+1];return y.TokenMetadata.getPresentationFromMetadata(b)}getEndOffset(w){return this._tokens[w<<1]}findTokenIndexAtOffset(w){return m.findIndexInTokensArray(this._tokens,w)}inflate(){return this}sliceAndInflate(w,b,p){return new D(this,w,b,p)}static convertToEndOffset(w,b){const h=(w.length>>>1)-1;for(let g=0;g<h;g++)w[g<<1]=w[g+1<<1];w[h<<1]=b}static findIndexInTokensArray(w,b){if(w.length<=2)return 0;let p=0,h=(w.length>>>1)-1;for(;p<h;){const g=p+Math.floor((h-p)/2),t=w[g<<1];if(t===b)return g+1;t<b?p=g+1:t>b&&(h=g)}return p}withInserted(w){if(w.length===0)return this;let b=0,p=0,h="";const g=new Array;let t=0;for(;;){const i=b<this._tokensCount?this._tokens[b<<1]:-1,n=p<w.length?w[p]:null;if(i!==-1&&(n===null||i<=n.offset)){h+=this._text.substring(t,i);const l=this._tokens[(b<<1)+1];g.push(h.length,l),b++,t=i}else if(n){if(n.offset>t){h+=this._text.substring(t,n.offset);const l=this._tokens[(b<<1)+1];g.push(h.length,l),t=n.offset}h+=n.text,g.push(h.length,n.tokenMetadata),p++}else break}return new m(new Uint32Array(g),h,this._languageIdCodec)}}e.LineTokens=m,m.defaultTokenMetadata=(0<<10|1<<14|2<<23)>>>0;class D{constructor(w,b,p,h){this._source=w,this._startOffset=b,this._endOffset=p,this._deltaOffset=h,this._firstTokenIndex=w.findTokenIndexAtOffset(b),this._tokensCount=0;for(let g=this._firstTokenIndex,t=w.getCount();g<t&&!(w.getStartOffset(g)>=p);g++)this._tokensCount++}getMetadata(w){return this._source.getMetadata(this._firstTokenIndex+w)}getLanguageId(w){return this._source.getLanguageId(this._firstTokenIndex+w)}getLineContent(){return this._source.getLineContent().substring(this._startOffset,this._endOffset)}equals(w){return w instanceof D?this._startOffset===w._startOffset&&this._endOffset===w._endOffset&&this._deltaOffset===w._deltaOffset&&this._source.slicedEquals(w._source,this._firstTokenIndex,this._tokensCount):!1}getCount(){return this._tokensCount}getForeground(w){return this._source.getForeground(this._firstTokenIndex+w)}getEndOffset(w){const b=this._source.getEndOffset(this._firstTokenIndex+w);return Math.min(this._endOffset,b)-this._startOffset+this._deltaOffset}getClassName(w){return this._source.getClassName(this._firstTokenIndex+w)}getInlineStyle(w,b){return this._source.getInlineStyle(this._firstTokenIndex+w,b)}getPresentation(w){return this._source.getPresentation(this._firstTokenIndex+w)}findTokenIndexAtOffset(w){return this._source.findTokenIndexAtOffset(w+this._startOffset-this._deltaOffset)-this._firstTokenIndex}}}),define(te[249],ie([1,0,8,75,18,121]),function(j,e,y,m,D,I){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e._tokenizeToString=e.tokenizeLineToHTML=e.tokenizeToString=void 0;const w={getInitialState:()=>I.NullState,tokenizeEncoded:(g,t,i)=>(0,I.nullTokenizeEncoded)(0,i)};function b(g,t,i){return ye(this,void 0,void 0,function*(){if(!i)return h(t,g.languageIdCodec,w);const n=yield D.TokenizationRegistry.getOrCreate(i);return h(t,g.languageIdCodec,n||w)})}e.tokenizeToString=b;function p(g,t,i,n,l,c,r){let s="<div>",o=n,a=0,d=!0;for(let u=0,f=t.getCount();u<f;u++){const S=t.getEndOffset(u);if(S<=n)continue;let v="";for(;o<S&&o<l;o++){const C=g.charCodeAt(o);switch(C){case 9:{let _=c-(o+a)%c;for(a+=_-1;_>0;)r&&d?(v+=" ",d=!1):(v+=" ",d=!0),_--;break}case 60:v+="<",d=!1;break;case 62:v+=">",d=!1;break;case 38:v+="&",d=!1;break;case 0:v+="�",d=!1;break;case 65279:case 8232:case 8233:case 133:v+="\uFFFD",d=!1;break;case 13:v+="​",d=!1;break;case 32:r&&d?(v+=" ",d=!1):(v+=" ",d=!0);break;default:v+=String.fromCharCode(C),d=!1}}if(s+=`<span style="${t.getInlineStyle(u,i)}">${v}</span>`,S>l||o>=l)break}return s+="</div>",s}e.tokenizeLineToHTML=p;function h(g,t,i){let n='<div class="monaco-tokenized-source">';const l=y.splitLines(g);let c=i.getInitialState();for(let r=0,s=l.length;r<s;r++){const o=l[r];r>0&&(n+="<br/>");const a=i.tokenizeEncoded(o,!0,c);m.LineTokens.convertToEndOffset(a.tokens,o.length);const u=new m.LineTokens(a.tokens,o,t).inflate();let f=0;for(let S=0,v=u.getCount();S<v;S++){const C=u.getClassName(S),_=u.getEndOffset(S);n+=`<span class="${C}">${y.escape(o.substring(f,_))}</span>`,f=_}c=a.endState}return n+="</div>",n}e._tokenizeToString=h}),define(te[432],ie([1,0,19,13,75,18,121,2,65,117,431,10,17]),function(j,e,y,m,D,I,w,b,p,h,g,t,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TextModelTokenization=e.TokenizationStateStore=void 0;class n{constructor(a){this._default=a,this._store=[]}get(a){return a<this._store.length?this._store[a]:this._default}set(a,d){for(;a>=this._store.length;)this._store[this._store.length]=this._default;this._store[a]=d}delete(a,d){d===0||a>=this._store.length||this._store.splice(a,d)}insert(a,d){if(d===0||a>=this._store.length)return;const u=[];for(let f=0;f<d;f++)u[f]=this._default;this._store=y.arrayInsert(this._store,a,u)}}class l{constructor(a,d){this.tokenizationSupport=a,this.initialState=d,this._lineBeginState=new n(null),this._lineNeedsTokenization=new n(!0),this._firstLineNeedsTokenization=0,this._lineBeginState.set(0,this.initialState)}get invalidLineStartIndex(){return this._firstLineNeedsTokenization}markMustBeTokenized(a){this._lineNeedsTokenization.set(a,!0),this._firstLineNeedsTokenization=Math.min(this._firstLineNeedsTokenization,a)}getBeginState(a){return this._lineBeginState.get(a)}setEndState(a,d,u){if(this._lineNeedsTokenization.set(d,!1),this._firstLineNeedsTokenization=d+1,d===a-1)return;const f=this._lineBeginState.get(d+1);if(f===null||!u.equals(f)){this._lineBeginState.set(d+1,u),this.markMustBeTokenized(d+1);return}let S=d+1;for(;S<a&&!this._lineNeedsTokenization.get(S);)S++;this._firstLineNeedsTokenization=S}applyEdits(a,d){this.markMustBeTokenized(a.startLineNumber-1),this._lineBeginState.delete(a.startLineNumber,a.endLineNumber-a.startLineNumber),this._lineNeedsTokenization.delete(a.startLineNumber,a.endLineNumber-a.startLineNumber),this._lineBeginState.insert(a.startLineNumber,d),this._lineNeedsTokenization.insert(a.startLineNumber,d)}}e.TokenizationStateStore=l;class c extends b.Disposable{constructor(a,d){super();this._textModel=a,this._languageIdCodec=d,this._isScheduled=!1,this._isDisposed=!1,this._tokenizationStateStore=null,this._register(I.TokenizationRegistry.onDidChange(u=>{const f=this._textModel.getLanguageId();u.changedLanguages.indexOf(f)!==-1&&(this._resetTokenizationState(),this._textModel.clearTokens())})),this._register(this._textModel.onDidChangeContentFast(u=>{if(u.isFlush){this._resetTokenizationState();return}if(this._tokenizationStateStore)for(let f=0,S=u.changes.length;f<S;f++){const v=u.changes[f],[C]=(0,h.countEOL)(v.text);this._tokenizationStateStore.applyEdits(v.range,C)}this._beginBackgroundTokenization()})),this._register(this._textModel.onDidChangeAttached(()=>{this._beginBackgroundTokenization()})),this._register(this._textModel.onDidChangeLanguage(()=>{this._resetTokenizationState(),this._textModel.clearTokens()})),this._resetTokenizationState()}dispose(){this._isDisposed=!0,super.dispose()}_resetTokenizationState(){const[a,d]=r(this._textModel);a&&d?this._tokenizationStateStore=new l(a,d):this._tokenizationStateStore=null,this._beginBackgroundTokenization()}_beginBackgroundTokenization(){this._isScheduled||!this._textModel.isAttachedToEditor()||!this._hasLinesToTokenize()||(this._isScheduled=!0,(0,t.runWhenIdle)(a=>{this._isScheduled=!1,this._backgroundTokenizeWithDeadline(a)}))}_backgroundTokenizeWithDeadline(a){const d=Date.now()+a.timeRemaining(),u=()=>{this._isDisposed||!this._textModel.isAttachedToEditor()||!this._hasLinesToTokenize()||(this._backgroundTokenizeForAtLeast1ms(),Date.now()<d?(0,i.setTimeout0)(u):this._beginBackgroundTokenization())};u()}_backgroundTokenizeForAtLeast1ms(){const a=this._textModel.getLineCount(),d=new g.ContiguousMultilineTokensBuilder,u=p.StopWatch.create(!1);do if(u.elapsed()>1||this._tokenizeOneInvalidLine(d)>=a)break;while(this._hasLinesToTokenize());this._textModel.setTokens(d.finalize(),!this._hasLinesToTokenize())}tokenizeViewport(a,d){const u=new g.ContiguousMultilineTokensBuilder;this._tokenizeViewport(u,a,d),this._textModel.setTokens(u.finalize(),!this._hasLinesToTokenize())}reset(){this._resetTokenizationState(),this._textModel.clearTokens()}forceTokenization(a){const d=new g.ContiguousMultilineTokensBuilder;this._updateTokensUntilLine(d,a),this._textModel.setTokens(d.finalize(),!this._hasLinesToTokenize())}getTokenTypeIfInsertingCharacter(a,d){if(!this._tokenizationStateStore)return 0;this.forceTokenization(a.lineNumber);const u=this._tokenizationStateStore.getBeginState(a.lineNumber-1);if(!u)return 0;const f=this._textModel.getLanguageId(),S=this._textModel.getLineContent(a.lineNumber),v=S.substring(0,a.column-1)+d+S.substring(a.column-1),C=s(this._languageIdCodec,f,this._tokenizationStateStore.tokenizationSupport,v,!0,u),_=new D.LineTokens(C.tokens,v,this._languageIdCodec);if(_.getCount()===0)return 0;const L=_.findTokenIndexAtOffset(a.column-1);return _.getStandardTokenType(L)}tokenizeLineWithEdit(a,d,u){const f=a.lineNumber,S=a.column;if(!this._tokenizationStateStore)return null;this.forceTokenization(f);const v=this._tokenizationStateStore.getBeginState(f-1);if(!v)return null;const C=this._textModel.getLineContent(f),_=C.substring(0,S-1)+u+C.substring(S-1+d),L=this._textModel.getLanguageIdAtPosition(f,0),E=s(this._languageIdCodec,L,this._tokenizationStateStore.tokenizationSupport,_,!0,v);return new D.LineTokens(E.tokens,_,this._languageIdCodec)}isCheapToTokenize(a){if(!this._tokenizationStateStore)return!0;const d=this._tokenizationStateStore.invalidLineStartIndex+1;return a>d?!1:a<d||this._textModel.getLineLength(a)<2048}_hasLinesToTokenize(){return this._tokenizationStateStore?this._tokenizationStateStore.invalidLineStartIndex<this._textModel.getLineCount():!1}_tokenizeOneInvalidLine(a){if(!this._tokenizationStateStore||!this._hasLinesToTokenize())return this._textModel.getLineCount()+1;const d=this._tokenizationStateStore.invalidLineStartIndex+1;return this._updateTokensUntilLine(a,d),d}_updateTokensUntilLine(a,d){if(!this._tokenizationStateStore)return;const u=this._textModel.getLanguageId(),f=this._textModel.getLineCount(),S=d-1;for(let v=this._tokenizationStateStore.invalidLineStartIndex;v<=S;v++){const C=this._textModel.getLineContent(v+1),_=this._tokenizationStateStore.getBeginState(v),L=s(this._languageIdCodec,u,this._tokenizationStateStore.tokenizationSupport,C,!0,_);a.add(v+1,L.tokens),this._tokenizationStateStore.setEndState(f,v,L.endState),v=this._tokenizationStateStore.invalidLineStartIndex-1}}_tokenizeViewport(a,d,u){if(!this._tokenizationStateStore||u<=this._tokenizationStateStore.invalidLineStartIndex)return;if(d<=this._tokenizationStateStore.invalidLineStartIndex){this._updateTokensUntilLine(a,u);return}let f=this._textModel.getLineFirstNonWhitespaceColumn(d);const S=[];let v=null;for(let L=d-1;f>1&&L>=1;L--){const E=this._textModel.getLineFirstNonWhitespaceColumn(L);if(E!==0&&E<f){if(v=this._tokenizationStateStore.getBeginState(L-1),v)break;S.push(this._textModel.getLineContent(L)),f=E}}v||(v=this._tokenizationStateStore.initialState);const C=this._textModel.getLanguageId();let _=v;for(let L=S.length-1;L>=0;L--)_=s(this._languageIdCodec,C,this._tokenizationStateStore.tokenizationSupport,S[L],!1,_).endState;for(let L=d;L<=u;L++){const E=this._textModel.getLineContent(L),N=s(this._languageIdCodec,C,this._tokenizationStateStore.tokenizationSupport,E,!0,_);a.add(L,N.tokens),this._tokenizationStateStore.markMustBeTokenized(L-1),_=N.endState}}}e.TextModelTokenization=c;function r(o){if(o.isTooLargeForTokenization())return[null,null];const a=I.TokenizationRegistry.get(o.getLanguageId());if(!a)return[null,null];let d;try{d=a.getInitialState()}catch(u){return(0,m.onUnexpectedError)(u),[null,null]}return[a,d]}function s(o,a,d,u,f,S){let v=null;if(d)try{v=d.tokenizeEncoded(u,f,S.clone())}catch(C){(0,m.onUnexpectedError)(C)}return v||(v=(0,w.nullTokenizeEncoded)(o.encodeLanguageId(a),S)),D.LineTokens.convertToEndOffset(v.tokens,u.length),v}}),define(te[433],ie([1,0,75]),function(j,e,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.toUint32Array=e.ContiguousTokensEditing=e.EMPTY_LINE_TOKENS=void 0,e.EMPTY_LINE_TOKENS=new Uint32Array(0).buffer;class m{static deleteBeginning(w,b){return w===null||w===e.EMPTY_LINE_TOKENS?w:m.delete(w,0,b)}static deleteEnding(w,b){if(w===null||w===e.EMPTY_LINE_TOKENS)return w;const p=D(w),h=p[p.length-2];return m.delete(w,b,h)}static delete(w,b,p){if(w===null||w===e.EMPTY_LINE_TOKENS||b===p)return w;const h=D(w),g=h.length>>>1;if(b===0&&h[h.length-2]===p)return e.EMPTY_LINE_TOKENS;const t=y.LineTokens.findIndexInTokensArray(h,b),i=t>0?h[t-1<<1]:0,n=h[t<<1];if(p<n){const o=p-b;for(let a=t;a<g;a++)h[a<<1]-=o;return w}let l,c;i!==b?(h[t<<1]=b,l=t+1<<1,c=b):(l=t<<1,c=i);const r=p-b;for(let o=t+1;o<g;o++){const a=h[o<<1]-r;a>c&&(h[l++]=a,h[l++]=h[(o<<1)+1],c=a)}if(l===h.length)return w;const s=new Uint32Array(l);return s.set(h.subarray(0,l),0),s.buffer}static append(w,b){if(b===e.EMPTY_LINE_TOKENS)return w;if(w===e.EMPTY_LINE_TOKENS)return b;if(w===null)return w;if(b===null)return null;const p=D(w),h=D(b),g=h.length>>>1,t=new Uint32Array(p.length+h.length);t.set(p,0);let i=p.length;const n=p[p.length-2];for(let l=0;l<g;l++)t[i++]=h[l<<1]+n,t[i++]=h[(l<<1)+1];return t.buffer}static insert(w,b,p){if(w===null||w===e.EMPTY_LINE_TOKENS)return w;const h=D(w),g=h.length>>>1;let t=y.LineTokens.findIndexInTokensArray(h,b);t>0&&h[t-1<<1]===b&&t--;for(let i=t;i<g;i++)h[i<<1]+=p;return w}}e.ContiguousTokensEditing=m;function D(I){return I instanceof Uint32Array?I:new Uint32Array(I)}e.toUint32Array=D}),define(te[434],ie([1,0,19,11,433,75,18]),function(j,e,y,m,D,I,w){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ContiguousTokensStore=void 0;class b{constructor(g){this._lineTokens=[],this._len=0,this._languageIdCodec=g}flush(){this._lineTokens=[],this._len=0}getTokens(g,t,i){let n=null;if(t<this._len&&(n=this._lineTokens[t]),n!==null&&n!==D.EMPTY_LINE_TOKENS)return new I.LineTokens((0,D.toUint32Array)(n),i,this._languageIdCodec);const l=new Uint32Array(2);return l[0]=i.length,l[1]=p(this._languageIdCodec.encodeLanguageId(g)),new I.LineTokens(l,i,this._languageIdCodec)}static _massageTokens(g,t,i){const n=i?(0,D.toUint32Array)(i):null;if(t===0){let l=!1;if(n&&n.length>1&&(l=w.TokenMetadata.getLanguageId(n[1])!==g),!l)return D.EMPTY_LINE_TOKENS}if(!n||n.length===0){const l=new Uint32Array(2);return l[0]=t,l[1]=p(g),l.buffer}return n[n.length-2]=t,n.byteOffset===0&&n.byteLength===n.buffer.byteLength?n.buffer:n}_ensureLine(g){for(;g>=this._len;)this._lineTokens[this._len]=null,this._len++}_deleteLines(g,t){t!==0&&(g+t>this._len&&(t=this._len-g),this._lineTokens.splice(g,t),this._len-=t)}_insertLines(g,t){if(t===0)return;const i=[];for(let n=0;n<t;n++)i[n]=null;this._lineTokens=y.arrayInsert(this._lineTokens,g,i),this._len+=t}setTokens(g,t,i,n,l){const c=b._massageTokens(this._languageIdCodec.encodeLanguageId(g),i,n);this._ensureLine(t);const r=this._lineTokens[t];return this._lineTokens[t]=c,l?!b._equals(r,c):!1}static _equals(g,t){if(!g||!t)return!g&&!t;const i=(0,D.toUint32Array)(g),n=(0,D.toUint32Array)(t);if(i.length!==n.length)return!1;for(let l=0,c=i.length;l<c;l++)if(i[l]!==n[l])return!1;return!0}acceptEdit(g,t,i){this._acceptDeleteRange(g),this._acceptInsertText(new m.Position(g.startLineNumber,g.startColumn),t,i)}_acceptDeleteRange(g){const t=g.startLineNumber-1;if(t>=this._len)return;if(g.startLineNumber===g.endLineNumber){if(g.startColumn===g.endColumn)return;this._lineTokens[t]=D.ContiguousTokensEditing.delete(this._lineTokens[t],g.startColumn-1,g.endColumn-1);return}this._lineTokens[t]=D.ContiguousTokensEditing.deleteEnding(this._lineTokens[t],g.startColumn-1);const i=g.endLineNumber-1;let n=null;i<this._len&&(n=D.ContiguousTokensEditing.deleteBeginning(this._lineTokens[i],g.endColumn-1)),this._lineTokens[t]=D.ContiguousTokensEditing.append(this._lineTokens[t],n),this._deleteLines(g.startLineNumber,g.endLineNumber-g.startLineNumber)}_acceptInsertText(g,t,i){if(t===0&&i===0)return;const n=g.lineNumber-1;if(!(n>=this._len)){if(t===0){this._lineTokens[n]=D.ContiguousTokensEditing.insert(this._lineTokens[n],g.column-1,i);return}this._lineTokens[n]=D.ContiguousTokensEditing.deleteEnding(this._lineTokens[n],g.column-1),this._lineTokens[n]=D.ContiguousTokensEditing.insert(this._lineTokens[n],g.column-1,i),this._insertLines(g.lineNumber,t)}}}e.ContiguousTokensStore=b;function p(h){return(h<<0|0<<8|0<<10|1<<14|2<<23)>>>0}}),define(te[435],ie([1,0,11,3,117]),function(j,e,y,m,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SparseLineTokens=e.SparseMultilineTokens=void 0;class I{constructor(h,g){this._startLineNumber=h,this._tokens=g,this._endLineNumber=this._startLineNumber+this._tokens.getMaxDeltaLine()}static create(h,g){return new I(h,new w(g))}get startLineNumber(){return this._startLineNumber}get endLineNumber(){return this._endLineNumber}toString(){return this._tokens.toString(this._startLineNumber)}_updateEndLineNumber(){this._endLineNumber=this._startLineNumber+this._tokens.getMaxDeltaLine()}isEmpty(){return this._tokens.isEmpty()}getLineTokens(h){return this._startLineNumber<=h&&h<=this._endLineNumber?this._tokens.getLineTokens(h-this._startLineNumber):null}getRange(){const h=this._tokens.getRange();return h&&new m.Range(this._startLineNumber+h.startLineNumber,h.startColumn,this._startLineNumber+h.endLineNumber,h.endColumn)}removeTokens(h){const g=h.startLineNumber-this._startLineNumber,t=h.endLineNumber-this._startLineNumber;this._startLineNumber+=this._tokens.removeTokens(g,h.startColumn-1,t,h.endColumn-1),this._updateEndLineNumber()}split(h){const g=h.startLineNumber-this._startLineNumber,t=h.endLineNumber-this._startLineNumber,[i,n,l]=this._tokens.split(g,h.startColumn-1,t,h.endColumn-1);return[new I(this._startLineNumber,i),new I(this._startLineNumber+l,n)]}applyEdit(h,g){const[t,i,n]=(0,D.countEOL)(g);this.acceptEdit(h,t,i,n,g.length>0?g.charCodeAt(0):0)}acceptEdit(h,g,t,i,n){this._acceptDeleteRange(h),this._acceptInsertText(new y.Position(h.startLineNumber,h.startColumn),g,t,i,n),this._updateEndLineNumber()}_acceptDeleteRange(h){if(h.startLineNumber===h.endLineNumber&&h.startColumn===h.endColumn)return;const g=h.startLineNumber-this._startLineNumber,t=h.endLineNumber-this._startLineNumber;if(t<0){const n=t-g;this._startLineNumber-=n;return}const i=this._tokens.getMaxDeltaLine();if(!(g>=i+1)){if(g<0&&t>=i+1){this._startLineNumber=0,this._tokens.clear();return}if(g<0){const n=-g;this._startLineNumber-=n,this._tokens.acceptDeleteRange(h.startColumn-1,0,0,t,h.endColumn-1)}else this._tokens.acceptDeleteRange(0,g,h.startColumn-1,t,h.endColumn-1)}}_acceptInsertText(h,g,t,i,n){if(g===0&&t===0)return;const l=h.lineNumber-this._startLineNumber;if(l<0){this._startLineNumber+=g;return}const c=this._tokens.getMaxDeltaLine();l>=c+1||this._tokens.acceptInsertText(l,h.column-1,g,t,i,n)}}e.SparseMultilineTokens=I;class w{constructor(h){this._tokens=h,this._tokenCount=h.length/4}toString(h){const g=[];for(let t=0;t<this._tokenCount;t++)g.push(`(${this._getDeltaLine(t)+h},${this._getStartCharacter(t)}-${this._getEndCharacter(t)})`);return`[${g.join(",")}]`}getMaxDeltaLine(){const h=this._getTokenCount();return h===0?-1:this._getDeltaLine(h-1)}getRange(){const h=this._getTokenCount();if(h===0)return null;const g=this._getStartCharacter(0),t=this._getDeltaLine(h-1),i=this._getEndCharacter(h-1);return new m.Range(0,g+1,t,i+1)}_getTokenCount(){return this._tokenCount}_getDeltaLine(h){return this._tokens[4*h]}_getStartCharacter(h){return this._tokens[4*h+1]}_getEndCharacter(h){return this._tokens[4*h+2]}isEmpty(){return this._getTokenCount()===0}getLineTokens(h){let g=0,t=this._getTokenCount()-1;for(;g<t;){const i=g+Math.floor((t-g)/2),n=this._getDeltaLine(i);if(n<h)g=i+1;else if(n>h)t=i-1;else{let l=i;for(;l>g&&this._getDeltaLine(l-1)===h;)l--;let c=i;for(;c<t&&this._getDeltaLine(c+1)===h;)c++;return new b(this._tokens.subarray(4*l,4*c+4))}}return this._getDeltaLine(g)===h?new b(this._tokens.subarray(4*g,4*g+4)):null}clear(){this._tokenCount=0}removeTokens(h,g,t,i){const n=this._tokens,l=this._tokenCount;let c=0,r=!1,s=0;for(let o=0;o<l;o++){const a=4*o,d=n[a],u=n[a+1],f=n[a+2],S=n[a+3];if((d>h||d===h&&f>=g)&&(d<t||d===t&&u<=i))r=!0;else{if(c===0&&(s=d),r){const v=4*c;n[v]=d-s,n[v+1]=u,n[v+2]=f,n[v+3]=S}c++}}return this._tokenCount=c,s}split(h,g,t,i){const n=this._tokens,l=this._tokenCount,c=[],r=[];let s=c,o=0,a=0;for(let d=0;d<l;d++){const u=4*d,f=n[u],S=n[u+1],v=n[u+2],C=n[u+3];if(f>h||f===h&&v>=g){if(f<t||f===t&&S<=i)continue;s!==r&&(s=r,o=0,a=f)}s[o++]=f-a,s[o++]=S,s[o++]=v,s[o++]=C}return[new w(new Uint32Array(c)),new w(new Uint32Array(r)),a]}acceptDeleteRange(h,g,t,i,n){const l=this._tokens,c=this._tokenCount,r=i-g;let s=0,o=!1;for(let a=0;a<c;a++){const d=4*a;let u=l[d],f=l[d+1],S=l[d+2];const v=l[d+3];if(u<g||u===g&&S<=t){s++;continue}else if(u===g&&f<t)u===i&&S>n?S-=n-t:S=t;else if(u===g&&f===t)if(u===i&&S>n)S-=n-t;else{o=!0;continue}else if(u<i||u===i&&f<n)if(u===i&&S>n)u===g?(f=t,S=f+(S-n)):(f=0,S=f+(S-n));else{o=!0;continue}else if(u>i){if(r===0&&!o){s=c;break}u-=r}else if(u===i&&f>=n)h&&u===0&&(f+=h,S+=h),u-=r,f-=n-t,S-=n-t;else throw new Error("Not possible!");const C=4*s;l[C]=u,l[C+1]=f,l[C+2]=S,l[C+3]=v,s++}this._tokenCount=s}acceptInsertText(h,g,t,i,n,l){const c=t===0&&i===1&&(l>=48&&l<=57||l>=65&&l<=90||l>=97&&l<=122),r=this._tokens,s=this._tokenCount;for(let o=0;o<s;o++){const a=4*o;let d=r[a],u=r[a+1],f=r[a+2];if(!(d<h||d===h&&f<g)){if(d===h&&f===g)if(c)f+=1;else continue;else if(d===h&&u<g&&g<f)t===0?f+=i:f=g;else{if(d===h&&u===g&&c)continue;if(d===h)if(d+=t,t===0)u+=i,f+=i;else{const S=f-u;u=n+(u-g),f=u+S}else d+=t}r[a]=d,r[a+1]=u,r[a+2]=f}}}}class b{constructor(h){this._tokens=h}getCount(){return this._tokens.length/4}getStartCharacter(h){return this._tokens[4*h+1]}getEndCharacter(h){return this._tokens[4*h+2]}getMetadata(h){return this._tokens[4*h+3]}}e.SparseLineTokens=b}),define(te[436],ie([1,0,19,75]),function(j,e,y,m){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SparseTokensStore=void 0;class D{constructor(w){this._pieces=[],this._isComplete=!1,this._languageIdCodec=w}flush(){this._pieces=[],this._isComplete=!1}isEmpty(){return this._pieces.length===0}set(w,b){this._pieces=w||[],this._isComplete=b}setPartial(w,b){let p=w;if(b.length>0){const g=b[0].getRange(),t=b[b.length-1].getRange();if(!g||!t)return w;p=w.plusRange(g).plusRange(t)}let h=null;for(let g=0,t=this._pieces.length;g<t;g++){const i=this._pieces[g];if(i.endLineNumber<p.startLineNumber)continue;if(i.startLineNumber>p.endLineNumber){h=h||{index:g};break}if(i.removeTokens(p),i.isEmpty()){this._pieces.splice(g,1),g--,t--;continue}if(i.endLineNumber<p.startLineNumber)continue;if(i.startLineNumber>p.endLineNumber){h=h||{index:g};continue}const[n,l]=i.split(p);if(n.isEmpty()){h=h||{index:g};continue}l.isEmpty()||(this._pieces.splice(g,1,n,l),g++,t++,h=h||{index:g})}return h=h||{index:this._pieces.length},b.length>0&&(this._pieces=y.arrayInsert(this._pieces,h.index,b)),p}isComplete(){return this._isComplete}addSparseTokens(w,b){const p=this._pieces;if(p.length===0)return b;const h=D._findFirstPieceWithLine(p,w),g=p[h].getLineTokens(w);if(!g)return b;const t=b.getCount(),i=g.getCount();let n=0;const l=[];let c=0,r=0;const s=(o,a)=>{o!==r&&(r=o,l[c++]=o,l[c++]=a)};for(let o=0;o<i;o++){const a=g.getStartCharacter(o),d=g.getEndCharacter(o),u=g.getMetadata(o),f=((u&1?1024:0)|(u&2?2048:0)|(u&4?4096:0)|(u&8?8192:0)|(u&16?8372224:0)|(u&32?4286578688:0))>>>0,S=~f>>>0;for(;n<t&&b.getEndOffset(n)<=a;)s(b.getEndOffset(n),b.getMetadata(n)),n++;for(n<t&&b.getStartOffset(n)<a&&s(a,b.getMetadata(n));n<t&&b.getEndOffset(n)<d;)s(b.getEndOffset(n),b.getMetadata(n)&S|u&f),n++;if(n<t)s(d,b.getMetadata(n)&S|u&f),b.getEndOffset(n)===d&&n++;else{const v=Math.min(Math.max(0,n-1),t-1);s(d,b.getMetadata(v)&S|u&f)}}for(;n<t;)s(b.getEndOffset(n),b.getMetadata(n)),n++;return new m.LineTokens(new Uint32Array(l),b.getLineContent(),this._languageIdCodec)}static _findFirstPieceWithLine(w,b){let p=0,h=w.length-1;for(;p<h;){let g=p+Math.floor((h-p)/2);if(w[g].endLineNumber<b)p=g+1;else if(w[g].startLineNumber>b)h=g-1;else{for(;g>p&&w[g-1].startLineNumber<=b&&b<=w[g-1].endLineNumber;)g--;return g}}return p}acceptEdit(w,b,p,h,g){for(const t of this._pieces)t.acceptEdit(w,b,p,h,g)}}e.SparseTokensStore=D}),define(te[151],ie([1,0,8]),function(j,e,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.LineDecorationsNormalizer=e.DecorationSegment=e.LineDecoration=void 0;class m{constructor(p,h,g,t){this.startColumn=p,this.endColumn=h,this.className=g,this.type=t,this._lineDecorationBrand=void 0}static _equals(p,h){return p.startColumn===h.startColumn&&p.endColumn===h.endColumn&&p.className===h.className&&p.type===h.type}static equalsArr(p,h){const g=p.length,t=h.length;if(g!==t)return!1;for(let i=0;i<g;i++)if(!m._equals(p[i],h[i]))return!1;return!0}static extractWrapped(p,h,g){if(p.length===0)return p;const t=h+1,i=g+1,n=g-h,l=[];let c=0;for(const r of p)r.endColumn<=t||r.startColumn>=i||(l[c++]=new m(Math.max(1,r.startColumn-t+1),Math.min(n+1,r.endColumn-t+1),r.className,r.type));return l}static filter(p,h,g,t){if(p.length===0)return[];const i=[];let n=0;for(let l=0,c=p.length;l<c;l++){const r=p[l],s=r.range;if(s.endLineNumber<h||s.startLineNumber>h||s.isEmpty()&&(r.type===0||r.type===3))continue;const o=s.startLineNumber===h?s.startColumn:g,a=s.endLineNumber===h?s.endColumn:t;i[n++]=new m(o,a,r.inlineClassName,r.type)}return i}static _typeCompare(p,h){const g=[2,0,1,3];return g[p]-g[h]}static compare(p,h){if(p.startColumn!==h.startColumn)return p.startColumn-h.startColumn;if(p.endColumn!==h.endColumn)return p.endColumn-h.endColumn;const g=m._typeCompare(p.type,h.type);return g!==0?g:p.className!==h.className?p.className<h.className?-1:1:0}}e.LineDecoration=m;class D{constructor(p,h,g,t){this.startOffset=p,this.endOffset=h,this.className=g,this.metadata=t}}e.DecorationSegment=D;class I{constructor(){this.stopOffsets=[],this.classNames=[],this.metadata=[],this.count=0}static _metadata(p){let h=0;for(let g=0,t=p.length;g<t;g++)h|=p[g];return h}consumeLowerThan(p,h,g){for(;this.count>0&&this.stopOffsets[0]<p;){let t=0;for(;t+1<this.count&&this.stopOffsets[t]===this.stopOffsets[t+1];)t++;g.push(new D(h,this.stopOffsets[t],this.classNames.join(" "),I._metadata(this.metadata))),h=this.stopOffsets[t]+1,this.stopOffsets.splice(0,t+1),this.classNames.splice(0,t+1),this.metadata.splice(0,t+1),this.count-=t+1}return this.count>0&&h<p&&(g.push(new D(h,p-1,this.classNames.join(" "),I._metadata(this.metadata))),h=p),h}insert(p,h,g){if(this.count===0||this.stopOffsets[this.count-1]<=p)this.stopOffsets.push(p),this.classNames.push(h),this.metadata.push(g);else for(let t=0;t<this.count;t++)if(this.stopOffsets[t]>=p){this.stopOffsets.splice(t,0,p),this.classNames.splice(t,0,h),this.metadata.splice(t,0,g);break}this.count++}}class w{static normalize(p,h){if(h.length===0)return[];const g=[],t=new I;let i=0;for(let n=0,l=h.length;n<l;n++){const c=h[n];let r=c.startColumn,s=c.endColumn;const o=c.className,a=c.type===1?2:c.type===2?4:0;if(r>1){const f=p.charCodeAt(r-2);y.isHighSurrogate(f)&&r--}if(s>1){const f=p.charCodeAt(s-2);y.isHighSurrogate(f)&&s--}const d=r-1,u=s-2;i=t.consumeLowerThan(d,i,g),t.count===0&&(i=d),t.insert(u,o,a)}return t.consumeLowerThan(1073741824,i,g),g}}e.LineDecorationsNormalizer=w}),define(te[437],ie([1,0,8]),function(j,e,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.LinesLayout=e.EditorWhitespace=void 0;class m{constructor(){this._hasPending=!1,this._inserts=[],this._changes=[],this._removes=[]}insert(b){this._hasPending=!0,this._inserts.push(b)}change(b){this._hasPending=!0,this._changes.push(b)}remove(b){this._hasPending=!0,this._removes.push(b)}mustCommit(){return this._hasPending}commit(b){if(!this._hasPending)return;const p=this._inserts,h=this._changes,g=this._removes;this._hasPending=!1,this._inserts=[],this._changes=[],this._removes=[],b._commitPendingChanges(p,h,g)}}class D{constructor(b,p,h,g,t){this.id=b,this.afterLineNumber=p,this.ordinal=h,this.height=g,this.minWidth=t,this.prefixSum=0}}e.EditorWhitespace=D;class I{constructor(b,p,h,g){this._instanceId=y.singleLetterHash(++I.INSTANCE_COUNT),this._pendingChanges=new m,this._lastWhitespaceId=0,this._arr=[],this._prefixSumValidIndex=-1,this._minWidth=-1,this._lineCount=b,this._lineHeight=p,this._paddingTop=h,this._paddingBottom=g}static findInsertionIndex(b,p,h){let g=0,t=b.length;for(;g<t;){const i=g+t>>>1;p===b[i].afterLineNumber?h<b[i].ordinal?t=i:g=i+1:p<b[i].afterLineNumber?t=i:g=i+1}return g}setLineHeight(b){this._checkPendingChanges(),this._lineHeight=b}setPadding(b,p){this._paddingTop=b,this._paddingBottom=p}onFlushed(b){this._checkPendingChanges(),this._lineCount=b}changeWhitespace(b){let p=!1;try{b({insertWhitespace:(g,t,i,n)=>{p=!0,g=g|0,t=t|0,i=i|0,n=n|0;const l=this._instanceId+ ++this._lastWhitespaceId;return this._pendingChanges.insert(new D(l,g,t,i,n)),l},changeOneWhitespace:(g,t,i)=>{p=!0,t=t|0,i=i|0,this._pendingChanges.change({id:g,newAfterLineNumber:t,newHeight:i})},removeWhitespace:g=>{p=!0,this._pendingChanges.remove({id:g})}})}finally{this._pendingChanges.commit(this)}return p}_commitPendingChanges(b,p,h){if((b.length>0||h.length>0)&&(this._minWidth=-1),b.length+p.length+h.length<=1){for(const l of b)this._insertWhitespace(l);for(const l of p)this._changeOneWhitespace(l.id,l.newAfterLineNumber,l.newHeight);for(const l of h){const c=this._findWhitespaceIndex(l.id);c!==-1&&this._removeWhitespace(c)}return}const g=new Set;for(const l of h)g.add(l.id);const t=new Map;for(const l of p)t.set(l.id,l);const i=l=>{const c=[];for(const r of l)if(!g.has(r.id)){if(t.has(r.id)){const s=t.get(r.id);r.afterLineNumber=s.newAfterLineNumber,r.height=s.newHeight}c.push(r)}return c},n=i(this._arr).concat(i(b));n.sort((l,c)=>l.afterLineNumber===c.afterLineNumber?l.ordinal-c.ordinal:l.afterLineNumber-c.afterLineNumber),this._arr=n,this._prefixSumValidIndex=-1}_checkPendingChanges(){this._pendingChanges.mustCommit()&&this._pendingChanges.commit(this)}_insertWhitespace(b){const p=I.findInsertionIndex(this._arr,b.afterLineNumber,b.ordinal);this._arr.splice(p,0,b),this._prefixSumValidIndex=Math.min(this._prefixSumValidIndex,p-1)}_findWhitespaceIndex(b){const p=this._arr;for(let h=0,g=p.length;h<g;h++)if(p[h].id===b)return h;return-1}_changeOneWhitespace(b,p,h){const g=this._findWhitespaceIndex(b);if(g!==-1&&(this._arr[g].height!==h&&(this._arr[g].height=h,this._prefixSumValidIndex=Math.min(this._prefixSumValidIndex,g-1)),this._arr[g].afterLineNumber!==p)){const t=this._arr[g];this._removeWhitespace(g),t.afterLineNumber=p,this._insertWhitespace(t)}}_removeWhitespace(b){this._arr.splice(b,1),this._prefixSumValidIndex=Math.min(this._prefixSumValidIndex,b-1)}onLinesDeleted(b,p){this._checkPendingChanges(),b=b|0,p=p|0,this._lineCount-=p-b+1;for(let h=0,g=this._arr.length;h<g;h++){const t=this._arr[h].afterLineNumber;b<=t&&t<=p?this._arr[h].afterLineNumber=b-1:t>p&&(this._arr[h].afterLineNumber-=p-b+1)}}onLinesInserted(b,p){this._checkPendingChanges(),b=b|0,p=p|0,this._lineCount+=p-b+1;for(let h=0,g=this._arr.length;h<g;h++){const t=this._arr[h].afterLineNumber;b<=t&&(this._arr[h].afterLineNumber+=p-b+1)}}getWhitespacesTotalHeight(){return this._checkPendingChanges(),this._arr.length===0?0:this.getWhitespacesAccumulatedHeight(this._arr.length-1)}getWhitespacesAccumulatedHeight(b){this._checkPendingChanges(),b=b|0;let p=Math.max(0,this._prefixSumValidIndex+1);p===0&&(this._arr[0].prefixSum=this._arr[0].height,p++);for(let h=p;h<=b;h++)this._arr[h].prefixSum=this._arr[h-1].prefixSum+this._arr[h].height;return this._prefixSumValidIndex=Math.max(this._prefixSumValidIndex,b),this._arr[b].prefixSum}getLinesTotalHeight(){this._checkPendingChanges();const b=this._lineHeight*this._lineCount,p=this.getWhitespacesTotalHeight();return b+p+this._paddingTop+this._paddingBottom}getWhitespaceAccumulatedHeightBeforeLineNumber(b){this._checkPendingChanges(),b=b|0;const p=this._findLastWhitespaceBeforeLineNumber(b);return p===-1?0:this.getWhitespacesAccumulatedHeight(p)}_findLastWhitespaceBeforeLineNumber(b){b=b|0;const p=this._arr;let h=0,g=p.length-1;for(;h<=g;){const i=(g-h|0)/2|0,n=h+i|0;if(p[n].afterLineNumber<b){if(n+1>=p.length||p[n+1].afterLineNumber>=b)return n;h=n+1|0}else g=n-1|0}return-1}_findFirstWhitespaceAfterLineNumber(b){b=b|0;const h=this._findLastWhitespaceBeforeLineNumber(b)+1;return h<this._arr.length?h:-1}getFirstWhitespaceIndexAfterLineNumber(b){return this._checkPendingChanges(),b=b|0,this._findFirstWhitespaceAfterLineNumber(b)}getVerticalOffsetForLineNumber(b){this._checkPendingChanges(),b=b|0;let p;b>1?p=this._lineHeight*(b-1):p=0;const h=this.getWhitespaceAccumulatedHeightBeforeLineNumber(b);return p+h+this._paddingTop}getWhitespaceMinWidth(){if(this._checkPendingChanges(),this._minWidth===-1){let b=0;for(let p=0,h=this._arr.length;p<h;p++)b=Math.max(b,this._arr[p].minWidth);this._minWidth=b}return this._minWidth}isAfterLines(b){this._checkPendingChanges();const p=this.getLinesTotalHeight();return b>p}isInTopPadding(b){return this._paddingTop===0?!1:(this._checkPendingChanges(),b<this._paddingTop)}isInBottomPadding(b){if(this._paddingBottom===0)return!1;this._checkPendingChanges();const p=this.getLinesTotalHeight();return b>=p-this._paddingBottom}getLineNumberAtOrAfterVerticalOffset(b){if(this._checkPendingChanges(),b=b|0,b<0)return 1;const p=this._lineCount|0,h=this._lineHeight;let g=1,t=p;for(;g<t;){const i=(g+t)/2|0,n=this.getVerticalOffsetForLineNumber(i)|0;if(b>=n+h)g=i+1;else{if(b>=n)return i;t=i}}return g>p?p:g}getLinesViewportData(b,p){this._checkPendingChanges(),b=b|0,p=p|0;const h=this._lineHeight,g=this.getLineNumberAtOrAfterVerticalOffset(b)|0,t=this.getVerticalOffsetForLineNumber(g)|0;let i=this._lineCount|0,n=this.getFirstWhitespaceIndexAfterLineNumber(g)|0;const l=this.getWhitespacesCount()|0;let c,r;n===-1?(n=l,r=i+1,c=0):(r=this.getAfterLineNumberForWhitespaceIndex(n)|0,c=this.getHeightForWhitespaceIndex(n)|0);let s=t,o=s;const a=5e5;let d=0;t>=a&&(d=Math.floor(t/a)*a,d=Math.floor(d/h)*h,o-=d);const u=[],f=b+(p-b)/2;let S=-1;for(let L=g;L<=i;L++){if(S===-1){const E=s,N=s+h;(E<=f&&f<N||E>f)&&(S=L)}for(s+=h,u[L-g]=o,o+=h;r===L;)o+=c,s+=c,n++,n>=l?r=i+1:(r=this.getAfterLineNumberForWhitespaceIndex(n)|0,c=this.getHeightForWhitespaceIndex(n)|0);if(s>=p){i=L;break}}S===-1&&(S=i);const v=this.getVerticalOffsetForLineNumber(i)|0;let C=g,_=i;return C<_&&t<b&&C++,C<_&&v+h>p&&_--,{bigNumbersDelta:d,startLineNumber:g,endLineNumber:i,relativeVerticalOffset:u,centeredLineNumber:S,completelyVisibleStartLineNumber:C,completelyVisibleEndLineNumber:_}}getVerticalOffsetForWhitespaceIndex(b){this._checkPendingChanges(),b=b|0;const p=this.getAfterLineNumberForWhitespaceIndex(b);let h;p>=1?h=this._lineHeight*p:h=0;let g;return b>0?g=this.getWhitespacesAccumulatedHeight(b-1):g=0,h+g+this._paddingTop}getWhitespaceIndexAtOrAfterVerticallOffset(b){this._checkPendingChanges(),b=b|0;let p=0,h=this.getWhitespacesCount()-1;if(h<0)return-1;const g=this.getVerticalOffsetForWhitespaceIndex(h),t=this.getHeightForWhitespaceIndex(h);if(b>=g+t)return-1;for(;p<h;){const i=Math.floor((p+h)/2),n=this.getVerticalOffsetForWhitespaceIndex(i),l=this.getHeightForWhitespaceIndex(i);if(b>=n+l)p=i+1;else{if(b>=n)return i;h=i}}return p}getWhitespaceAtVerticalOffset(b){this._checkPendingChanges(),b=b|0;const p=this.getWhitespaceIndexAtOrAfterVerticallOffset(b);if(p<0||p>=this.getWhitespacesCount())return null;const h=this.getVerticalOffsetForWhitespaceIndex(p);if(h>b)return null;const g=this.getHeightForWhitespaceIndex(p),t=this.getIdForWhitespaceIndex(p),i=this.getAfterLineNumberForWhitespaceIndex(p);return{id:t,afterLineNumber:i,verticalOffset:h,height:g}}getWhitespaceViewportData(b,p){this._checkPendingChanges(),b=b|0,p=p|0;const h=this.getWhitespaceIndexAtOrAfterVerticallOffset(b),g=this.getWhitespacesCount()-1;if(h<0)return[];const t=[];for(let i=h;i<=g;i++){const n=this.getVerticalOffsetForWhitespaceIndex(i),l=this.getHeightForWhitespaceIndex(i);if(n>=p)break;t.push({id:this.getIdForWhitespaceIndex(i),afterLineNumber:this.getAfterLineNumberForWhitespaceIndex(i),verticalOffset:n,height:l})}return t}getWhitespaces(){return this._checkPendingChanges(),this._arr.slice(0)}getWhitespacesCount(){return this._checkPendingChanges(),this._arr.length}getIdForWhitespaceIndex(b){return this._checkPendingChanges(),b=b|0,this._arr[b].id}getAfterLineNumberForWhitespaceIndex(b){return this._checkPendingChanges(),b=b|0,this._arr[b].afterLineNumber}getHeightForWhitespaceIndex(b){return this._checkPendingChanges(),b=b|0,this._arr[b].height}}e.LinesLayout=I,I.INSTANCE_COUNT=0}),define(te[122],ie([1,0,8,90,151]),function(j,e,y,m,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.renderViewLine2=e.RenderLineOutput2=e.renderViewLine=e.RenderLineOutput=e.CharacterMapping=e.DomPosition=e.RenderLineInput=e.LineRange=void 0;class I{constructor(C,_,L){this._linePartBrand=void 0,this.endIndex=C,this.type=_,this.metadata=L}isWhitespace(){return!!(this.metadata&1)}isPseudoAfter(){return!!(this.metadata&4)}}class w{constructor(C,_){this.startOffset=C,this.endOffset=_}equals(C){return this.startOffset===C.startOffset&&this.endOffset===C.endOffset}}e.LineRange=w;class b{constructor(C,_,L,E,N,k,M,O,B,T,R,P,F,W,A,H,q,X,G){this.useMonospaceOptimizations=C,this.canUseHalfwidthRightwardsArrow=_,this.lineContent=L,this.continuesWithWrappedLine=E,this.isBasicASCII=N,this.containsRTL=k,this.fauxIndentLength=M,this.lineTokens=O,this.lineDecorations=B.sort(D.LineDecoration.compare),this.tabSize=T,this.startVisibleColumn=R,this.spaceWidth=P,this.stopRenderingLineAfter=A,this.renderWhitespace=H==="all"?4:H==="boundary"?1:H==="selection"?2:H==="trailing"?3:0,this.renderControlCharacters=q,this.fontLigatures=X,this.selectionsOnLine=G&&G.sort((oe,Z)=>oe.startOffset<Z.startOffset?-1:1);const re=Math.abs(W-P),ae=Math.abs(F-P);re<ae?(this.renderSpaceWidth=W,this.renderSpaceCharCode=11825):(this.renderSpaceWidth=F,this.renderSpaceCharCode=183)}sameSelection(C){if(this.selectionsOnLine===null)return C===null;if(C===null||C.length!==this.selectionsOnLine.length)return!1;for(let _=0;_<this.selectionsOnLine.length;_++)if(!this.selectionsOnLine[_].equals(C[_]))return!1;return!0}equals(C){return this.useMonospaceOptimizations===C.useMonospaceOptimizations&&this.canUseHalfwidthRightwardsArrow===C.canUseHalfwidthRightwardsArrow&&this.lineContent===C.lineContent&&this.continuesWithWrappedLine===C.continuesWithWrappedLine&&this.isBasicASCII===C.isBasicASCII&&this.containsRTL===C.containsRTL&&this.fauxIndentLength===C.fauxIndentLength&&this.tabSize===C.tabSize&&this.startVisibleColumn===C.startVisibleColumn&&this.spaceWidth===C.spaceWidth&&this.renderSpaceWidth===C.renderSpaceWidth&&this.renderSpaceCharCode===C.renderSpaceCharCode&&this.stopRenderingLineAfter===C.stopRenderingLineAfter&&this.renderWhitespace===C.renderWhitespace&&this.renderControlCharacters===C.renderControlCharacters&&this.fontLigatures===C.fontLigatures&&D.LineDecoration.equalsArr(this.lineDecorations,C.lineDecorations)&&this.lineTokens.equals(C.lineTokens)&&this.sameSelection(C.selectionsOnLine)}}e.RenderLineInput=b;class p{constructor(C,_){this.partIndex=C,this.charIndex=_}}e.DomPosition=p;class h{constructor(C,_){this.length=C,this._data=new Uint32Array(this.length),this._absoluteOffsets=new Uint32Array(this.length)}static getPartIndex(C){return(C&4294901760)>>>16}static getCharIndex(C){return(C&65535)>>>0}setColumnInfo(C,_,L,E){const N=(_<<16|L<<0)>>>0;this._data[C-1]=N,this._absoluteOffsets[C-1]=E+L}getAbsoluteOffset(C){return this._absoluteOffsets.length===0?0:this._absoluteOffsets[C-1]}charOffsetToPartData(C){return this.length===0?0:C<0?this._data[0]:C>=this.length?this._data[this.length-1]:this._data[C]}getDomPosition(C){const _=this.charOffsetToPartData(C-1),L=h.getPartIndex(_),E=h.getCharIndex(_);return new p(L,E)}getColumn(C,_){return this.partDataToCharOffset(C.partIndex,_,C.charIndex)+1}partDataToCharOffset(C,_,L){if(this.length===0)return 0;const E=(C<<16|L<<0)>>>0;let N=0,k=this.length-1;for(;N+1<k;){const A=N+k>>>1,H=this._data[A];if(H===E)return A;H>E?k=A:N=A}if(N===k)return N;const M=this._data[N],O=this._data[k];if(M===E)return N;if(O===E)return k;const B=h.getPartIndex(M),T=h.getCharIndex(M),R=h.getPartIndex(O);let P;B!==R?P=_:P=h.getCharIndex(O);const F=L-T,W=P-L;return F<=W?N:k}}e.CharacterMapping=h;class g{constructor(C,_,L){this._renderLineOutputBrand=void 0,this.characterMapping=C,this.containsRTL=_,this.containsForeignElements=L}}e.RenderLineOutput=g;function t(v,C){if(v.lineContent.length===0){if(v.lineDecorations.length>0){C.appendASCIIString("<span>");let _=0,L=0,E=0;for(const k of v.lineDecorations)(k.type===1||k.type===2)&&(C.appendASCIIString('<span class="'),C.appendASCIIString(k.className),C.appendASCIIString('"></span>'),k.type===1&&(E|=1,_++),k.type===2&&(E|=2,L++));C.appendASCIIString("</span>");const N=new h(1,_+L);return N.setColumnInfo(1,_,0,0),new g(N,!1,E)}return C.appendASCIIString("<span><span></span></span>"),new g(new h(0,0),!1,0)}return f(c(v),C)}e.renderViewLine=t;class i{constructor(C,_,L,E){this.characterMapping=C,this.html=_,this.containsRTL=L,this.containsForeignElements=E}}e.RenderLineOutput2=i;function n(v){const C=(0,m.createStringBuilder)(1e4),_=t(v,C);return new i(_.characterMapping,C.build(),_.containsRTL,_.containsForeignElements)}e.renderViewLine2=n;class l{constructor(C,_,L,E,N,k,M,O,B,T,R,P,F,W,A){this.fontIsMonospace=C,this.canUseHalfwidthRightwardsArrow=_,this.lineContent=L,this.len=E,this.isOverflowing=N,this.parts=k,this.containsForeignElements=M,this.fauxIndentLength=O,this.tabSize=B,this.startVisibleColumn=T,this.containsRTL=R,this.spaceWidth=P,this.renderSpaceCharCode=F,this.renderWhitespace=W,this.renderControlCharacters=A}}function c(v){const C=v.lineContent;let _,L;v.stopRenderingLineAfter!==-1&&v.stopRenderingLineAfter<C.length?(_=!0,L=v.stopRenderingLineAfter):(_=!1,L=C.length);let E=r(v.lineTokens,v.fauxIndentLength,L);v.renderControlCharacters&&!v.isBasicASCII&&(E=a(C,E)),(v.renderWhitespace===4||v.renderWhitespace===1||v.renderWhitespace===2&&!!v.selectionsOnLine||v.renderWhitespace===3)&&(E=d(v,C,L,E));let N=0;if(v.lineDecorations.length>0){for(let k=0,M=v.lineDecorations.length;k<M;k++){const O=v.lineDecorations[k];O.type===3||O.type===1?N|=1:O.type===2&&(N|=2)}E=u(C,L,E,v.lineDecorations)}return v.containsRTL||(E=s(C,E,!v.isBasicASCII||v.fontLigatures)),new l(v.useMonospaceOptimizations,v.canUseHalfwidthRightwardsArrow,C,L,_,E,N,v.fauxIndentLength,v.tabSize,v.startVisibleColumn,v.containsRTL,v.spaceWidth,v.renderSpaceCharCode,v.renderWhitespace,v.renderControlCharacters)}function r(v,C,_){const L=[];let E=0;C>0&&(L[E++]=new I(C,"",0));for(let N=0,k=v.getCount();N<k;N++){const M=v.getEndOffset(N);if(M<=C)continue;const O=v.getClassName(N);if(M>=_){L[E++]=new I(_,O,0);break}L[E++]=new I(M,O,0)}return L}function s(v,C,_){let L=0;const E=[];let N=0;if(_)for(let k=0,M=C.length;k<M;k++){const O=C[k],B=O.endIndex;if(L+50<B){const T=O.type,R=O.metadata;let P=-1,F=L;for(let W=L;W<B;W++)v.charCodeAt(W)===32&&(P=W),P!==-1&&W-F>=50&&(E[N++]=new I(P+1,T,R),F=P+1,P=-1);F!==B&&(E[N++]=new I(B,T,R))}else E[N++]=O;L=B}else for(let k=0,M=C.length;k<M;k++){const O=C[k],B=O.endIndex,T=B-L;if(T>50){const R=O.type,P=O.metadata,F=Math.ceil(T/50);for(let W=1;W<F;W++){const A=L+W*50;E[N++]=new I(A,R,P)}E[N++]=new I(B,R,P)}else E[N++]=O;L=B}return E}function o(v){return v<32?v!==9:v===127||v>=8234&&v<=8238||v>=8294&&v<=8297||v>=8206&&v<=8207||v===1564}function a(v,C){const _=[];let L=new I(0,"",0),E=0;for(const N of C){const k=N.endIndex;for(;E<k;E++){const M=v.charCodeAt(E);o(M)&&(E>L.endIndex&&(L=new I(E,N.type,N.metadata),_.push(L)),L=new I(E+1,"mtkcontrol",N.metadata),_.push(L))}E>L.endIndex&&(L=new I(k,N.type,N.metadata),_.push(L))}return _}function d(v,C,_,L){const E=v.continuesWithWrappedLine,N=v.fauxIndentLength,k=v.tabSize,M=v.startVisibleColumn,O=v.useMonospaceOptimizations,B=v.selectionsOnLine,T=v.renderWhitespace===1,R=v.renderWhitespace===3,P=v.renderSpaceWidth!==v.spaceWidth,F=[];let W=0,A=0,H=L[A].type,q=L[A].endIndex;const X=L.length;let G=!1,re=y.firstNonWhitespaceIndex(C),ae;re===-1?(G=!0,re=_,ae=_):ae=y.lastNonWhitespaceIndex(C);let oe=!1,Z=0,x=B&&B[Z],U=M%k;for(let ne=N;ne<_;ne++){const ce=C.charCodeAt(ne);x&&ne>=x.endOffset&&(Z++,x=B&&B[Z]);let ee;if(ne<re||ne>ae)ee=!0;else if(ce===9)ee=!0;else if(ce===32)if(T)if(oe)ee=!0;else{const ue=ne+1<_?C.charCodeAt(ne+1):0;ee=ue===32||ue===9}else ee=!0;else ee=!1;if(ee&&B&&(ee=!!x&&x.startOffset<=ne&&x.endOffset>ne),ee&&R&&(ee=G||ne>ae),oe){if(!ee||!O&&U>=k){if(P){const ue=W>0?F[W-1].endIndex:N;for(let z=ue+1;z<=ne;z++)F[W++]=new I(z,"mtkw",1)}else F[W++]=new I(ne,"mtkw",1);U=U%k}}else(ne===q||ee&&ne>N)&&(F[W++]=new I(ne,H,0),U=U%k);for(ce===9?U=k:y.isFullWidthCharacter(ce)?U+=2:U++,oe=ee;ne===q&&(A++,A<X);)H=L[A].type,q=L[A].endIndex}let Q=!1;if(oe)if(E&&T){const ne=_>0?C.charCodeAt(_-1):0,ce=_>1?C.charCodeAt(_-2):0;ne===32&&ce!==32&&ce!==9||(Q=!0)}else Q=!0;if(Q)if(P){const ne=W>0?F[W-1].endIndex:N;for(let ce=ne+1;ce<=_;ce++)F[W++]=new I(ce,"mtkw",1)}else F[W++]=new I(_,"mtkw",1);else F[W++]=new I(_,H,0);return F}function u(v,C,_,L){L.sort(D.LineDecoration.compare);const E=D.LineDecorationsNormalizer.normalize(v,L),N=E.length;let k=0;const M=[];let O=0,B=0;for(let R=0,P=_.length;R<P;R++){const F=_[R],W=F.endIndex,A=F.type,H=F.metadata;for(;k<N&&E[k].startOffset<W;){const q=E[k];if(q.startOffset>B&&(B=q.startOffset,M[O++]=new I(B,A,H)),q.endOffset+1<=W)B=q.endOffset+1,M[O++]=new I(B,A+" "+q.className,H|q.metadata),k++;else{B=W,M[O++]=new I(B,A+" "+q.className,H|q.metadata);break}}W>B&&(B=W,M[O++]=new I(B,A,H))}const T=_[_.length-1].endIndex;if(k<N&&E[k].startOffset===T)for(;k<N&&E[k].startOffset===T;){const R=E[k];M[O++]=new I(B,R.className,R.metadata),k++}return M}function f(v,C){const _=v.fontIsMonospace,L=v.canUseHalfwidthRightwardsArrow,E=v.containsForeignElements,N=v.lineContent,k=v.len,M=v.isOverflowing,O=v.parts,B=v.fauxIndentLength,T=v.tabSize,R=v.startVisibleColumn,P=v.containsRTL,F=v.spaceWidth,W=v.renderSpaceCharCode,A=v.renderWhitespace,H=v.renderControlCharacters,q=new h(k+1,O.length);let X=!1,G=0,re=R,ae=0,oe=0,Z=0,x=0;P?C.appendASCIIString('<span dir="ltr">'):C.appendASCIIString("<span>");for(let U=0,Q=O.length;U<Q;U++){x+=Z;const ne=O[U],ce=ne.endIndex,ee=ne.type,ue=A!==0&&ne.isWhitespace(),z=ue&&!_&&(ee==="mtkw"||!E),V=G===ce&&ne.isPseudoAfter();if(ae=0,C.appendASCIIString('<span class="'),C.appendASCIIString(z?"mtkz":ee),C.appendASCII(34),ue){let $=0;{let K=G,J=re;for(;K<ce;K++){const se=(N.charCodeAt(K)===9?T-J%T:1)|0;$+=se,K>=B&&(J+=se)}}for(z&&(C.appendASCIIString(' style="width:'),C.appendASCIIString(String(F*$)),C.appendASCIIString('px"')),C.appendASCII(62);G<ce;G++){q.setColumnInfo(G+1,U-oe,ae,x),oe=0;const K=N.charCodeAt(G);let J;if(K===9){J=T-re%T|0,!L||J>1?C.write1(8594):C.write1(65515);for(let Y=2;Y<=J;Y++)C.write1(160)}else J=1,C.write1(W);ae+=J,G>=B&&(re+=J)}Z=$}else{let $=0;for(C.appendASCII(62);G<ce;G++){q.setColumnInfo(G+1,U-oe,ae,x),oe=0;const K=N.charCodeAt(G);let J=1,Y=1;switch(K){case 9:J=T-re%T,Y=J;for(let se=1;se<=J;se++)C.write1(160);break;case 32:C.write1(160);break;case 60:C.appendASCIIString("<");break;case 62:C.appendASCIIString(">");break;case 38:C.appendASCIIString("&");break;case 0:H?C.write1(9216):C.appendASCIIString("�");break;case 65279:case 8232:case 8233:case 133:C.write1(65533);break;default:y.isFullWidthCharacter(K)&&Y++,H&&K<32?C.write1(9216+K):H&&K===127?C.write1(9249):H&&o(K)?(C.appendASCIIString("[U+"),C.appendASCIIString(S(K)),C.appendASCIIString("]"),J=8):C.write1(K)}ae+=J,$+=J,G>=B&&(re+=Y)}Z=$}V?oe++:oe=0,G>=k&&!X&&ne.isPseudoAfter()&&(X=!0,q.setColumnInfo(G+1,U,ae,x)),C.appendASCIIString("</span>")}return X||q.setColumnInfo(k+1,O.length-1,ae,x),M&&C.appendASCIIString("<span>…</span>"),C.appendASCIIString("</span>"),new g(q,P,E)}function S(v){return v.toString(16).toUpperCase().padStart(4,"0")}}),define(te[438],ie([1,0,3]),function(j,e,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ViewportData=void 0;class m{constructor(I,w,b,p){this.selections=I,this.startLineNumber=w.startLineNumber|0,this.endLineNumber=w.endLineNumber|0,this.relativeVerticalOffset=w.relativeVerticalOffset,this.bigNumbersDelta=w.bigNumbersDelta|0,this.whitespaceViewportData=b,this._model=p,this.visibleRange=new y.Range(w.startLineNumber,this._model.getLineMinColumn(w.startLineNumber),w.endLineNumber,this._model.getLineMaxColumn(w.endLineNumber))}getViewLineRenderingData(I){return this._model.getViewLineRenderingData(this.visibleRange,I)}getDecorationsInViewport(){return this._model.getDecorationsInViewport(this.visibleRange)}}e.ViewportData=m}),define(te[250],ie([1,0,4,2,236,18]),function(j,e,y,m,D,I){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MinimapTokensColorTracker=void 0;class w extends m.Disposable{constructor(){super();this._onDidChange=new y.Emitter,this.onDidChange=this._onDidChange.event,this._updateColorMap(),this._register(I.TokenizationRegistry.onDidChange(p=>{p.changedColorMap&&this._updateColorMap()}))}static getInstance(){return this._INSTANCE||(this._INSTANCE=(0,m.markAsSingleton)(new w)),this._INSTANCE}_updateColorMap(){const p=I.TokenizationRegistry.getColorMap();if(!p){this._colors=[D.RGBA8.Empty],this._backgroundIsLight=!0;return}this._colors=[D.RGBA8.Empty];for(let g=1;g<p.length;g++){const t=p[g].rgba;this._colors[g]=new D.RGBA8(t.r,t.g,t.b,Math.round(t.a*255))}const h=p[2].getRelativeLuminance();this._backgroundIsLight=h>=.5,this._onDidChange.fire(void 0)}getColor(p){return(p<1||p>=this._colors.length)&&(p=2),this._colors[p]}backgroundIsLight(){return this._backgroundIsLight}}e.MinimapTokensColorTracker=w,w._INSTANCE=null}),define(te[251],ie([1,0,20,11,49]),function(j,e,y,m,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.OutputPosition=e.InjectedText=e.ModelLineProjectionData=void 0;class I{constructor(t,i,n,l,c){this.injectionOffsets=t,this.injectionOptions=i,this.breakOffsets=n,this.breakOffsetsVisibleColumn=l,this.wrappedTextIndentLength=c}getOutputLineCount(){return this.breakOffsets.length}getMinOutputOffset(t){return t>0?this.wrappedTextIndentLength:0}getLineLength(t){const i=t>0?this.breakOffsets[t-1]:0;let l=this.breakOffsets[t]-i;return t>0&&(l+=this.wrappedTextIndentLength),l}getMaxOutputOffset(t){return this.getLineLength(t)}translateToInputOffset(t,i){t>0&&(i=Math.max(0,i-this.wrappedTextIndentLength));let l=t===0?i:this.breakOffsets[t-1]+i;if(this.injectionOffsets!==null)for(let c=0;c<this.injectionOffsets.length&&l>this.injectionOffsets[c];c++)l<this.injectionOffsets[c]+this.injectionOptions[c].content.length?l=this.injectionOffsets[c]:l-=this.injectionOptions[c].content.length;return l}translateToOutputPosition(t,i=2){let n=t;if(this.injectionOffsets!==null)for(let l=0;l<this.injectionOffsets.length&&!(t<this.injectionOffsets[l]||i!==1&&t===this.injectionOffsets[l]);l++)n+=this.injectionOptions[l].content.length;return this.offsetInInputWithInjectionsToOutputPosition(n,i)}offsetInInputWithInjectionsToOutputPosition(t,i=2){let n=0,l=this.breakOffsets.length-1,c=0,r=0;for(;n<=l;){c=n+(l-n)/2|0;const o=this.breakOffsets[c];if(r=c>0?this.breakOffsets[c-1]:0,i===0)if(t<=r)l=c-1;else if(t>o)n=c+1;else break;else if(t<r)l=c-1;else if(t>=o)n=c+1;else break}let s=t-r;return c>0&&(s+=this.wrappedTextIndentLength),new h(c,s)}normalizeOutputPosition(t,i,n){if(this.injectionOffsets!==null){const l=this.outputPositionToOffsetInInputWithInjections(t,i),c=this.normalizeOffsetInInputWithInjectionsAroundInjections(l,n);if(c!==l)return this.offsetInInputWithInjectionsToOutputPosition(c,n)}if(n===0){if(t>0&&i===this.getMinOutputOffset(t))return new h(t-1,this.getMaxOutputOffset(t-1))}else if(n===1){const l=this.getOutputLineCount()-1;if(t<l&&i===this.getMaxOutputOffset(t))return new h(t+1,this.getMinOutputOffset(t+1))}return new h(t,i)}outputPositionToOffsetInInputWithInjections(t,i){return t>0&&(i=Math.max(0,i-this.wrappedTextIndentLength)),(t>0?this.breakOffsets[t-1]:0)+i}normalizeOffsetInInputWithInjectionsAroundInjections(t,i){const n=this.getInjectedTextAtOffset(t);if(!n)return t;if(i===2){if(t===n.offsetInInputWithInjections+n.length&&w(this.injectionOptions[n.injectedTextIndex].cursorStops))return n.offsetInInputWithInjections+n.length;{let l=n.offsetInInputWithInjections;if(b(this.injectionOptions[n.injectedTextIndex].cursorStops))return l;let c=n.injectedTextIndex-1;for(;c>=0&&this.injectionOffsets[c]===this.injectionOffsets[n.injectedTextIndex]&&!(w(this.injectionOptions[c].cursorStops)||(l-=this.injectionOptions[c].content.length,b(this.injectionOptions[c].cursorStops)));)c--;return l}}else if(i===1){let l=n.offsetInInputWithInjections+n.length,c=n.injectedTextIndex;for(;c+1<this.injectionOffsets.length&&this.injectionOffsets[c+1]===this.injectionOffsets[c];)l+=this.injectionOptions[c+1].content.length,c++;return l}else if(i===0){let l=n.offsetInInputWithInjections,c=n.injectedTextIndex;for(;c-1>=0&&this.injectionOffsets[c-1]===this.injectionOffsets[c];)l-=this.injectionOptions[c-1].content.length,c--;return l}(0,y.assertNever)(i)}getInjectedText(t,i){const n=this.outputPositionToOffsetInInputWithInjections(t,i),l=this.getInjectedTextAtOffset(n);return l?{options:this.injectionOptions[l.injectedTextIndex]}:null}getInjectedTextAtOffset(t){const i=this.injectionOffsets,n=this.injectionOptions;if(i!==null){let l=0;for(let c=0;c<i.length;c++){const r=n[c].content.length,s=i[c]+l,o=i[c]+l+r;if(s>t)break;if(t<=o)return{injectedTextIndex:c,offsetInInputWithInjections:s,length:r};l+=r}}}}e.ModelLineProjectionData=I;function w(g){return g==null?!0:g===D.InjectedTextCursorStops.Right||g===D.InjectedTextCursorStops.Both}function b(g){return g==null?!0:g===D.InjectedTextCursorStops.Left||g===D.InjectedTextCursorStops.Both}class p{constructor(t){this.options=t}}e.InjectedText=p;class h{constructor(t,i){this.outputLineIndex=t,this.outputOffset=i}toString(){return`${this.outputLineIndex}:${this.outputOffset}`}toPosition(t){return new m.Position(t+this.outputLineIndex,this.outputOffset+1)}}e.OutputPosition=h}),define(te[439],ie([1,0,8,97,91,251]),function(j,e,y,m,D,I){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MonospaceLineBreaksComputerFactory=void 0;class w{constructor(s,o){this.classifier=new b(s,o)}static create(s){return new w(s.get(120),s.get(119))}createLineBreaksComputer(s,o,a,d){const u=[],f=[],S=[];return{addRequest:(v,C,_)=>{u.push(v),f.push(C),S.push(_)},finalize:()=>{const v=s.typicalFullwidthCharacterWidth/s.typicalHalfwidthCharacterWidth,C=[];for(let _=0,L=u.length;_<L;_++){const E=f[_],N=S[_];N&&!N.injectionOptions&&!E?C[_]=g(this.classifier,N,u[_],o,a,v,d):C[_]=t(this.classifier,u[_],E,o,a,v,d)}return p.length=0,h.length=0,C}}}}e.MonospaceLineBreaksComputerFactory=w;class b extends m.CharacterClassifier{constructor(s,o){super(0);for(let a=0;a<s.length;a++)this.set(s.charCodeAt(a),1);for(let a=0;a<o.length;a++)this.set(o.charCodeAt(a),2)}get(s){return s>=0&&s<256?this._asciiMap[s]:s>=12352&&s<=12543||s>=13312&&s<=19903||s>=19968&&s<=40959?3:this._map.get(s)||this._defaultValue}}let p=[],h=[];function g(r,s,o,a,d,u,f){if(d===-1)return null;const S=o.length;if(S<=1)return null;const v=s.breakOffsets,C=s.breakOffsetsVisibleColumn,_=c(o,a,d,u,f),L=d-_,E=p,N=h;let k=0,M=0,O=0,B=d;const T=v.length;let R=0;if(R>=0){let P=Math.abs(C[R]-B);for(;R+1<T;){const F=Math.abs(C[R+1]-B);if(F>=P)break;P=F,R++}}for(;R<T;){let P=R<0?0:v[R],F=R<0?0:C[R];M>P&&(P=M,F=O);let W=0,A=0,H=0,q=0;if(F<=B){let G=F,re=P===0?0:o.charCodeAt(P-1),ae=P===0?0:r.get(re),oe=!0;for(let Z=P;Z<S;Z++){const x=Z,U=o.charCodeAt(Z);let Q,ne;if(y.isHighSurrogate(U)?(Z++,Q=0,ne=2):(Q=r.get(U),ne=i(U,G,a,u)),x>M&&l(re,ae,U,Q)&&(W=x,A=G),G+=ne,G>B){x>M?(H=x,q=G-ne):(H=Z+1,q=G),G-A>L&&(W=0),oe=!1;break}re=U,ae=Q}if(oe){k>0&&(E[k]=v[v.length-1],N[k]=C[v.length-1],k++);break}}if(W===0){let G=F,re=o.charCodeAt(P),ae=r.get(re),oe=!1;for(let Z=P-1;Z>=M;Z--){const x=Z+1,U=o.charCodeAt(Z);if(U===9){oe=!0;break}let Q,ne;if(y.isLowSurrogate(U)?(Z--,Q=0,ne=2):(Q=r.get(U),ne=y.isFullWidthCharacter(U)?u:1),G<=B){if(H===0&&(H=x,q=G),G<=B-L)break;if(l(U,Q,re,ae)){W=x,A=G;break}}G-=ne,re=U,ae=Q}if(W!==0){const Z=L-(q-A);if(Z<=a){const x=o.charCodeAt(H);let U;y.isHighSurrogate(x)?U=2:U=i(x,q,a,u),Z-U<0&&(W=0)}}if(oe){R--;continue}}if(W===0&&(W=H,A=q),W<=M){const G=o.charCodeAt(M);y.isHighSurrogate(G)?(W=M+2,A=O+2):(W=M+1,A=O+i(G,O,a,u))}for(M=W,E[k]=W,O=A,N[k]=A,k++,B=A+L;R<0||R<T&&C[R]<A;)R++;let X=Math.abs(C[R]-B);for(;R+1<T;){const G=Math.abs(C[R+1]-B);if(G>=X)break;X=G,R++}}return k===0?null:(E.length=k,N.length=k,p=s.breakOffsets,h=s.breakOffsetsVisibleColumn,s.breakOffsets=E,s.breakOffsetsVisibleColumn=N,s.wrappedTextIndentLength=_,s)}function t(r,s,o,a,d,u,f){const S=D.LineInjectedText.applyInjectedText(s,o);let v,C;if(o&&o.length>0?(v=o.map(A=>A.options),C=o.map(A=>A.column-1)):(v=null,C=null),d===-1)return v?new I.ModelLineProjectionData(C,v,[S.length],[],0):null;const _=S.length;if(_<=1)return v?new I.ModelLineProjectionData(C,v,[S.length],[],0):null;const L=c(S,a,d,u,f),E=d-L,N=[],k=[];let M=0,O=0,B=0,T=d,R=S.charCodeAt(0),P=r.get(R),F=i(R,0,a,u),W=1;y.isHighSurrogate(R)&&(F+=1,R=S.charCodeAt(1),P=r.get(R),W++);for(let A=W;A<_;A++){const H=A,q=S.charCodeAt(A);let X,G;y.isHighSurrogate(q)?(A++,X=0,G=2):(X=r.get(q),G=i(q,F,a,u)),l(R,P,q,X)&&(O=H,B=F),F+=G,F>T&&((O===0||F-B>E)&&(O=H,B=F-G),N[M]=O,k[M]=B,M++,T=B+E,O=0),R=q,P=X}return M===0&&(!o||o.length===0)?null:(N[M]=_,k[M]=F,new I.ModelLineProjectionData(C,v,N,k,L))}function i(r,s,o,a){return r===9?o-s%o:y.isFullWidthCharacter(r)||r<32?a:1}function n(r,s){return s-r%s}function l(r,s,o,a){return o!==32&&(s===2||s===3&&a!==2||a===1||a===3&&s!==1)}function c(r,s,o,a,d){let u=0;if(d!==0){const f=y.firstNonWhitespaceIndex(r);if(f!==-1){for(let v=0;v<f;v++)u+=r.charCodeAt(v)===9?n(u,s):1;const S=d===3?2:d===2?1:0;for(let v=0;v<S;v++)u+=n(u,s);u+a>o&&(u=0)}}return u}}),define(te[252],ie([1,0]),function(j,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.OverviewZoneManager=e.OverviewRulerZone=e.ColorZone=void 0;class y{constructor(w,b,p){this._colorZoneBrand=void 0,this.from=w|0,this.to=b|0,this.colorId=p|0}static compare(w,b){return w.colorId===b.colorId?w.from===b.from?w.to-b.to:w.from-b.from:w.colorId-b.colorId}}e.ColorZone=y;class m{constructor(w,b,p){this._overviewRulerZoneBrand=void 0,this.startLineNumber=w,this.endLineNumber=b,this.color=p,this._colorZone=null}static compare(w,b){return w.color===b.color?w.startLineNumber===b.startLineNumber?w.endLineNumber-b.endLineNumber:w.startLineNumber-b.startLineNumber:w.color<b.color?-1:1}setColorZone(w){this._colorZone=w}getColorZones(){return this._colorZone}}e.OverviewRulerZone=m;class D{constructor(w){this._getVerticalOffsetForLine=w,this._zones=[],this._colorZonesInvalid=!1,this._lineHeight=0,this._domWidth=0,this._domHeight=0,this._outerHeight=0,this._pixelRatio=1,this._lastAssignedId=0,this._color2Id=Object.create(null),this._id2Color=[]}getId2Color(){return this._id2Color}setZones(w){this._zones=w,this._zones.sort(m.compare)}setLineHeight(w){return this._lineHeight===w?!1:(this._lineHeight=w,this._colorZonesInvalid=!0,!0)}setPixelRatio(w){this._pixelRatio=w,this._colorZonesInvalid=!0}getDOMWidth(){return this._domWidth}getCanvasWidth(){return this._domWidth*this._pixelRatio}setDOMWidth(w){return this._domWidth===w?!1:(this._domWidth=w,this._colorZonesInvalid=!0,!0)}getDOMHeight(){return this._domHeight}getCanvasHeight(){return this._domHeight*this._pixelRatio}setDOMHeight(w){return this._domHeight===w?!1:(this._domHeight=w,this._colorZonesInvalid=!0,!0)}getOuterHeight(){return this._outerHeight}setOuterHeight(w){return this._outerHeight===w?!1:(this._outerHeight=w,this._colorZonesInvalid=!0,!0)}resolveColorZones(){const w=this._colorZonesInvalid,b=Math.floor(this._lineHeight),p=Math.floor(this.getCanvasHeight()),h=Math.floor(this._outerHeight),g=p/h,t=Math.floor(4*this._pixelRatio/2),i=[];for(let n=0,l=this._zones.length;n<l;n++){const c=this._zones[n];if(!w){const S=c.getColorZones();if(S){i.push(S);continue}}const r=Math.floor(g*this._getVerticalOffsetForLine(c.startLineNumber)),s=Math.floor(g*(this._getVerticalOffsetForLine(c.endLineNumber)+b));let o=Math.floor((r+s)/2),a=s-o;a<t&&(a=t),o-a<0&&(o=a),o+a>p&&(o=p-a);const d=c.color;let u=this._color2Id[d];u||(u=++this._lastAssignedId,this._color2Id[d]=u,this._id2Color[u]=d);const f=new y(o-a,o+a,u);c.setColorZone(f),i.push(f)}return this._colorZonesInvalid=!1,i.sort(y.compare),i}}e.OverviewZoneManager=D}),define(te[440],ie([1,0]),function(j,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ViewContext=e.EditorTheme=void 0;class y{constructor(I){this._theme=I}get type(){return this._theme.type}get value(){return this._theme}update(I){this._theme=I}getColor(I){return this._theme.getColor(I)}}e.EditorTheme=y;class m{constructor(I,w,b){this.configuration=I,this.theme=new y(w),this.model=b,this.viewLayout=b.viewLayout}addEventHandler(I){this.model.addViewEventHandler(I)}removeEventHandler(I){this.model.removeViewEventHandler(I)}}e.ViewContext=m}),define(te[123],ie([1,0,2]),function(j,e,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ViewEventHandler=void 0;class m extends y.Disposable{constructor(){super();this._shouldRender=!0}shouldRender(){return this._shouldRender}forceShouldRender(){this._shouldRender=!0}setShouldRender(){this._shouldRender=!0}onDidRender(){this._shouldRender=!1}onCompositionStart(I){return!1}onCompositionEnd(I){return!1}onConfigurationChanged(I){return!1}onCursorStateChanged(I){return!1}onDecorationsChanged(I){return!1}onFlushed(I){return!1}onFocusChanged(I){return!1}onLanguageConfigurationChanged(I){return!1}onLineMappingChanged(I){return!1}onLinesChanged(I){return!1}onLinesDeleted(I){return!1}onLinesInserted(I){return!1}onRevealRangeRequest(I){return!1}onScrollChanged(I){return!1}onThemeChanged(I){return!1}onTokensChanged(I){return!1}onTokensColorsChanged(I){return!1}onZonesChanged(I){return!1}handleEvents(I){let w=!1;for(let b=0,p=I.length;b<p;b++){const h=I[b];switch(h.type){case 0:this.onCompositionStart(h)&&(w=!0);break;case 1:this.onCompositionEnd(h)&&(w=!0);break;case 2:this.onConfigurationChanged(h)&&(w=!0);break;case 3:this.onCursorStateChanged(h)&&(w=!0);break;case 4:this.onDecorationsChanged(h)&&(w=!0);break;case 5:this.onFlushed(h)&&(w=!0);break;case 6:this.onFocusChanged(h)&&(w=!0);break;case 7:this.onLanguageConfigurationChanged(h)&&(w=!0);break;case 8:this.onLineMappingChanged(h)&&(w=!0);break;case 9:this.onLinesChanged(h)&&(w=!0);break;case 10:this.onLinesDeleted(h)&&(w=!0);break;case 11:this.onLinesInserted(h)&&(w=!0);break;case 12:this.onRevealRangeRequest(h)&&(w=!0);break;case 13:this.onScrollChanged(h)&&(w=!0);break;case 15:this.onTokensChanged(h)&&(w=!0);break;case 14:this.onThemeChanged(h)&&(w=!0);break;case 16:this.onTokensColorsChanged(h)&&(w=!0);break;case 17:this.onZonesChanged(h)&&(w=!0);break;default:console.info("View received unknown event: "),console.info(h)}}w&&(this._shouldRender=!0)}}e.ViewEventHandler=m}),define(te[100],ie([1,0,123]),function(j,e,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DynamicViewOverlay=void 0;class m extends y.ViewEventHandler{}e.DynamicViewOverlay=m}),define(te[50],ie([1,0,123]),function(j,e,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.PartFingerprints=e.ViewPart=void 0;class m extends y.ViewEventHandler{constructor(w){super();this._context=w,this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),super.dispose()}}e.ViewPart=m;class D{static write(w,b){w.setAttribute("data-mprt",String(b))}static read(w){const b=w.getAttribute("data-mprt");return b===null?0:parseInt(b,10)}static collect(w,b){const p=[];let h=0;for(;w&&w!==document.body&&w!==b;)w.nodeType===w.ELEMENT_NODE&&(p[h++]=this.read(w)),w=w.parentElement;const g=new Uint8Array(h);for(let t=0;t<h;t++)g[t]=p[h-t-1];return g}}e.PartFingerprints=D}),define(te[441],ie([1,0,7,30,50]),function(j,e,y,m,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ViewContentWidgets=void 0;class I{constructor(g,t){this._coordinateBrand=void 0,this.top=g,this.left=t}}class w extends D.ViewPart{constructor(g,t){super(g);this._viewDomNode=t,this._widgets={},this.domNode=(0,m.createFastDomNode)(document.createElement("div")),D.PartFingerprints.write(this.domNode,1),this.domNode.setClassName("contentWidgets"),this.domNode.setPosition("absolute"),this.domNode.setTop(0),this.overflowingContentWidgetsDomNode=(0,m.createFastDomNode)(document.createElement("div")),D.PartFingerprints.write(this.overflowingContentWidgetsDomNode,2),this.overflowingContentWidgetsDomNode.setClassName("overflowingContentWidgets")}dispose(){super.dispose(),this._widgets={}}onConfigurationChanged(g){const t=Object.keys(this._widgets);for(const i of t)this._widgets[i].onConfigurationChanged(g);return!0}onDecorationsChanged(g){return!0}onFlushed(g){return!0}onLineMappingChanged(g){const t=Object.keys(this._widgets);for(const i of t)this._widgets[i].onLineMappingChanged(g);return!0}onLinesChanged(g){return!0}onLinesDeleted(g){return!0}onLinesInserted(g){return!0}onScrollChanged(g){return!0}onZonesChanged(g){return!0}addWidget(g){const t=new b(this._context,this._viewDomNode,g);this._widgets[t.id]=t,t.allowEditorOverflow?this.overflowingContentWidgetsDomNode.appendChild(t.domNode):this.domNode.appendChild(t.domNode),this.setShouldRender()}setWidgetPosition(g,t,i){this._widgets[g.getId()].setPosition(t,i),this.setShouldRender()}removeWidget(g){const t=g.getId();if(this._widgets.hasOwnProperty(t)){const i=this._widgets[t];delete this._widgets[t];const n=i.domNode.domNode;n.parentNode.removeChild(n),n.removeAttribute("monaco-visible-content-widget"),this.setShouldRender()}}shouldSuppressMouseDownOnWidget(g){return this._widgets.hasOwnProperty(g)?this._widgets[g].suppressMouseDown:!1}onBeforeRender(g){const t=Object.keys(this._widgets);for(const i of t)this._widgets[i].onBeforeRender(g)}prepareRender(g){const t=Object.keys(this._widgets);for(const i of t)this._widgets[i].prepareRender(g)}render(g){const t=Object.keys(this._widgets);for(const i of t)this._widgets[i].render(g)}}e.ViewContentWidgets=w;class b{constructor(g,t,i){this._context=g,this._viewDomNode=t,this._actual=i,this.domNode=(0,m.createFastDomNode)(this._actual.getDomNode()),this.id=this._actual.getId(),this.allowEditorOverflow=this._actual.allowEditorOverflow||!1,this.suppressMouseDown=this._actual.suppressMouseDown||!1;const n=this._context.configuration.options,l=n.get(131);this._fixedOverflowWidgets=n.get(36),this._contentWidth=l.contentWidth,this._contentLeft=l.contentLeft,this._lineHeight=n.get(59),this._range=null,this._viewRange=null,this._preference=[],this._cachedDomNodeOffsetWidth=-1,this._cachedDomNodeOffsetHeight=-1,this._maxWidth=this._getMaxWidth(),this._isVisible=!1,this._renderData=null,this.domNode.setPosition(this._fixedOverflowWidgets&&this.allowEditorOverflow?"fixed":"absolute"),this.domNode.setDisplay("none"),this.domNode.setVisibility("hidden"),this.domNode.setAttribute("widgetId",this.id),this.domNode.setMaxWidth(this._maxWidth)}onConfigurationChanged(g){const t=this._context.configuration.options;if(this._lineHeight=t.get(59),g.hasChanged(131)){const i=t.get(131);this._contentLeft=i.contentLeft,this._contentWidth=i.contentWidth,this._maxWidth=this._getMaxWidth()}}onLineMappingChanged(g){this._setPosition(this._range)}_setPosition(g){if(this._range=g,this._viewRange=null,this._range){const t=this._context.model.validateModelRange(this._range);(this._context.model.coordinatesConverter.modelPositionIsVisible(t.getStartPosition())||this._context.model.coordinatesConverter.modelPositionIsVisible(t.getEndPosition()))&&(this._viewRange=this._context.model.coordinatesConverter.convertModelRangeToViewRange(t))}}_getMaxWidth(){return this.allowEditorOverflow?window.innerWidth||document.documentElement.offsetWidth||document.body.offsetWidth:this._contentWidth}setPosition(g,t){this._setPosition(g),this._preference=t,this._viewRange&&this._preference&&this._preference.length>0?this.domNode.setDisplay("block"):this.domNode.setDisplay("none"),this._cachedDomNodeOffsetWidth=-1,this._cachedDomNodeOffsetHeight=-1}_layoutBoxInViewport(g,t,i,n,l){const c=g.top,r=c,s=t.top+this._lineHeight,o=l.viewportHeight-s,a=c-n,d=r>=n,u=s,f=o>=n;let S=g.left,v=t.left;return S+i>l.scrollLeft+l.viewportWidth&&(S=l.scrollLeft+l.viewportWidth-i),v+i>l.scrollLeft+l.viewportWidth&&(v=l.scrollLeft+l.viewportWidth-i),S<l.scrollLeft&&(S=l.scrollLeft),v<l.scrollLeft&&(v=l.scrollLeft),{fitsAbove:d,aboveTop:a,aboveLeft:S,fitsBelow:f,belowTop:u,belowLeft:v}}_layoutHorizontalSegmentInPage(g,t,i,n){const l=Math.max(0,t.left-n),c=Math.min(t.left+t.width+n,g.width);let r=t.left+i-y.StandardWindow.scrollX;if(r+n>c){const s=r-(c-n);r-=s,i-=s}if(r<l){const s=r-l;r-=s,i-=s}return[i,r]}_layoutBoxInPage(g,t,i,n,l){const c=g.top-n,r=t.top+this._lineHeight,s=y.getDomNodePagePosition(this._viewDomNode.domNode),o=s.top+c-y.StandardWindow.scrollY,a=s.top+r-y.StandardWindow.scrollY,d=y.getClientArea(document.body),[u,f]=this._layoutHorizontalSegmentInPage(d,s,g.left-l.scrollLeft+this._contentLeft,i),[S,v]=this._layoutHorizontalSegmentInPage(d,s,t.left-l.scrollLeft+this._contentLeft,i),C=22,_=22,L=o>=C,E=a+n<=d.height-_;return this._fixedOverflowWidgets?{fitsAbove:L,aboveTop:Math.max(o,C),aboveLeft:f,fitsBelow:E,belowTop:a,belowLeft:v}:{fitsAbove:L,aboveTop:c,aboveLeft:u,fitsBelow:E,belowTop:r,belowLeft:S}}_prepareRenderWidgetAtExactPositionOverflowing(g){return new I(g.top,g.left+this._contentLeft)}_getTopAndBottomLeft(g){if(!this._viewRange)return[null,null];const t=g.linesVisibleRangesForRange(this._viewRange,!1);if(!t||t.length===0)return[null,null];let i=t[0],n=t[0];for(const d of t)d.lineNumber<i.lineNumber&&(i=d),d.lineNumber>n.lineNumber&&(n=d);let l=1073741824;for(const d of i.ranges)d.left<l&&(l=d.left);let c=1073741824;for(const d of n.ranges)d.left<c&&(c=d.left);const r=g.getVerticalOffsetForLineNumber(i.lineNumber)-g.scrollTop,s=new I(r,l),o=g.getVerticalOffsetForLineNumber(n.lineNumber)-g.scrollTop,a=new I(o,c);return[s,a]}_prepareRenderWidget(g){if(!this._preference||this._preference.length===0)return null;const[t,i]=this._getTopAndBottomLeft(g);if(!t||!i)return null;if(this._cachedDomNodeOffsetWidth===-1||this._cachedDomNodeOffsetHeight===-1){let l=null;if(typeof this._actual.beforeRender=="function"&&(l=p(this._actual.beforeRender,this._actual)),l)this._cachedDomNodeOffsetWidth=l.width,this._cachedDomNodeOffsetHeight=l.height;else{const c=this.domNode.domNode;this._cachedDomNodeOffsetWidth=c.offsetWidth,this._cachedDomNodeOffsetHeight=c.offsetHeight}}let n;this.allowEditorOverflow?n=this._layoutBoxInPage(t,i,this._cachedDomNodeOffsetWidth,this._cachedDomNodeOffsetHeight,g):n=this._layoutBoxInViewport(t,i,this._cachedDomNodeOffsetWidth,this._cachedDomNodeOffsetHeight,g);for(let l=1;l<=2;l++)for(const c of this._preference)if(c===1){if(!n)return null;if(l===2||n.fitsAbove)return{coordinate:new I(n.aboveTop,n.aboveLeft),position:1}}else if(c===2){if(!n)return null;if(l===2||n.fitsBelow)return{coordinate:new I(n.belowTop,n.belowLeft),position:2}}else return this.allowEditorOverflow?{coordinate:this._prepareRenderWidgetAtExactPositionOverflowing(t),position:0}:{coordinate:t,position:0};return null}onBeforeRender(g){!this._viewRange||!this._preference||this._viewRange.endLineNumber<g.startLineNumber||this._viewRange.startLineNumber>g.endLineNumber||this.domNode.setMaxWidth(this._maxWidth)}prepareRender(g){this._renderData=this._prepareRenderWidget(g)}render(g){if(!this._renderData){this._isVisible&&(this.domNode.removeAttribute("monaco-visible-content-widget"),this._isVisible=!1,this.domNode.setVisibility("hidden")),typeof this._actual.afterRender=="function"&&p(this._actual.afterRender,this._actual,null);return}this.allowEditorOverflow?(this.domNode.setTop(this._renderData.coordinate.top),this.domNode.setLeft(this._renderData.coordinate.left)):(this.domNode.setTop(this._renderData.coordinate.top+g.scrollTop-g.bigNumbersDelta),this.domNode.setLeft(this._renderData.coordinate.left)),this._isVisible||(this.domNode.setVisibility("inherit"),this.domNode.setAttribute("monaco-visible-content-widget","true"),this._isVisible=!0),typeof this._actual.afterRender=="function"&&p(this._actual.afterRender,this._actual,this._renderData.position)}}function p(h,g,...t){try{return h.call(g,...t)}catch{return null}}}),define(te[442],ie([1,0,100,3,116,352]),function(j,e,y,m,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DecorationsOverlay=void 0;class I extends y.DynamicViewOverlay{constructor(b){super();this._context=b;const p=this._context.configuration.options;this._lineHeight=p.get(59),this._typicalHalfwidthCharacterWidth=p.get(44).typicalHalfwidthCharacterWidth,this._renderResult=null,this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),this._renderResult=null,super.dispose()}onConfigurationChanged(b){const p=this._context.configuration.options;return this._lineHeight=p.get(59),this._typicalHalfwidthCharacterWidth=p.get(44).typicalHalfwidthCharacterWidth,!0}onDecorationsChanged(b){return!0}onFlushed(b){return!0}onLinesChanged(b){return!0}onLinesDeleted(b){return!0}onLinesInserted(b){return!0}onScrollChanged(b){return b.scrollTopChanged||b.scrollWidthChanged}onZonesChanged(b){return!0}prepareRender(b){const p=b.getDecorationsInViewport();let h=[],g=0;for(let l=0,c=p.length;l<c;l++){const r=p[l];r.options.className&&(h[g++]=r)}h=h.sort((l,c)=>{if(l.options.zIndex<c.options.zIndex)return-1;if(l.options.zIndex>c.options.zIndex)return 1;const r=l.options.className,s=c.options.className;return r<s?-1:r>s?1:m.Range.compareRangesUsingStarts(l.range,c.range)});const t=b.visibleRange.startLineNumber,i=b.visibleRange.endLineNumber,n=[];for(let l=t;l<=i;l++){const c=l-t;n[c]=""}this._renderWholeLineDecorations(b,h,n),this._renderNormalDecorations(b,h,n),this._renderResult=n}_renderWholeLineDecorations(b,p,h){const g=String(this._lineHeight),t=b.visibleRange.startLineNumber,i=b.visibleRange.endLineNumber;for(let n=0,l=p.length;n<l;n++){const c=p[n];if(!c.options.isWholeLine)continue;const r='<div class="cdr '+c.options.className+'" style="left:0;width:100%;height:'+g+'px;"></div>',s=Math.max(c.range.startLineNumber,t),o=Math.min(c.range.endLineNumber,i);for(let a=s;a<=o;a++){const d=a-t;h[d]+=r}}}_renderNormalDecorations(b,p,h){const g=String(this._lineHeight),t=b.visibleRange.startLineNumber;let i=null,n=!1,l=null;for(let c=0,r=p.length;c<r;c++){const s=p[c];if(s.options.isWholeLine)continue;const o=s.options.className,a=Boolean(s.options.showIfCollapsed);let d=s.range;if(a&&d.endColumn===1&&d.endLineNumber!==d.startLineNumber&&(d=new m.Range(d.startLineNumber,d.startColumn,d.endLineNumber-1,this._context.model.getLineMaxColumn(d.endLineNumber-1))),i===o&&n===a&&m.Range.areIntersectingOrTouching(l,d)){l=m.Range.plusRange(l,d);continue}i!==null&&this._renderNormalDecoration(b,l,i,n,g,t,h),i=o,n=a,l=d}i!==null&&this._renderNormalDecoration(b,l,i,n,g,t,h)}_renderNormalDecoration(b,p,h,g,t,i,n){const l=b.linesVisibleRangesForRange(p,h==="findMatch");if(!!l)for(let c=0,r=l.length;c<r;c++){const s=l[c];if(s.outsideRenderedLine)continue;const o=s.lineNumber-i;if(g&&s.ranges.length===1){const a=s.ranges[0];if(a.width<this._typicalHalfwidthCharacterWidth){const d=Math.round(a.left+a.width/2),u=Math.max(0,Math.round(d-this._typicalHalfwidthCharacterWidth/2));s.ranges[0]=new D.HorizontalRange(u,this._typicalHalfwidthCharacterWidth)}}for(let a=0,d=s.ranges.length;a<d;a++){const u=s.ranges[a],f='<div class="cdr '+h+'" style="left:'+String(u.left)+"px;width:"+String(u.width)+"px;height:"+t+'px;"></div>';n[o]+=f}}}render(b,p){if(!this._renderResult)return"";const h=p-b;return h<0||h>=this._renderResult.length?"":this._renderResult[h]}}e.DecorationsOverlay=I}),define(te[182],ie([1,0,100,353]),function(j,e,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.GlyphMarginOverlay=e.DedupOverlay=e.DecorationToRender=void 0;class m{constructor(b,p,h){this._decorationToRenderBrand=void 0,this.startLineNumber=+b,this.endLineNumber=+p,this.className=String(h)}}e.DecorationToRender=m;class D extends y.DynamicViewOverlay{_render(b,p,h){const g=[];for(let n=b;n<=p;n++){const l=n-b;g[l]=[]}if(h.length===0)return g;h.sort((n,l)=>n.className===l.className?n.startLineNumber===l.startLineNumber?n.endLineNumber-l.endLineNumber:n.startLineNumber-l.startLineNumber:n.className<l.className?-1:1);let t=null,i=0;for(let n=0,l=h.length;n<l;n++){const c=h[n],r=c.className;let s=Math.max(c.startLineNumber,b)-b;const o=Math.min(c.endLineNumber,p)-b;t===r?(s=Math.max(i+1,s),i=Math.max(i,o)):(t=r,i=o);for(let a=s;a<=i;a++)g[a].push(t)}return g}}e.DedupOverlay=D;class I extends D{constructor(b){super();this._context=b;const p=this._context.configuration.options,h=p.get(131);this._lineHeight=p.get(59),this._glyphMargin=p.get(50),this._glyphMarginLeft=h.glyphMarginLeft,this._glyphMarginWidth=h.glyphMarginWidth,this._renderResult=null,this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),this._renderResult=null,super.dispose()}onConfigurationChanged(b){const p=this._context.configuration.options,h=p.get(131);return this._lineHeight=p.get(59),this._glyphMargin=p.get(50),this._glyphMarginLeft=h.glyphMarginLeft,this._glyphMarginWidth=h.glyphMarginWidth,!0}onDecorationsChanged(b){return!0}onFlushed(b){return!0}onLinesChanged(b){return!0}onLinesDeleted(b){return!0}onLinesInserted(b){return!0}onScrollChanged(b){return b.scrollTopChanged}onZonesChanged(b){return!0}_getDecorations(b){const p=b.getDecorationsInViewport(),h=[];let g=0;for(let t=0,i=p.length;t<i;t++){const n=p[t],l=n.options.glyphMarginClassName;l&&(h[g++]=new m(n.range.startLineNumber,n.range.endLineNumber,l))}return h}prepareRender(b){if(!this._glyphMargin){this._renderResult=null;return}const p=b.visibleRange.startLineNumber,h=b.visibleRange.endLineNumber,g=this._render(p,h,this._getDecorations(b)),t=this._lineHeight.toString(),i=this._glyphMarginLeft.toString(),n=this._glyphMarginWidth.toString(),l='" style="left:'+i+"px;width:"+n+"px;height:"+t+'px;"></div>',c=[];for(let r=p;r<=h;r++){const s=r-p,o=g[s];o.length===0?c[s]="":c[s]='<div class="cgmr codicon '+o.join(" ")+l}this._renderResult=c}render(b,p){if(!this._renderResult)return"";const h=p-b;return h<0||h>=this._renderResult.length?"":this._renderResult[h]}}e.GlyphMarginOverlay=I}),define(te[443],ie([1,0,182,357]),function(j,e,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.LinesDecorationsOverlay=void 0;class m extends y.DedupOverlay{constructor(I){super();this._context=I;const b=this._context.configuration.options.get(131);this._decorationsLeft=b.decorationsLeft,this._decorationsWidth=b.decorationsWidth,this._renderResult=null,this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),this._renderResult=null,super.dispose()}onConfigurationChanged(I){const b=this._context.configuration.options.get(131);return this._decorationsLeft=b.decorationsLeft,this._decorationsWidth=b.decorationsWidth,!0}onDecorationsChanged(I){return!0}onFlushed(I){return!0}onLinesChanged(I){return!0}onLinesDeleted(I){return!0}onLinesInserted(I){return!0}onScrollChanged(I){return I.scrollTopChanged}onZonesChanged(I){return!0}_getDecorations(I){const w=I.getDecorationsInViewport(),b=[];let p=0;for(let h=0,g=w.length;h<g;h++){const t=w[h],i=t.options.linesDecorationsClassName;i&&(b[p++]=new y.DecorationToRender(t.range.startLineNumber,t.range.endLineNumber,i));const n=t.options.firstLineDecorationClassName;n&&(b[p++]=new y.DecorationToRender(t.range.startLineNumber,t.range.startLineNumber,n))}return b}prepareRender(I){const w=I.visibleRange.startLineNumber,b=I.visibleRange.endLineNumber,p=this._render(w,b,this._getDecorations(I)),h=this._decorationsLeft.toString(),g=this._decorationsWidth.toString(),t='" style="left:'+h+"px;width:"+g+'px;"></div>',i=[];for(let n=w;n<=b;n++){const l=n-w,c=p[l];let r="";for(let s=0,o=c.length;s<o;s++)r+='<div class="cldr '+c[s]+t;i[l]=r}this._renderResult=i}render(I,w){return this._renderResult?this._renderResult[w-I]:""}}e.LinesDecorationsOverlay=m}),define(te[253],ie([1,0,30,50]),function(j,e,y,m){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Margin=void 0;class D extends m.ViewPart{constructor(w){super(w);const b=this._context.configuration.options,p=b.get(131);this._canUseLayerHinting=!b.get(28),this._contentLeft=p.contentLeft,this._glyphMarginLeft=p.glyphMarginLeft,this._glyphMarginWidth=p.glyphMarginWidth,this._domNode=(0,y.createFastDomNode)(document.createElement("div")),this._domNode.setClassName(D.OUTER_CLASS_NAME),this._domNode.setPosition("absolute"),this._domNode.setAttribute("role","presentation"),this._domNode.setAttribute("aria-hidden","true"),this._glyphMarginBackgroundDomNode=(0,y.createFastDomNode)(document.createElement("div")),this._glyphMarginBackgroundDomNode.setClassName(D.CLASS_NAME),this._domNode.appendChild(this._glyphMarginBackgroundDomNode)}dispose(){super.dispose()}getDomNode(){return this._domNode}onConfigurationChanged(w){const b=this._context.configuration.options,p=b.get(131);return this._canUseLayerHinting=!b.get(28),this._contentLeft=p.contentLeft,this._glyphMarginLeft=p.glyphMarginLeft,this._glyphMarginWidth=p.glyphMarginWidth,!0}onScrollChanged(w){return super.onScrollChanged(w)||w.scrollTopChanged}prepareRender(w){}render(w){this._domNode.setLayerHinting(this._canUseLayerHinting),this._domNode.setContain("strict");const b=w.scrollTop-w.bigNumbersDelta;this._domNode.setTop(-b);const p=Math.min(w.scrollHeight,1e6);this._domNode.setHeight(p),this._domNode.setWidth(this._contentLeft),this._glyphMarginBackgroundDomNode.setLeft(this._glyphMarginLeft),this._glyphMarginBackgroundDomNode.setWidth(this._glyphMarginWidth),this._glyphMarginBackgroundDomNode.setHeight(p)}}e.Margin=D,D.CLASS_NAME="glyph-margin",D.OUTER_CLASS_NAME="margin"}),define(te[444],ie([1,0,182,358]),function(j,e,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MarginViewLineDecorationsOverlay=void 0;class m extends y.DedupOverlay{constructor(I){super();this._context=I,this._renderResult=null,this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),this._renderResult=null,super.dispose()}onConfigurationChanged(I){return!0}onDecorationsChanged(I){return!0}onFlushed(I){return!0}onLinesChanged(I){return!0}onLinesDeleted(I){return!0}onLinesInserted(I){return!0}onScrollChanged(I){return I.scrollTopChanged}onZonesChanged(I){return!0}_getDecorations(I){const w=I.getDecorationsInViewport(),b=[];let p=0;for(let h=0,g=w.length;h<g;h++){const t=w[h],i=t.options.marginClassName;i&&(b[p++]=new y.DecorationToRender(t.range.startLineNumber,t.range.endLineNumber,i))}return b}prepareRender(I){const w=I.visibleRange.startLineNumber,b=I.visibleRange.endLineNumber,p=this._render(w,b,this._getDecorations(I)),h=[];for(let g=w;g<=b;g++){const t=g-w,i=p[t];let n="";for(let l=0,c=i.length;l<c;l++)n+='<div class="cmdr '+i[l]+'" style=""></div>';h[t]=n}this._renderResult=h}render(I,w){return this._renderResult?this._renderResult[w-I]:""}}e.MarginViewLineDecorationsOverlay=m}),define(te[445],ie([1,0,30,50,360]),function(j,e,y,m){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ViewOverlayWidgets=void 0;class D extends m.ViewPart{constructor(w){super(w);const p=this._context.configuration.options.get(131);this._widgets={},this._verticalScrollbarWidth=p.verticalScrollbarWidth,this._minimapWidth=p.minimap.minimapWidth,this._horizontalScrollbarHeight=p.horizontalScrollbarHeight,this._editorHeight=p.height,this._editorWidth=p.width,this._domNode=(0,y.createFastDomNode)(document.createElement("div")),m.PartFingerprints.write(this._domNode,4),this._domNode.setClassName("overlayWidgets")}dispose(){super.dispose(),this._widgets={}}getDomNode(){return this._domNode}onConfigurationChanged(w){const p=this._context.configuration.options.get(131);return this._verticalScrollbarWidth=p.verticalScrollbarWidth,this._minimapWidth=p.minimap.minimapWidth,this._horizontalScrollbarHeight=p.horizontalScrollbarHeight,this._editorHeight=p.height,this._editorWidth=p.width,!0}addWidget(w){const b=(0,y.createFastDomNode)(w.getDomNode());this._widgets[w.getId()]={widget:w,preference:null,domNode:b},b.setPosition("absolute"),b.setAttribute("widgetId",w.getId()),this._domNode.appendChild(b),this.setShouldRender()}setWidgetPosition(w,b){const p=this._widgets[w.getId()];return p.preference===b?!1:(p.preference=b,this.setShouldRender(),!0)}removeWidget(w){const b=w.getId();if(this._widgets.hasOwnProperty(b)){const h=this._widgets[b].domNode.domNode;delete this._widgets[b],h.parentNode.removeChild(h),this.setShouldRender()}}_renderWidget(w){const b=w.domNode;if(w.preference===null){b.unsetTop();return}if(w.preference===0)b.setTop(0),b.setRight(2*this._verticalScrollbarWidth+this._minimapWidth);else if(w.preference===1){const p=b.domNode.clientHeight;b.setTop(this._editorHeight-p-2*this._horizontalScrollbarHeight),b.setRight(2*this._verticalScrollbarWidth+this._minimapWidth)}else w.preference===2&&(b.setTop(0),b.domNode.style.right="50%")}prepareRender(w){}render(w){this._domNode.setWidth(this._editorWidth);const b=Object.keys(this._widgets);for(let p=0,h=b.length;p<h;p++){const g=b[p];this._renderWidget(this._widgets[g])}}}e.ViewOverlayWidgets=D}),define(te[446],ie([1,0,30,252,123]),function(j,e,y,m,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.OverviewRuler=void 0;class I extends D.ViewEventHandler{constructor(b,p){super();this._context=b;const h=this._context.configuration.options;this._domNode=(0,y.createFastDomNode)(document.createElement("canvas")),this._domNode.setClassName(p),this._domNode.setPosition("absolute"),this._domNode.setLayerHinting(!0),this._domNode.setContain("strict"),this._zoneManager=new m.OverviewZoneManager(g=>this._context.viewLayout.getVerticalOffsetForLineNumber(g)),this._zoneManager.setDOMWidth(0),this._zoneManager.setDOMHeight(0),this._zoneManager.setOuterHeight(this._context.viewLayout.getScrollHeight()),this._zoneManager.setLineHeight(h.get(59)),this._zoneManager.setPixelRatio(h.get(129)),this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),super.dispose()}onConfigurationChanged(b){const p=this._context.configuration.options;return b.hasChanged(59)&&(this._zoneManager.setLineHeight(p.get(59)),this._render()),b.hasChanged(129)&&(this._zoneManager.setPixelRatio(p.get(129)),this._domNode.setWidth(this._zoneManager.getDOMWidth()),this._domNode.setHeight(this._zoneManager.getDOMHeight()),this._domNode.domNode.width=this._zoneManager.getCanvasWidth(),this._domNode.domNode.height=this._zoneManager.getCanvasHeight(),this._render()),!0}onFlushed(b){return this._render(),!0}onScrollChanged(b){return b.scrollHeightChanged&&(this._zoneManager.setOuterHeight(b.scrollHeight),this._render()),!0}onZonesChanged(b){return this._render(),!0}getDomNode(){return this._domNode.domNode}setLayout(b){this._domNode.setTop(b.top),this._domNode.setRight(b.right);let p=!1;p=this._zoneManager.setDOMWidth(b.width)||p,p=this._zoneManager.setDOMHeight(b.height)||p,p&&(this._domNode.setWidth(this._zoneManager.getDOMWidth()),this._domNode.setHeight(this._zoneManager.getDOMHeight()),this._domNode.domNode.width=this._zoneManager.getCanvasWidth(),this._domNode.domNode.height=this._zoneManager.getCanvasHeight(),this._render())}setZones(b){this._zoneManager.setZones(b),this._render()}_render(){if(this._zoneManager.getOuterHeight()===0)return!1;const b=this._zoneManager.getCanvasWidth(),p=this._zoneManager.getCanvasHeight(),h=this._zoneManager.resolveColorZones(),g=this._zoneManager.getId2Color(),t=this._domNode.domNode.getContext("2d");return t.clearRect(0,0,b,p),h.length>0&&this._renderOneLane(t,h,g,b),!0}_renderOneLane(b,p,h,g){let t=0,i=0,n=0;for(const l of p){const c=l.colorId,r=l.from,s=l.to;c!==t?(b.fillRect(0,i,g,n-i),t=c,b.fillStyle=h[t],i=r,n=s):n>=r?n=Math.max(n,s):(b.fillRect(0,i,g,n-i),i=r,n=s)}b.fillRect(0,i,g,n-i)}}e.OverviewRuler=I}),define(te[447],ie([1,0,30,13,50,11]),function(j,e,y,m,D,I){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ViewZones=void 0;const w=()=>{throw new Error("Invalid change accessor")};class b extends D.ViewPart{constructor(g){super(g);const t=this._context.configuration.options,i=t.get(131);this._lineHeight=t.get(59),this._contentWidth=i.contentWidth,this._contentLeft=i.contentLeft,this.domNode=(0,y.createFastDomNode)(document.createElement("div")),this.domNode.setClassName("view-zones"),this.domNode.setPosition("absolute"),this.domNode.setAttribute("role","presentation"),this.domNode.setAttribute("aria-hidden","true"),this.marginDomNode=(0,y.createFastDomNode)(document.createElement("div")),this.marginDomNode.setClassName("margin-view-zones"),this.marginDomNode.setPosition("absolute"),this.marginDomNode.setAttribute("role","presentation"),this.marginDomNode.setAttribute("aria-hidden","true"),this._zones={}}dispose(){super.dispose(),this._zones={}}_recomputeWhitespacesProps(){const g=this._context.viewLayout.getWhitespaces(),t=new Map;for(const n of g)t.set(n.id,n);let i=!1;return this._context.model.changeWhitespace(n=>{const l=Object.keys(this._zones);for(let c=0,r=l.length;c<r;c++){const s=l[c],o=this._zones[s],a=this._computeWhitespaceProps(o.delegate);o.isInHiddenArea=a.isInHiddenArea;const d=t.get(s);d&&(d.afterLineNumber!==a.afterViewLineNumber||d.height!==a.heightInPx)&&(n.changeOneWhitespace(s,a.afterViewLineNumber,a.heightInPx),this._safeCallOnComputedHeight(o.delegate,a.heightInPx),i=!0)}}),i}onConfigurationChanged(g){const t=this._context.configuration.options,i=t.get(131);return this._lineHeight=t.get(59),this._contentWidth=i.contentWidth,this._contentLeft=i.contentLeft,g.hasChanged(59)&&this._recomputeWhitespacesProps(),!0}onLineMappingChanged(g){return this._recomputeWhitespacesProps()}onLinesDeleted(g){return!0}onScrollChanged(g){return g.scrollTopChanged||g.scrollWidthChanged}onZonesChanged(g){return!0}onLinesInserted(g){return!0}_getZoneOrdinal(g){return typeof g.afterColumn!="undefined"?g.afterColumn:1e4}_computeWhitespaceProps(g){if(g.afterLineNumber===0)return{isInHiddenArea:!1,afterViewLineNumber:0,heightInPx:this._heightInPixels(g),minWidthInPx:this._minWidthInPixels(g)};let t;if(typeof g.afterColumn!="undefined")t=this._context.model.validateModelPosition({lineNumber:g.afterLineNumber,column:g.afterColumn});else{const c=this._context.model.validateModelPosition({lineNumber:g.afterLineNumber,column:1}).lineNumber;t=new I.Position(c,this._context.model.getModelLineMaxColumn(c))}let i;t.column===this._context.model.getModelLineMaxColumn(t.lineNumber)?i=this._context.model.validateModelPosition({lineNumber:t.lineNumber+1,column:1}):i=this._context.model.validateModelPosition({lineNumber:t.lineNumber,column:t.column+1});const n=this._context.model.coordinatesConverter.convertModelPositionToViewPosition(t,g.afterColumnAffinity),l=this._context.model.coordinatesConverter.modelPositionIsVisible(i);return{isInHiddenArea:!l,afterViewLineNumber:n.lineNumber,heightInPx:l?this._heightInPixels(g):0,minWidthInPx:this._minWidthInPixels(g)}}changeViewZones(g){let t=!1;return this._context.model.changeWhitespace(i=>{const n={addZone:l=>(t=!0,this._addZone(i,l)),removeZone:l=>{!l||(t=this._removeZone(i,l)||t)},layoutZone:l=>{!l||(t=this._layoutZone(i,l)||t)}};p(g,n),n.addZone=w,n.removeZone=w,n.layoutZone=w}),t}_addZone(g,t){const i=this._computeWhitespaceProps(t),l={whitespaceId:g.insertWhitespace(i.afterViewLineNumber,this._getZoneOrdinal(t),i.heightInPx,i.minWidthInPx),delegate:t,isInHiddenArea:i.isInHiddenArea,isVisible:!1,domNode:(0,y.createFastDomNode)(t.domNode),marginDomNode:t.marginDomNode?(0,y.createFastDomNode)(t.marginDomNode):null};return this._safeCallOnComputedHeight(l.delegate,i.heightInPx),l.domNode.setPosition("absolute"),l.domNode.domNode.style.width="100%",l.domNode.setDisplay("none"),l.domNode.setAttribute("monaco-view-zone",l.whitespaceId),this.domNode.appendChild(l.domNode),l.marginDomNode&&(l.marginDomNode.setPosition("absolute"),l.marginDomNode.domNode.style.width="100%",l.marginDomNode.setDisplay("none"),l.marginDomNode.setAttribute("monaco-view-zone",l.whitespaceId),this.marginDomNode.appendChild(l.marginDomNode)),this._zones[l.whitespaceId]=l,this.setShouldRender(),l.whitespaceId}_removeZone(g,t){if(this._zones.hasOwnProperty(t)){const i=this._zones[t];return delete this._zones[t],g.removeWhitespace(i.whitespaceId),i.domNode.removeAttribute("monaco-visible-view-zone"),i.domNode.removeAttribute("monaco-view-zone"),i.domNode.domNode.parentNode.removeChild(i.domNode.domNode),i.marginDomNode&&(i.marginDomNode.removeAttribute("monaco-visible-view-zone"),i.marginDomNode.removeAttribute("monaco-view-zone"),i.marginDomNode.domNode.parentNode.removeChild(i.marginDomNode.domNode)),this.setShouldRender(),!0}return!1}_layoutZone(g,t){if(this._zones.hasOwnProperty(t)){const i=this._zones[t],n=this._computeWhitespaceProps(i.delegate);return i.isInHiddenArea=n.isInHiddenArea,g.changeOneWhitespace(i.whitespaceId,n.afterViewLineNumber,n.heightInPx),this._safeCallOnComputedHeight(i.delegate,n.heightInPx),this.setShouldRender(),!0}return!1}shouldSuppressMouseDownOnViewZone(g){if(this._zones.hasOwnProperty(g)){const t=this._zones[g];return Boolean(t.delegate.suppressMouseDown)}return!1}_heightInPixels(g){return typeof g.heightInPx=="number"?g.heightInPx:typeof g.heightInLines=="number"?this._lineHeight*g.heightInLines:this._lineHeight}_minWidthInPixels(g){return typeof g.minWidthInPx=="number"?g.minWidthInPx:0}_safeCallOnComputedHeight(g,t){if(typeof g.onComputedHeight=="function")try{g.onComputedHeight(t)}catch(i){(0,m.onUnexpectedError)(i)}}_safeCallOnDomNodeTop(g,t){if(typeof g.onDomNodeTop=="function")try{g.onDomNodeTop(t)}catch(i){(0,m.onUnexpectedError)(i)}}prepareRender(g){}render(g){const t=g.viewportData.whitespaceViewportData,i={};let n=!1;for(const c of t)this._zones[c.id].isInHiddenArea||(i[c.id]=c,n=!0);const l=Object.keys(this._zones);for(let c=0,r=l.length;c<r;c++){const s=l[c],o=this._zones[s];let a=0,d=0,u="none";i.hasOwnProperty(s)?(a=i[s].verticalOffset-g.bigNumbersDelta,d=i[s].height,u="block",o.isVisible||(o.domNode.setAttribute("monaco-visible-view-zone","true"),o.isVisible=!0),this._safeCallOnDomNodeTop(o.delegate,g.getScrolledTopFromAbsoluteTop(i[s].verticalOffset))):(o.isVisible&&(o.domNode.removeAttribute("monaco-visible-view-zone"),o.isVisible=!1),this._safeCallOnDomNodeTop(o.delegate,g.getScrolledTopFromAbsoluteTop(-1e6))),o.domNode.setTop(a),o.domNode.setHeight(d),o.domNode.setDisplay(u),o.marginDomNode&&(o.marginDomNode.setTop(a),o.marginDomNode.setHeight(d),o.marginDomNode.setDisplay(u))}n&&(this.domNode.setWidth(Math.max(g.scrollWidth,this._contentWidth)),this.marginDomNode.setWidth(this._contentLeft))}}e.ViewZones=b;function p(h,g){try{return h(g)}catch(t){(0,m.onUnexpectedError)(t)}}}),define(te[183],ie([1,0]),function(j,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ViewZonesChangedEvent=e.ViewTokensColorsChangedEvent=e.ViewTokensChangedEvent=e.ViewThemeChangedEvent=e.ViewScrollChangedEvent=e.ViewRevealRangeRequestEvent=e.ViewLinesInsertedEvent=e.ViewLinesDeletedEvent=e.ViewLinesChangedEvent=e.ViewLineMappingChangedEvent=e.ViewLanguageConfigurationEvent=e.ViewFocusChangedEvent=e.ViewFlushedEvent=e.ViewDecorationsChangedEvent=e.ViewCursorStateChangedEvent=e.ViewConfigurationChangedEvent=e.ViewCompositionEndEvent=e.ViewCompositionStartEvent=void 0;class y{constructor(){this.type=0}}e.ViewCompositionStartEvent=y;class m{constructor(){this.type=1}}e.ViewCompositionEndEvent=m;class D{constructor(u){this.type=2,this._source=u}hasChanged(u){return this._source.hasChanged(u)}}e.ViewConfigurationChangedEvent=D;class I{constructor(u,f){this.type=3,this.selections=u,this.modelSelections=f}}e.ViewCursorStateChangedEvent=I;class w{constructor(u){this.type=4,u?(this.affectsMinimap=u.affectsMinimap,this.affectsOverviewRuler=u.affectsOverviewRuler):(this.affectsMinimap=!0,this.affectsOverviewRuler=!0)}}e.ViewDecorationsChangedEvent=w;class b{constructor(){this.type=5}}e.ViewFlushedEvent=b;class p{constructor(u){this.type=6,this.isFocused=u}}e.ViewFocusChangedEvent=p;class h{constructor(){this.type=7}}e.ViewLanguageConfigurationEvent=h;class g{constructor(){this.type=8}}e.ViewLineMappingChangedEvent=g;class t{constructor(u,f){this.type=9,this.fromLineNumber=u,this.toLineNumber=f}}e.ViewLinesChangedEvent=t;class i{constructor(u,f){this.type=10,this.fromLineNumber=u,this.toLineNumber=f}}e.ViewLinesDeletedEvent=i;class n{constructor(u,f){this.type=11,this.fromLineNumber=u,this.toLineNumber=f}}e.ViewLinesInsertedEvent=n;class l{constructor(u,f,S,v,C,_,L){this.source=u,this.minimalReveal=f,this.range=S,this.selections=v,this.verticalType=C,this.revealHorizontal=_,this.scrollType=L,this.type=12}}e.ViewRevealRangeRequestEvent=l;class c{constructor(u){this.type=13,this.scrollWidth=u.scrollWidth,this.scrollLeft=u.scrollLeft,this.scrollHeight=u.scrollHeight,this.scrollTop=u.scrollTop,this.scrollWidthChanged=u.scrollWidthChanged,this.scrollLeftChanged=u.scrollLeftChanged,this.scrollHeightChanged=u.scrollHeightChanged,this.scrollTopChanged=u.scrollTopChanged}}e.ViewScrollChangedEvent=c;class r{constructor(){this.type=14}}e.ViewThemeChangedEvent=r;class s{constructor(u){this.type=15,this.ranges=u}}e.ViewTokensChangedEvent=s;class o{constructor(){this.type=16}}e.ViewTokensColorsChangedEvent=o;class a{constructor(){this.type=17}}e.ViewZonesChangedEvent=a}),define(te[69],ie([1,0,8,3]),function(j,e,y,m){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.OverviewRulerDecorationsGroup=e.ViewModelDecoration=e.SingleLineInlineDecoration=e.InlineDecoration=e.ViewLineRenderingData=e.ViewLineData=e.MinimapLinesRenderingData=e.Viewport=void 0;class D{constructor(n,l,c,r){this._viewportBrand=void 0,this.top=n|0,this.left=l|0,this.width=c|0,this.height=r|0}}e.Viewport=D;class I{constructor(n,l){this.tabSize=n,this.data=l}}e.MinimapLinesRenderingData=I;class w{constructor(n,l,c,r,s,o,a){this._viewLineDataBrand=void 0,this.content=n,this.continuesWithWrappedLine=l,this.minColumn=c,this.maxColumn=r,this.startVisibleColumn=s,this.tokens=o,this.inlineDecorations=a}}e.ViewLineData=w;class b{constructor(n,l,c,r,s,o,a,d,u,f){this.minColumn=n,this.maxColumn=l,this.content=c,this.continuesWithWrappedLine=r,this.isBasicASCII=b.isBasicASCII(c,o),this.containsRTL=b.containsRTL(c,this.isBasicASCII,s),this.tokens=a,this.inlineDecorations=d,this.tabSize=u,this.startVisibleColumn=f}static isBasicASCII(n,l){return l?y.isBasicASCII(n):!0}static containsRTL(n,l,c){return!l&&c?y.containsRTL(n):!1}}e.ViewLineRenderingData=b;class p{constructor(n,l,c){this.range=n,this.inlineClassName=l,this.type=c}}e.InlineDecoration=p;class h{constructor(n,l,c,r){this.startOffset=n,this.endOffset=l,this.inlineClassName=c,this.inlineClassNameAffectsLetterSpacing=r}toInlineDecoration(n){return new p(new m.Range(n,this.startOffset+1,n,this.endOffset+1),this.inlineClassName,this.inlineClassNameAffectsLetterSpacing?3:0)}}e.SingleLineInlineDecoration=h;class g{constructor(n,l){this._viewModelDecorationBrand=void 0,this.range=n,this.options=l}}e.ViewModelDecoration=g;class t{constructor(n,l,c){this.color=n,this.zIndex=l,this.data=c}static cmp(n,l){return n.zIndex===l.zIndex?n.color<l.color?-1:n.color>l.color?1:0:n.zIndex-l.zIndex}}e.OverviewRulerDecorationsGroup=t}),define(te[448],ie([1,0,75,11,91,69]),function(j,e,y,m,D,I){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.createModelLineProjection=void 0;function w(n,l){return n===null?l?p.INSTANCE:h.INSTANCE:new b(n,l)}e.createModelLineProjection=w;class b{constructor(l,c){this._projectionData=l,this._isVisible=c}isVisible(){return this._isVisible}setVisible(l){return this._isVisible=l,this}getProjectionData(){return this._projectionData}getViewLineCount(){return this._isVisible?this._projectionData.getOutputLineCount():0}getViewLineContent(l,c,r){this._assertVisible();const s=r>0?this._projectionData.breakOffsets[r-1]:0,o=this._projectionData.breakOffsets[r];let a;if(this._projectionData.injectionOffsets!==null){const d=this._projectionData.injectionOffsets.map((f,S)=>new D.LineInjectedText(0,0,f+1,this._projectionData.injectionOptions[S],0));a=D.LineInjectedText.applyInjectedText(l.getLineContent(c),d).substring(s,o)}else a=l.getValueInRange({startLineNumber:c,startColumn:s+1,endLineNumber:c,endColumn:o+1});return r>0&&(a=t(this._projectionData.wrappedTextIndentLength)+a),a}getViewLineLength(l,c,r){return this._assertVisible(),this._projectionData.getLineLength(r)}getViewLineMinColumn(l,c,r){return this._assertVisible(),this._projectionData.getMinOutputOffset(r)+1}getViewLineMaxColumn(l,c,r){return this._assertVisible(),this._projectionData.getMaxOutputOffset(r)+1}getViewLineData(l,c,r){const s=new Array;return this.getViewLinesData(l,c,r,1,0,[!0],s),s[0]}getViewLinesData(l,c,r,s,o,a,d){this._assertVisible();const u=this._projectionData,f=u.injectionOffsets,S=u.injectionOptions;let v=null;if(f){v=[];let _=0,L=0;for(let E=0;E<u.getOutputLineCount();E++){const N=new Array;v[E]=N;const k=E>0?u.breakOffsets[E-1]:0,M=u.breakOffsets[E];for(;L<f.length;){const O=S[L].content.length,B=f[L]+_,T=B+O;if(B>M)break;if(k<T){const R=S[L];if(R.inlineClassName){const P=E>0?u.wrappedTextIndentLength:0,F=P+Math.max(B-k,0),W=P+Math.min(T-k,M);F!==W&&N.push(new I.SingleLineInlineDecoration(F,W,R.inlineClassName,R.inlineClassNameAffectsLetterSpacing))}}if(T<=M)_+=O,L++;else break}}}let C;f?C=l.getLineTokens(c).withInserted(f.map((_,L)=>({offset:_,text:S[L].content,tokenMetadata:y.LineTokens.defaultTokenMetadata}))):C=l.getLineTokens(c);for(let _=r;_<r+s;_++){const L=o+_-r;if(!a[L]){d[L]=null;continue}d[L]=this._getViewLineData(C,v?v[_]:null,_)}}_getViewLineData(l,c,r){this._assertVisible();const s=this._projectionData,o=r>0?s.wrappedTextIndentLength:0,a=r>0?s.breakOffsets[r-1]:0,d=s.breakOffsets[r],u=l.sliceAndInflate(a,d,o);let f=u.getLineContent();r>0&&(f=t(s.wrappedTextIndentLength)+f);const S=this._projectionData.getMinOutputOffset(r)+1,v=f.length+1,C=r+1<this.getViewLineCount(),_=r===0?0:s.breakOffsetsVisibleColumn[r-1];return new I.ViewLineData(f,C,S,v,_,u,c)}getModelColumnOfViewPosition(l,c){return this._assertVisible(),this._projectionData.translateToInputOffset(l,c-1)+1}getViewPositionOfModelPosition(l,c,r=2){return this._assertVisible(),this._projectionData.translateToOutputPosition(c-1,r).toPosition(l)}getViewLineNumberOfModelPosition(l,c){this._assertVisible();const r=this._projectionData.translateToOutputPosition(c-1);return l+r.outputLineIndex}normalizePosition(l,c,r){const s=c.lineNumber-l;return this._projectionData.normalizeOutputPosition(l,c.column-1,r).toPosition(s)}getInjectedTextAt(l,c){return this._projectionData.getInjectedText(l,c-1)}_assertVisible(){if(!this._isVisible)throw new Error("Not supported")}}class p{constructor(){}isVisible(){return!0}setVisible(l){return l?this:h.INSTANCE}getProjectionData(){return null}getViewLineCount(){return 1}getViewLineContent(l,c,r){return l.getLineContent(c)}getViewLineLength(l,c,r){return l.getLineLength(c)}getViewLineMinColumn(l,c,r){return l.getLineMinColumn(c)}getViewLineMaxColumn(l,c,r){return l.getLineMaxColumn(c)}getViewLineData(l,c,r){const s=l.getLineTokens(c),o=s.getLineContent();return new I.ViewLineData(o,!1,1,o.length+1,0,s.inflate(),null)}getViewLinesData(l,c,r,s,o,a,d){if(!a[o]){d[o]=null;return}d[o]=this.getViewLineData(l,c,0)}getModelColumnOfViewPosition(l,c){return c}getViewPositionOfModelPosition(l,c){return new m.Position(l,c)}getViewLineNumberOfModelPosition(l,c){return l}normalizePosition(l,c,r){return c}getInjectedTextAt(l,c){return null}}p.INSTANCE=new p;class h{constructor(){}isVisible(){return!1}setVisible(l){return l?p.INSTANCE:this}getProjectionData(){return null}getViewLineCount(){return 0}getViewLineContent(l,c,r){throw new Error("Not supported")}getViewLineLength(l,c,r){throw new Error("Not supported")}getViewLineMinColumn(l,c,r){throw new Error("Not supported")}getViewLineMaxColumn(l,c,r){throw new Error("Not supported")}getViewLineData(l,c,r){throw new Error("Not supported")}getViewLinesData(l,c,r,s,o,a,d){throw new Error("Not supported")}getModelColumnOfViewPosition(l,c){throw new Error("Not supported")}getViewPositionOfModelPosition(l,c){throw new Error("Not supported")}getViewLineNumberOfModelPosition(l,c){throw new Error("Not supported")}normalizePosition(l,c,r){throw new Error("Not supported")}getInjectedTextAt(l,c){throw new Error("Not supported")}}h.INSTANCE=new h;let g=[""];function t(n){if(n>=g.length)for(let l=1;l<=n;l++)g[l]=i(l);return g[n]}function i(n){return new Array(n+1).join(" ")}}),define(te[184],ie([1,0,4,2]),function(j,e,y,m){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ReadOnlyEditAttemptEvent=e.CursorStateChangedEvent=e.HiddenAreasChangedEvent=e.ViewZonesChangedEvent=e.ScrollChangedEvent=e.FocusChangedEvent=e.ContentSizeChangedEvent=e.ViewModelEventsCollector=e.ViewModelEventDispatcher=void 0;class D extends m.Disposable{constructor(){super();this._onEvent=this._register(new y.Emitter),this.onEvent=this._onEvent.event,this._eventHandlers=[],this._viewEventQueue=null,this._isConsumingViewEventQueue=!1,this._collector=null,this._collectorCnt=0,this._outgoingEvents=[]}emitOutgoingEvent(l){this._addOutgoingEvent(l),this._emitOutgoingEvents()}_addOutgoingEvent(l){for(let c=0,r=this._outgoingEvents.length;c<r;c++)if(this._outgoingEvents[c].kind===l.kind){this._outgoingEvents[c]=this._outgoingEvents[c].merge(l);return}this._outgoingEvents.push(l)}_emitOutgoingEvents(){for(;this._outgoingEvents.length>0;){if(this._collector||this._isConsumingViewEventQueue)return;const l=this._outgoingEvents.shift();l.isNoOp()||this._onEvent.fire(l)}}addViewEventHandler(l){for(let c=0,r=this._eventHandlers.length;c<r;c++)this._eventHandlers[c]===l&&console.warn("Detected duplicate listener in ViewEventDispatcher",l);this._eventHandlers.push(l)}removeViewEventHandler(l){for(let c=0;c<this._eventHandlers.length;c++)if(this._eventHandlers[c]===l){this._eventHandlers.splice(c,1);break}}beginEmitViewEvents(){return this._collectorCnt++,this._collectorCnt===1&&(this._collector=new I),this._collector}endEmitViewEvents(){if(this._collectorCnt--,this._collectorCnt===0){const l=this._collector.outgoingEvents,c=this._collector.viewEvents;this._collector=null;for(const r of l)this._addOutgoingEvent(r);c.length>0&&this._emitMany(c)}this._emitOutgoingEvents()}emitSingleViewEvent(l){try{this.beginEmitViewEvents().emitViewEvent(l)}finally{this.endEmitViewEvents()}}_emitMany(l){this._viewEventQueue?this._viewEventQueue=this._viewEventQueue.concat(l):this._viewEventQueue=l,this._isConsumingViewEventQueue||this._consumeViewEventQueue()}_consumeViewEventQueue(){try{this._isConsumingViewEventQueue=!0,this._doConsumeQueue()}finally{this._isConsumingViewEventQueue=!1}}_doConsumeQueue(){for(;this._viewEventQueue;){const l=this._viewEventQueue;this._viewEventQueue=null;const c=this._eventHandlers.slice(0);for(const r of c)r.handleEvents(l)}}}e.ViewModelEventDispatcher=D;class I{constructor(){this.viewEvents=[],this.outgoingEvents=[]}emitViewEvent(l){this.viewEvents.push(l)}emitOutgoingEvent(l){this.outgoingEvents.push(l)}}e.ViewModelEventsCollector=I;class w{constructor(l,c,r,s){this.kind=0,this._oldContentWidth=l,this._oldContentHeight=c,this.contentWidth=r,this.contentHeight=s,this.contentWidthChanged=this._oldContentWidth!==this.contentWidth,this.contentHeightChanged=this._oldContentHeight!==this.contentHeight}isNoOp(){return!this.contentWidthChanged&&!this.contentHeightChanged}merge(l){return l.kind!==0?this:new w(this._oldContentWidth,this._oldContentHeight,l.contentWidth,l.contentHeight)}}e.ContentSizeChangedEvent=w;class b{constructor(l,c){this.kind=1,this.oldHasFocus=l,this.hasFocus=c}isNoOp(){return this.oldHasFocus===this.hasFocus}merge(l){return l.kind!==1?this:new b(this.oldHasFocus,l.hasFocus)}}e.FocusChangedEvent=b;class p{constructor(l,c,r,s,o,a,d,u){this.kind=2,this._oldScrollWidth=l,this._oldScrollLeft=c,this._oldScrollHeight=r,this._oldScrollTop=s,this.scrollWidth=o,this.scrollLeft=a,this.scrollHeight=d,this.scrollTop=u,this.scrollWidthChanged=this._oldScrollWidth!==this.scrollWidth,this.scrollLeftChanged=this._oldScrollLeft!==this.scrollLeft,this.scrollHeightChanged=this._oldScrollHeight!==this.scrollHeight,this.scrollTopChanged=this._oldScrollTop!==this.scrollTop}isNoOp(){return!this.scrollWidthChanged&&!this.scrollLeftChanged&&!this.scrollHeightChanged&&!this.scrollTopChanged}merge(l){return l.kind!==2?this:new p(this._oldScrollWidth,this._oldScrollLeft,this._oldScrollHeight,this._oldScrollTop,l.scrollWidth,l.scrollLeft,l.scrollHeight,l.scrollTop)}}e.ScrollChangedEvent=p;class h{constructor(){this.kind=3}isNoOp(){return!1}merge(l){return this}}e.ViewZonesChangedEvent=h;class g{constructor(){this.kind=4}isNoOp(){return!1}merge(l){return this}}e.HiddenAreasChangedEvent=g;class t{constructor(l,c,r,s,o,a,d){this.kind=6,this.oldSelections=l,this.selections=c,this.oldModelVersionId=r,this.modelVersionId=s,this.source=o,this.reason=a,this.reachedMaxCursorCount=d}static _selectionsAreEqual(l,c){if(!l&&!c)return!0;if(!l||!c)return!1;const r=l.length,s=c.length;if(r!==s)return!1;for(let o=0;o<r;o++)if(!l[o].equalsSelection(c[o]))return!1;return!0}isNoOp(){return t._selectionsAreEqual(this.oldSelections,this.selections)&&this.oldModelVersionId===this.modelVersionId}merge(l){return l.kind!==6?this:new t(this.oldSelections,l.selections,this.oldModelVersionId,l.modelVersionId,l.source,l.reason,this.reachedMaxCursorCount||l.reachedMaxCursorCount)}}e.CursorStateChangedEvent=t;class i{constructor(){this.kind=5}isNoOp(){return!1}merge(l){return this}}e.ReadOnlyEditAttemptEvent=i}),define(te[449],ie([1,0,4,2,137,437,69,184]),function(j,e,y,m,D,I,w,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ViewLayout=void 0;const p=125;class h{constructor(n,l,c,r){n=n|0,l=l|0,c=c|0,r=r|0,n<0&&(n=0),l<0&&(l=0),c<0&&(c=0),r<0&&(r=0),this.width=n,this.contentWidth=l,this.scrollWidth=Math.max(n,l),this.height=c,this.contentHeight=r,this.scrollHeight=Math.max(c,r)}equals(n){return this.width===n.width&&this.contentWidth===n.contentWidth&&this.height===n.height&&this.contentHeight===n.contentHeight}}class g extends m.Disposable{constructor(n,l){super();this._onDidContentSizeChange=this._register(new y.Emitter),this.onDidContentSizeChange=this._onDidContentSizeChange.event,this._dimensions=new h(0,0,0,0),this._scrollable=this._register(new D.Scrollable({forceIntegerValues:!0,smoothScrollDuration:n,scheduleAtNextAnimationFrame:l})),this.onDidScroll=this._scrollable.onScroll}getScrollable(){return this._scrollable}setSmoothScrollDuration(n){this._scrollable.setSmoothScrollDuration(n)}validateScrollPosition(n){return this._scrollable.validateScrollPosition(n)}getScrollDimensions(){return this._dimensions}setScrollDimensions(n){if(this._dimensions.equals(n))return;const l=this._dimensions;this._dimensions=n,this._scrollable.setScrollDimensions({width:n.width,scrollWidth:n.scrollWidth,height:n.height,scrollHeight:n.scrollHeight},!0);const c=l.contentWidth!==n.contentWidth,r=l.contentHeight!==n.contentHeight;(c||r)&&this._onDidContentSizeChange.fire(new b.ContentSizeChangedEvent(l.contentWidth,l.contentHeight,n.contentWidth,n.contentHeight))}getFutureScrollPosition(){return this._scrollable.getFutureScrollPosition()}getCurrentScrollPosition(){return this._scrollable.getCurrentScrollPosition()}setScrollPositionNow(n){this._scrollable.setScrollPositionNow(n)}setScrollPositionSmooth(n){this._scrollable.setScrollPositionSmooth(n)}}class t extends m.Disposable{constructor(n,l,c){super();this._configuration=n;const r=this._configuration.options,s=r.get(131),o=r.get(75);this._linesLayout=new I.LinesLayout(l,r.get(59),o.top,o.bottom),this._scrollable=this._register(new g(0,c)),this._configureSmoothScrollDuration(),this._scrollable.setScrollDimensions(new h(s.contentWidth,0,s.height,0)),this.onDidScroll=this._scrollable.onDidScroll,this.onDidContentSizeChange=this._scrollable.onDidContentSizeChange,this._updateHeight()}dispose(){super.dispose()}getScrollable(){return this._scrollable.getScrollable()}onHeightMaybeChanged(){this._updateHeight()}_configureSmoothScrollDuration(){this._scrollable.setSmoothScrollDuration(this._configuration.options.get(103)?p:0)}onConfigurationChanged(n){const l=this._configuration.options;if(n.hasChanged(59)&&this._linesLayout.setLineHeight(l.get(59)),n.hasChanged(75)){const c=l.get(75);this._linesLayout.setPadding(c.top,c.bottom)}if(n.hasChanged(131)){const c=l.get(131),r=c.contentWidth,s=c.height,o=this._scrollable.getScrollDimensions(),a=o.contentWidth;this._scrollable.setScrollDimensions(new h(r,o.contentWidth,s,this._getContentHeight(r,s,a)))}else this._updateHeight();n.hasChanged(103)&&this._configureSmoothScrollDuration()}onFlushed(n){this._linesLayout.onFlushed(n)}onLinesDeleted(n,l){this._linesLayout.onLinesDeleted(n,l)}onLinesInserted(n,l){this._linesLayout.onLinesInserted(n,l)}_getHorizontalScrollbarHeight(n,l){const r=this._configuration.options.get(92);return r.horizontal===2||n>=l?0:r.horizontalScrollbarSize}_getContentHeight(n,l,c){const r=this._configuration.options;let s=this._linesLayout.getLinesTotalHeight();return r.get(94)?s+=Math.max(0,l-r.get(59)-r.get(75).bottom):s+=this._getHorizontalScrollbarHeight(n,c),s}_updateHeight(){const n=this._scrollable.getScrollDimensions(),l=n.width,c=n.height,r=n.contentWidth;this._scrollable.setScrollDimensions(new h(l,n.contentWidth,c,this._getContentHeight(l,c,r)))}getCurrentViewport(){const n=this._scrollable.getScrollDimensions(),l=this._scrollable.getCurrentScrollPosition();return new w.Viewport(l.scrollTop,l.scrollLeft,n.width,n.height)}getFutureViewport(){const n=this._scrollable.getScrollDimensions(),l=this._scrollable.getFutureScrollPosition();return new w.Viewport(l.scrollTop,l.scrollLeft,n.width,n.height)}_computeContentWidth(n){const l=this._configuration.options,c=l.get(132),r=l.get(44);if(c.isViewportWrapping){const s=l.get(131),o=l.get(65);return n>s.contentWidth+r.typicalHalfwidthCharacterWidth&&o.enabled&&o.side==="right"?n+s.verticalScrollbarWidth:n}else{const s=l.get(93)*r.typicalHalfwidthCharacterWidth,o=this._linesLayout.getWhitespaceMinWidth();return Math.max(n+s,o)}}setMaxLineWidth(n){const l=this._scrollable.getScrollDimensions();this._scrollable.setScrollDimensions(new h(l.width,this._computeContentWidth(n),l.height,l.contentHeight)),this._updateHeight()}saveState(){const n=this._scrollable.getFutureScrollPosition(),l=n.scrollTop,c=this._linesLayout.getLineNumberAtOrAfterVerticalOffset(l),r=this._linesLayout.getWhitespaceAccumulatedHeightBeforeLineNumber(c);return{scrollTop:l,scrollTopWithoutViewZones:l-r,scrollLeft:n.scrollLeft}}changeWhitespace(n){const l=this._linesLayout.changeWhitespace(n);return l&&this.onHeightMaybeChanged(),l}getVerticalOffsetForLineNumber(n){return this._linesLayout.getVerticalOffsetForLineNumber(n)}isAfterLines(n){return this._linesLayout.isAfterLines(n)}isInTopPadding(n){return this._linesLayout.isInTopPadding(n)}isInBottomPadding(n){return this._linesLayout.isInBottomPadding(n)}getLineNumberAtVerticalOffset(n){return this._linesLayout.getLineNumberAtOrAfterVerticalOffset(n)}getWhitespaceAtVerticalOffset(n){return this._linesLayout.getWhitespaceAtVerticalOffset(n)}getLinesViewportData(){const n=this.getCurrentViewport();return this._linesLayout.getLinesViewportData(n.top,n.top+n.height)}getLinesViewportDataAtScrollTop(n){const l=this._scrollable.getScrollDimensions();return n+l.height>l.scrollHeight&&(n=l.scrollHeight-l.height),n<0&&(n=0),this._linesLayout.getLinesViewportData(n,n+l.height)}getWhitespaceViewportData(){const n=this.getCurrentViewport();return this._linesLayout.getWhitespaceViewportData(n.top,n.top+n.height)}getWhitespaces(){return this._linesLayout.getWhitespaces()}getContentWidth(){return this._scrollable.getScrollDimensions().contentWidth}getScrollWidth(){return this._scrollable.getScrollDimensions().scrollWidth}getContentHeight(){return this._scrollable.getScrollDimensions().contentHeight}getScrollHeight(){return this._scrollable.getScrollDimensions().scrollHeight}getCurrentScrollLeft(){return this._scrollable.getCurrentScrollPosition().scrollLeft}getCurrentScrollTop(){return this._scrollable.getCurrentScrollPosition().scrollTop}validateScrollPosition(n){return this._scrollable.validateScrollPosition(n)}setScrollPosition(n,l){l===1?this._scrollable.setScrollPositionNow(n):this._scrollable.setScrollPositionSmooth(n)}deltaScrollNow(n,l){const c=this._scrollable.getCurrentScrollPosition();this._scrollable.setScrollPositionNow({scrollLeft:c.scrollLeft+n,scrollTop:c.scrollTop+l})}}e.ViewLayout=t}),define(te[450],ie([1,0,3,22]),function(j,e,y,m){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MoveCaretCommand=void 0;class D{constructor(w,b){this._selection=w,this._isMovingLeft=b}getEditOperations(w,b){if(this._selection.startLineNumber!==this._selection.endLineNumber||this._selection.isEmpty())return;const p=this._selection.startLineNumber,h=this._selection.startColumn,g=this._selection.endColumn;if(!(this._isMovingLeft&&h===1)&&!(!this._isMovingLeft&&g===w.getLineMaxColumn(p)))if(this._isMovingLeft){const t=new y.Range(p,h-1,p,h),i=w.getValueInRange(t);b.addEditOperation(t,null),b.addEditOperation(new y.Range(p,g,p,g),i)}else{const t=new y.Range(p,g,p,g+1),i=w.getValueInRange(t);b.addEditOperation(t,null),b.addEditOperation(new y.Range(p,h,p,h),i)}}computeCursorState(w,b){return this._isMovingLeft?new m.Selection(this._selection.startLineNumber,this._selection.startColumn-1,this._selection.endLineNumber,this._selection.endColumn-1):new m.Selection(this._selection.startLineNumber,this._selection.startColumn+1,this._selection.endLineNumber,this._selection.endColumn+1)}}e.MoveCaretCommand=D}),define(te[152],ie([1,0]),function(j,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CodeActionCommandArgs=e.filtersAction=e.mayIncludeActionsOfKind=e.CodeActionKind=void 0;class y{constructor(p){this.value=p}equals(p){return this.value===p.value}contains(p){return this.equals(p)||this.value===""||p.value.startsWith(this.value+y.sep)}intersects(p){return this.contains(p)||p.contains(this)}append(p){return new y(this.value+y.sep+p)}}e.CodeActionKind=y,y.sep=".",y.None=new y("@@none@@"),y.Empty=new y(""),y.QuickFix=new y("quickfix"),y.Refactor=new y("refactor"),y.Source=new y("source"),y.SourceOrganizeImports=y.Source.append("organizeImports"),y.SourceFixAll=y.Source.append("fixAll");function m(b,p){return!(b.include&&!b.include.intersects(p)||b.excludes&&b.excludes.some(h=>I(p,h,b.include))||!b.includeSourceActions&&y.Source.contains(p))}e.mayIncludeActionsOfKind=m;function D(b,p){const h=p.kind?new y(p.kind):void 0;return!(b.include&&(!h||!b.include.contains(h))||b.excludes&&h&&b.excludes.some(g=>I(h,g,b.include))||!b.includeSourceActions&&h&&y.Source.contains(h)||b.onlyIncludePreferredActions&&!p.isPreferred)}e.filtersAction=D;function I(b,p,h){return!(!p.contains(b)||h&&p.contains(h))}class w{constructor(p,h,g){this.kind=p,this.apply=h,this.preferred=g}static fromUser(p,h){return!p||typeof p!="object"?new w(h.kind,h.apply,!1):new w(w.getKindFromUser(p,h.kind),w.getApplyFromUser(p,h.apply),w.getPreferredUser(p))}static getApplyFromUser(p,h){switch(typeof p.apply=="string"?p.apply.toLowerCase():""){case"first":return"first";case"never":return"never";case"ifsingle":return"ifSingle";default:return h}}static getKindFromUser(p,h){return typeof p.kind=="string"?new y(p.kind):h}static getPreferredUser(p){return typeof p.preferred=="boolean"?p.preferred:!1}}e.CodeActionCommandArgs=w}),define(te[451],ie([1,0,4]),function(j,e,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ColorPickerModel=void 0;class m{constructor(I,w,b){this.presentationIndex=b,this._onColorFlushed=new y.Emitter,this.onColorFlushed=this._onColorFlushed.event,this._onDidChangeColor=new y.Emitter,this.onDidChangeColor=this._onDidChangeColor.event,this._onDidChangePresentation=new y.Emitter,this.onDidChangePresentation=this._onDidChangePresentation.event,this.originalColor=I,this._color=I,this._colorPresentations=w}get color(){return this._color}set color(I){this._color.equals(I)||(this._color=I,this._onDidChangeColor.fire(I))}get presentation(){return this.colorPresentations[this.presentationIndex]}get colorPresentations(){return this._colorPresentations}set colorPresentations(I){this._colorPresentations=I,this.presentationIndex>I.length-1&&(this.presentationIndex=0),this._onDidChangePresentation.fire(this.presentation)}selectNextColorPresentation(){this.presentationIndex=(this.presentationIndex+1)%this.colorPresentations.length,this.flushColor(),this._onDidChangePresentation.fire(this.presentation)}guessColorPresentation(I,w){for(let b=0;b<this.colorPresentations.length;b++)if(w.toLowerCase()===this.colorPresentations[b].label){this.presentationIndex=b,this._onDidChangePresentation.fire(this.presentation);break}}flushColor(){this._onColorFlushed.fire(this._color)}}e.ColorPickerModel=m}),define(te[254],ie([1,0,61,11,3,22]),function(j,e,y,m,D,I){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BlockCommentCommand=void 0;class w{constructor(p,h,g){this.languageConfigurationService=g,this._selection=p,this._insertSpace=h,this._usedEndToken=null}static _haystackHasNeedleAtOffset(p,h,g){if(g<0)return!1;const t=h.length,i=p.length;if(g+t>i)return!1;for(let n=0;n<t;n++){const l=p.charCodeAt(g+n),c=h.charCodeAt(n);if(l!==c&&!(l>=65&&l<=90&&l+32===c)&&!(c>=65&&c<=90&&c+32===l))return!1}return!0}_createOperationsForBlockComment(p,h,g,t,i,n){const l=p.startLineNumber,c=p.startColumn,r=p.endLineNumber,s=p.endColumn,o=i.getLineContent(l),a=i.getLineContent(r);let d=o.lastIndexOf(h,c-1+h.length),u=a.indexOf(g,s-1-g.length);if(d!==-1&&u!==-1)if(l===r)o.substring(d+h.length,u).indexOf(g)>=0&&(d=-1,u=-1);else{const S=o.substring(d+h.length),v=a.substring(0,u);(S.indexOf(g)>=0||v.indexOf(g)>=0)&&(d=-1,u=-1)}let f;d!==-1&&u!==-1?(t&&d+h.length<o.length&&o.charCodeAt(d+h.length)===32&&(h=h+" "),t&&u>0&&a.charCodeAt(u-1)===32&&(g=" "+g,u-=1),f=w._createRemoveBlockCommentOperations(new D.Range(l,d+h.length+1,r,u+1),h,g)):(f=w._createAddBlockCommentOperations(p,h,g,this._insertSpace),this._usedEndToken=f.length===1?g:null);for(const S of f)n.addTrackedEditOperation(S.range,S.text)}static _createRemoveBlockCommentOperations(p,h,g){let t=[];return D.Range.isEmpty(p)?t.push(y.EditOperation.delete(new D.Range(p.startLineNumber,p.startColumn-h.length,p.endLineNumber,p.endColumn+g.length))):(t.push(y.EditOperation.delete(new D.Range(p.startLineNumber,p.startColumn-h.length,p.startLineNumber,p.startColumn))),t.push(y.EditOperation.delete(new D.Range(p.endLineNumber,p.endColumn,p.endLineNumber,p.endColumn+g.length)))),t}static _createAddBlockCommentOperations(p,h,g,t){let i=[];return D.Range.isEmpty(p)?i.push(y.EditOperation.replace(new D.Range(p.startLineNumber,p.startColumn,p.endLineNumber,p.endColumn),h+" "+g)):(i.push(y.EditOperation.insert(new m.Position(p.startLineNumber,p.startColumn),h+(t?" ":""))),i.push(y.EditOperation.insert(new m.Position(p.endLineNumber,p.endColumn),(t?" ":"")+g))),i}getEditOperations(p,h){const g=this._selection.startLineNumber,t=this._selection.startColumn;p.tokenizeIfCheap(g);const i=p.getLanguageIdAtPosition(g,t),n=this.languageConfigurationService.getLanguageConfiguration(i).comments;!n||!n.blockCommentStartToken||!n.blockCommentEndToken||this._createOperationsForBlockComment(this._selection,n.blockCommentStartToken,n.blockCommentEndToken,this._insertSpace,p,h)}computeCursorState(p,h){const g=h.getInverseEditOperations();if(g.length===2){const t=g[0],i=g[1];return new I.Selection(t.range.endLineNumber,t.range.endColumn,i.range.startLineNumber,i.range.startColumn)}else{const t=g[0].range,i=this._usedEndToken?-this._usedEndToken.length-1:0;return new I.Selection(t.endLineNumber,t.endColumn+i,t.endLineNumber,t.endColumn+i)}}}e.BlockCommentCommand=w}),define(te[452],ie([1,0,3,22]),function(j,e,y,m){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DragAndDropCommand=void 0;class D{constructor(w,b,p){this.selection=w,this.targetPosition=b,this.copy=p,this.targetSelection=null}getEditOperations(w,b){let p=w.getValueInRange(this.selection);if(this.copy||b.addEditOperation(this.selection,null),b.addEditOperation(new y.Range(this.targetPosition.lineNumber,this.targetPosition.column,this.targetPosition.lineNumber,this.targetPosition.column),p),this.selection.containsPosition(this.targetPosition)&&!(this.copy&&(this.selection.getEndPosition().equals(this.targetPosition)||this.selection.getStartPosition().equals(this.targetPosition)))){this.targetSelection=this.selection;return}if(this.copy){this.targetSelection=new m.Selection(this.targetPosition.lineNumber,this.targetPosition.column,this.selection.endLineNumber-this.selection.startLineNumber+this.targetPosition.lineNumber,this.selection.startLineNumber===this.selection.endLineNumber?this.targetPosition.column+this.selection.endColumn-this.selection.startColumn:this.selection.endColumn);return}if(this.targetPosition.lineNumber>this.selection.endLineNumber){this.targetSelection=new m.Selection(this.targetPosition.lineNumber-this.selection.endLineNumber+this.selection.startLineNumber,this.targetPosition.column,this.targetPosition.lineNumber,this.selection.startLineNumber===this.selection.endLineNumber?this.targetPosition.column+this.selection.endColumn-this.selection.startColumn:this.selection.endColumn);return}if(this.targetPosition.lineNumber<this.selection.endLineNumber){this.targetSelection=new m.Selection(this.targetPosition.lineNumber,this.targetPosition.column,this.targetPosition.lineNumber+this.selection.endLineNumber-this.selection.startLineNumber,this.selection.startLineNumber===this.selection.endLineNumber?this.targetPosition.column+this.selection.endColumn-this.selection.startColumn:this.selection.endColumn);return}this.selection.endColumn<=this.targetPosition.column?this.targetSelection=new m.Selection(this.targetPosition.lineNumber-this.selection.endLineNumber+this.selection.startLineNumber,this.selection.startLineNumber===this.selection.endLineNumber?this.targetPosition.column-this.selection.endColumn+this.selection.startColumn:this.targetPosition.column-this.selection.endColumn+this.selection.startColumn,this.targetPosition.lineNumber,this.selection.startLineNumber===this.selection.endLineNumber?this.targetPosition.column:this.selection.endColumn):this.targetSelection=new m.Selection(this.targetPosition.lineNumber-this.selection.endLineNumber+this.selection.startLineNumber,this.targetPosition.column,this.targetPosition.lineNumber,this.targetPosition.column+this.selection.endColumn-this.selection.startColumn)}computeCursorState(w,b){return this.targetSelection}}e.DragAndDropCommand=D}),define(te[453],ie([1,0,3]),function(j,e,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ReplaceAllCommand=void 0;class m{constructor(I,w,b){this._editorSelection=I,this._ranges=w,this._replaceStrings=b,this._trackedEditorSelectionId=null}getEditOperations(I,w){if(this._ranges.length>0){let b=[];for(let g=0;g<this._ranges.length;g++)b.push({range:this._ranges[g],text:this._replaceStrings[g]});b.sort((g,t)=>y.Range.compareRangesUsingStarts(g.range,t.range));let p=[],h=b[0];for(let g=1;g<b.length;g++)h.range.endLineNumber===b[g].range.startLineNumber&&h.range.endColumn===b[g].range.startColumn?(h.range=h.range.plusRange(b[g].range),h.text=h.text+b[g].text):(p.push(h),h=b[g]);p.push(h);for(const g of p)w.addEditOperation(g.range,g.text)}this._trackedEditorSelectionId=w.trackSelection(this._editorSelection)}computeCursorState(I,w){return w.getTrackedSelection(this._trackedEditorSelectionId)}}e.ReplaceAllCommand=m}),define(te[454],ie([1,0,320]),function(j,e,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.parseReplaceString=e.ReplacePiece=e.ReplacePattern=void 0;class m{constructor(g){this.staticValue=g,this.kind=0}}class D{constructor(g){this.pieces=g,this.kind=1}}class I{constructor(g){!g||g.length===0?this._state=new m(""):g.length===1&&g[0].staticValue!==null?this._state=new m(g[0].staticValue):this._state=new D(g)}static fromStaticValue(g){return new I([w.staticValue(g)])}get hasReplacementPatterns(){return this._state.kind===1}buildReplaceString(g,t){if(this._state.kind===0)return t?(0,y.buildReplaceStringWithCasePreserved)(g,this._state.staticValue):this._state.staticValue;let i="";for(let n=0,l=this._state.pieces.length;n<l;n++){let c=this._state.pieces[n];if(c.staticValue!==null){i+=c.staticValue;continue}let r=I._substitute(c.matchIndex,g);if(c.caseOps!==null&&c.caseOps.length>0){let s=[],o=c.caseOps.length,a=0;for(let d=0,u=r.length;d<u;d++){if(a>=o){s.push(r.slice(d));break}switch(c.caseOps[a]){case"U":s.push(r[d].toUpperCase());break;case"u":s.push(r[d].toUpperCase()),a++;break;case"L":s.push(r[d].toLowerCase());break;case"l":s.push(r[d].toLowerCase()),a++;break;default:s.push(r[d])}}r=s.join("")}i+=r}return i}static _substitute(g,t){if(t===null)return"";if(g===0)return t[0];let i="";for(;g>0;){if(g<t.length)return(t[g]||"")+i;i=String(g%10)+i,g=Math.floor(g/10)}return"$"+i}}e.ReplacePattern=I;class w{constructor(g,t,i){this.staticValue=g,this.matchIndex=t,!i||i.length===0?this.caseOps=null:this.caseOps=i.slice(0)}static staticValue(g){return new w(g,-1,null)}static caseOps(g,t){return new w(null,g,t)}}e.ReplacePiece=w;class b{constructor(g){this._source=g,this._lastCharIndex=0,this._result=[],this._resultLen=0,this._currentStaticPiece=""}emitUnchanged(g){this._emitStatic(this._source.substring(this._lastCharIndex,g)),this._lastCharIndex=g}emitStatic(g,t){this._emitStatic(g),this._lastCharIndex=t}_emitStatic(g){g.length!==0&&(this._currentStaticPiece+=g)}emitMatchIndex(g,t,i){this._currentStaticPiece.length!==0&&(this._result[this._resultLen++]=w.staticValue(this._currentStaticPiece),this._currentStaticPiece=""),this._result[this._resultLen++]=w.caseOps(g,i),this._lastCharIndex=t}finalize(){return this.emitUnchanged(this._source.length),this._currentStaticPiece.length!==0&&(this._result[this._resultLen++]=w.staticValue(this._currentStaticPiece),this._currentStaticPiece=""),new I(this._result)}}function p(h){if(!h||h.length===0)return new I(null);let g=[],t=new b(h);for(let i=0,n=h.length;i<n;i++){let l=h.charCodeAt(i);if(l===92){if(i++,i>=n)break;let c=h.charCodeAt(i);switch(c){case 92:t.emitUnchanged(i-1),t.emitStatic("\\",i+1);break;case 110:t.emitUnchanged(i-1),t.emitStatic(`
|
||
`,i+1);break;case 116:t.emitUnchanged(i-1),t.emitStatic(" ",i+1);break;case 117:case 85:case 108:case 76:t.emitUnchanged(i-1),t.emitStatic("",i+1),g.push(String.fromCharCode(c));break}continue}if(l===36){if(i++,i>=n)break;let c=h.charCodeAt(i);if(c===36){t.emitUnchanged(i-1),t.emitStatic("$",i+1);continue}if(c===48||c===38){t.emitUnchanged(i-1),t.emitMatchIndex(0,i+1,g),g.length=0;continue}if(49<=c&&c<=57){let r=c-48;if(i+1<n){let s=h.charCodeAt(i+1);if(48<=s&&s<=57){i++,r=r*10+(s-48),t.emitUnchanged(i-2),t.emitMatchIndex(r,i+1,g),g.length=0;continue}}t.emitUnchanged(i-1),t.emitMatchIndex(r,i+1,g),g.length=0;continue}}}return t.finalize()}e.parseReplaceString=p}),define(te[185],ie([1,0]),function(j,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.FoldingRegion=e.FoldingRegions=e.MAX_LINE_NUMBER=e.MAX_FOLDING_REGIONS=void 0,e.MAX_FOLDING_REGIONS=65535,e.MAX_LINE_NUMBER=16777215;const y=4278190080;class m{constructor(w,b,p){if(w.length!==b.length||w.length>e.MAX_FOLDING_REGIONS)throw new Error("invalid startIndexes or endIndexes size");this._startIndexes=w,this._endIndexes=b,this._collapseStates=new Uint32Array(Math.ceil(w.length/32)),this._types=p,this._parentsComputed=!1}ensureParentIndices(){if(!this._parentsComputed){this._parentsComputed=!0;let w=[],b=(p,h)=>{let g=w[w.length-1];return this.getStartLineNumber(g)<=p&&this.getEndLineNumber(g)>=h};for(let p=0,h=this._startIndexes.length;p<h;p++){let g=this._startIndexes[p],t=this._endIndexes[p];if(g>e.MAX_LINE_NUMBER||t>e.MAX_LINE_NUMBER)throw new Error("startLineNumber or endLineNumber must not exceed "+e.MAX_LINE_NUMBER);for(;w.length>0&&!b(g,t);)w.pop();let i=w.length>0?w[w.length-1]:-1;w.push(p),this._startIndexes[p]=g+((i&255)<<24),this._endIndexes[p]=t+((i&65280)<<16)}}}get length(){return this._startIndexes.length}getStartLineNumber(w){return this._startIndexes[w]&e.MAX_LINE_NUMBER}getEndLineNumber(w){return this._endIndexes[w]&e.MAX_LINE_NUMBER}getType(w){return this._types?this._types[w]:void 0}hasTypes(){return!!this._types}isCollapsed(w){let b=w/32|0,p=w%32;return(this._collapseStates[b]&1<<p)!=0}setCollapsed(w,b){let p=w/32|0,h=w%32,g=this._collapseStates[p];b?this._collapseStates[p]=g|1<<h:this._collapseStates[p]=g&~(1<<h)}setCollapsedAllOfType(w,b){let p=!1;if(this._types)for(let h=0;h<this._types.length;h++)this._types[h]===w&&(this.setCollapsed(h,b),p=!0);return p}toRegion(w){return new D(this,w)}getParentIndex(w){this.ensureParentIndices();let b=((this._startIndexes[w]&y)>>>24)+((this._endIndexes[w]&y)>>>16);return b===e.MAX_FOLDING_REGIONS?-1:b}contains(w,b){return this.getStartLineNumber(w)<=b&&this.getEndLineNumber(w)>=b}findIndex(w){let b=0,p=this._startIndexes.length;if(p===0)return-1;for(;b<p;){let h=Math.floor((b+p)/2);w<this.getStartLineNumber(h)?p=h:b=h+1}return b-1}findRange(w){let b=this.findIndex(w);if(b>=0){if(this.getEndLineNumber(b)>=w)return b;for(b=this.getParentIndex(b);b!==-1;){if(this.contains(b,w))return b;b=this.getParentIndex(b)}}return-1}toString(){let w=[];for(let b=0;b<this.length;b++)w[b]=`[${this.isCollapsed(b)?"+":"-"}] ${this.getStartLineNumber(b)}/${this.getEndLineNumber(b)}`;return w.join(", ")}}e.FoldingRegions=m;class D{constructor(w,b){this.ranges=w,this.index=b}get startLineNumber(){return this.ranges.getStartLineNumber(this.index)}get endLineNumber(){return this.ranges.getEndLineNumber(this.index)}get regionIndex(){return this.index}get parentIndex(){return this.ranges.getParentIndex(this.index)}get isCollapsed(){return this.ranges.isCollapsed(this.index)}containedBy(w){return w.startLineNumber<=this.startLineNumber&&w.endLineNumber>=this.endLineNumber}containsLine(w){return this.startLineNumber<=w&&w<=this.endLineNumber}}e.FoldingRegion=D}),define(te[455],ie([1,0,4,185]),function(j,e,y,m){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getNextFoldLine=e.getPreviousFoldLine=e.getParentFoldLine=e.setCollapseStateForType=e.setCollapseStateForMatchingLines=e.setCollapseStateForRest=e.setCollapseStateAtLevel=e.setCollapseStateUp=e.setCollapseStateLevelsUp=e.setCollapseStateLevelsDown=e.toggleCollapseState=e.FoldingModel=void 0;class D{constructor(s,o){this._updateEventEmitter=new y.Emitter,this.onDidChange=this._updateEventEmitter.event,this._textModel=s,this._decorationProvider=o,this._regions=new m.FoldingRegions(new Uint32Array(0),new Uint32Array(0)),this._editorDecorationIds=[],this._isInitialized=!1}get regions(){return this._regions}get textModel(){return this._textModel}get isInitialized(){return this._isInitialized}toggleCollapseState(s){if(!s.length)return;s=s.sort((a,d)=>a.regionIndex-d.regionIndex);const o={};this._decorationProvider.changeDecorations(a=>{let d=0,u=-1,f=-1;const S=v=>{for(;d<v;){const C=this._regions.getEndLineNumber(d),_=this._regions.isCollapsed(d);C<=u&&a.changeDecorationOptions(this._editorDecorationIds[d],this._decorationProvider.getDecorationOption(_,C<=f)),_&&C>f&&(f=C),d++}};for(let v of s){let C=v.regionIndex,_=this._editorDecorationIds[C];if(_&&!o[_]){o[_]=!0,S(C);let L=!this._regions.isCollapsed(C);this._regions.setCollapsed(C,L),u=Math.max(u,this._regions.getEndLineNumber(C))}}S(this._regions.length)}),this._updateEventEmitter.fire({model:this,collapseStateChanged:s})}update(s,o=[]){let a=[],d=(L,E)=>{for(let N of o)if(L<N&&N<=E)return!0;return!1},u=-1,f=(L,E)=>{const N=s.getStartLineNumber(L),k=s.getEndLineNumber(L);E||(E=s.isCollapsed(L)),E&&d(N,k)&&(E=!1),s.setCollapsed(L,E);const M=this._textModel.getLineMaxColumn(N),O={startLineNumber:N,startColumn:Math.max(M-1,1),endLineNumber:N,endColumn:M};a.push({range:O,options:this._decorationProvider.getDecorationOption(E,k<=u)}),E&&k>u&&(u=k)},S=0,v=()=>{for(;S<this._regions.length;){let L=this._regions.isCollapsed(S);if(S++,L)return S-1}return-1},C=0,_=v();for(;_!==-1&&C<s.length;){let L=this._textModel.getDecorationRange(this._editorDecorationIds[_]);if(L){let E=L.startLineNumber;if(L.startColumn===Math.max(L.endColumn-1,1)&&this._textModel.getLineMaxColumn(E)===L.endColumn)for(;C<s.length;){let N=s.getStartLineNumber(C);if(E>=N)f(C,E===N),C++;else break}}_=v()}for(;C<s.length;)f(C,!1),C++;this._editorDecorationIds=this._decorationProvider.deltaDecorations(this._editorDecorationIds,a),this._regions=s,this._isInitialized=!0,this._updateEventEmitter.fire({model:this})}getMemento(){let s=[];for(let o=0;o<this._regions.length;o++)if(this._regions.isCollapsed(o)){let a=this._textModel.getDecorationRange(this._editorDecorationIds[o]);if(a){let d=a.startLineNumber,u=a.endLineNumber+this._regions.getEndLineNumber(o)-this._regions.getStartLineNumber(o);s.push({startLineNumber:d,endLineNumber:u})}}if(s.length>0)return s}applyMemento(s){if(!Array.isArray(s))return;let o=[];for(let a of s){let d=this.getRegionAtLine(a.startLineNumber);d&&!d.isCollapsed&&o.push(d)}this.toggleCollapseState(o)}dispose(){this._decorationProvider.deltaDecorations(this._editorDecorationIds,[])}getAllRegionsAtLine(s,o){let a=[];if(this._regions){let d=this._regions.findRange(s),u=1;for(;d>=0;){let f=this._regions.toRegion(d);(!o||o(f,u))&&a.push(f),u++,d=f.parentIndex}}return a}getRegionAtLine(s){if(this._regions){let o=this._regions.findRange(s);if(o>=0)return this._regions.toRegion(o)}return null}getRegionsInside(s,o){let a=[],d=s?s.regionIndex+1:0,u=s?s.endLineNumber:Number.MAX_VALUE;if(o&&o.length===2){const f=[];for(let S=d,v=this._regions.length;S<v;S++){let C=this._regions.toRegion(S);if(this._regions.getStartLineNumber(S)<u){for(;f.length>0&&!C.containedBy(f[f.length-1]);)f.pop();f.push(C),o(C,f.length)&&a.push(C)}else break}}else for(let f=d,S=this._regions.length;f<S;f++){let v=this._regions.toRegion(f);if(this._regions.getStartLineNumber(f)<u)(!o||o(v))&&a.push(v);else break}return a}}e.FoldingModel=D;function I(r,s,o){let a=[];for(let d of o){let u=r.getRegionAtLine(d);if(u){const f=!u.isCollapsed;if(a.push(u),s>1){let S=r.getRegionsInside(u,(v,C)=>v.isCollapsed!==f&&C<s);a.push(...S)}}}r.toggleCollapseState(a)}e.toggleCollapseState=I;function w(r,s,o=Number.MAX_VALUE,a){let d=[];if(a&&a.length>0)for(let u of a){let f=r.getRegionAtLine(u);if(f&&(f.isCollapsed!==s&&d.push(f),o>1)){let S=r.getRegionsInside(f,(v,C)=>v.isCollapsed!==s&&C<o);d.push(...S)}}else{let u=r.getRegionsInside(null,(f,S)=>f.isCollapsed!==s&&S<o);d.push(...u)}r.toggleCollapseState(d)}e.setCollapseStateLevelsDown=w;function b(r,s,o,a){let d=[];for(let u of a){let f=r.getAllRegionsAtLine(u,(S,v)=>S.isCollapsed!==s&&v<=o);d.push(...f)}r.toggleCollapseState(d)}e.setCollapseStateLevelsUp=b;function p(r,s,o){let a=[];for(let d of o){let u=r.getAllRegionsAtLine(d,f=>f.isCollapsed!==s);u.length>0&&a.push(u[0])}r.toggleCollapseState(a)}e.setCollapseStateUp=p;function h(r,s,o,a){let d=(f,S)=>S===s&&f.isCollapsed!==o&&!a.some(v=>f.containsLine(v)),u=r.getRegionsInside(null,d);r.toggleCollapseState(u)}e.setCollapseStateAtLevel=h;function g(r,s,o){let a=[];for(let f of o){const S=r.getAllRegionsAtLine(f,void 0);S.length>0&&a.push(S[0])}let d=f=>a.every(S=>!S.containedBy(f)&&!f.containedBy(S))&&f.isCollapsed!==s,u=r.getRegionsInside(null,d);r.toggleCollapseState(u)}e.setCollapseStateForRest=g;function t(r,s,o){let a=r.textModel,d=r.regions,u=[];for(let f=d.length-1;f>=0;f--)if(o!==d.isCollapsed(f)){let S=d.getStartLineNumber(f);s.test(a.getLineContent(S))&&u.push(d.toRegion(f))}r.toggleCollapseState(u)}e.setCollapseStateForMatchingLines=t;function i(r,s,o){let a=r.regions,d=[];for(let u=a.length-1;u>=0;u--)o!==a.isCollapsed(u)&&s===a.getType(u)&&d.push(a.toRegion(u));r.toggleCollapseState(d)}e.setCollapseStateForType=i;function n(r,s){let o=null,a=s.getRegionAtLine(r);if(a!==null&&(o=a.startLineNumber,r===o)){let d=a.parentIndex;d!==-1?o=s.regions.getStartLineNumber(d):o=null}return o}e.getParentFoldLine=n;function l(r,s){let o=s.getRegionAtLine(r);if(o!==null&&o.startLineNumber===r){if(r!==o.startLineNumber)return o.startLineNumber;{let a=o.parentIndex,d=0;for(a!==-1&&(d=s.regions.getStartLineNumber(o.parentIndex));o!==null;)if(o.regionIndex>0){if(o=s.regions.toRegion(o.regionIndex-1),o.startLineNumber<=d)return null;if(o.parentIndex===a)return o.startLineNumber}else return null}}else if(s.regions.length>0)for(o=s.regions.toRegion(s.regions.length-1);o!==null;){if(o.startLineNumber<r)return o.startLineNumber;o.regionIndex>0?o=s.regions.toRegion(o.regionIndex-1):o=null}return null}e.getPreviousFoldLine=l;function c(r,s){let o=s.getRegionAtLine(r);if(o!==null&&o.startLineNumber===r){let a=o.parentIndex,d=0;if(a!==-1)d=s.regions.getEndLineNumber(o.parentIndex);else{if(s.regions.length===0)return null;d=s.regions.getEndLineNumber(s.regions.length-1)}for(;o!==null;)if(o.regionIndex<s.regions.length){if(o=s.regions.toRegion(o.regionIndex+1),o.startLineNumber>=d)return null;if(o.parentIndex===a)return o.startLineNumber}else return null}else if(s.regions.length>0)for(o=s.regions.toRegion(0);o!==null;){if(o.startLineNumber>r)return o.startLineNumber;o.regionIndex<s.regions.length?o=s.regions.toRegion(o.regionIndex+1):o=null}return null}e.getNextFoldLine=c}),define(te[456],ie([1,0,19,4,3,117]),function(j,e,y,m,D,I){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.HiddenRangeModel=void 0;class w{constructor(g){this._updateEventEmitter=new m.Emitter,this._hasLineChanges=!1,this._foldingModel=g,this._foldingModelListener=g.onDidChange(t=>this.updateHiddenRanges()),this._hiddenRanges=[],g.regions.length&&this.updateHiddenRanges()}get onDidChange(){return this._updateEventEmitter.event}get hiddenRanges(){return this._hiddenRanges}notifyChangeModelContent(g){this._hiddenRanges.length&&!this._hasLineChanges&&(this._hasLineChanges=g.changes.some(t=>t.range.endLineNumber!==t.range.startLineNumber||(0,I.countEOL)(t.text)[0]!==0))}updateHiddenRanges(){let g=!1,t=[],i=0,n=0,l=Number.MAX_VALUE,c=-1,r=this._foldingModel.regions;for(;i<r.length;i++){if(!r.isCollapsed(i))continue;let s=r.getStartLineNumber(i)+1,o=r.getEndLineNumber(i);l<=s&&o<=c||(!g&&n<this._hiddenRanges.length&&this._hiddenRanges[n].startLineNumber===s&&this._hiddenRanges[n].endLineNumber===o?(t.push(this._hiddenRanges[n]),n++):(g=!0,t.push(new D.Range(s,1,o,1))),l=s,c=o)}(this._hasLineChanges||g||n<this._hiddenRanges.length)&&this.applyHiddenRanges(t)}applyMemento(g){if(!Array.isArray(g)||g.length===0)return!1;let t=[];for(let i of g){if(!i.startLineNumber||!i.endLineNumber)return!1;t.push(new D.Range(i.startLineNumber+1,1,i.endLineNumber,1))}return this.applyHiddenRanges(t),!0}getMemento(){return this._hiddenRanges.map(g=>({startLineNumber:g.startLineNumber-1,endLineNumber:g.endLineNumber}))}applyHiddenRanges(g){this._hiddenRanges=g,this._hasLineChanges=!1,this._updateEventEmitter.fire(g)}hasRanges(){return this._hiddenRanges.length>0}isHidden(g){return p(this._hiddenRanges,g)!==null}adjustSelections(g){let t=!1,i=this._foldingModel.textModel,n=null,l=c=>((!n||!b(c,n))&&(n=p(this._hiddenRanges,c)),n?n.startLineNumber-1:null);for(let c=0,r=g.length;c<r;c++){let s=g[c],o=l(s.startLineNumber);o&&(s=s.setStartPosition(o,i.getLineMaxColumn(o)),t=!0);let a=l(s.endLineNumber);a&&(s=s.setEndPosition(a,i.getLineMaxColumn(a)),t=!0),g[c]=s}return t}dispose(){this.hiddenRanges.length>0&&(this._hiddenRanges=[],this._updateEventEmitter.fire(this._hiddenRanges)),this._foldingModelListener&&(this._foldingModelListener.dispose(),this._foldingModelListener=null)}}e.HiddenRangeModel=w;function b(h,g){return h>=g.startLineNumber&&h<=g.endLineNumber}function p(h,g){let t=(0,y.findFirstInSorted)(h,i=>g<i.startLineNumber)-1;return t>=0&&h[t].endLineNumber>=g?h[t]:null}}),define(te[457],ie([1,0,178,185]),function(j,e,y,m){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.computeRanges=e.RangesCollector=e.IndentRangeProvider=e.ID_INDENT_PROVIDER=void 0;const D=5e3;e.ID_INDENT_PROVIDER="indent";class I{constructor(h,g,t){this.editorModel=h,this.languageConfigurationService=g,this.maxFoldingRegions=t,this.id=e.ID_INDENT_PROVIDER}dispose(){}compute(h,g){let t=this.languageConfigurationService.getLanguageConfiguration(this.editorModel.getLanguageId()).foldingRules,i=t&&!!t.offSide,n=t&&t.markers;return Promise.resolve(b(this.editorModel,i,n,this.maxFoldingRegions,g))}}e.IndentRangeProvider=I;class w{constructor(h,g){this._notifyTooManyRegions=g,this._startIndexes=[],this._endIndexes=[],this._indentOccurrences=[],this._length=0,this._foldingRangesLimit=h}insertFirst(h,g,t){if(h>m.MAX_LINE_NUMBER||g>m.MAX_LINE_NUMBER)return;let i=this._length;this._startIndexes[i]=h,this._endIndexes[i]=g,this._length++,t<1e3&&(this._indentOccurrences[t]=(this._indentOccurrences[t]||0)+1)}toIndentRanges(h){if(this._length<=this._foldingRangesLimit){let g=new Uint32Array(this._length),t=new Uint32Array(this._length);for(let i=this._length-1,n=0;i>=0;i--,n++)g[n]=this._startIndexes[i],t[n]=this._endIndexes[i];return new m.FoldingRegions(g,t)}else{this._notifyTooManyRegions&&this._notifyTooManyRegions(this._foldingRangesLimit);let g=0,t=this._indentOccurrences.length;for(let c=0;c<this._indentOccurrences.length;c++){let r=this._indentOccurrences[c];if(r){if(r+g>this._foldingRangesLimit){t=c;break}g+=r}}const i=h.getOptions().tabSize;let n=new Uint32Array(this._foldingRangesLimit),l=new Uint32Array(this._foldingRangesLimit);for(let c=this._length-1,r=0;c>=0;c--){let s=this._startIndexes[c],o=h.getLineContent(s),a=(0,y.computeIndentLevel)(o,i);(a<t||a===t&&g++<this._foldingRangesLimit)&&(n[r]=s,l[r]=this._endIndexes[c],r++)}return new m.FoldingRegions(n,l)}}}e.RangesCollector=w;function b(p,h,g,t,i){const n=p.getOptions().tabSize;t=t??D;let l=new w(t,i),c;g&&(c=new RegExp(`(${g.start.source})|(?:${g.end.source})`));let r=[],s=p.getLineCount()+1;r.push({indent:-1,endAbove:s,line:s});for(let o=p.getLineCount();o>0;o--){let a=p.getLineContent(o),d=(0,y.computeIndentLevel)(a,n),u=r[r.length-1];if(d===-1){h&&(u.endAbove=o);continue}let f;if(c&&(f=a.match(c)))if(f[1]){let S=r.length-1;for(;S>0&&r[S].indent!==-2;)S--;if(S>0){r.length=S+1,u=r[S],l.insertFirst(o,u.line,d),u.line=o,u.indent=d,u.endAbove=o;continue}}else{r.push({indent:-2,endAbove:o,line:o});continue}if(u.indent>d){do r.pop(),u=r[r.length-1];while(u.indent>d);let S=u.endAbove-1;S-o>=1&&l.insertFirst(o,S,d)}u.indent===d?u.endAbove=o:r.push({indent:d,endAbove:o,line:o})}return l.toIndentRanges(p)}e.computeRanges=b}),define(te[255],ie([1,0,13,2,185]),function(j,e,y,m,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.sanitizeRanges=e.RangesCollector=e.SyntaxRangeProvider=e.ID_SYNTAX_PROVIDER=void 0;const I={};e.ID_SYNTAX_PROVIDER="syntax";class w{constructor(t,i,n,l){this.editorModel=t,this.providers=i,this.limit=l,this.id=e.ID_SYNTAX_PROVIDER;for(const c of i)typeof c.onDidChange=="function"&&(this.disposables||(this.disposables=new m.DisposableStore),this.disposables.add(c.onDidChange(n)))}compute(t,i){return b(this.providers,this.editorModel,t).then(n=>n?h(n,this.limit,i):null)}dispose(){var t;(t=this.disposables)===null||t===void 0||t.dispose()}}e.SyntaxRangeProvider=w;function b(g,t,i){let n=null,l=g.map((c,r)=>Promise.resolve(c.provideFoldingRanges(t,I,i)).then(s=>{if(!i.isCancellationRequested&&Array.isArray(s)){Array.isArray(n)||(n=[]);let o=t.getLineCount();for(let a of s)a.start>0&&a.end>a.start&&a.end<=o&&n.push({start:a.start,end:a.end,rank:r,kind:a.kind})}},y.onUnexpectedExternalError));return Promise.all(l).then(c=>n)}class p{constructor(t,i){this._notifyTooManyRegions=i,this._startIndexes=[],this._endIndexes=[],this._nestingLevels=[],this._nestingLevelCounts=[],this._types=[],this._length=0,this._foldingRangesLimit=t}add(t,i,n,l){if(t>D.MAX_LINE_NUMBER||i>D.MAX_LINE_NUMBER)return;let c=this._length;this._startIndexes[c]=t,this._endIndexes[c]=i,this._nestingLevels[c]=l,this._types[c]=n,this._length++,l<30&&(this._nestingLevelCounts[l]=(this._nestingLevelCounts[l]||0)+1)}toIndentRanges(){if(this._length<=this._foldingRangesLimit){let t=new Uint32Array(this._length),i=new Uint32Array(this._length);for(let n=0;n<this._length;n++)t[n]=this._startIndexes[n],i[n]=this._endIndexes[n];return new D.FoldingRegions(t,i,this._types)}else{this._notifyTooManyRegions&&this._notifyTooManyRegions(this._foldingRangesLimit);let t=0,i=this._nestingLevelCounts.length;for(let r=0;r<this._nestingLevelCounts.length;r++){let s=this._nestingLevelCounts[r];if(s){if(s+t>this._foldingRangesLimit){i=r;break}t+=s}}let n=new Uint32Array(this._foldingRangesLimit),l=new Uint32Array(this._foldingRangesLimit),c=[];for(let r=0,s=0;r<this._length;r++){let o=this._nestingLevels[r];(o<i||o===i&&t++<this._foldingRangesLimit)&&(n[s]=this._startIndexes[r],l[s]=this._endIndexes[r],c[s]=this._types[r],s++)}return new D.FoldingRegions(n,l,c)}}}e.RangesCollector=p;function h(g,t,i){let n=g.sort((s,o)=>{let a=s.start-o.start;return a===0&&(a=s.rank-o.rank),a}),l=new p(t,i),c,r=[];for(let s of n)if(!c)c=s,l.add(s.start,s.end,s.kind&&s.kind.value,r.length);else if(s.start>c.start)if(s.end<=c.end)r.push(c),c=s,l.add(s.start,s.end,s.kind&&s.kind.value,r.length);else{if(s.start>c.end){do c=r.pop();while(c&&s.start>c.end);c&&r.push(c),c=s}l.add(s.start,s.end,s.kind&&s.kind.value,r.length)}return l.toIndentRanges()}e.sanitizeRanges=h}),define(te[458],ie([1,0,255]),function(j,e,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.InitializingRangeProvider=e.ID_INIT_PROVIDER=void 0,e.ID_INIT_PROVIDER="init";class m{constructor(I,w,b,p){if(this.editorModel=I,this.id=e.ID_INIT_PROVIDER,w.length){let h=g=>({range:{startLineNumber:g.startLineNumber,startColumn:0,endLineNumber:g.endLineNumber,endColumn:I.getLineLength(g.endLineNumber)},options:{description:"folding-initializing-range-provider",stickiness:1}});this.decorationIds=I.deltaDecorations([],w.map(h)),this.timeout=setTimeout(b,p)}}dispose(){this.decorationIds&&(this.editorModel.deltaDecorations(this.decorationIds,[]),this.decorationIds=void 0),typeof this.timeout=="number"&&(clearTimeout(this.timeout),this.timeout=void 0)}compute(I){let w=[];if(this.decorationIds)for(let b of this.decorationIds){let p=this.editorModel.getDecorationRange(b);p&&w.push({start:p.startLineNumber,end:p.endLineNumber,rank:1})}return Promise.resolve((0,y.sanitizeRanges)(w,Number.MAX_VALUE))}}e.InitializingRangeProvider=m}),define(te[256],ie([1,0,61,3]),function(j,e,y,m){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.FormattingEdit=void 0;class D{static _handleEolEdits(w,b){let p,h=[];for(let g of b)typeof g.eol=="number"&&(p=g.eol),g.range&&typeof g.text=="string"&&h.push(g);return typeof p=="number"&&w.hasModel()&&w.getModel().pushEOL(p),h}static _isFullModelReplaceEdit(w,b){if(!w.hasModel())return!1;const p=w.getModel(),h=p.validateRange(b.range);return p.getFullModelRange().equalsRange(h)}static execute(w,b,p){p&&w.pushUndoStop();const h=D._handleEolEdits(w,b);h.length===1&&D._isFullModelReplaceEdit(w,h[0])?w.executeEdits("formatEditsCommand",h.map(g=>y.EditOperation.replace(m.Range.lift(g.range),g.text))):w.executeEdits("formatEditsCommand",h.map(g=>y.EditOperation.replaceMove(m.Range.lift(g.range),g.text))),p&&w.pushUndoStop()}}e.FormattingEdit=D}),define(te[186],ie([1,0,4,2,17]),function(j,e,y,m,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ClickLinkGesture=e.ClickLinkOptions=e.ClickLinkKeyboardEvent=e.ClickLinkMouseEvent=void 0;function I(t,i){return!!t[i]}class w{constructor(i,n){this.target=i.target,this.hasTriggerModifier=I(i.event,n.triggerModifier),this.hasSideBySideModifier=I(i.event,n.triggerSideBySideModifier),this.isNoneOrSingleMouseDown=i.event.detail<=1}}e.ClickLinkMouseEvent=w;class b{constructor(i,n){this.keyCodeIsTriggerKey=i.keyCode===n.triggerKey,this.keyCodeIsSideBySideKey=i.keyCode===n.triggerSideBySideKey,this.hasTriggerModifier=I(i,n.triggerModifier)}}e.ClickLinkKeyboardEvent=b;class p{constructor(i,n,l,c){this.triggerKey=i,this.triggerModifier=n,this.triggerSideBySideKey=l,this.triggerSideBySideModifier=c}equals(i){return this.triggerKey===i.triggerKey&&this.triggerModifier===i.triggerModifier&&this.triggerSideBySideKey===i.triggerSideBySideKey&&this.triggerSideBySideModifier===i.triggerSideBySideModifier}}e.ClickLinkOptions=p;function h(t){return t==="altKey"?D.isMacintosh?new p(57,"metaKey",6,"altKey"):new p(5,"ctrlKey",6,"altKey"):D.isMacintosh?new p(6,"altKey",57,"metaKey"):new p(6,"altKey",5,"ctrlKey")}class g extends m.Disposable{constructor(i){super();this._onMouseMoveOrRelevantKeyDown=this._register(new y.Emitter),this.onMouseMoveOrRelevantKeyDown=this._onMouseMoveOrRelevantKeyDown.event,this._onExecute=this._register(new y.Emitter),this.onExecute=this._onExecute.event,this._onCancel=this._register(new y.Emitter),this.onCancel=this._onCancel.event,this._editor=i,this._opts=h(this._editor.getOption(70)),this._lastMouseMoveEvent=null,this._hasTriggerKeyOnMouseDown=!1,this._lineNumberOnMouseDown=0,this._register(this._editor.onDidChangeConfiguration(n=>{if(n.hasChanged(70)){const l=h(this._editor.getOption(70));if(this._opts.equals(l))return;this._opts=l,this._lastMouseMoveEvent=null,this._hasTriggerKeyOnMouseDown=!1,this._lineNumberOnMouseDown=0,this._onCancel.fire()}})),this._register(this._editor.onMouseMove(n=>this._onEditorMouseMove(new w(n,this._opts)))),this._register(this._editor.onMouseDown(n=>this._onEditorMouseDown(new w(n,this._opts)))),this._register(this._editor.onMouseUp(n=>this._onEditorMouseUp(new w(n,this._opts)))),this._register(this._editor.onKeyDown(n=>this._onEditorKeyDown(new b(n,this._opts)))),this._register(this._editor.onKeyUp(n=>this._onEditorKeyUp(new b(n,this._opts)))),this._register(this._editor.onMouseDrag(()=>this._resetHandler())),this._register(this._editor.onDidChangeCursorSelection(n=>this._onDidChangeCursorSelection(n))),this._register(this._editor.onDidChangeModel(n=>this._resetHandler())),this._register(this._editor.onDidChangeModelContent(()=>this._resetHandler())),this._register(this._editor.onDidScrollChange(n=>{(n.scrollTopChanged||n.scrollLeftChanged)&&this._resetHandler()}))}_onDidChangeCursorSelection(i){i.selection&&i.selection.startColumn!==i.selection.endColumn&&this._resetHandler()}_onEditorMouseMove(i){this._lastMouseMoveEvent=i,this._onMouseMoveOrRelevantKeyDown.fire([i,null])}_onEditorMouseDown(i){this._hasTriggerKeyOnMouseDown=i.hasTriggerModifier,this._lineNumberOnMouseDown=i.target.position?i.target.position.lineNumber:0}_onEditorMouseUp(i){const n=i.target.position?i.target.position.lineNumber:0;this._hasTriggerKeyOnMouseDown&&this._lineNumberOnMouseDown&&this._lineNumberOnMouseDown===n&&this._onExecute.fire(i)}_onEditorKeyDown(i){this._lastMouseMoveEvent&&(i.keyCodeIsTriggerKey||i.keyCodeIsSideBySideKey&&i.hasTriggerModifier)?this._onMouseMoveOrRelevantKeyDown.fire([this._lastMouseMoveEvent,i]):i.hasTriggerModifier&&this._onCancel.fire()}_onEditorKeyUp(i){i.keyCodeIsTriggerKey&&this._onCancel.fire()}_resetHandler(){this._lastMouseMoveEvent=null,this._hasTriggerKeyOnMouseDown=!1,this._onCancel.fire()}}e.ClickLinkGesture=g});var pt=this&&this.__asyncValues||function(j){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var e=j[Symbol.asyncIterator],y;return e?e.call(j):(j=typeof __values=="function"?__values(j):j[Symbol.iterator](),y={},m("next"),m("throw"),m("return"),y[Symbol.asyncIterator]=function(){return this},y);function m(I){y[I]=j[I]&&function(w){return new Promise(function(b,p){w=j[I](w),D(b,p,w.done,w.value)})}}function D(I,w,b,p){Promise.resolve(p).then(function(h){I({value:h,done:b})},w)}};define(te[257],ie([1,0,10,13,4,2]),function(j,e,y,m,D,I){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.HoverOperation=e.HoverResult=void 0;class w{constructor(h,g,t){this.value=h,this.isComplete=g,this.hasLoadingMessage=t}}e.HoverResult=w;class b extends I.Disposable{constructor(h,g){super();this._editor=h,this._computer=g,this._onResult=this._register(new D.Emitter),this.onResult=this._onResult.event,this._firstWaitScheduler=this._register(new y.RunOnceScheduler(()=>this._triggerAsyncComputation(),0)),this._secondWaitScheduler=this._register(new y.RunOnceScheduler(()=>this._triggerSyncComputation(),0)),this._loadingMessageScheduler=this._register(new y.RunOnceScheduler(()=>this._triggerLoadingMessage(),0)),this._state=0,this._asyncIterable=null,this._asyncIterableDone=!1,this._result=[]}dispose(){this._asyncIterable&&(this._asyncIterable.cancel(),this._asyncIterable=null),super.dispose()}get _hoverTime(){return this._editor.getOption(53).delay}get _firstWaitTime(){return this._hoverTime/2}get _secondWaitTime(){return this._hoverTime-this._firstWaitTime}get _loadingMessageTime(){return 3*this._hoverTime}_setState(h,g=!0){this._state=h,g&&this._fireResult()}_triggerAsyncComputation(){this._setState(2),this._secondWaitScheduler.schedule(this._secondWaitTime),this._computer.computeAsync?(this._asyncIterableDone=!1,this._asyncIterable=(0,y.createCancelableAsyncIterable)(h=>this._computer.computeAsync(h)),(()=>ye(this,void 0,void 0,function*(){var h,g;try{try{for(var t=pt(this._asyncIterable),i;i=yield t.next(),!i.done;){const n=i.value;n&&(this._result.push(n),this._fireResult())}}catch(n){h={error:n}}finally{try{i&&!i.done&&(g=t.return)&&(yield g.call(t))}finally{if(h)throw h.error}}this._asyncIterableDone=!0,(this._state===3||this._state===4)&&this._setState(0)}catch(n){(0,m.onUnexpectedError)(n)}}))()):this._asyncIterableDone=!0}_triggerSyncComputation(){this._computer.computeSync&&(this._result=this._result.concat(this._computer.computeSync())),this._setState(this._asyncIterableDone?0:3)}_triggerLoadingMessage(){this._state===3&&this._setState(4)}_fireResult(){if(this._state===1||this._state===2)return;const h=this._state===0,g=this._state===4;this._onResult.fire(new w(this._result.slice(0),h,g))}start(h){if(h===0)this._state===0&&(this._setState(1),this._firstWaitScheduler.schedule(this._firstWaitTime),this._loadingMessageScheduler.schedule(this._loadingMessageTime));else switch(this._state){case 0:this._triggerAsyncComputation(),this._secondWaitScheduler.cancel(),this._triggerSyncComputation();break;case 2:this._secondWaitScheduler.cancel(),this._triggerSyncComputation();break}}cancel(){this._firstWaitScheduler.cancel(),this._secondWaitScheduler.cancel(),this._loadingMessageScheduler.cancel(),this._asyncIterable&&(this._asyncIterable.cancel(),this._asyncIterable=null),this._result=[],this._setState(0,!1)}}e.HoverOperation=b}),define(te[187],ie([1,0]),function(j,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.HoverForeignElementAnchor=e.HoverRangeAnchor=void 0;class y{constructor(I,w){this.priority=I,this.range=w,this.type=1}equals(I){return I.type===1&&this.range.equalsRange(I.range)}canAdoptVisibleHover(I,w){return I.type===1&&w.lineNumber===this.range.startLineNumber}}e.HoverRangeAnchor=y;class m{constructor(I,w,b){this.priority=I,this.owner=w,this.range=b,this.type=2}equals(I){return I.type===2&&this.owner===I.owner}canAdoptVisibleHover(I,w){return I.type===2&&this.owner===I.owner}}e.HoverForeignElementAnchor=m}),define(te[459],ie([1,0,22]),function(j,e,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.InPlaceReplaceCommand=void 0;class m{constructor(I,w,b){this._editRange=I,this._originalSelection=w,this._text=b}getEditOperations(I,w){w.addTrackedEditOperation(this._editRange,this._text)}computeCursorState(I,w){const p=w.getInverseEditOperations()[0].range;return this._originalSelection.isEmpty()?new y.Selection(p.endLineNumber,Math.min(this._originalSelection.positionColumn,p.endColumn),p.endLineNumber,Math.min(this._originalSelection.positionColumn,p.endColumn)):new y.Selection(p.endLineNumber,p.endColumn-this._text.length,p.endLineNumber,p.endColumn)}}e.InPlaceReplaceCommand=m}),define(te[258],ie([1,0]),function(j,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.generateIndent=e.getSpaceCnt=void 0;function y(D,I){let w=0;for(let b=0;b<D.length;b++)D.charAt(b)===" "?w+=I:w++;return w}e.getSpaceCnt=y;function m(D,I,w){D=D<0?0:D;let b="";if(!w){let p=Math.floor(D/I);D=D%I;for(let h=0;h<p;h++)b+=" "}for(let p=0;p<D;p++)b+=" ";return b}e.generateIndent=m}),define(te[460],ie([1,0,13,2,11,3,18]),function(j,e,y,m,D,I,w){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.InlayHintsFragments=e.InlayHintItem=e.InlayHintAnchor=void 0;class b{constructor(t,i){this.range=t,this.direction=i}}e.InlayHintAnchor=b;class p{constructor(t,i,n){this.hint=t,this.anchor=i,this.provider=n,this._isResolved=!1}with(t){const i=new p(this.hint,t.anchor,this.provider);return i._isResolved=this._isResolved,i._currentResolve=this._currentResolve,i}resolve(t){return ye(this,void 0,void 0,function*(){if(typeof this.provider.resolveInlayHint=="function"){if(this._currentResolve)return yield this._currentResolve,t.isCancellationRequested?void 0:this.resolve(t);this._isResolved||(this._currentResolve=this._doResolve(t).finally(()=>this._currentResolve=void 0)),yield this._currentResolve}})}_doResolve(t){var i,n;return ye(this,void 0,void 0,function*(){try{const l=yield Promise.resolve(this.provider.resolveInlayHint(this.hint,t));this.hint.tooltip=(i=l==null?void 0:l.tooltip)!==null&&i!==void 0?i:this.hint.tooltip,this.hint.label=(n=l==null?void 0:l.label)!==null&&n!==void 0?n:this.hint.label,this._isResolved=!0}catch(l){(0,y.onUnexpectedExternalError)(l),this._isResolved=!1}})}}e.InlayHintItem=p;class h{constructor(t,i,n){this._disposables=new m.DisposableStore,this.ranges=t,this.provider=new Set;const l=[];for(const[c,r]of i){this._disposables.add(c),this.provider.add(r);for(const s of c.hints){let o=n.validatePosition(s.position),a="before";const d=h._getRangeAtPosition(n,o);let u;d.getStartPosition().isBefore(o)?(u=I.Range.fromPositions(d.getStartPosition(),o),a="after"):(u=I.Range.fromPositions(o,d.getEndPosition()),a="before"),l.push(new p(s,new b(u,a),r))}}this.items=l.sort((c,r)=>D.Position.compare(c.hint.position,r.hint.position))}static create(t,i,n){return ye(this,void 0,void 0,function*(){const l=[],c=w.InlayHintsProviderRegistry.ordered(t).reverse().map(r=>i.map(s=>ye(this,void 0,void 0,function*(){try{const o=yield r.provideInlayHints(t,s,n);(o==null?void 0:o.hints.length)&&l.push([o,r])}catch(o){(0,y.onUnexpectedExternalError)(o)}})));if(yield Promise.all(c.flat()),n.isCancellationRequested||t.isDisposed())throw new y.CancellationError;return new h(i,l,t)})}dispose(){this._disposables.dispose()}static _getRangeAtPosition(t,i){const n=i.lineNumber,l=t.getWordAtPosition(i);if(l)return new I.Range(n,l.startColumn,n,l.endColumn);t.tokenizeIfCheap(n);const c=t.getLineTokens(n),r=i.column-1,s=c.findTokenIndexAtOffset(r);let o=c.getStartOffset(s),a=c.getEndOffset(s);return a-o==1&&(o===r&&s>1?(o=c.getStartOffset(s-1),a=c.getEndOffset(s-1)):a===r&&s<c.getCount()-1&&(o=c.getStartOffset(s+1),a=c.getEndOffset(s+1))),new I.Range(n,o+1,n,a+1)}}e.InlayHintsFragments=h}),define(te[259],ie([1,0]),function(j,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.inlineSuggestCommitId=void 0,e.inlineSuggestCommitId="editor.action.inlineSuggest.commit"}),define(te[188],ie([1,0,4,2,3]),function(j,e,y,m,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BaseGhostTextWidgetModel=e.GhostTextPart=e.GhostText=void 0;class I{constructor(t,i,n=0){this.lineNumber=t,this.parts=i,this.additionalReservedLineCount=n}renderForScreenReader(t){if(this.parts.length===0)return"";const i=this.parts[this.parts.length-1],n=t.substr(0,i.column-1);return b(n,this.parts.map(c=>({range:{startLineNumber:1,endLineNumber:1,startColumn:c.column,endColumn:c.column},text:c.lines.join(`
|
||
`)}))).substring(this.parts[0].column-1)}}e.GhostText=I;class w{constructor(t){this.lineStartOffsetByLineIdx=[],this.lineStartOffsetByLineIdx.push(0);for(let i=0;i<t.length;i++)t.charAt(i)===`
|
||
`&&this.lineStartOffsetByLineIdx.push(i+1)}getOffset(t){return this.lineStartOffsetByLineIdx[t.lineNumber-1]+t.column-1}}function b(g,t){const i=new w(g),n=t.map(l=>{const c=D.Range.lift(l.range);return{startOffset:i.getOffset(c.getStartPosition()),endOffset:i.getOffset(c.getEndPosition()),text:l.text}});n.sort((l,c)=>c.startOffset-l.startOffset);for(const l of n)g=g.substring(0,l.startOffset)+l.text+g.substring(l.endOffset);return g}class p{constructor(t,i,n){this.column=t,this.lines=i,this.preview=n}}e.GhostTextPart=p;class h extends m.Disposable{constructor(t){super();this.editor=t,this._expanded=void 0,this.onDidChangeEmitter=new y.Emitter,this.onDidChange=this.onDidChangeEmitter.event,this._register(t.onDidChangeConfiguration(i=>{i.hasChanged(106)&&this._expanded===void 0&&this.onDidChangeEmitter.fire()}))}setExpanded(t){this._expanded=!0,this.onDidChangeEmitter.fire()}}e.BaseGhostTextWidgetModel=h}),define(te[189],ie([1,0,138,8,3,188]),function(j,e,y,m,D,I){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.inlineCompletionToGhostText=e.normalizedInlineCompletionsEquals=void 0;function w(t,i){return t===i?!0:!t||!i?!1:t.range.equalsRange(i.range)&&t.text===i.text&&t.command===i.command}e.normalizedInlineCompletionsEquals=w;function b(t,i,n,l,c=0){if(t.range.startLineNumber!==t.range.endLineNumber)return;const r=i.getLineContent(t.range.startLineNumber),s=m.getLeadingWhitespace(r).length;if(t.range.startColumn-1<=s){const v=m.getLeadingWhitespace(t.text).length,C=r.substring(t.range.startColumn-1,s),_=D.Range.fromPositions(t.range.getStartPosition().delta(0,C.length),t.range.getEndPosition()),L=t.text.startsWith(C)?t.text.substring(C.length):t.text.substring(v);t={range:_,text:L,command:t.command}}const a=i.getValueInRange(t.range),d=h(a,t.text);if(!d)return;const u=t.range.startLineNumber,f=new Array;if(n==="prefix"){const v=d.filter(C=>C.originalLength===0);if(v.length>1||v.length===1&&v[0].originalStart!==a.length)return}const S=t.text.length-c;for(const v of d){const C=t.range.startColumn+v.originalStart+v.originalLength;if(n==="subwordSmart"&&l&&l.lineNumber===t.range.startLineNumber&&C<l.column||v.originalLength>0)return;if(v.modifiedLength===0)continue;const _=v.modifiedStart+v.modifiedLength,L=Math.max(v.modifiedStart,Math.min(_,S)),E=t.text.substring(v.modifiedStart,L),N=t.text.substring(L,Math.max(v.modifiedStart,_));if(E.length>0){const k=m.splitLines(E);f.push(new I.GhostTextPart(C,k,!1))}if(N.length>0){const k=m.splitLines(N);f.push(new I.GhostTextPart(C,k,!0))}}return new I.GhostText(u,f,0)}e.inlineCompletionToGhostText=b;let p;function h(t,i){if((p==null?void 0:p.originalValue)===t&&(p==null?void 0:p.newValue)===i)return p==null?void 0:p.changes;{const n=g(t,i);return p={originalValue:t,newValue:i,changes:n},n}}function g(t,i){if(t.length>5e3||i.length>5e3)return;function n(a){let d=0;for(let u=0,f=a.length;u<f;u++){const S=a.charCodeAt(u);S>d&&(d=S)}return d}const l=Math.max(n(t),n(i));function c(a){if(a<0)throw new Error("unexpected");return l+a+1}function r(a){let d=0,u=0;const f=new Int32Array(a.length);for(let S=0,v=a.length;S<v;S++){const C=u*100+d;a[S]==="("?(f[S]=c(2*C),d++):a[S]===")"?(f[S]=c(2*C+1),d===1&&u++,d=Math.max(d-1,0)):f[S]=a.charCodeAt(S)}return f}const s=r(t),o=r(i);return new y.LcsDiff({getElements:()=>s},{getElements:()=>o}).ComputeDiff(!1).changes}}),define(te[461],ie([1,0]),function(j,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.createDisposableRef=void 0;function y(m,D){return{object:m,dispose:()=>D==null?void 0:D.dispose()}}e.createDisposableRef=y}),define(te[462],ie([1,0,3,22]),function(j,e,y,m){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CopyLinesCommand=void 0;class D{constructor(w,b,p){this._selection=w,this._isCopyingDown=b,this._noop=p||!1,this._selectionDirection=0,this._selectionId=null,this._startLineNumberDelta=0,this._endLineNumberDelta=0}getEditOperations(w,b){let p=this._selection;this._startLineNumberDelta=0,this._endLineNumberDelta=0,p.startLineNumber<p.endLineNumber&&p.endColumn===1&&(this._endLineNumberDelta=1,p=p.setEndPosition(p.endLineNumber-1,w.getLineMaxColumn(p.endLineNumber-1)));let h=[];for(let t=p.startLineNumber;t<=p.endLineNumber;t++)h.push(w.getLineContent(t));const g=h.join(`
|
||
`);g===""&&this._isCopyingDown&&(this._startLineNumberDelta++,this._endLineNumberDelta++),this._noop?b.addEditOperation(new y.Range(p.endLineNumber,w.getLineMaxColumn(p.endLineNumber),p.endLineNumber+1,1),p.endLineNumber===w.getLineCount()?"":`
|
||
`):this._isCopyingDown?b.addEditOperation(new y.Range(p.startLineNumber,1,p.startLineNumber,1),g+`
|
||
`):b.addEditOperation(new y.Range(p.endLineNumber,w.getLineMaxColumn(p.endLineNumber),p.endLineNumber,w.getLineMaxColumn(p.endLineNumber)),`
|
||
`+g),this._selectionId=b.trackSelection(p),this._selectionDirection=this._selection.getDirection()}computeCursorState(w,b){let p=b.getTrackedSelection(this._selectionId);if(this._startLineNumberDelta!==0||this._endLineNumberDelta!==0){let h=p.startLineNumber,g=p.startColumn,t=p.endLineNumber,i=p.endColumn;this._startLineNumberDelta!==0&&(h=h+this._startLineNumberDelta,g=1),this._endLineNumberDelta!==0&&(t=t+this._endLineNumberDelta,i=1),p=m.Selection.createWithDirection(h,g,t,i,this._selectionDirection)}return p}}e.CopyLinesCommand=D}),define(te[463],ie([1,0,61,3]),function(j,e,y,m){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SortLinesCommand=void 0;class D{constructor(p,h){this.selection=p,this.descending=h,this.selectionId=null}static getCollator(){return D._COLLATOR||(D._COLLATOR=new Intl.Collator),D._COLLATOR}getEditOperations(p,h){let g=w(p,this.selection,this.descending);g&&h.addEditOperation(g.range,g.text),this.selectionId=h.trackSelection(this.selection)}computeCursorState(p,h){return h.getTrackedSelection(this.selectionId)}static canRun(p,h,g){if(p===null)return!1;let t=I(p,h,g);if(!t)return!1;for(let i=0,n=t.before.length;i<n;i++)if(t.before[i]!==t.after[i])return!0;return!1}}e.SortLinesCommand=D,D._COLLATOR=null;function I(b,p,h){let g=p.startLineNumber,t=p.endLineNumber;if(p.endColumn===1&&t--,g>=t)return null;let i=[];for(let l=g;l<=t;l++)i.push(b.getLineContent(l));let n=i.slice(0);return n.sort(D.getCollator().compare),h===!0&&(n=n.reverse()),{startLineNumber:g,endLineNumber:t,before:i,after:n}}function w(b,p,h){let g=I(b,p,h);return g?y.EditOperation.replace(new m.Range(g.startLineNumber,1,g.endLineNumber,b.getLineMaxColumn(g.endLineNumber)),g.after.join(`
|
||
`)):null}}),define(te[260],ie([1,0,81,11,3]),function(j,e,y,m,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BracketSelectionRangeProvider=void 0;class I{provideSelectionRanges(b,p){return ye(this,void 0,void 0,function*(){const h=[];for(const g of p){const t=[];h.push(t);const i=new Map;yield new Promise(n=>I._bracketsRightYield(n,0,b,g,i)),yield new Promise(n=>I._bracketsLeftYield(n,0,b,g,i,t))}return h})}static _bracketsRightYield(b,p,h,g,t){const i=new Map,n=Date.now();for(;;){if(p>=I._maxRounds){b();break}if(!g){b();break}let l=h.bracketPairs.findNextBracket(g);if(!l){b();break}if(Date.now()-n>I._maxDuration){setTimeout(()=>I._bracketsRightYield(b,p+1,h,g,t));break}const r=l.close[0];if(l.isOpen){let s=i.has(r)?i.get(r):0;i.set(r,s+1)}else{let s=i.has(r)?i.get(r):0;if(s-=1,i.set(r,Math.max(0,s)),s<0){let o=t.get(r);o||(o=new y.LinkedList,t.set(r,o)),o.push(l.range)}}g=l.range.getEndPosition()}}static _bracketsLeftYield(b,p,h,g,t,i){const n=new Map,l=Date.now();for(;;){if(p>=I._maxRounds&&t.size===0){b();break}if(!g){b();break}let c=h.bracketPairs.findPrevBracket(g);if(!c){b();break}if(Date.now()-l>I._maxDuration){setTimeout(()=>I._bracketsLeftYield(b,p+1,h,g,t,i));break}const s=c.close[0];if(c.isOpen){let o=n.has(s)?n.get(s):0;if(o-=1,n.set(s,Math.max(0,o)),o<0){let a=t.get(s);if(a){let d=a.shift();a.size===0&&t.delete(s);const u=D.Range.fromPositions(c.range.getEndPosition(),d.getStartPosition()),f=D.Range.fromPositions(c.range.getStartPosition(),d.getEndPosition());i.push({range:u}),i.push({range:f}),I._addBracketLeading(h,f,i)}}}else{let o=n.has(s)?n.get(s):0;n.set(s,o+1)}g=c.range.getStartPosition()}}static _addBracketLeading(b,p,h){if(p.startLineNumber===p.endLineNumber)return;const g=p.startLineNumber,t=b.getLineFirstNonWhitespaceColumn(g);t!==0&&t!==p.startColumn&&(h.push({range:D.Range.fromPositions(new m.Position(g,t),p.getEndPosition())}),h.push({range:D.Range.fromPositions(new m.Position(g,1),p.getEndPosition())}));const i=g-1;if(i>0){const n=b.getLineFirstNonWhitespaceColumn(i);n===p.startColumn&&n!==b.getLineLastNonWhitespaceColumn(i)&&(h.push({range:D.Range.fromPositions(new m.Position(i,n),p.getEndPosition())}),h.push({range:D.Range.fromPositions(new m.Position(i,1),p.getEndPosition())}))}}}e.BracketSelectionRangeProvider=I,I._maxDuration=30,I._maxRounds=2}),define(te[464],ie([1,0,8,3]),function(j,e,y,m){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.WordSelectionRangeProvider=void 0;class D{provideSelectionRanges(w,b){const p=[];for(const h of b){const g=[];p.push(g),this._addInWordRanges(g,w,h),this._addWordRanges(g,w,h),this._addWhitespaceLine(g,w,h),g.push({range:w.getFullModelRange()})}return p}_addInWordRanges(w,b,p){const h=b.getWordAtPosition(p);if(!h)return;let{word:g,startColumn:t}=h,i=p.column-t,n=i,l=i,c=0;for(;n>=0;n--){let r=g.charCodeAt(n);if(n!==i&&(r===95||r===45))break;if((0,y.isLowerAsciiLetter)(r)&&(0,y.isUpperAsciiLetter)(c))break;c=r}for(n+=1;l<g.length;l++){let r=g.charCodeAt(l);if((0,y.isUpperAsciiLetter)(r)&&(0,y.isLowerAsciiLetter)(c))break;if(r===95||r===45)break;c=r}n<l&&w.push({range:new m.Range(p.lineNumber,t+n,p.lineNumber,t+l)})}_addWordRanges(w,b,p){const h=b.getWordAtPosition(p);h&&w.push({range:new m.Range(p.lineNumber,h.startColumn,p.lineNumber,h.endColumn)})}_addWhitespaceLine(w,b,p){b.getLineLength(p.lineNumber)>0&&b.getLineFirstNonWhitespaceColumn(p.lineNumber)===0&&b.getLineLastNonWhitespaceColumn(p.lineNumber)===0&&w.push({range:new m.Range(p.lineNumber,1,p.lineNumber,b.getLineMaxColumn(p.lineNumber))})}}e.WordSelectionRangeProvider=D}),define(te[124],ie([1,0]),function(j,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SnippetParser=e.TextmateSnippet=e.Variable=e.FormatString=e.Transform=e.Choice=e.Placeholder=e.TransformableMarker=e.Text=e.Marker=e.Scanner=void 0;class y{constructor(){this.value="",this.pos=0}static isDigitCharacter(c){return c>=48&&c<=57}static isVariableCharacter(c){return c===95||c>=97&&c<=122||c>=65&&c<=90}text(c){this.value=c,this.pos=0}tokenText(c){return this.value.substr(c.pos,c.len)}next(){if(this.pos>=this.value.length)return{type:14,pos:this.pos,len:0};let c=this.pos,r=0,s=this.value.charCodeAt(c),o;if(o=y._table[s],typeof o=="number")return this.pos+=1,{type:o,pos:c,len:1};if(y.isDigitCharacter(s)){o=8;do r+=1,s=this.value.charCodeAt(c+r);while(y.isDigitCharacter(s));return this.pos+=r,{type:o,pos:c,len:r}}if(y.isVariableCharacter(s)){o=9;do s=this.value.charCodeAt(c+ ++r);while(y.isVariableCharacter(s)||y.isDigitCharacter(s));return this.pos+=r,{type:o,pos:c,len:r}}o=10;do r+=1,s=this.value.charCodeAt(c+r);while(!isNaN(s)&&typeof y._table[s]=="undefined"&&!y.isDigitCharacter(s)&&!y.isVariableCharacter(s));return this.pos+=r,{type:o,pos:c,len:r}}}e.Scanner=y,y._table={[36]:0,[58]:1,[44]:2,[123]:3,[125]:4,[92]:5,[47]:6,[124]:7,[43]:11,[45]:12,[63]:13};class m{constructor(){this._children=[]}appendChild(c){return c instanceof D&&this._children[this._children.length-1]instanceof D?this._children[this._children.length-1].value+=c.value:(c.parent=this,this._children.push(c)),this}replace(c,r){const{parent:s}=c,o=s.children.indexOf(c),a=s.children.slice(0);a.splice(o,1,...r),s._children=a,function d(u,f){for(const S of u)S.parent=f,d(S.children,S)}(r,s)}get children(){return this._children}get snippet(){let c=this;for(;;){if(!c)return;if(c instanceof i)return c;c=c.parent}}toString(){return this.children.reduce((c,r)=>c+r.toString(),"")}len(){return 0}}e.Marker=m;class D extends m{constructor(c){super();this.value=c}toString(){return this.value}len(){return this.value.length}clone(){return new D(this.value)}}e.Text=D;class I extends m{}e.TransformableMarker=I;class w extends I{constructor(c){super();this.index=c}static compareByIndex(c,r){return c.index===r.index?0:c.isFinalTabstop?1:r.isFinalTabstop||c.index<r.index?-1:c.index>r.index?1:0}get isFinalTabstop(){return this.index===0}get choice(){return this._children.length===1&&this._children[0]instanceof b?this._children[0]:void 0}clone(){let c=new w(this.index);return this.transform&&(c.transform=this.transform.clone()),c._children=this.children.map(r=>r.clone()),c}}e.Placeholder=w;class b extends m{constructor(){super(...arguments);this.options=[]}appendChild(c){return c instanceof D&&(c.parent=this,this.options.push(c)),this}toString(){return this.options[0].value}len(){return this.options[0].len()}clone(){let c=new b;return this.options.forEach(c.appendChild,c),c}}e.Choice=b;class p extends m{constructor(){super(...arguments);this.regexp=new RegExp("")}resolve(c){const r=this;let s=!1,o=c.replace(this.regexp,function(){return s=!0,r._replace(Array.prototype.slice.call(arguments,0,-2))});return!s&&this._children.some(a=>a instanceof h&&Boolean(a.elseValue))&&(o=this._replace([])),o}_replace(c){let r="";for(const s of this._children)if(s instanceof h){let o=c[s.index]||"";o=s.resolve(o),r+=o}else r+=s.toString();return r}toString(){return""}clone(){let c=new p;return c.regexp=new RegExp(this.regexp.source,""+(this.regexp.ignoreCase?"i":"")+(this.regexp.global?"g":"")),c._children=this.children.map(r=>r.clone()),c}}e.Transform=p;class h extends m{constructor(c,r,s,o){super();this.index=c,this.shorthandName=r,this.ifValue=s,this.elseValue=o}resolve(c){return this.shorthandName==="upcase"?c?c.toLocaleUpperCase():"":this.shorthandName==="downcase"?c?c.toLocaleLowerCase():"":this.shorthandName==="capitalize"?c?c[0].toLocaleUpperCase()+c.substr(1):"":this.shorthandName==="pascalcase"?c?this._toPascalCase(c):"":this.shorthandName==="camelcase"?c?this._toCamelCase(c):"":Boolean(c)&&typeof this.ifValue=="string"?this.ifValue:!Boolean(c)&&typeof this.elseValue=="string"?this.elseValue:c||""}_toPascalCase(c){const r=c.match(/[a-z0-9]+/gi);return r?r.map(s=>s.charAt(0).toUpperCase()+s.substr(1).toLowerCase()).join(""):c}_toCamelCase(c){const r=c.match(/[a-z0-9]+/gi);return r?r.map((s,o)=>o===0?s.toLowerCase():s.charAt(0).toUpperCase()+s.substr(1).toLowerCase()).join(""):c}clone(){return new h(this.index,this.shorthandName,this.ifValue,this.elseValue)}}e.FormatString=h;class g extends I{constructor(c){super();this.name=c}resolve(c){let r=c.resolve(this);return this.transform&&(r=this.transform.resolve(r||"")),r!==void 0?(this._children=[new D(r)],!0):!1}clone(){const c=new g(this.name);return this.transform&&(c.transform=this.transform.clone()),c._children=this.children.map(r=>r.clone()),c}}e.Variable=g;function t(l,c){const r=[...l];for(;r.length>0;){const s=r.shift();if(!c(s))break;r.unshift(...s.children)}}class i extends m{get placeholderInfo(){if(!this._placeholders){let c=[],r;this.walk(function(s){return s instanceof w&&(c.push(s),r=!r||r.index<s.index?s:r),!0}),this._placeholders={all:c,last:r}}return this._placeholders}get placeholders(){const{all:c}=this.placeholderInfo;return c}offset(c){let r=0,s=!1;return this.walk(o=>o===c?(s=!0,!1):(r+=o.len(),!0)),s?r:-1}fullLen(c){let r=0;return t([c],s=>(r+=s.len(),!0)),r}enclosingPlaceholders(c){let r=[],{parent:s}=c;for(;s;)s instanceof w&&r.push(s),s=s.parent;return r}resolveVariables(c){return this.walk(r=>(r instanceof g&&r.resolve(c)&&(this._placeholders=void 0),!0)),this}appendChild(c){return this._placeholders=void 0,super.appendChild(c)}replace(c,r){return this._placeholders=void 0,super.replace(c,r)}clone(){let c=new i;return this._children=this.children.map(r=>r.clone()),c}walk(c){t(this.children,c)}}e.TextmateSnippet=i;class n{constructor(){this._scanner=new y,this._token={type:14,pos:0,len:0}}static escape(c){return c.replace(/\$|}|\\/g,"\\$&")}static guessNeedsClipboard(c){return/\${?CLIPBOARD/.test(c)}parse(c,r,s){this._scanner.text(c),this._token=this._scanner.next();const o=new i;for(;this._parse(o););const a=new Map,d=[];let u=0;o.walk(f=>(f instanceof w&&(u+=1,f.isFinalTabstop?a.set(0,void 0):!a.has(f.index)&&f.children.length>0?a.set(f.index,f.children):d.push(f)),!0));for(const f of d){const S=a.get(f.index);if(S){const v=new w(f.index);v.transform=f.transform;for(const C of S)v.appendChild(C.clone());o.replace(f,[v])}}return s||(s=u>0&&r),!a.has(0)&&s&&o.appendChild(new w(0)),o}_accept(c,r){if(c===void 0||this._token.type===c){let s=r?this._scanner.tokenText(this._token):!0;return this._token=this._scanner.next(),s}return!1}_backTo(c){return this._scanner.pos=c.pos+c.len,this._token=c,!1}_until(c){const r=this._token;for(;this._token.type!==c;){if(this._token.type===14)return!1;if(this._token.type===5){const o=this._scanner.next();if(o.type!==0&&o.type!==4&&o.type!==5)return!1}this._token=this._scanner.next()}const s=this._scanner.value.substring(r.pos,this._token.pos).replace(/\\(\$|}|\\)/g,"$1");return this._token=this._scanner.next(),s}_parse(c){return this._parseEscaped(c)||this._parseTabstopOrVariableName(c)||this._parseComplexPlaceholder(c)||this._parseComplexVariable(c)||this._parseAnything(c)}_parseEscaped(c){let r;return(r=this._accept(5,!0))?(r=this._accept(0,!0)||this._accept(4,!0)||this._accept(5,!0)||r,c.appendChild(new D(r)),!0):!1}_parseTabstopOrVariableName(c){let r;const s=this._token;return this._accept(0)&&(r=this._accept(9,!0)||this._accept(8,!0))?(c.appendChild(/^\d+$/.test(r)?new w(Number(r)):new g(r)),!0):this._backTo(s)}_parseComplexPlaceholder(c){let r;const s=this._token;if(!(this._accept(0)&&this._accept(3)&&(r=this._accept(8,!0))))return this._backTo(s);const a=new w(Number(r));if(this._accept(1))for(;;){if(this._accept(4))return c.appendChild(a),!0;if(!this._parse(a))return c.appendChild(new D("${"+r+":")),a.children.forEach(c.appendChild,c),!0}else if(a.index>0&&this._accept(7)){const d=new b;for(;;){if(this._parseChoiceElement(d)){if(this._accept(2))continue;if(this._accept(7)&&(a.appendChild(d),this._accept(4)))return c.appendChild(a),!0}return this._backTo(s),!1}}else return this._accept(6)?this._parseTransform(a)?(c.appendChild(a),!0):(this._backTo(s),!1):this._accept(4)?(c.appendChild(a),!0):this._backTo(s)}_parseChoiceElement(c){const r=this._token,s=[];for(;!(this._token.type===2||this._token.type===7);){let o;if((o=this._accept(5,!0))?o=this._accept(2,!0)||this._accept(7,!0)||this._accept(5,!0)||o:o=this._accept(void 0,!0),!o)return this._backTo(r),!1;s.push(o)}return s.length===0?(this._backTo(r),!1):(c.appendChild(new D(s.join(""))),!0)}_parseComplexVariable(c){let r;const s=this._token;if(!(this._accept(0)&&this._accept(3)&&(r=this._accept(9,!0))))return this._backTo(s);const a=new g(r);if(this._accept(1))for(;;){if(this._accept(4))return c.appendChild(a),!0;if(!this._parse(a))return c.appendChild(new D("${"+r+":")),a.children.forEach(c.appendChild,c),!0}else return this._accept(6)?this._parseTransform(a)?(c.appendChild(a),!0):(this._backTo(s),!1):this._accept(4)?(c.appendChild(a),!0):this._backTo(s)}_parseTransform(c){let r=new p,s="",o="";for(;!this._accept(6);){let a;if(a=this._accept(5,!0)){a=this._accept(6,!0)||a,s+=a;continue}if(this._token.type!==14){s+=this._accept(void 0,!0);continue}return!1}for(;!this._accept(6);){let a;if(a=this._accept(5,!0)){a=this._accept(5,!0)||this._accept(6,!0)||a,r.appendChild(new D(a));continue}if(!(this._parseFormatString(r)||this._parseAnything(r)))return!1}for(;!this._accept(4);){if(this._token.type!==14){o+=this._accept(void 0,!0);continue}return!1}try{r.regexp=new RegExp(s,o)}catch{return!1}return c.transform=r,!0}_parseFormatString(c){const r=this._token;if(!this._accept(0))return!1;let s=!1;this._accept(3)&&(s=!0);let o=this._accept(8,!0);if(o)if(s){if(this._accept(4))return c.appendChild(new h(Number(o))),!0;if(!this._accept(1))return this._backTo(r),!1}else return c.appendChild(new h(Number(o))),!0;else return this._backTo(r),!1;if(this._accept(6)){let a=this._accept(9,!0);return!a||!this._accept(4)?(this._backTo(r),!1):(c.appendChild(new h(Number(o),a)),!0)}else if(this._accept(11)){let a=this._until(4);if(a)return c.appendChild(new h(Number(o),void 0,a,void 0)),!0}else if(this._accept(12)){let a=this._until(4);if(a)return c.appendChild(new h(Number(o),void 0,void 0,a)),!0}else if(this._accept(13)){let a=this._until(1);if(a){let d=this._until(4);if(d)return c.appendChild(new h(Number(o),void 0,a,d)),!0}}else{let a=this._until(4);if(a)return c.appendChild(new h(Number(o),void 0,void 0,a)),!0}return this._backTo(r),!1}_parseAnything(c){return this._token.type!==14?(c.appendChild(new D(this._scanner.tokenText(this._token))),this._accept(void 0),!0):!1}}e.SnippetParser=n}),define(te[465],ie([1,0,19,73,8]),function(j,e,y,m,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CompletionModel=e.LineContext=void 0;class I{constructor(p,h){this.leadingLineContent=p,this.characterCountDelta=h}}e.LineContext=I;class w{constructor(p,h,g,t,i,n,l){this.clipboardText=l,this._snippetCompareFn=w._compareCompletionItems,this._items=p,this._column=h,this._wordDistance=t,this._options=i,this._refilterKind=1,this._lineContext=g,n==="top"?this._snippetCompareFn=w._compareCompletionItemsSnippetsUp:n==="bottom"&&(this._snippetCompareFn=w._compareCompletionItemsSnippetsDown)}get lineContext(){return this._lineContext}set lineContext(p){(this._lineContext.leadingLineContent!==p.leadingLineContent||this._lineContext.characterCountDelta!==p.characterCountDelta)&&(this._refilterKind=this._lineContext.characterCountDelta<p.characterCountDelta&&this._filteredItems?2:1,this._lineContext=p)}get items(){return this._ensureCachedState(),this._filteredItems}get allProvider(){return this._ensureCachedState(),this._providerInfo.keys()}get incomplete(){this._ensureCachedState();const p=new Set;for(let[h,g]of this._providerInfo)g&&p.add(h);return p}adopt(p){let h=[];for(let g=0;g<this._items.length;)p.has(this._items[g].provider)?g++:(h.push(this._items[g]),this._items[g]=this._items[this._items.length-1],this._items.pop());return this._refilterKind=1,h}get stats(){return this._ensureCachedState(),this._stats}_ensureCachedState(){this._refilterKind!==0&&this._createCachedState()}_createCachedState(){this._providerInfo=new Map;const p=[],{leadingLineContent:h,characterCountDelta:g}=this._lineContext;let t="",i="";const n=this._refilterKind===1?this._items:this._filteredItems,l=[],c=!this._options.filterGraceful||n.length>2e3?m.fuzzyScore:m.fuzzyScoreGracefulAggressive;for(let r=0;r<n.length;r++){const s=n[r];if(s.isInvalid)continue;this._providerInfo.set(s.provider,Boolean(s.container.incomplete));const o=s.position.column-s.editStart.column,a=o+g-(s.position.column-this._column);if(t.length!==a&&(t=a===0?"":h.slice(-a),i=t.toLowerCase()),s.word=t,a===0)s.score=m.FuzzyScore.Default;else{let d=0;for(;d<o;){const u=t.charCodeAt(d);if(u===32||u===9)d+=1;else break}if(d>=a)s.score=m.FuzzyScore.Default;else if(typeof s.completion.filterText=="string"){let u=c(t,i,d,s.completion.filterText,s.filterTextLow,0,!1);if(!u)continue;(0,D.compareIgnoreCase)(s.completion.filterText,s.textLabel)===0?s.score=u:(s.score=(0,m.anyScore)(t,i,d,s.textLabel,s.labelLow,0),s.score[0]=u[0])}else{let u=c(t,i,d,s.textLabel,s.labelLow,0,!1);if(!u)continue;s.score=u}}s.idx=r,s.distance=this._wordDistance.distance(s.position,s.completion),l.push(s),p.push(s.textLabel.length)}this._filteredItems=l.sort(this._snippetCompareFn),this._refilterKind=0,this._stats={pLabelLen:p.length?(0,y.quickSelect)(p.length-.85,p,(r,s)=>r-s):0}}static _compareCompletionItems(p,h){return p.score[0]>h.score[0]?-1:p.score[0]<h.score[0]?1:p.distance<h.distance?-1:p.distance>h.distance?1:p.idx<h.idx?-1:p.idx>h.idx?1:0}static _compareCompletionItemsSnippetsDown(p,h){if(p.completion.kind!==h.completion.kind){if(p.completion.kind===27)return 1;if(h.completion.kind===27)return-1}return w._compareCompletionItems(p,h)}static _compareCompletionItemsSnippetsUp(p,h){if(p.completion.kind!==h.completion.kind){if(p.completion.kind===27)return-1;if(h.completion.kind===27)return 1}return w._compareCompletionItems(p,h)}}e.CompletionModel=w}),define(te[261],ie([1,0,7,114,4,2]),function(j,e,y,m,D,I){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ResizableHTMLElement=void 0;class w{constructor(){this._onDidWillResize=new D.Emitter,this.onDidWillResize=this._onDidWillResize.event,this._onDidResize=new D.Emitter,this.onDidResize=this._onDidResize.event,this._sashListener=new I.DisposableStore,this._size=new y.Dimension(0,0),this._minSize=new y.Dimension(0,0),this._maxSize=new y.Dimension(Number.MAX_SAFE_INTEGER,Number.MAX_SAFE_INTEGER),this.domNode=document.createElement("div"),this._eastSash=new m.Sash(this.domNode,{getVerticalSashLeft:()=>this._size.width},{orientation:0}),this._westSash=new m.Sash(this.domNode,{getVerticalSashLeft:()=>0},{orientation:0}),this._northSash=new m.Sash(this.domNode,{getHorizontalSashTop:()=>0},{orientation:1,orthogonalEdge:m.OrthogonalEdge.North}),this._southSash=new m.Sash(this.domNode,{getHorizontalSashTop:()=>this._size.height},{orientation:1,orthogonalEdge:m.OrthogonalEdge.South}),this._northSash.orthogonalStartSash=this._westSash,this._northSash.orthogonalEndSash=this._eastSash,this._southSash.orthogonalStartSash=this._westSash,this._southSash.orthogonalEndSash=this._eastSash;let p,h=0,g=0;this._sashListener.add(D.Event.any(this._northSash.onDidStart,this._eastSash.onDidStart,this._southSash.onDidStart,this._westSash.onDidStart)(()=>{p===void 0&&(this._onDidWillResize.fire(),p=this._size,h=0,g=0)})),this._sashListener.add(D.Event.any(this._northSash.onDidEnd,this._eastSash.onDidEnd,this._southSash.onDidEnd,this._westSash.onDidEnd)(()=>{p!==void 0&&(p=void 0,h=0,g=0,this._onDidResize.fire({dimension:this._size,done:!0}))})),this._sashListener.add(this._eastSash.onDidChange(t=>{p&&(g=t.currentX-t.startX,this.layout(p.height+h,p.width+g),this._onDidResize.fire({dimension:this._size,done:!1,east:!0}))})),this._sashListener.add(this._westSash.onDidChange(t=>{p&&(g=-(t.currentX-t.startX),this.layout(p.height+h,p.width+g),this._onDidResize.fire({dimension:this._size,done:!1,west:!0}))})),this._sashListener.add(this._northSash.onDidChange(t=>{p&&(h=-(t.currentY-t.startY),this.layout(p.height+h,p.width+g),this._onDidResize.fire({dimension:this._size,done:!1,north:!0}))})),this._sashListener.add(this._southSash.onDidChange(t=>{p&&(h=t.currentY-t.startY,this.layout(p.height+h,p.width+g),this._onDidResize.fire({dimension:this._size,done:!1,south:!0}))})),this._sashListener.add(D.Event.any(this._eastSash.onDidReset,this._westSash.onDidReset)(t=>{this._preferredSize&&(this.layout(this._size.height,this._preferredSize.width),this._onDidResize.fire({dimension:this._size,done:!0}))})),this._sashListener.add(D.Event.any(this._northSash.onDidReset,this._southSash.onDidReset)(t=>{this._preferredSize&&(this.layout(this._preferredSize.height,this._size.width),this._onDidResize.fire({dimension:this._size,done:!0}))}))}dispose(){this._northSash.dispose(),this._southSash.dispose(),this._eastSash.dispose(),this._westSash.dispose(),this._sashListener.dispose(),this._onDidResize.dispose(),this._onDidWillResize.dispose(),this.domNode.remove()}enableSashes(p,h,g,t){this._northSash.state=p?3:0,this._eastSash.state=h?3:0,this._southSash.state=g?3:0,this._westSash.state=t?3:0}layout(p=this.size.height,h=this.size.width){const{height:g,width:t}=this._minSize,{height:i,width:n}=this._maxSize;p=Math.max(g,Math.min(i,p)),h=Math.max(t,Math.min(n,h));const l=new y.Dimension(h,p);y.Dimension.equals(l,this._size)||(this.domNode.style.height=p+"px",this.domNode.style.width=h+"px",this._size=l,this._northSash.layout(),this._eastSash.layout(),this._southSash.layout(),this._westSash.layout())}clearSashHoverState(){this._eastSash.clearSashHoverState(),this._westSash.clearSashHoverState(),this._northSash.clearSashHoverState(),this._southSash.clearSashHoverState()}get size(){return this._size}set maxSize(p){this._maxSize=p}get maxSize(){return this._maxSize}set minSize(p){this._minSize=p}get minSize(){return this._minSize}set preferredSize(p){this._preferredSize=p}get preferredSize(){return this._preferredSize}}e.ResizableHTMLElement=w}),define(te[466],ie([1,0,19,2,97]),function(j,e,y,m,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CommitCharacterController=void 0;class I{constructor(b,p,h){this._disposables=new m.DisposableStore,this._disposables.add(p.onDidShow(()=>this._onItem(p.getFocusedItem()))),this._disposables.add(p.onDidFocus(this._onItem,this)),this._disposables.add(p.onDidHide(this.reset,this)),this._disposables.add(b.onWillType(g=>{if(this._active&&!p.isFrozen()){const t=g.charCodeAt(g.length-1);this._active.acceptCharacters.has(t)&&b.getOption(0)&&h(this._active.item)}}))}_onItem(b){if(!b||!(0,y.isNonEmptyArray)(b.item.completion.commitCharacters)){this.reset();return}if(this._active&&this._active.item.item===b.item)return;const p=new D.CharacterSet;for(const h of b.item.completion.commitCharacters)h.length>0&&p.add(h.charCodeAt(0));this._active={acceptCharacters:p,item:b}}reset(){this._active=void 0}dispose(){this._disposables.dispose()}}e.CommitCharacterController=I}),define(te[467],ie([1,0,2]),function(j,e,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.OvertypingCapturer=void 0;class m{constructor(I,w){this._disposables=new y.DisposableStore,this._lastOvertyped=[],this._empty=!0,this._disposables.add(I.onWillType(()=>{if(!this._empty||!I.hasModel())return;const b=I.getSelections(),p=b.length;let h=!1;for(let t=0;t<p;t++)if(!b[t].isEmpty()){h=!0;break}if(!h)return;this._lastOvertyped=[];const g=I.getModel();for(let t=0;t<p;t++){const i=b[t];if(g.getValueLengthInRange(i)>m._maxSelectionLength)return;this._lastOvertyped[t]={value:g.getValueInRange(i),multiline:i.startLineNumber!==i.endLineNumber}}this._empty=!1})),this._disposables.add(w.onDidCancel(b=>{!this._empty&&!b.retrigger&&(this._empty=!0)}))}getLastOvertypedInfo(I){if(!this._empty&&I>=0&&I<this._lastOvertyped.length)return this._lastOvertyped[I]}dispose(){this._disposables.dispose()}}e.OvertypingCapturer=m,m._maxSelectionLength=51200}),define(te[468],ie([1,0,19,3,260]),function(j,e,y,m,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.WordDistance=void 0;class I{static create(b,p){return ye(this,void 0,void 0,function*(){if(!p.getOption(106).localityBonus||!p.hasModel())return I.None;const h=p.getModel(),g=p.getPosition();if(!b.canComputeWordRanges(h.uri))return I.None;const[t]=yield new D.BracketSelectionRangeProvider().provideSelectionRanges(h,[g]);if(t.length===0)return I.None;const i=yield b.computeWordRanges(h.uri,t[0].range);if(!i)return I.None;const n=h.getWordUntilPosition(g);return delete i[n.word],new class extends I{distance(l,c){if(!g.equals(p.getPosition()))return 0;if(c.kind===17)return 2<<20;let r=typeof c.label=="string"?c.label:c.label.label,s=i[r];if((0,y.isFalsyOrEmpty)(s))return 2<<20;let o=(0,y.binarySearch)(s,m.Range.fromPositions(l),m.Range.compareRangesUsingStarts),a=o>=0?s[o]:s[Math.max(0,~o-1)],d=t.length;for(const u of t){if(!m.Range.containsRange(u.range,a))break;d-=1}return d}}})}}e.WordDistance=I,I.None=new class extends I{distance(){return 0}}}),define(te[262],ie([1,0]),function(j,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.stateExists=e.findRules=e.substituteMatches=e.createError=e.log=e.sanitize=e.fixCase=e.empty=e.isIAction=e.isString=e.isFuzzyAction=e.isFuzzyActionArr=void 0;function y(l){return Array.isArray(l)}e.isFuzzyActionArr=y;function m(l){return!y(l)}e.isFuzzyAction=m;function D(l){return typeof l=="string"}e.isString=D;function I(l){return!D(l)}e.isIAction=I;function w(l){return!l}e.empty=w;function b(l,c){return l.ignoreCase&&c?c.toLowerCase():c}e.fixCase=b;function p(l){return l.replace(/[&<>'"_]/g,"-")}e.sanitize=p;function h(l,c){console.log(`${l.languageId}: ${c}`)}e.log=h;function g(l,c){return new Error(`${l.languageId}: ${c}`)}e.createError=g;function t(l,c,r,s,o){const a=/\$((\$)|(#)|(\d\d?)|[sS](\d\d?)|@(\w+))/g;let d=null;return c.replace(a,function(u,f,S,v,C,_,L,E,N){return w(S)?w(v)?!w(C)&&C<s.length?b(l,s[C]):!w(L)&&l&&typeof l[L]=="string"?l[L]:(d===null&&(d=o.split("."),d.unshift(o)),!w(_)&&_<d.length?b(l,d[_]):""):b(l,r):"$"})}e.substituteMatches=t;function i(l,c){let r=c;for(;r&&r.length>0;){const s=l.tokenizer[r];if(s)return s;const o=r.lastIndexOf(".");o<0?r=null:r=r.substr(0,o)}return null}e.findRules=i;function n(l,c){let r=c;for(;r&&r.length>0;){if(l.stateNames[r])return!0;const o=r.lastIndexOf(".");o<0?r=null:r=r.substr(0,o)}return!1}e.stateExists=n}),define(te[469],ie([1,0,262]),function(j,e,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.compile=void 0;function m(l,c){if(!c||!Array.isArray(c))return!1;for(const r of c)if(!l(r))return!1;return!0}function D(l,c){return typeof l=="boolean"?l:c}function I(l,c){return typeof l=="string"?l:c}function w(l){const c={};for(const r of l)c[r]=!0;return c}function b(l,c=!1){c&&(l=l.map(function(s){return s.toLowerCase()}));const r=w(l);return c?function(s){return r[s.toLowerCase()]!==void 0&&r.hasOwnProperty(s.toLowerCase())}:function(s){return r[s]!==void 0&&r.hasOwnProperty(s)}}function p(l,c){c=c.replace(/@@/g,"");let r=0,s;do s=!1,c=c.replace(/@(\w+)/g,function(a,d){s=!0;let u="";if(typeof l[d]=="string")u=l[d];else if(l[d]&&l[d]instanceof RegExp)u=l[d].source;else throw l[d]===void 0?y.createError(l,"language definition does not contain attribute '"+d+"', used at: "+c):y.createError(l,"attribute reference '"+d+"' must be a string, used at: "+c);return y.empty(u)?"":"(?:"+u+")"}),r++;while(s&&r<5);c=c.replace(/\x01/g,"@");const o=(l.ignoreCase?"i":"")+(l.unicode?"u":"");return new RegExp(c,o)}function h(l,c,r,s){if(s<0)return l;if(s<c.length)return c[s];if(s>=100){s=s-100;const o=r.split(".");if(o.unshift(r),s<o.length)return o[s]}return null}function g(l,c,r,s){let o=-1,a=r,d=r.match(/^\$(([sS]?)(\d\d?)|#)(.*)$/);d&&(d[3]&&(o=parseInt(d[3]),d[2]&&(o=o+100)),a=d[4]);let u="~",f=a;!a||a.length===0?(u="!=",f=""):/^\w*$/.test(f)?u="==":(d=a.match(/^(@|!@|~|!~|==|!=)(.*)$/),d&&(u=d[1],f=d[2]));let S;if((u==="~"||u==="!~")&&/^(\w|\|)*$/.test(f)){const v=b(f.split("|"),l.ignoreCase);S=function(C){return u==="~"?v(C):!v(C)}}else if(u==="@"||u==="!@"){const v=l[f];if(!v)throw y.createError(l,"the @ match target '"+f+"' is not defined, in rule: "+c);if(!m(function(_){return typeof _=="string"},v))throw y.createError(l,"the @ match target '"+f+"' must be an array of strings, in rule: "+c);const C=b(v,l.ignoreCase);S=function(_){return u==="@"?C(_):!C(_)}}else if(u==="~"||u==="!~")if(f.indexOf("$")<0){const v=p(l,"^"+f+"$");S=function(C){return u==="~"?v.test(C):!v.test(C)}}else S=function(v,C,_,L){return p(l,"^"+y.substituteMatches(l,f,C,_,L)+"$").test(v)};else if(f.indexOf("$")<0){const v=y.fixCase(l,f);S=function(C){return u==="=="?C===v:C!==v}}else{const v=y.fixCase(l,f);S=function(C,_,L,E,N){const k=y.substituteMatches(l,v,_,L,E);return u==="=="?C===k:C!==k}}return o===-1?{name:r,value:s,test:function(v,C,_,L){return S(v,v,C,_,L)}}:{name:r,value:s,test:function(v,C,_,L){const E=h(v,C,_,o);return S(E||"",v,C,_,L)}}}function t(l,c,r){if(r){if(typeof r=="string")return r;if(r.token||r.token===""){if(typeof r.token!="string")throw y.createError(l,"a 'token' attribute must be of type string, in rule: "+c);{const s={token:r.token};if(r.token.indexOf("$")>=0&&(s.tokenSubst=!0),typeof r.bracket=="string")if(r.bracket==="@open")s.bracket=1;else if(r.bracket==="@close")s.bracket=-1;else throw y.createError(l,"a 'bracket' attribute must be either '@open' or '@close', in rule: "+c);if(r.next){if(typeof r.next!="string")throw y.createError(l,"the next state must be a string value in rule: "+c);{let o=r.next;if(!/^(@pop|@push|@popall)$/.test(o)&&(o[0]==="@"&&(o=o.substr(1)),o.indexOf("$")<0&&!y.stateExists(l,y.substituteMatches(l,o,"",[],""))))throw y.createError(l,"the next state '"+r.next+"' is not defined in rule: "+c);s.next=o}}return typeof r.goBack=="number"&&(s.goBack=r.goBack),typeof r.switchTo=="string"&&(s.switchTo=r.switchTo),typeof r.log=="string"&&(s.log=r.log),typeof r.nextEmbedded=="string"&&(s.nextEmbedded=r.nextEmbedded,l.usesEmbedded=!0),s}}else if(Array.isArray(r)){const s=[];for(let o=0,a=r.length;o<a;o++)s[o]=t(l,c,r[o]);return{group:s}}else if(r.cases){const s=[];for(let a in r.cases)if(r.cases.hasOwnProperty(a)){const d=t(l,c,r.cases[a]);a==="@default"||a==="@"||a===""?s.push({test:void 0,value:d,name:a}):a==="@eos"?s.push({test:function(u,f,S,v){return v},value:d,name:a}):s.push(g(l,c,a,d))}const o=l.defaultToken;return{test:function(a,d,u,f){for(const S of s)if(!S.test||S.test(a,d,u,f))return S.value;return o}}}else throw y.createError(l,"an action must be a string, an object with a 'token' or 'cases' attribute, or an array of actions; in rule: "+c)}else return{token:""}}class i{constructor(c){this.regex=new RegExp(""),this.action={token:""},this.matchOnlyAtLineStart=!1,this.name="",this.name=c}setRegex(c,r){let s;if(typeof r=="string")s=r;else if(r instanceof RegExp)s=r.source;else throw y.createError(c,"rules must start with a match string or regular expression: "+this.name);this.matchOnlyAtLineStart=s.length>0&&s[0]==="^",this.name=this.name+": "+s,this.regex=p(c,"^(?:"+(this.matchOnlyAtLineStart?s.substr(1):s)+")")}setAction(c,r){this.action=t(c,this.name,r)}}function n(l,c){if(!c||typeof c!="object")throw new Error("Monarch: expecting a language definition object");const r={};r.languageId=l,r.includeLF=D(c.includeLF,!1),r.noThrow=!1,r.maxStack=100,r.start=typeof c.start=="string"?c.start:null,r.ignoreCase=D(c.ignoreCase,!1),r.unicode=D(c.unicode,!1),r.tokenPostfix=I(c.tokenPostfix,"."+r.languageId),r.defaultToken=I(c.defaultToken,"source"),r.usesEmbedded=!1;const s=c;s.languageId=l,s.includeLF=r.includeLF,s.ignoreCase=r.ignoreCase,s.unicode=r.unicode,s.noThrow=r.noThrow,s.usesEmbedded=r.usesEmbedded,s.stateNames=c.tokenizer,s.defaultToken=r.defaultToken;function o(d,u,f){for(const S of f){let v=S.include;if(v){if(typeof v!="string")throw y.createError(r,"an 'include' attribute must be a string at: "+d);if(v[0]==="@"&&(v=v.substr(1)),!c.tokenizer[v])throw y.createError(r,"include target '"+v+"' is not defined at: "+d);o(d+"."+v,u,c.tokenizer[v])}else{const C=new i(d);if(Array.isArray(S)&&S.length>=1&&S.length<=3)if(C.setRegex(s,S[0]),S.length>=3)if(typeof S[1]=="string")C.setAction(s,{token:S[1],next:S[2]});else if(typeof S[1]=="object"){const _=S[1];_.next=S[2],C.setAction(s,_)}else throw y.createError(r,"a next state as the last element of a rule can only be given if the action is either an object or a string, at: "+d);else C.setAction(s,S[1]);else{if(!S.regex)throw y.createError(r,"a rule must either be an array, or an object with a 'regex' or 'include' field at: "+d);S.name&&typeof S.name=="string"&&(C.name=S.name),S.matchOnlyAtStart&&(C.matchOnlyAtLineStart=D(S.matchOnlyAtLineStart,!1)),C.setRegex(s,S.regex),C.setAction(s,S.action)}u.push(C)}}}if(!c.tokenizer||typeof c.tokenizer!="object")throw y.createError(r,"a language definition must define the 'tokenizer' attribute as an object");r.tokenizer=[];for(let d in c.tokenizer)if(c.tokenizer.hasOwnProperty(d)){r.start||(r.start=d);const u=c.tokenizer[d];r.tokenizer[d]=new Array,o("tokenizer."+d,r.tokenizer[d],u)}if(r.usesEmbedded=s.usesEmbedded,c.brackets){if(!Array.isArray(c.brackets))throw y.createError(r,"the 'brackets' attribute must be defined as an array")}else c.brackets=[{open:"{",close:"}",token:"delimiter.curly"},{open:"[",close:"]",token:"delimiter.square"},{open:"(",close:")",token:"delimiter.parenthesis"},{open:"<",close:">",token:"delimiter.angle"}];const a=[];for(let d of c.brackets){let u=d;if(u&&Array.isArray(u)&&u.length===3&&(u={token:u[2],open:u[0],close:u[1]}),u.open===u.close)throw y.createError(r,"open and close brackets in a 'brackets' attribute must be different: "+u.open+`
|
||
hint: use the 'bracket' attribute if matching on equal brackets is required.`);if(typeof u.open=="string"&&typeof u.token=="string"&&typeof u.close=="string")a.push({token:u.token+r.tokenPostfix,open:y.fixCase(r,u.open),close:y.fixCase(r,u.close)});else throw y.createError(r,"every element in the 'brackets' array must be a '{open,close,token}' object or array")}return r.brackets=a,r.noThrow=!0,r}e.compile=n}),define(te[263],ie([1,0,18,121,262]),function(j,e,y,m,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MonarchTokenizer=void 0;const I=5;class w{constructor(r){this._maxCacheDepth=r,this._entries=Object.create(null)}static create(r,s){return this._INSTANCE.create(r,s)}create(r,s){if(r!==null&&r.depth>=this._maxCacheDepth)return new b(r,s);let o=b.getStackElementId(r);o.length>0&&(o+="|"),o+=s;let a=this._entries[o];return a||(a=new b(r,s),this._entries[o]=a,a)}}w._INSTANCE=new w(I);class b{constructor(r,s){this.parent=r,this.state=s,this.depth=(this.parent?this.parent.depth:0)+1}static getStackElementId(r){let s="";for(;r!==null;)s.length>0&&(s+="|"),s+=r.state,r=r.parent;return s}static _equals(r,s){for(;r!==null&&s!==null;){if(r===s)return!0;if(r.state!==s.state)return!1;r=r.parent,s=s.parent}return r===null&&s===null}equals(r){return b._equals(this,r)}push(r){return w.create(this,r)}pop(){return this.parent}popall(){let r=this;for(;r.parent;)r=r.parent;return r}switchTo(r){return w.create(this.parent,r)}}class p{constructor(r,s){this.languageId=r,this.state=s}equals(r){return this.languageId===r.languageId&&this.state.equals(r.state)}clone(){return this.state.clone()===this.state?this:new p(this.languageId,this.state)}}class h{constructor(r){this._maxCacheDepth=r,this._entries=Object.create(null)}static create(r,s){return this._INSTANCE.create(r,s)}create(r,s){if(s!==null)return new g(r,s);if(r!==null&&r.depth>=this._maxCacheDepth)return new g(r,s);const o=b.getStackElementId(r);let a=this._entries[o];return a||(a=new g(r,null),this._entries[o]=a,a)}}h._INSTANCE=new h(I);class g{constructor(r,s){this.stack=r,this.embeddedLanguageData=s}clone(){return(this.embeddedLanguageData?this.embeddedLanguageData.clone():null)===this.embeddedLanguageData?this:h.create(this.stack,this.embeddedLanguageData)}equals(r){return!(r instanceof g)||!this.stack.equals(r.stack)?!1:this.embeddedLanguageData===null&&r.embeddedLanguageData===null?!0:this.embeddedLanguageData===null||r.embeddedLanguageData===null?!1:this.embeddedLanguageData.equals(r.embeddedLanguageData)}}class t{constructor(){this._tokens=[],this._languageId=null,this._lastTokenType=null,this._lastTokenLanguage=null}enterLanguage(r){this._languageId=r}emit(r,s){this._lastTokenType===s&&this._lastTokenLanguage===this._languageId||(this._lastTokenType=s,this._lastTokenLanguage=this._languageId,this._tokens.push(new y.Token(r,s,this._languageId)))}nestedLanguageTokenize(r,s,o,a){const d=o.languageId,u=o.state,f=y.TokenizationRegistry.get(d);if(!f)return this.enterLanguage(d),this.emit(a,""),u;const S=f.tokenize(r,s,u);if(a!==0)for(const v of S.tokens)this._tokens.push(new y.Token(v.offset+a,v.type,v.language));else this._tokens=this._tokens.concat(S.tokens);return this._lastTokenType=null,this._lastTokenLanguage=null,this._languageId=null,S.endState}finalize(r){return new y.TokenizationResult(this._tokens,r)}}class i{constructor(r,s){this._languageService=r,this._theme=s,this._prependTokens=null,this._tokens=[],this._currentLanguageId=0,this._lastTokenMetadata=0}enterLanguage(r){this._currentLanguageId=this._languageService.languageIdCodec.encodeLanguageId(r)}emit(r,s){const o=this._theme.match(this._currentLanguageId,s);this._lastTokenMetadata!==o&&(this._lastTokenMetadata=o,this._tokens.push(r),this._tokens.push(o))}static _merge(r,s,o){const a=r!==null?r.length:0,d=s.length,u=o!==null?o.length:0;if(a===0&&d===0&&u===0)return new Uint32Array(0);if(a===0&&d===0)return o;if(d===0&&u===0)return r;const f=new Uint32Array(a+d+u);r!==null&&f.set(r);for(let S=0;S<d;S++)f[a+S]=s[S];return o!==null&&f.set(o,a+d),f}nestedLanguageTokenize(r,s,o,a){const d=o.languageId,u=o.state,f=y.TokenizationRegistry.get(d);if(!f)return this.enterLanguage(d),this.emit(a,""),u;const S=f.tokenizeEncoded(r,s,u);if(a!==0)for(let v=0,C=S.tokens.length;v<C;v+=2)S.tokens[v]+=a;return this._prependTokens=i._merge(this._prependTokens,this._tokens,S.tokens),this._tokens=[],this._currentLanguageId=0,this._lastTokenMetadata=0,S.endState}finalize(r){return new y.EncodedTokenizationResult(i._merge(this._prependTokens,this._tokens,null),r)}}class n{constructor(r,s,o,a){this._languageService=r,this._standaloneThemeService=s,this._languageId=o,this._lexer=a,this._embeddedLanguages=Object.create(null),this.embeddedLoaded=Promise.resolve(void 0);let d=!1;this._tokenizationRegistryListener=y.TokenizationRegistry.onDidChange(u=>{if(d)return;let f=!1;for(let S=0,v=u.changedLanguages.length;S<v;S++){const C=u.changedLanguages[S];if(this._embeddedLanguages[C]){f=!0;break}}f&&(d=!0,y.TokenizationRegistry.fire([this._languageId]),d=!1)})}dispose(){this._tokenizationRegistryListener.dispose()}getLoadStatus(){const r=[];for(let s in this._embeddedLanguages){const o=y.TokenizationRegistry.get(s);if(o){if(o instanceof n){const a=o.getLoadStatus();a.loaded===!1&&r.push(a.promise)}continue}y.TokenizationRegistry.isResolved(s)||r.push(y.TokenizationRegistry.getOrCreate(s))}return r.length===0?{loaded:!0}:{loaded:!1,promise:Promise.all(r).then(s=>{})}}getInitialState(){const r=w.create(null,this._lexer.start);return h.create(r,null)}tokenize(r,s,o){const a=new t,d=this._tokenize(r,s,o,a);return a.finalize(d)}tokenizeEncoded(r,s,o){const a=new i(this._languageService,this._standaloneThemeService.getColorTheme().tokenTheme),d=this._tokenize(r,s,o,a);return a.finalize(d)}_tokenize(r,s,o,a){return o.embeddedLanguageData?this._nestedTokenize(r,s,o,0,a):this._myTokenize(r,s,o,0,a)}_findLeavingNestedLanguageOffset(r,s){let o=this._lexer.tokenizer[s.stack.state];if(!o&&(o=D.findRules(this._lexer,s.stack.state),!o))throw D.createError(this._lexer,"tokenizer state is not defined: "+s.stack.state);let a=-1,d=!1;for(const u of o){if(!D.isIAction(u.action)||u.action.nextEmbedded!=="@pop")continue;d=!0;let f=u.regex;const S=u.regex.source;if(S.substr(0,4)==="^(?:"&&S.substr(S.length-1,1)===")"){const C=(f.ignoreCase?"i":"")+(f.unicode?"u":"");f=new RegExp(S.substr(4,S.length-5),C)}const v=r.search(f);v===-1||v!==0&&u.matchOnlyAtLineStart||(a===-1||v<a)&&(a=v)}if(!d)throw D.createError(this._lexer,'no rule containing nextEmbedded: "@pop" in tokenizer embedded state: '+s.stack.state);return a}_nestedTokenize(r,s,o,a,d){const u=this._findLeavingNestedLanguageOffset(r,o);if(u===-1){const v=d.nestedLanguageTokenize(r,s,o.embeddedLanguageData,a);return h.create(o.stack,new p(o.embeddedLanguageData.languageId,v))}const f=r.substring(0,u);f.length>0&&d.nestedLanguageTokenize(f,!1,o.embeddedLanguageData,a);const S=r.substring(u);return this._myTokenize(S,s,o,a+u,d)}_safeRuleName(r){return r?r.name:"(unknown)"}_myTokenize(r,s,o,a,d){d.enterLanguage(this._languageId);const u=r.length,f=s&&this._lexer.includeLF?r+`
|
||
`:r,S=f.length;let v=o.embeddedLanguageData,C=o.stack,_=0,L=null,E=!0;for(;E||_<S;){const N=_,k=C.depth,M=L?L.groups.length:0,O=C.state;let B=null,T=null,R=null,P=null,F=null;if(L){B=L.matches;const H=L.groups.shift();T=H.matched,R=H.action,P=L.rule,L.groups.length===0&&(L=null)}else{if(!E&&_>=S)break;E=!1;let H=this._lexer.tokenizer[O];if(!H&&(H=D.findRules(this._lexer,O),!H))throw D.createError(this._lexer,"tokenizer state is not defined: "+O);let q=f.substr(_);for(const X of H)if((_===0||!X.matchOnlyAtLineStart)&&(B=q.match(X.regex),B)){T=B[0],R=X.action;break}}if(B||(B=[""],T=""),R||(_<S&&(B=[f.charAt(_)],T=B[0]),R=this._lexer.defaultToken),T===null)break;for(_+=T.length;D.isFuzzyAction(R)&&D.isIAction(R)&&R.test;)R=R.test(T,B,O,_===S);let W=null;if(typeof R=="string"||Array.isArray(R))W=R;else if(R.group)W=R.group;else if(R.token!==null&&R.token!==void 0){if(R.tokenSubst?W=D.substituteMatches(this._lexer,R.token,T,B,O):W=R.token,R.nextEmbedded)if(R.nextEmbedded==="@pop"){if(!v)throw D.createError(this._lexer,"cannot pop embedded language if not inside one");v=null}else{if(v)throw D.createError(this._lexer,"cannot enter embedded language from within an embedded language");F=D.substituteMatches(this._lexer,R.nextEmbedded,T,B,O)}if(R.goBack&&(_=Math.max(0,_-R.goBack)),R.switchTo&&typeof R.switchTo=="string"){let H=D.substituteMatches(this._lexer,R.switchTo,T,B,O);if(H[0]==="@"&&(H=H.substr(1)),D.findRules(this._lexer,H))C=C.switchTo(H);else throw D.createError(this._lexer,"trying to switch to a state '"+H+"' that is undefined in rule: "+this._safeRuleName(P))}else{if(R.transform&&typeof R.transform=="function")throw D.createError(this._lexer,"action.transform not supported");if(R.next)if(R.next==="@push"){if(C.depth>=this._lexer.maxStack)throw D.createError(this._lexer,"maximum tokenizer stack size reached: ["+C.state+","+C.parent.state+",...]");C=C.push(O)}else if(R.next==="@pop"){if(C.depth<=1)throw D.createError(this._lexer,"trying to pop an empty stack in rule: "+this._safeRuleName(P));C=C.pop()}else if(R.next==="@popall")C=C.popall();else{let H=D.substituteMatches(this._lexer,R.next,T,B,O);if(H[0]==="@"&&(H=H.substr(1)),D.findRules(this._lexer,H))C=C.push(H);else throw D.createError(this._lexer,"trying to set a next state '"+H+"' that is undefined in rule: "+this._safeRuleName(P))}}R.log&&typeof R.log=="string"&&D.log(this._lexer,this._lexer.languageId+": "+D.substituteMatches(this._lexer,R.log,T,B,O))}if(W===null)throw D.createError(this._lexer,"lexer rule has no well-defined action in rule: "+this._safeRuleName(P));const A=H=>{const q=this._languageService.getLanguageIdByLanguageName(H)||this._languageService.getLanguageIdByMimeType(H)||H,X=this._getNestedEmbeddedLanguageData(q);if(_<S){const G=r.substr(_);return this._nestedTokenize(G,s,h.create(C,X),a+_,d)}else return h.create(C,X)};if(Array.isArray(W)){if(L&&L.groups.length>0)throw D.createError(this._lexer,"groups cannot be nested: "+this._safeRuleName(P));if(B.length!==W.length+1)throw D.createError(this._lexer,"matched number of groups does not match the number of actions in rule: "+this._safeRuleName(P));let H=0;for(let q=1;q<B.length;q++)H+=B[q].length;if(H!==T.length)throw D.createError(this._lexer,"with groups, all characters should be matched in consecutive groups in rule: "+this._safeRuleName(P));L={rule:P,matches:B,groups:[]};for(let q=0;q<W.length;q++)L.groups[q]={action:W[q],matched:B[q+1]};_-=T.length;continue}else{if(W==="@rematch"&&(_-=T.length,T="",B=null,W="",F!==null))return A(F);if(T.length===0){if(S===0||k!==C.depth||O!==C.state||(L?L.groups.length:0)!==M)continue;throw D.createError(this._lexer,"no progress in tokenizer in rule: "+this._safeRuleName(P))}let H=null;if(D.isString(W)&&W.indexOf("@brackets")===0){const q=W.substr("@brackets".length),X=l(this._lexer,T);if(!X)throw D.createError(this._lexer,"@brackets token returned but no bracket defined as: "+T);H=D.sanitize(X.token+q)}else{const q=W===""?"":W+this._lexer.tokenPostfix;H=D.sanitize(q)}N<u&&d.emit(N+a,H)}if(F!==null)return A(F)}return h.create(C,v)}_getNestedEmbeddedLanguageData(r){if(!this._languageService.isRegisteredLanguageId(r))return new p(r,m.NullState);r!==this._languageId&&(y.TokenizationRegistry.getOrCreate(r),this._embeddedLanguages[r]=!0);const s=y.TokenizationRegistry.get(r);return s?new p(r,s.getInitialState()):new p(r,m.NullState)}}e.MonarchTokenizer=n;function l(c,r){if(!r)return null;r=D.fixCase(c,r);const s=c.brackets;for(const o of s){if(o.open===r)return{token:o.token,bracketType:1};if(o.close===r)return{token:o.token,bracketType:-1}}return null}}),define(te[470],ie([1,0,8,75,18,122,69,263]),function(j,e,y,m,D,I,w,b){"use strict";var p;Object.defineProperty(e,"__esModule",{value:!0}),e.Colorizer=void 0;const h=(p=window.trustedTypes)===null||p===void 0?void 0:p.createPolicy("standaloneColorizer",{createHTML:l=>l});class g{static colorizeElement(c,r,s,o){o=o||{};const a=o.theme||"vs",d=o.mimeType||s.getAttribute("lang")||s.getAttribute("data-lang");if(!d)return console.error("Mode not detected"),Promise.resolve();const u=r.getLanguageIdByMimeType(d)||d;c.setTheme(a);const f=s.firstChild?s.firstChild.nodeValue:"";s.className+=" "+a;const S=v=>{var C;const _=(C=h==null?void 0:h.createHTML(v))!==null&&C!==void 0?C:v;s.innerHTML=_};return this.colorize(r,f||"",u,o).then(S,v=>console.error(v))}static colorize(c,r,s,o){return ye(this,void 0,void 0,function*(){const a=c.languageIdCodec;let d=4;o&&typeof o.tabSize=="number"&&(d=o.tabSize),y.startsWithUTF8BOM(r)&&(r=r.substr(1));const u=y.splitLines(r);if(!c.isRegisteredLanguageId(s))return i(u,d,a);const f=yield D.TokenizationRegistry.getOrCreate(s);return f?t(u,d,f,a):i(u,d,a)})}static colorizeLine(c,r,s,o,a=4){const d=w.ViewLineRenderingData.isBasicASCII(c,r),u=w.ViewLineRenderingData.containsRTL(c,d,s);return(0,I.renderViewLine2)(new I.RenderLineInput(!1,!0,c,!1,d,u,0,o,[],a,0,0,0,0,-1,"none",!1,!1,null)).html}static colorizeModelLine(c,r,s=4){const o=c.getLineContent(r);c.forceTokenization(r);const d=c.getLineTokens(r).inflate();return this.colorizeLine(o,c.mightContainNonBasicASCII(),c.mightContainRTL(),d,s)}}e.Colorizer=g;function t(l,c,r,s){return new Promise((o,a)=>{const d=()=>{const u=n(l,c,r,s);if(r instanceof b.MonarchTokenizer){const f=r.getLoadStatus();if(f.loaded===!1){f.promise.then(d,a);return}}o(u)};d()})}function i(l,c,r){let s=[];const o=(0<<10|1<<14|2<<23)>>>0,a=new Uint32Array(2);a[0]=0,a[1]=o;for(let d=0,u=l.length;d<u;d++){const f=l[d];a[0]=f.length;const S=new m.LineTokens(a,f,r),v=w.ViewLineRenderingData.isBasicASCII(f,!0),C=w.ViewLineRenderingData.containsRTL(f,v,!0),_=(0,I.renderViewLine2)(new I.RenderLineInput(!1,!0,f,!1,v,C,0,S,[],c,0,0,0,0,-1,"none",!1,!1,null));s=s.concat(_.html),s.push("<br/>")}return s.join("")}function n(l,c,r,s){let o=[],a=r.getInitialState();for(let d=0,u=l.length;d<u;d++){const f=l[d],S=r.tokenizeEncoded(f,!0,a);m.LineTokens.convertToEndOffset(S.tokens,f.length);const v=new m.LineTokens(S.tokens,f,s),C=w.ViewLineRenderingData.isBasicASCII(f,!0),_=w.ViewLineRenderingData.containsRTL(f,C,!0),L=(0,I.renderViewLine2)(new I.RenderLineInput(!1,!0,f,!1,C,_,0,v.inflate(),[],c,0,0,0,0,-1,"none",!1,!1,null));o=o.concat(L.html),o.push("<br/>"),a=S.endState}return o.join("")}}),define(te[471],ie([5,6]),function(j,e){return j.create("vs/base/browser/ui/actionbar/actionViewItems",e)}),define(te[472],ie([5,6]),function(j,e){return j.create("vs/base/browser/ui/findinput/findInput",e)}),define(te[473],ie([5,6]),function(j,e){return j.create("vs/base/browser/ui/findinput/findInputCheckboxes",e)}),define(te[264],ie([1,0,172,27,473]),function(j,e,y,m,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.RegexCheckbox=e.WholeWordsCheckbox=e.CaseSensitiveCheckbox=void 0;const I=D.localize(0,null),w=D.localize(1,null),b=D.localize(2,null);class p extends y.Checkbox{constructor(i){super({icon:m.Codicon.caseSensitive,title:I+i.appendTitle,isChecked:i.isChecked,inputActiveOptionBorder:i.inputActiveOptionBorder,inputActiveOptionForeground:i.inputActiveOptionForeground,inputActiveOptionBackground:i.inputActiveOptionBackground})}}e.CaseSensitiveCheckbox=p;class h extends y.Checkbox{constructor(i){super({icon:m.Codicon.wholeWord,title:w+i.appendTitle,isChecked:i.isChecked,inputActiveOptionBorder:i.inputActiveOptionBorder,inputActiveOptionForeground:i.inputActiveOptionForeground,inputActiveOptionBackground:i.inputActiveOptionBackground})}}e.WholeWordsCheckbox=h;class g extends y.Checkbox{constructor(i){super({icon:m.Codicon.regex,title:b+i.appendTitle,isChecked:i.isChecked,inputActiveOptionBorder:i.inputActiveOptionBorder,inputActiveOptionForeground:i.inputActiveOptionForeground,inputActiveOptionBackground:i.inputActiveOptionBackground})}}e.RegexCheckbox=g}),define(te[474],ie([5,6]),function(j,e){return j.create("vs/base/browser/ui/findinput/replaceInput",e)}),define(te[475],ie([5,6]),function(j,e){return j.create("vs/base/browser/ui/iconLabel/iconLabelHover",e)}),define(te[476],ie([1,0,7,10,21,66,95,2,20,475]),function(j,e,y,m,D,I,w,b,p,h){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.setupCustomHover=e.setupNativeHover=void 0;function g(n,l){(0,p.isString)(l)?n.title=(0,w.stripIcons)(l):(l==null?void 0:l.markdownNotSupportedFallback)?n.title=l.markdownNotSupportedFallback:n.removeAttribute("title")}e.setupNativeHover=g;class t{constructor(l,c,r){this.hoverDelegate=l,this.target=c,this.fadeInAnimation=r}update(l,c){var r;return ye(this,void 0,void 0,function*(){if(this._cancellationTokenSource&&(this._cancellationTokenSource.dispose(!0),this._cancellationTokenSource=void 0),this.isDisposed)return;let s;if(l===void 0||(0,p.isString)(l)||l instanceof HTMLElement)s=l;else if(!(0,p.isFunction)(l.markdown))s=(r=l.markdown)!==null&&r!==void 0?r:l.markdownNotSupportedFallback;else{this._hoverWidget||this.show((0,h.localize)(0,null),c),this._cancellationTokenSource=new D.CancellationTokenSource;const o=this._cancellationTokenSource.token;if(s=yield l.markdown(o),this.isDisposed||o.isCancellationRequested)return}this.show(s,c)})}show(l,c){const r=this._hoverWidget;if(this.hasContent(l)){const s={content:l,target:this.target,showPointer:this.hoverDelegate.placement==="element",hoverPosition:2,skipFadeInAnimation:!this.fadeInAnimation||!!r};this._hoverWidget=this.hoverDelegate.showHover(s,c)}r==null||r.dispose()}hasContent(l){return l?(0,I.isMarkdownString)(l)?!!l.value:!0:!1}get isDisposed(){var l;return(l=this._hoverWidget)===null||l===void 0?void 0:l.isDisposed}dispose(){var l,c;(l=this._hoverWidget)===null||l===void 0||l.dispose(),(c=this._cancellationTokenSource)===null||c===void 0||c.dispose(!0),this._cancellationTokenSource=void 0}}function i(n,l,c){let r,s;const o=(S,v)=>{var C;S&&(s==null||s.dispose(),s=void 0),v&&(r==null||r.dispose(),r=void 0),(C=n.onDidHideHover)===null||C===void 0||C.call(n)},a=(S,v,C)=>new m.TimeoutTimer(()=>ye(this,void 0,void 0,function*(){(!s||s.isDisposed)&&(s=new t(n,C||l,S>0),yield s.update(c,v))}),S),d=()=>{if(r)return;const S=new b.DisposableStore,v=L=>o(!1,L.fromElement===l);S.add(y.addDisposableListener(l,y.EventType.MOUSE_LEAVE,v,!0));const C=()=>o(!0,!0);S.add(y.addDisposableListener(l,y.EventType.MOUSE_DOWN,C,!0));const _={targetElements:[l],dispose:()=>{}};if(n.placement===void 0||n.placement==="mouse"){const L=E=>_.x=E.x+10;S.add(y.addDisposableListener(l,y.EventType.MOUSE_MOVE,L,!0))}S.add(a(n.delay,!1,_)),r=S},u=y.addDisposableListener(l,y.EventType.MOUSE_OVER,d,!0);return{show:S=>{o(!1,!0),a(0,S)},hide:()=>{o(!0,!0)},update:S=>ye(this,void 0,void 0,function*(){c=S,yield s==null?void 0:s.update(c)}),dispose:()=>{u.dispose(),o(!0,!0)}}}e.setupCustomHover=i}),define(te[190],ie([1,0,7,217,476,2,39,136,337]),function(j,e,y,m,D,I,w,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IconLabel=void 0;class p{constructor(l){this._element=l}get element(){return this._element}set textContent(l){this.disposed||l===this._textContent||(this._textContent=l,this._element.textContent=l)}set className(l){this.disposed||l===this._className||(this._className=l,this._element.className=l)}set empty(l){this.disposed||l===this._empty||(this._empty=l,this._element.style.marginLeft=l?"0":"")}dispose(){this.disposed=!0}}class h extends I.Disposable{constructor(l,c){super();this.customHovers=new Map,this.domNode=this._register(new p(y.append(l,y.$(".monaco-icon-label")))),this.labelContainer=y.append(this.domNode.element,y.$(".monaco-icon-label-container"));const r=y.append(this.labelContainer,y.$("span.monaco-icon-name-container"));this.descriptionContainer=this._register(new p(y.append(this.labelContainer,y.$("span.monaco-icon-description-container")))),(c==null?void 0:c.supportHighlights)||(c==null?void 0:c.supportIcons)?this.nameNode=new i(r,!!c.supportIcons):this.nameNode=new g(r),(c==null?void 0:c.supportDescriptionHighlights)?this.descriptionNodeFactory=()=>new m.HighlightedLabel(y.append(this.descriptionContainer.element,y.$("span.label-description")),{supportIcons:!!c.supportIcons}):this.descriptionNodeFactory=()=>this._register(new p(y.append(this.descriptionContainer.element,y.$("span.label-description")))),this.hoverDelegate=c==null?void 0:c.hoverDelegate}get element(){return this.domNode.element}setLabel(l,c,r){const s=["monaco-icon-label"];r&&(r.extraClasses&&s.push(...r.extraClasses),r.italic&&s.push("italic"),r.strikethrough&&s.push("strikethrough")),this.domNode.className=s.join(" "),this.setupHover((r==null?void 0:r.descriptionTitle)?this.labelContainer:this.element,r==null?void 0:r.title),this.nameNode.setLabel(l,r),(c||this.descriptionNode)&&(this.descriptionNode||(this.descriptionNode=this.descriptionNodeFactory()),this.descriptionNode instanceof m.HighlightedLabel?(this.descriptionNode.set(c||"",r?r.descriptionMatches:void 0),this.setupHover(this.descriptionNode.element,r==null?void 0:r.descriptionTitle)):(this.descriptionNode.textContent=c||"",this.setupHover(this.descriptionNode.element,(r==null?void 0:r.descriptionTitle)||""),this.descriptionNode.empty=!c))}setupHover(l,c){const r=this.customHovers.get(l);if(r&&(r.dispose(),this.customHovers.delete(l)),!c){l.removeAttribute("title");return}if(!this.hoverDelegate)(0,D.setupNativeHover)(l,c);else{const s=(0,D.setupCustomHover)(this.hoverDelegate,l,c);s&&this.customHovers.set(l,s)}}dispose(){super.dispose();for(const l of this.customHovers.values())l.dispose();this.customHovers.clear()}}e.IconLabel=h;class g{constructor(l){this.container=l,this.label=void 0,this.singleLabel=void 0}setLabel(l,c){if(!(this.label===l&&(0,w.equals)(this.options,c)))if(this.label=l,this.options=c,typeof l=="string")this.singleLabel||(this.container.innerText="",this.container.classList.remove("multiple"),this.singleLabel=y.append(this.container,y.$("a.label-name",{id:c==null?void 0:c.domId}))),this.singleLabel.textContent=l;else{this.container.innerText="",this.container.classList.add("multiple"),this.singleLabel=void 0;for(let r=0;r<l.length;r++){const s=l[r],o=(c==null?void 0:c.domId)&&`${c==null?void 0:c.domId}_${r}`;y.append(this.container,y.$("a.label-name",{id:o,"data-icon-label-count":l.length,"data-icon-label-index":r,role:"treeitem"},s)),r<l.length-1&&y.append(this.container,y.$("span.label-separator",void 0,(c==null?void 0:c.separator)||"/"))}}}}function t(n,l,c){if(!c)return;let r=0;return n.map(s=>{const o={start:r,end:r+s.length},a=c.map(d=>b.Range.intersect(o,d)).filter(d=>!b.Range.isEmpty(d)).map(({start:d,end:u})=>({start:d-r,end:u-r}));return r=o.end+l.length,a})}class i{constructor(l,c){this.container=l,this.supportIcons=c,this.label=void 0,this.singleLabel=void 0}setLabel(l,c){if(!(this.label===l&&(0,w.equals)(this.options,c)))if(this.label=l,this.options=c,typeof l=="string")this.singleLabel||(this.container.innerText="",this.container.classList.remove("multiple"),this.singleLabel=new m.HighlightedLabel(y.append(this.container,y.$("a.label-name",{id:c==null?void 0:c.domId})),{supportIcons:this.supportIcons})),this.singleLabel.set(l,c==null?void 0:c.matches,void 0,c==null?void 0:c.labelEscapeNewLines);else{this.container.innerText="",this.container.classList.add("multiple"),this.singleLabel=void 0;const r=(c==null?void 0:c.separator)||"/",s=t(l,r,c==null?void 0:c.matches);for(let o=0;o<l.length;o++){const a=l[o],d=s?s[o]:void 0,u=(c==null?void 0:c.domId)&&`${c==null?void 0:c.domId}_${o}`,f=y.$("a.label-name",{id:u,"data-icon-label-count":l.length,"data-icon-label-index":o,role:"treeitem"});new m.HighlightedLabel(y.append(this.container,f),{supportIcons:this.supportIcons}).set(a,d,void 0,c==null?void 0:c.labelEscapeNewLines),o<l.length-1&&y.append(f,y.$("span.label-separator",void 0,r))}}}}}),define(te[477],ie([5,6]),function(j,e){return j.create("vs/base/browser/ui/inputbox/inputBox",e)}),define(te[478],ie([5,6]),function(j,e){return j.create("vs/base/browser/ui/keybindingLabel/keybindingLabel",e)}),define(te[479],ie([5,6]),function(j,e){return j.create("vs/base/browser/ui/tree/abstractTree",e)}),define(te[191],ie([1,0,164,7,89,46,173,115,167,109,19,10,27,214,4,73,2,111,17,479,349]),function(j,e,y,m,D,I,w,b,p,h,g,t,i,n,l,c,r,s,o,a){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AbstractTree=e.RenderIndentGuides=e.ComposedTreeDelegate=void 0;class d extends w.ElementsDragAndDropData{constructor(F){super(F.elements.map(W=>W.element));this.data=F}}function u(P){return P instanceof w.ElementsDragAndDropData?new d(P):P}class f{constructor(F,W){this.modelProvider=F,this.dnd=W,this.autoExpandDisposable=r.Disposable.None}getDragURI(F){return this.dnd.getDragURI(F.element)}getDragLabel(F,W){if(this.dnd.getDragLabel)return this.dnd.getDragLabel(F.map(A=>A.element),W)}onDragStart(F,W){this.dnd.onDragStart&&this.dnd.onDragStart(u(F),W)}onDragOver(F,W,A,H,q=!0){const X=this.dnd.onDragOver(u(F),W&&W.element,A,H),G=this.autoExpandNode!==W;if(G&&(this.autoExpandDisposable.dispose(),this.autoExpandNode=W),typeof W=="undefined")return X;if(G&&typeof X!="boolean"&&X.autoExpand&&(this.autoExpandDisposable=(0,t.disposableTimeout)(()=>{const x=this.modelProvider(),U=x.getNodeLocation(W);x.isCollapsed(U)&&x.setCollapsed(U,!1),this.autoExpandNode=void 0},500)),typeof X=="boolean"||!X.accept||typeof X.bubble=="undefined"||X.feedback){if(!q){const x=typeof X=="boolean"?X:X.accept,U=typeof X=="boolean"?void 0:X.effect;return{accept:x,effect:U,feedback:[A]}}return X}if(X.bubble===1){const x=this.modelProvider(),U=x.getNodeLocation(W),Q=x.getParentNodeLocation(U),ne=x.getNode(Q),ce=Q&&x.getListIndex(Q);return this.onDragOver(F,ne,ce,H,!1)}const re=this.modelProvider(),ae=re.getNodeLocation(W),oe=re.getListIndex(ae),Z=re.getListRenderCount(ae);return Object.assign(Object.assign({},X),{feedback:(0,g.range)(oe,oe+Z)})}drop(F,W,A,H){this.autoExpandDisposable.dispose(),this.autoExpandNode=void 0,this.dnd.drop(u(F),W&&W.element,A,H)}onDragEnd(F){this.dnd.onDragEnd&&this.dnd.onDragEnd(F)}}function S(P,F){return F&&Object.assign(Object.assign({},F),{identityProvider:F.identityProvider&&{getId(W){return F.identityProvider.getId(W.element)}},dnd:F.dnd&&new f(P,F.dnd),multipleSelectionController:F.multipleSelectionController&&{isSelectionSingleChangeEvent(W){return F.multipleSelectionController.isSelectionSingleChangeEvent(Object.assign(Object.assign({},W),{element:W.element}))},isSelectionRangeChangeEvent(W){return F.multipleSelectionController.isSelectionRangeChangeEvent(Object.assign(Object.assign({},W),{element:W.element}))}},accessibilityProvider:F.accessibilityProvider&&Object.assign(Object.assign({},F.accessibilityProvider),{getSetSize(W){const A=P(),H=A.getNodeLocation(W),q=A.getParentNodeLocation(H);return A.getNode(q).visibleChildrenCount},getPosInSet(W){return W.visibleChildIndex+1},isChecked:F.accessibilityProvider&&F.accessibilityProvider.isChecked?W=>F.accessibilityProvider.isChecked(W.element):void 0,getRole:F.accessibilityProvider&&F.accessibilityProvider.getRole?W=>F.accessibilityProvider.getRole(W.element):()=>"treeitem",getAriaLabel(W){return F.accessibilityProvider.getAriaLabel(W.element)},getWidgetAriaLabel(){return F.accessibilityProvider.getWidgetAriaLabel()},getWidgetRole:F.accessibilityProvider&&F.accessibilityProvider.getWidgetRole?()=>F.accessibilityProvider.getWidgetRole():()=>"tree",getAriaLevel:F.accessibilityProvider&&F.accessibilityProvider.getAriaLevel?W=>F.accessibilityProvider.getAriaLevel(W.element):W=>W.depth,getActiveDescendantId:F.accessibilityProvider.getActiveDescendantId&&(W=>F.accessibilityProvider.getActiveDescendantId(W.element))}),keyboardNavigationLabelProvider:F.keyboardNavigationLabelProvider&&Object.assign(Object.assign({},F.keyboardNavigationLabelProvider),{getKeyboardNavigationLabel(W){return F.keyboardNavigationLabelProvider.getKeyboardNavigationLabel(W.element)}}),enableKeyboardNavigation:F.simpleKeyboardNavigation})}class v{constructor(F){this.delegate=F}getHeight(F){return this.delegate.getHeight(F.element)}getTemplateId(F){return this.delegate.getTemplateId(F.element)}hasDynamicHeight(F){return!!this.delegate.hasDynamicHeight&&this.delegate.hasDynamicHeight(F.element)}setDynamicHeight(F,W){this.delegate.setDynamicHeight&&this.delegate.setDynamicHeight(F.element,W)}}e.ComposedTreeDelegate=v;var C;(function(P){P.None="none",P.OnHover="onHover",P.Always="always"})(C=e.RenderIndentGuides||(e.RenderIndentGuides={}));class _{constructor(F,W=[]){this._elements=W,this.onDidChange=l.Event.forEach(F,A=>this._elements=A)}get elements(){return this._elements}}class L{constructor(F,W,A,H,q={}){this.renderer=F,this.modelProvider=W,this.activeNodes=H,this.renderedElements=new Map,this.renderedNodes=new Map,this.indent=L.DefaultIndent,this.hideTwistiesOfChildlessElements=!1,this.shouldRenderIndentGuides=!1,this.renderedIndentGuides=new n.SetMap,this.activeIndentNodes=new Set,this.indentGuidesDisposable=r.Disposable.None,this.disposables=new r.DisposableStore,this.templateId=F.templateId,this.updateOptions(q),l.Event.map(A,X=>X.node)(this.onDidChangeNodeTwistieState,this,this.disposables),F.onDidChangeTwistieState&&F.onDidChangeTwistieState(this.onDidChangeTwistieState,this,this.disposables)}updateOptions(F={}){if(typeof F.indent!="undefined"&&(this.indent=(0,s.clamp)(F.indent,0,40)),typeof F.renderIndentGuides!="undefined"){const W=F.renderIndentGuides!==C.None;if(W!==this.shouldRenderIndentGuides&&(this.shouldRenderIndentGuides=W,this.indentGuidesDisposable.dispose(),W)){const A=new r.DisposableStore;this.activeNodes.onDidChange(this._onDidChangeActiveNodes,this,A),this.indentGuidesDisposable=A,this._onDidChangeActiveNodes(this.activeNodes.elements)}}typeof F.hideTwistiesOfChildlessElements!="undefined"&&(this.hideTwistiesOfChildlessElements=F.hideTwistiesOfChildlessElements)}renderTemplate(F){const W=(0,m.append)(F,(0,m.$)(".monaco-tl-row")),A=(0,m.append)(W,(0,m.$)(".monaco-tl-indent")),H=(0,m.append)(W,(0,m.$)(".monaco-tl-twistie")),q=(0,m.append)(W,(0,m.$)(".monaco-tl-contents")),X=this.renderer.renderTemplate(q);return{container:F,indent:A,twistie:H,indentGuidesDisposable:r.Disposable.None,templateData:X}}renderElement(F,W,A,H){typeof H=="number"&&(this.renderedNodes.set(F,{templateData:A,height:H}),this.renderedElements.set(F.element,F));const q=L.DefaultIndent+(F.depth-1)*this.indent;A.twistie.style.paddingLeft=`${q}px`,A.indent.style.width=`${q+this.indent-16}px`,this.renderTwistie(F,A),typeof H=="number"&&this.renderIndentGuides(F,A),this.renderer.renderElement(F,W,A.templateData,H)}disposeElement(F,W,A,H){A.indentGuidesDisposable.dispose(),this.renderer.disposeElement&&this.renderer.disposeElement(F,W,A.templateData,H),typeof H=="number"&&(this.renderedNodes.delete(F),this.renderedElements.delete(F.element))}disposeTemplate(F){this.renderer.disposeTemplate(F.templateData)}onDidChangeTwistieState(F){const W=this.renderedElements.get(F);!W||this.onDidChangeNodeTwistieState(W)}onDidChangeNodeTwistieState(F){const W=this.renderedNodes.get(F);!W||(this.renderTwistie(F,W.templateData),this._onDidChangeActiveNodes(this.activeNodes.elements),this.renderIndentGuides(F,W.templateData))}renderTwistie(F,W){W.twistie.classList.remove(...i.Codicon.treeItemExpanded.classNamesArray);let A=!1;this.renderer.renderTwistie&&(A=this.renderer.renderTwistie(F.element,W.twistie)),F.collapsible&&(!this.hideTwistiesOfChildlessElements||F.visibleChildrenCount>0)?(A||W.twistie.classList.add(...i.Codicon.treeItemExpanded.classNamesArray),W.twistie.classList.add("collapsible"),W.twistie.classList.toggle("collapsed",F.collapsed)):W.twistie.classList.remove("collapsible","collapsed"),F.collapsible?W.container.setAttribute("aria-expanded",String(!F.collapsed)):W.container.removeAttribute("aria-expanded")}renderIndentGuides(F,W){if((0,m.clearNode)(W.indent),W.indentGuidesDisposable.dispose(),!this.shouldRenderIndentGuides)return;const A=new r.DisposableStore,H=this.modelProvider();let q=F;for(;;){const X=H.getNodeLocation(q),G=H.getParentNodeLocation(X);if(!G)break;const re=H.getNode(G),ae=(0,m.$)(".indent-guide",{style:`width: ${this.indent}px`});this.activeIndentNodes.has(re)&&ae.classList.add("active"),W.indent.childElementCount===0?W.indent.appendChild(ae):W.indent.insertBefore(ae,W.indent.firstElementChild),this.renderedIndentGuides.add(re,ae),A.add((0,r.toDisposable)(()=>this.renderedIndentGuides.delete(re,ae))),q=re}W.indentGuidesDisposable=A}_onDidChangeActiveNodes(F){if(!this.shouldRenderIndentGuides)return;const W=new Set,A=this.modelProvider();F.forEach(H=>{const q=A.getNodeLocation(H);try{const X=A.getParentNodeLocation(q);H.collapsible&&H.children.length>0&&!H.collapsed?W.add(H):X&&W.add(A.getNode(X))}catch{}}),this.activeIndentNodes.forEach(H=>{W.has(H)||this.renderedIndentGuides.forEach(H,q=>q.classList.remove("active"))}),W.forEach(H=>{this.activeIndentNodes.has(H)||this.renderedIndentGuides.forEach(H,q=>q.classList.add("active"))}),this.activeIndentNodes=W}dispose(){this.renderedNodes.clear(),this.renderedElements.clear(),this.indentGuidesDisposable.dispose(),(0,r.dispose)(this.disposables)}}L.DefaultIndent=8;class E{constructor(F,W,A){this.tree=F,this.keyboardNavigationLabelProvider=W,this._filter=A,this._totalCount=0,this._matchCount=0,this._pattern="",this._lowercasePattern="",this.disposables=new r.DisposableStore,F.onWillRefilter(this.reset,this,this.disposables)}get totalCount(){return this._totalCount}get matchCount(){return this._matchCount}set pattern(F){this._pattern=F,this._lowercasePattern=F.toLowerCase()}filter(F,W){if(this._filter){const q=this._filter.filter(F,W);if(this.tree.options.simpleKeyboardNavigation)return q;let X;if(typeof q=="boolean"?X=q?1:0:(0,p.isFilterResult)(q)?X=(0,p.getVisibleState)(q.visibility):X=q,X===0)return!1}if(this._totalCount++,this.tree.options.simpleKeyboardNavigation||!this._pattern)return this._matchCount++,{data:c.FuzzyScore.Default,visibility:!0};const A=this.keyboardNavigationLabelProvider.getKeyboardNavigationLabel(F),H=Array.isArray(A)?A:[A];for(const q of H){const X=q&&q.toString();if(typeof X=="undefined")return{data:c.FuzzyScore.Default,visibility:!0};const G=(0,c.fuzzyScore)(this._pattern,this._lowercasePattern,0,X,X.toLowerCase(),0,!0);if(G)return this._matchCount++,H.length===1?{data:G,visibility:!0}:{data:{label:X,score:G},visibility:!0}}return this.tree.options.filterOnType?2:{data:c.FuzzyScore.Default,visibility:!0}}reset(){this._totalCount=0,this._matchCount=0}dispose(){(0,r.dispose)(this.disposables)}}class N{constructor(F,W,A,H,q){this.tree=F,this.view=A,this.filter=H,this.keyboardNavigationDelegate=q,this._enabled=!1,this._pattern="",this._empty=!1,this._onDidChangeEmptyState=new l.Emitter,this.positionClassName="ne",this.automaticKeyboardNavigation=!0,this.triggered=!1,this._onDidChangePattern=new l.Emitter,this.enabledDisposables=new r.DisposableStore,this.disposables=new r.DisposableStore,this.domNode=(0,m.$)(`.monaco-list-type-filter.${this.positionClassName}`),this.domNode.draggable=!0,this.disposables.add((0,m.addDisposableListener)(this.domNode,"dragstart",()=>this.onDragStart())),this.messageDomNode=(0,m.append)(A.getHTMLElement(),(0,m.$)(".monaco-list-type-filter-message")),this.labelDomNode=(0,m.append)(this.domNode,(0,m.$)("span.label"));const X=(0,m.append)(this.domNode,(0,m.$)(".controls"));this._filterOnType=!!F.options.filterOnType,this.filterOnTypeDomNode=(0,m.append)(X,(0,m.$)("input.filter")),this.filterOnTypeDomNode.type="checkbox",this.filterOnTypeDomNode.checked=this._filterOnType,this.filterOnTypeDomNode.tabIndex=-1,this.updateFilterOnTypeTitleAndIcon(),this.disposables.add((0,m.addDisposableListener)(this.filterOnTypeDomNode,"input",()=>this.onDidChangeFilterOnType())),this.clearDomNode=(0,m.append)(X,(0,m.$)("button.clear"+i.Codicon.treeFilterClear.cssSelector)),this.clearDomNode.tabIndex=-1,this.clearDomNode.title=(0,a.localize)(0,null),this.keyboardNavigationEventFilter=F.options.keyboardNavigationEventFilter,W.onDidSplice(this.onDidSpliceModel,this,this.disposables),this.updateOptions(F.options)}get enabled(){return this._enabled}get pattern(){return this._pattern}get filterOnType(){return this._filterOnType}updateOptions(F){F.simpleKeyboardNavigation?this.disable():this.enable(),typeof F.filterOnType!="undefined"&&(this._filterOnType=!!F.filterOnType,this.filterOnTypeDomNode.checked=this._filterOnType,this.updateFilterOnTypeTitleAndIcon()),typeof F.automaticKeyboardNavigation!="undefined"&&(this.automaticKeyboardNavigation=F.automaticKeyboardNavigation),this.tree.refilter(),this.render(),this.automaticKeyboardNavigation||this.onEventOrInput("")}enable(){if(this._enabled)return;const F=this.enabledDisposables.add(new D.DomEmitter(this.view.getHTMLElement(),"keydown")),W=l.Event.chain(F.event).filter(H=>!(0,b.isInputElement)(H.target)||H.target===this.filterOnTypeDomNode).filter(H=>H.key!=="Dead"&&!/^Media/.test(H.key)).map(H=>new I.StandardKeyboardEvent(H)).filter(this.keyboardNavigationEventFilter||(()=>!0)).filter(()=>this.automaticKeyboardNavigation||this.triggered).filter(H=>this.keyboardNavigationDelegate.mightProducePrintableCharacter(H)&&!(H.keyCode===18||H.keyCode===16||H.keyCode===15||H.keyCode===17)||(this.pattern.length>0||this.triggered)&&(H.keyCode===9||H.keyCode===1)&&!H.altKey&&!H.ctrlKey&&!H.metaKey||H.keyCode===1&&(o.isMacintosh?H.altKey&&!H.metaKey:H.ctrlKey)&&!H.shiftKey).forEach(H=>{H.stopPropagation(),H.preventDefault()}).event,A=this.enabledDisposables.add(new D.DomEmitter(this.clearDomNode,"click"));l.Event.chain(l.Event.any(W,A.event)).event(this.onEventOrInput,this,this.enabledDisposables),this.filter.pattern="",this.tree.refilter(),this.render(),this._enabled=!0,this.triggered=!1}disable(){!this._enabled||(this.domNode.remove(),this.enabledDisposables.clear(),this.tree.refilter(),this.render(),this._enabled=!1,this.triggered=!1)}onEventOrInput(F){typeof F=="string"?this.onInput(F):F instanceof MouseEvent||F.keyCode===9||F.keyCode===1&&(o.isMacintosh?F.altKey:F.ctrlKey)?this.onInput(""):F.keyCode===1?this.onInput(this.pattern.length===0?"":this.pattern.substr(0,this.pattern.length-1)):this.onInput(this.pattern+F.browserEvent.key)}onInput(F){const W=this.view.getHTMLElement();F&&!this.domNode.parentElement?W.append(this.domNode):!F&&this.domNode.parentElement&&(this.domNode.remove(),this.tree.domFocus()),this._pattern=F,this._onDidChangePattern.fire(F),this.filter.pattern=F,this.tree.refilter(),F&&this.tree.focusNext(0,!0,void 0,H=>!c.FuzzyScore.isDefault(H.filterData));const A=this.tree.getFocus();if(A.length>0){const H=A[0];this.tree.getRelativeTop(H)===null&&this.tree.reveal(H,.5)}this.render(),F||(this.triggered=!1)}onDragStart(){const F=this.view.getHTMLElement(),{left:W}=(0,m.getDomNodePagePosition)(F),A=F.clientWidth,H=A/2,q=this.domNode.clientWidth,X=new r.DisposableStore;let G=this.positionClassName;const re=()=>{switch(G){case"nw":this.domNode.style.top="4px",this.domNode.style.left="4px";break;case"ne":this.domNode.style.top="4px",this.domNode.style.left=`${A-q-6}px`;break}},ae=Z=>{Z.preventDefault();const x=Z.clientX-W;Z.dataTransfer&&(Z.dataTransfer.dropEffect="none"),x<H?G="nw":G="ne",re()},oe=()=>{this.positionClassName=G,this.domNode.className=`monaco-list-type-filter ${this.positionClassName}`,this.domNode.style.top="",this.domNode.style.left="",(0,r.dispose)(X)};re(),this.domNode.classList.remove(G),this.domNode.classList.add("dragging"),X.add((0,r.toDisposable)(()=>this.domNode.classList.remove("dragging"))),X.add((0,m.addDisposableListener)(document,"dragover",Z=>ae(Z))),X.add((0,m.addDisposableListener)(this.domNode,"dragend",()=>oe())),y.StaticDND.CurrentDragAndDropData=new y.DragAndDropData("vscode-ui"),X.add((0,r.toDisposable)(()=>y.StaticDND.CurrentDragAndDropData=void 0))}onDidSpliceModel(){!this._enabled||this.pattern.length===0||(this.tree.refilter(),this.render())}onDidChangeFilterOnType(){this.tree.updateOptions({filterOnType:this.filterOnTypeDomNode.checked}),this.tree.refilter(),this.tree.domFocus(),this.render(),this.updateFilterOnTypeTitleAndIcon()}updateFilterOnTypeTitleAndIcon(){this.filterOnType?(this.filterOnTypeDomNode.classList.remove(...i.Codicon.treeFilterOnTypeOff.classNamesArray),this.filterOnTypeDomNode.classList.add(...i.Codicon.treeFilterOnTypeOn.classNamesArray),this.filterOnTypeDomNode.title=(0,a.localize)(1,null)):(this.filterOnTypeDomNode.classList.remove(...i.Codicon.treeFilterOnTypeOn.classNamesArray),this.filterOnTypeDomNode.classList.add(...i.Codicon.treeFilterOnTypeOff.classNamesArray),this.filterOnTypeDomNode.title=(0,a.localize)(2,null))}render(){const F=this.filter.totalCount>0&&this.filter.matchCount===0;this.pattern&&this.tree.options.filterOnType&&F?(this.messageDomNode.textContent=(0,a.localize)(3,null),this._empty=!0):(this.messageDomNode.innerText="",this._empty=!1),this.domNode.classList.toggle("no-matches",F),this.domNode.title=(0,a.localize)(4,null,this.filter.matchCount,this.filter.totalCount),this.labelDomNode.textContent=this.pattern.length>16?"\u2026"+this.pattern.substr(this.pattern.length-16):this.pattern,this._onDidChangeEmptyState.fire(this._empty)}shouldAllowFocus(F){return!this.enabled||!this.pattern||this.filterOnType||this.filter.totalCount>0&&this.filter.matchCount<=1?!0:!c.FuzzyScore.isDefault(F.filterData)}dispose(){this._enabled&&(this.domNode.remove(),this.enabledDisposables.dispose(),this._enabled=!1,this.triggered=!1),this._onDidChangePattern.dispose(),(0,r.dispose)(this.disposables)}}function k(P){let F=h.TreeMouseEventTarget.Unknown;return(0,m.hasParentWithClass)(P.browserEvent.target,"monaco-tl-twistie","monaco-tl-row")?F=h.TreeMouseEventTarget.Twistie:(0,m.hasParentWithClass)(P.browserEvent.target,"monaco-tl-contents","monaco-tl-row")&&(F=h.TreeMouseEventTarget.Element),{browserEvent:P.browserEvent,element:P.element?P.element.element:null,target:F}}function M(P,F){F(P),P.children.forEach(W=>M(W,F))}class O{constructor(F,W){this.getFirstViewElementWithTrait=F,this.identityProvider=W,this.nodes=[],this._onDidChange=new l.Emitter,this.onDidChange=this._onDidChange.event}get nodeSet(){return this._nodeSet||(this._nodeSet=this.createNodeSet()),this._nodeSet}set(F,W){!(W==null?void 0:W.__forceEvent)&&(0,g.equals)(this.nodes,F)||this._set(F,!1,W)}_set(F,W,A){if(this.nodes=[...F],this.elements=void 0,this._nodeSet=void 0,!W){const H=this;this._onDidChange.fire({get elements(){return H.get()},browserEvent:A})}}get(){return this.elements||(this.elements=this.nodes.map(F=>F.element)),[...this.elements]}getNodes(){return this.nodes}has(F){return this.nodeSet.has(F)}onDidModelSplice({insertedNodes:F,deletedNodes:W}){if(!this.identityProvider){const re=this.createNodeSet(),ae=oe=>re.delete(oe);W.forEach(oe=>M(oe,ae)),this.set([...re.values()]);return}const A=new Set,H=re=>A.add(this.identityProvider.getId(re.element).toString());W.forEach(re=>M(re,H));const q=new Map,X=re=>q.set(this.identityProvider.getId(re.element).toString(),re);F.forEach(re=>M(re,X));const G=[];for(const re of this.nodes){const ae=this.identityProvider.getId(re.element).toString();if(!A.has(ae))G.push(re);else{const Z=q.get(ae);Z&&G.push(Z)}}if(this.nodes.length>0&&G.length===0){const re=this.getFirstViewElementWithTrait();re&&G.push(re)}this._set(G,!0)}createNodeSet(){const F=new Set;for(const W of this.nodes)F.add(W);return F}}class B extends b.MouseController{constructor(F,W){super(F);this.tree=W}onViewPointer(F){if((0,b.isInputElement)(F.browserEvent.target)||(0,b.isMonacoEditor)(F.browserEvent.target))return;const W=F.element;if(!W)return super.onViewPointer(F);if(this.isSelectionRangeChangeEvent(F)||this.isSelectionSingleChangeEvent(F))return super.onViewPointer(F);const A=F.browserEvent.target,H=A.classList.contains("monaco-tl-twistie")||A.classList.contains("monaco-icon-label")&&A.classList.contains("folder-icon")&&F.browserEvent.offsetX<16;let q=!1;if(typeof this.tree.expandOnlyOnTwistieClick=="function"?q=this.tree.expandOnlyOnTwistieClick(W.element):q=!!this.tree.expandOnlyOnTwistieClick,q&&!H&&F.browserEvent.detail!==2)return super.onViewPointer(F);if(!this.tree.expandOnDoubleClick&&F.browserEvent.detail===2)return super.onViewPointer(F);if(W.collapsible){const X=this.tree.model,G=X.getNodeLocation(W),re=F.browserEvent.altKey;if(this.tree.setFocus([G]),X.setCollapsed(G,void 0,re),q&&H)return}super.onViewPointer(F)}onDoubleClick(F){F.browserEvent.target.classList.contains("monaco-tl-twistie")||!this.tree.expandOnDoubleClick||super.onDoubleClick(F)}}class T extends b.List{constructor(F,W,A,H,q,X,G,re){super(F,W,A,H,re);this.focusTrait=q,this.selectionTrait=X,this.anchorTrait=G}createMouseController(F){return new B(this,F.tree)}splice(F,W,A=[]){if(super.splice(F,W,A),A.length===0)return;const H=[],q=[];let X;A.forEach((G,re)=>{this.focusTrait.has(G)&&H.push(F+re),this.selectionTrait.has(G)&&q.push(F+re),this.anchorTrait.has(G)&&(X=F+re)}),H.length>0&&super.setFocus((0,g.distinct)([...super.getFocus(),...H])),q.length>0&&super.setSelection((0,g.distinct)([...super.getSelection(),...q])),typeof X=="number"&&super.setAnchor(X)}setFocus(F,W,A=!1){super.setFocus(F,W),A||this.focusTrait.set(F.map(H=>this.element(H)),W)}setSelection(F,W,A=!1){super.setSelection(F,W),A||this.selectionTrait.set(F.map(H=>this.element(H)),W)}setAnchor(F,W=!1){super.setAnchor(F),W||(typeof F=="undefined"?this.anchorTrait.set([]):this.anchorTrait.set([this.element(F)]))}}class R{constructor(F,W,A,H,q={}){this._user=F,this._options=q,this.eventBufferer=new l.EventBufferer,this.disposables=new r.DisposableStore,this._onWillRefilter=new l.Emitter,this.onWillRefilter=this._onWillRefilter.event,this._onDidUpdateOptions=new l.Emitter;const X=new v(A),G=new l.Relay,re=new l.Relay,ae=new _(re.event);this.renderers=H.map(x=>new L(x,()=>this.model,G.event,ae,q));for(let x of this.renderers)this.disposables.add(x);let oe;q.keyboardNavigationLabelProvider&&(oe=new E(this,q.keyboardNavigationLabelProvider,q.filter),q=Object.assign(Object.assign({},q),{filter:oe}),this.disposables.add(oe)),this.focus=new O(()=>this.view.getFocusedElements()[0],q.identityProvider),this.selection=new O(()=>this.view.getSelectedElements()[0],q.identityProvider),this.anchor=new O(()=>this.view.getAnchorElement(),q.identityProvider),this.view=new T(F,W,X,this.renderers,this.focus,this.selection,this.anchor,Object.assign(Object.assign({},S(()=>this.model,q)),{tree:this})),this.model=this.createModel(F,this.view,q),G.input=this.model.onDidChangeCollapseState;const Z=l.Event.forEach(this.model.onDidSplice,x=>{this.eventBufferer.bufferEvents(()=>{this.focus.onDidModelSplice(x),this.selection.onDidModelSplice(x)})});if(Z(()=>null,null,this.disposables),re.input=l.Event.chain(l.Event.any(Z,this.focus.onDidChange,this.selection.onDidChange)).debounce(()=>null,0).map(()=>{const x=new Set;for(const U of this.focus.getNodes())x.add(U);for(const U of this.selection.getNodes())x.add(U);return[...x.values()]}).event,q.keyboardSupport!==!1){const x=l.Event.chain(this.view.onKeyDown).filter(U=>!(0,b.isInputElement)(U.target)).map(U=>new I.StandardKeyboardEvent(U));x.filter(U=>U.keyCode===15).on(this.onLeftArrow,this,this.disposables),x.filter(U=>U.keyCode===17).on(this.onRightArrow,this,this.disposables),x.filter(U=>U.keyCode===10).on(this.onSpace,this,this.disposables)}if(q.keyboardNavigationLabelProvider){const x=q.keyboardNavigationDelegate||b.DefaultKeyboardNavigationDelegate;this.typeFilterController=new N(this,this.model,this.view,oe,x),this.focusNavigationFilter=U=>this.typeFilterController.shouldAllowFocus(U),this.disposables.add(this.typeFilterController)}this.styleElement=(0,m.createStyleSheet)(this.view.getHTMLElement()),this.getHTMLElement().classList.toggle("always",this._options.renderIndentGuides===C.Always)}get onDidChangeFocus(){return this.eventBufferer.wrapEvent(this.focus.onDidChange)}get onDidChangeSelection(){return this.eventBufferer.wrapEvent(this.selection.onDidChange)}get onMouseDblClick(){return l.Event.map(this.view.onMouseDblClick,k)}get onPointer(){return l.Event.map(this.view.onPointer,k)}get onDidFocus(){return this.view.onDidFocus}get onDidChangeModel(){return l.Event.signal(this.model.onDidSplice)}get onDidChangeCollapseState(){return this.model.onDidChangeCollapseState}get expandOnDoubleClick(){return typeof this._options.expandOnDoubleClick=="undefined"?!0:this._options.expandOnDoubleClick}get expandOnlyOnTwistieClick(){return typeof this._options.expandOnlyOnTwistieClick=="undefined"?!0:this._options.expandOnlyOnTwistieClick}get onDidDispose(){return this.view.onDidDispose}updateOptions(F={}){this._options=Object.assign(Object.assign({},this._options),F);for(const W of this.renderers)W.updateOptions(F);this.view.updateOptions(Object.assign(Object.assign({},this._options),{enableKeyboardNavigation:this._options.simpleKeyboardNavigation})),this.typeFilterController&&this.typeFilterController.updateOptions(this._options),this._onDidUpdateOptions.fire(this._options),this.getHTMLElement().classList.toggle("always",this._options.renderIndentGuides===C.Always)}get options(){return this._options}getHTMLElement(){return this.view.getHTMLElement()}get scrollTop(){return this.view.scrollTop}set scrollTop(F){this.view.scrollTop=F}domFocus(){this.view.domFocus()}layout(F,W){this.view.layout(F,W)}style(F){const W=`.${this.view.domId}`,A=[];F.treeIndentGuidesStroke&&(A.push(`.monaco-list${W}:hover .monaco-tl-indent > .indent-guide, .monaco-list${W}.always .monaco-tl-indent > .indent-guide { border-color: ${F.treeIndentGuidesStroke.transparent(.4)}; }`),A.push(`.monaco-list${W} .monaco-tl-indent > .indent-guide.active { border-color: ${F.treeIndentGuidesStroke}; }`)),this.styleElement.textContent=A.join(`
|
||
`),this.view.style(F)}getParentElement(F){const W=this.model.getParentNodeLocation(F);return this.model.getNode(W).element}getFirstElementChild(F){return this.model.getFirstElementChild(F)}getNode(F){return this.model.getNode(F)}collapse(F,W=!1){return this.model.setCollapsed(F,!0,W)}expand(F,W=!1){return this.model.setCollapsed(F,!1,W)}isCollapsible(F){return this.model.isCollapsible(F)}setCollapsible(F,W){return this.model.setCollapsible(F,W)}isCollapsed(F){return this.model.isCollapsed(F)}refilter(){this._onWillRefilter.fire(void 0),this.model.refilter()}setSelection(F,W){const A=F.map(q=>this.model.getNode(q));this.selection.set(A,W);const H=F.map(q=>this.model.getListIndex(q)).filter(q=>q>-1);this.view.setSelection(H,W,!0)}getSelection(){return this.selection.get()}setFocus(F,W){const A=F.map(q=>this.model.getNode(q));this.focus.set(A,W);const H=F.map(q=>this.model.getListIndex(q)).filter(q=>q>-1);this.view.setFocus(H,W,!0)}focusNext(F=1,W=!1,A,H=this.focusNavigationFilter){this.view.focusNext(F,W,A,H)}getFocus(){return this.focus.get()}reveal(F,W){this.model.expandTo(F);const A=this.model.getListIndex(F);A!==-1&&this.view.reveal(A,W)}getRelativeTop(F){const W=this.model.getListIndex(F);return W===-1?null:this.view.getRelativeTop(W)}onLeftArrow(F){F.preventDefault(),F.stopPropagation();const W=this.view.getFocusedElements();if(W.length===0)return;const A=W[0],H=this.model.getNodeLocation(A);if(!this.model.setCollapsed(H,!0)){const X=this.model.getParentNodeLocation(H);if(!X)return;const G=this.model.getListIndex(X);this.view.reveal(G),this.view.setFocus([G])}}onRightArrow(F){F.preventDefault(),F.stopPropagation();const W=this.view.getFocusedElements();if(W.length===0)return;const A=W[0],H=this.model.getNodeLocation(A);if(!this.model.setCollapsed(H,!1)){if(!A.children.some(re=>re.visible))return;const[X]=this.view.getFocus(),G=X+1;this.view.reveal(G),this.view.setFocus([G])}}onSpace(F){F.preventDefault(),F.stopPropagation();const W=this.view.getFocusedElements();if(W.length===0)return;const A=W[0],H=this.model.getNodeLocation(A),q=F.browserEvent.altKey;this.model.setCollapsed(H,void 0,q)}dispose(){(0,r.dispose)(this.disposables),this.view.dispose()}}e.AbstractTree=R}),define(te[480],ie([1,0,191,168]),function(j,e,y,m){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DataTree=void 0;class D extends y.AbstractTree{constructor(w,b,p,h,g,t={}){super(w,b,p,h,t);this.user=w,this.dataSource=g,this.identityProvider=t.identityProvider}createModel(w,b,p){return new m.ObjectTreeModel(w,b,p)}}e.DataTree=D}),define(te[265],ie([1,0,191,318,168,93,54]),function(j,e,y,m,D,I,w){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CompressibleObjectTree=e.ObjectTree=void 0;class b extends y.AbstractTree{constructor(i,n,l,c,r={}){super(i,n,l,c,r);this.user=i}get onDidChangeCollapseState(){return this.model.onDidChangeCollapseState}setChildren(i,n=w.Iterable.empty(),l){this.model.setChildren(i,n,l)}rerender(i){if(i===void 0){this.view.rerender();return}this.model.rerender(i)}hasElement(i){return this.model.has(i)}createModel(i,n,l){return new D.ObjectTreeModel(i,n,l)}}e.ObjectTree=b;class p{constructor(i,n){this._compressedTreeNodeProvider=i,this.renderer=n,this.templateId=n.templateId,n.onDidChangeTwistieState&&(this.onDidChangeTwistieState=n.onDidChangeTwistieState)}get compressedTreeNodeProvider(){return this._compressedTreeNodeProvider()}renderTemplate(i){const n=this.renderer.renderTemplate(i);return{compressedTreeNode:void 0,data:n}}renderElement(i,n,l,c){const r=this.compressedTreeNodeProvider.getCompressedTreeNode(i.element);r.element.elements.length===1?(l.compressedTreeNode=void 0,this.renderer.renderElement(i,n,l.data,c)):(l.compressedTreeNode=r,this.renderer.renderCompressedElements(r,n,l.data,c))}disposeElement(i,n,l,c){l.compressedTreeNode?this.renderer.disposeCompressedElements&&this.renderer.disposeCompressedElements(l.compressedTreeNode,n,l.data,c):this.renderer.disposeElement&&this.renderer.disposeElement(i,n,l.data,c)}disposeTemplate(i){this.renderer.disposeTemplate(i.data)}renderTwistie(i,n){return this.renderer.renderTwistie?this.renderer.renderTwistie(i,n):!1}}Ie([I.memoize],p.prototype,"compressedTreeNodeProvider",null);function h(t,i){return i&&Object.assign(Object.assign({},i),{keyboardNavigationLabelProvider:i.keyboardNavigationLabelProvider&&{getKeyboardNavigationLabel(n){let l;try{l=t().getCompressedTreeNode(n)}catch{return i.keyboardNavigationLabelProvider.getKeyboardNavigationLabel(n)}return l.element.elements.length===1?i.keyboardNavigationLabelProvider.getKeyboardNavigationLabel(n):i.keyboardNavigationLabelProvider.getCompressedNodeKeyboardNavigationLabel(l.element.elements)}}})}class g extends b{constructor(i,n,l,c,r={}){const s=()=>this,o=c.map(a=>new p(s,a));super(i,n,l,o,h(s,r))}setChildren(i,n=w.Iterable.empty(),l){this.model.setChildren(i,n,l)}createModel(i,n,l){return new m.CompressibleObjectTreeModel(i,n,l)}updateOptions(i={}){super.updateOptions(i),typeof i.compressionEnabled!="undefined"&&this.model.setCompressionEnabled(i.compressionEnabled)}getCompressedTreeNode(i=null){return this.model.getCompressedTreeNode(i)}}e.CompressibleObjectTree=g}),define(te[481],ie([1,0,173,191,167,265,109,10,27,13,4,54,2]),function(j,e,y,m,D,I,w,b,p,h,g,t,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CompressibleAsyncDataTree=e.AsyncDataTree=void 0;function n(M){return Object.assign(Object.assign({},M),{children:[],refreshPromise:void 0,stale:!0,slow:!1,collapsedByDefault:void 0})}function l(M,O){return O.parent?O.parent===M?!0:l(M,O.parent):!1}function c(M,O){return M===O||l(M,O)||l(O,M)}class r{constructor(O){this.node=O}get element(){return this.node.element.element}get children(){return this.node.children.map(O=>new r(O))}get depth(){return this.node.depth}get visibleChildrenCount(){return this.node.visibleChildrenCount}get visibleChildIndex(){return this.node.visibleChildIndex}get collapsible(){return this.node.collapsible}get collapsed(){return this.node.collapsed}get visible(){return this.node.visible}get filterData(){return this.node.filterData}}class s{constructor(O,B,T){this.renderer=O,this.nodeMapper=B,this.onDidChangeTwistieState=T,this.renderedNodes=new Map,this.templateId=O.templateId}renderTemplate(O){return{templateData:this.renderer.renderTemplate(O)}}renderElement(O,B,T,R){this.renderer.renderElement(this.nodeMapper.map(O),B,T.templateData,R)}renderTwistie(O,B){return O.slow?(B.classList.add(...p.Codicon.treeItemLoading.classNamesArray),!0):(B.classList.remove(...p.Codicon.treeItemLoading.classNamesArray),!1)}disposeElement(O,B,T,R){this.renderer.disposeElement&&this.renderer.disposeElement(this.nodeMapper.map(O),B,T.templateData,R)}disposeTemplate(O){this.renderer.disposeTemplate(O.templateData)}dispose(){this.renderedNodes.clear()}}function o(M){return{browserEvent:M.browserEvent,elements:M.elements.map(O=>O.element)}}function a(M){return{browserEvent:M.browserEvent,element:M.element&&M.element.element,target:M.target}}class d extends y.ElementsDragAndDropData{constructor(O){super(O.elements.map(B=>B.element));this.data=O}}function u(M){return M instanceof y.ElementsDragAndDropData?new d(M):M}class f{constructor(O){this.dnd=O}getDragURI(O){return this.dnd.getDragURI(O.element)}getDragLabel(O,B){if(this.dnd.getDragLabel)return this.dnd.getDragLabel(O.map(T=>T.element),B)}onDragStart(O,B){this.dnd.onDragStart&&this.dnd.onDragStart(u(O),B)}onDragOver(O,B,T,R,P=!0){return this.dnd.onDragOver(u(O),B&&B.element,T,R)}drop(O,B,T,R){this.dnd.drop(u(O),B&&B.element,T,R)}onDragEnd(O){this.dnd.onDragEnd&&this.dnd.onDragEnd(O)}}function S(M){return M&&Object.assign(Object.assign({},M),{collapseByDefault:!0,identityProvider:M.identityProvider&&{getId(O){return M.identityProvider.getId(O.element)}},dnd:M.dnd&&new f(M.dnd),multipleSelectionController:M.multipleSelectionController&&{isSelectionSingleChangeEvent(O){return M.multipleSelectionController.isSelectionSingleChangeEvent(Object.assign(Object.assign({},O),{element:O.element}))},isSelectionRangeChangeEvent(O){return M.multipleSelectionController.isSelectionRangeChangeEvent(Object.assign(Object.assign({},O),{element:O.element}))}},accessibilityProvider:M.accessibilityProvider&&Object.assign(Object.assign({},M.accessibilityProvider),{getPosInSet:void 0,getSetSize:void 0,getRole:M.accessibilityProvider.getRole?O=>M.accessibilityProvider.getRole(O.element):()=>"treeitem",isChecked:M.accessibilityProvider.isChecked?O=>{var B;return!!((B=M.accessibilityProvider)===null||B===void 0?void 0:B.isChecked(O.element))}:void 0,getAriaLabel(O){return M.accessibilityProvider.getAriaLabel(O.element)},getWidgetAriaLabel(){return M.accessibilityProvider.getWidgetAriaLabel()},getWidgetRole:M.accessibilityProvider.getWidgetRole?()=>M.accessibilityProvider.getWidgetRole():()=>"tree",getAriaLevel:M.accessibilityProvider.getAriaLevel&&(O=>M.accessibilityProvider.getAriaLevel(O.element)),getActiveDescendantId:M.accessibilityProvider.getActiveDescendantId&&(O=>M.accessibilityProvider.getActiveDescendantId(O.element))}),filter:M.filter&&{filter(O,B){return M.filter.filter(O.element,B)}},keyboardNavigationLabelProvider:M.keyboardNavigationLabelProvider&&Object.assign(Object.assign({},M.keyboardNavigationLabelProvider),{getKeyboardNavigationLabel(O){return M.keyboardNavigationLabelProvider.getKeyboardNavigationLabel(O.element)}}),sorter:void 0,expandOnlyOnTwistieClick:typeof M.expandOnlyOnTwistieClick=="undefined"?void 0:typeof M.expandOnlyOnTwistieClick!="function"?M.expandOnlyOnTwistieClick:O=>M.expandOnlyOnTwistieClick(O.element),additionalScrollHeight:M.additionalScrollHeight})}function v(M,O){O(M),M.children.forEach(B=>v(B,O))}class C{constructor(O,B,T,R,P,F={}){this.user=O,this.dataSource=P,this.nodes=new Map,this.subTreeRefreshPromises=new Map,this.refreshPromises=new Map,this._onDidRender=new g.Emitter,this._onDidChangeNodeSlowState=new g.Emitter,this.nodeMapper=new w.WeakMapper(W=>new r(W)),this.disposables=new i.DisposableStore,this.identityProvider=F.identityProvider,this.autoExpandSingleChildren=typeof F.autoExpandSingleChildren=="undefined"?!1:F.autoExpandSingleChildren,this.sorter=F.sorter,this.collapseByDefault=F.collapseByDefault,this.tree=this.createTree(O,B,T,R,F),this.root=n({element:void 0,parent:null,hasChildren:!0}),this.identityProvider&&(this.root=Object.assign(Object.assign({},this.root),{id:null})),this.nodes.set(null,this.root),this.tree.onDidChangeCollapseState(this._onDidChangeCollapseState,this,this.disposables)}get onDidChangeFocus(){return g.Event.map(this.tree.onDidChangeFocus,o)}get onDidChangeSelection(){return g.Event.map(this.tree.onDidChangeSelection,o)}get onMouseDblClick(){return g.Event.map(this.tree.onMouseDblClick,a)}get onPointer(){return g.Event.map(this.tree.onPointer,a)}get onDidFocus(){return this.tree.onDidFocus}get onDidChangeModel(){return this.tree.onDidChangeModel}get onDidChangeCollapseState(){return this.tree.onDidChangeCollapseState}get onDidDispose(){return this.tree.onDidDispose}createTree(O,B,T,R,P){const F=new m.ComposedTreeDelegate(T),W=R.map(H=>new s(H,this.nodeMapper,this._onDidChangeNodeSlowState.event)),A=S(P)||{};return new I.ObjectTree(O,B,F,W,A)}updateOptions(O={}){this.tree.updateOptions(O)}getHTMLElement(){return this.tree.getHTMLElement()}get scrollTop(){return this.tree.scrollTop}set scrollTop(O){this.tree.scrollTop=O}domFocus(){this.tree.domFocus()}layout(O,B){this.tree.layout(O,B)}style(O){this.tree.style(O)}getInput(){return this.root.element}setInput(O,B){return ye(this,void 0,void 0,function*(){this.refreshPromises.forEach(R=>R.cancel()),this.refreshPromises.clear(),this.root.element=O;const T=B&&{viewState:B,focus:[],selection:[]};yield this._updateChildren(O,!0,!1,T),T&&(this.tree.setFocus(T.focus),this.tree.setSelection(T.selection)),B&&typeof B.scrollTop=="number"&&(this.scrollTop=B.scrollTop)})}_updateChildren(O=this.root.element,B=!0,T=!1,R,P){return ye(this,void 0,void 0,function*(){if(typeof this.root.element=="undefined")throw new w.TreeError(this.user,"Tree input not set");this.root.refreshPromise&&(yield this.root.refreshPromise,yield g.Event.toPromise(this._onDidRender.event));const F=this.getDataNode(O);if(yield this.refreshAndRenderNode(F,B,R,P),T)try{this.tree.rerender(F)}catch{}})}rerender(O){if(O===void 0||O===this.root.element){this.tree.rerender();return}const B=this.getDataNode(O);this.tree.rerender(B)}getNode(O=this.root.element){const B=this.getDataNode(O),T=this.tree.getNode(B===this.root?null:B);return this.nodeMapper.map(T)}collapse(O,B=!1){const T=this.getDataNode(O);return this.tree.collapse(T===this.root?null:T,B)}expand(O,B=!1){return ye(this,void 0,void 0,function*(){if(typeof this.root.element=="undefined")throw new w.TreeError(this.user,"Tree input not set");this.root.refreshPromise&&(yield this.root.refreshPromise,yield g.Event.toPromise(this._onDidRender.event));const T=this.getDataNode(O);if(this.tree.hasElement(T)&&!this.tree.isCollapsible(T)||(T.refreshPromise&&(yield this.root.refreshPromise,yield g.Event.toPromise(this._onDidRender.event)),T!==this.root&&!T.refreshPromise&&!this.tree.isCollapsed(T)))return!1;const R=this.tree.expand(T===this.root?null:T,B);return T.refreshPromise&&(yield this.root.refreshPromise,yield g.Event.toPromise(this._onDidRender.event)),R})}setSelection(O,B){const T=O.map(R=>this.getDataNode(R));this.tree.setSelection(T,B)}getSelection(){return this.tree.getSelection().map(B=>B.element)}setFocus(O,B){const T=O.map(R=>this.getDataNode(R));this.tree.setFocus(T,B)}getFocus(){return this.tree.getFocus().map(B=>B.element)}reveal(O,B){this.tree.reveal(this.getDataNode(O),B)}getParentElement(O){const B=this.tree.getParentElement(this.getDataNode(O));return B&&B.element}getFirstElementChild(O=this.root.element){const B=this.getDataNode(O),T=this.tree.getFirstElementChild(B===this.root?null:B);return T&&T.element}getDataNode(O){const B=this.nodes.get(O===this.root.element?null:O);if(!B)throw new w.TreeError(this.user,`Data tree node not found: ${O}`);return B}refreshAndRenderNode(O,B,T,R){return ye(this,void 0,void 0,function*(){yield this.refreshNode(O,B,T),this.render(O,T,R)})}refreshNode(O,B,T){return ye(this,void 0,void 0,function*(){let R;return this.subTreeRefreshPromises.forEach((P,F)=>{!R&&c(F,O)&&(R=P.then(()=>this.refreshNode(O,B,T)))}),R||this.doRefreshSubTree(O,B,T)})}doRefreshSubTree(O,B,T){return ye(this,void 0,void 0,function*(){let R;O.refreshPromise=new Promise(P=>R=P),this.subTreeRefreshPromises.set(O,O.refreshPromise),O.refreshPromise.finally(()=>{O.refreshPromise=void 0,this.subTreeRefreshPromises.delete(O)});try{const P=yield this.doRefreshNode(O,B,T);O.stale=!1,yield b.Promises.settled(P.map(F=>this.doRefreshSubTree(F,B,T)))}finally{R()}})}doRefreshNode(O,B,T){return ye(this,void 0,void 0,function*(){O.hasChildren=!!this.dataSource.hasChildren(O.element);let R;if(!O.hasChildren)R=Promise.resolve(t.Iterable.empty());else{const P=(0,b.timeout)(800);P.then(()=>{O.slow=!0,this._onDidChangeNodeSlowState.fire(O)},F=>null),R=this.doGetChildren(O).finally(()=>P.cancel())}try{const P=yield R;return this.setChildren(O,P,B,T)}catch(P){if(O!==this.root&&this.tree.hasElement(O)&&this.tree.collapse(O),(0,h.isCancellationError)(P))return[];throw P}finally{O.slow&&(O.slow=!1,this._onDidChangeNodeSlowState.fire(O))}})}doGetChildren(O){let B=this.refreshPromises.get(O);return B||(B=(0,b.createCancelablePromise)(()=>ye(this,void 0,void 0,function*(){const T=yield this.dataSource.getChildren(O.element);return this.processChildren(T)})),this.refreshPromises.set(O,B),B.finally(()=>{this.refreshPromises.delete(O)}))}_onDidChangeCollapseState({node:O,deep:B}){O.element!==null&&!O.collapsed&&O.element.stale&&(B?this.collapse(O.element.element):this.refreshAndRenderNode(O.element,!1).catch(h.onUnexpectedError))}setChildren(O,B,T,R){const P=[...B];if(O.children.length===0&&P.length===0)return[];const F=new Map,W=new Map;for(const q of O.children)if(F.set(q.element,q),this.identityProvider){const X=this.tree.isCollapsed(q);W.set(q.id,{node:q,collapsed:X})}const A=[],H=P.map(q=>{const X=!!this.dataSource.hasChildren(q);if(!this.identityProvider){const oe=n({element:q,parent:O,hasChildren:X});return X&&this.collapseByDefault&&!this.collapseByDefault(q)&&(oe.collapsedByDefault=!1,A.push(oe)),oe}const G=this.identityProvider.getId(q).toString(),re=W.get(G);if(re){const oe=re.node;return F.delete(oe.element),this.nodes.delete(oe.element),this.nodes.set(q,oe),oe.element=q,oe.hasChildren=X,T?re.collapsed?(oe.children.forEach(Z=>v(Z,x=>this.nodes.delete(x.element))),oe.children.splice(0,oe.children.length),oe.stale=!0):A.push(oe):X&&this.collapseByDefault&&!this.collapseByDefault(q)&&(oe.collapsedByDefault=!1,A.push(oe)),oe}const ae=n({element:q,parent:O,id:G,hasChildren:X});return R&&R.viewState.focus&&R.viewState.focus.indexOf(G)>-1&&R.focus.push(ae),R&&R.viewState.selection&&R.viewState.selection.indexOf(G)>-1&&R.selection.push(ae),R&&R.viewState.expanded&&R.viewState.expanded.indexOf(G)>-1?A.push(ae):X&&this.collapseByDefault&&!this.collapseByDefault(q)&&(ae.collapsedByDefault=!1,A.push(ae)),ae});for(const q of F.values())v(q,X=>this.nodes.delete(X.element));for(const q of H)this.nodes.set(q.element,q);return O.children.splice(0,O.children.length,...H),O!==this.root&&this.autoExpandSingleChildren&&H.length===1&&A.length===0&&(H[0].collapsedByDefault=!1,A.push(H[0])),A}render(O,B,T){const R=O.children.map(F=>this.asTreeElement(F,B)),P=T&&Object.assign(Object.assign({},T),{diffIdentityProvider:T.diffIdentityProvider&&{getId(F){return T.diffIdentityProvider.getId(F.element)}}});this.tree.setChildren(O===this.root?null:O,R,P),O!==this.root&&this.tree.setCollapsible(O,O.hasChildren),this._onDidRender.fire()}asTreeElement(O,B){if(O.stale)return{element:O,collapsible:O.hasChildren,collapsed:!0};let T;return B&&B.viewState.expanded&&O.id&&B.viewState.expanded.indexOf(O.id)>-1?T=!1:T=O.collapsedByDefault,O.collapsedByDefault=void 0,{element:O,children:O.hasChildren?t.Iterable.map(O.children,R=>this.asTreeElement(R,B)):[],collapsible:O.hasChildren,collapsed:T}}processChildren(O){return this.sorter&&(O=[...O].sort(this.sorter.compare.bind(this.sorter))),O}dispose(){this.disposables.dispose()}}e.AsyncDataTree=C;class _{constructor(O){this.node=O}get element(){return{elements:this.node.element.elements.map(O=>O.element),incompressible:this.node.element.incompressible}}get children(){return this.node.children.map(O=>new _(O))}get depth(){return this.node.depth}get visibleChildrenCount(){return this.node.visibleChildrenCount}get visibleChildIndex(){return this.node.visibleChildIndex}get collapsible(){return this.node.collapsible}get collapsed(){return this.node.collapsed}get visible(){return this.node.visible}get filterData(){return this.node.filterData}}class L{constructor(O,B,T,R){this.renderer=O,this.nodeMapper=B,this.compressibleNodeMapperProvider=T,this.onDidChangeTwistieState=R,this.renderedNodes=new Map,this.disposables=[],this.templateId=O.templateId}renderTemplate(O){return{templateData:this.renderer.renderTemplate(O)}}renderElement(O,B,T,R){this.renderer.renderElement(this.nodeMapper.map(O),B,T.templateData,R)}renderCompressedElements(O,B,T,R){this.renderer.renderCompressedElements(this.compressibleNodeMapperProvider().map(O),B,T.templateData,R)}renderTwistie(O,B){return O.slow?(B.classList.add(...p.Codicon.treeItemLoading.classNamesArray),!0):(B.classList.remove(...p.Codicon.treeItemLoading.classNamesArray),!1)}disposeElement(O,B,T,R){this.renderer.disposeElement&&this.renderer.disposeElement(this.nodeMapper.map(O),B,T.templateData,R)}disposeCompressedElements(O,B,T,R){this.renderer.disposeCompressedElements&&this.renderer.disposeCompressedElements(this.compressibleNodeMapperProvider().map(O),B,T.templateData,R)}disposeTemplate(O){this.renderer.disposeTemplate(O.templateData)}dispose(){this.renderedNodes.clear(),this.disposables=(0,i.dispose)(this.disposables)}}function E(M){const O=M&&S(M);return O&&Object.assign(Object.assign({},O),{keyboardNavigationLabelProvider:O.keyboardNavigationLabelProvider&&Object.assign(Object.assign({},O.keyboardNavigationLabelProvider),{getCompressedNodeKeyboardNavigationLabel(B){return M.keyboardNavigationLabelProvider.getCompressedNodeKeyboardNavigationLabel(B.map(T=>T.element))}})})}class N extends C{constructor(O,B,T,R,P,F,W={}){super(O,B,T,P,F,W);this.compressionDelegate=R,this.compressibleNodeMapper=new w.WeakMapper(A=>new _(A)),this.filter=W.filter}createTree(O,B,T,R,P){const F=new m.ComposedTreeDelegate(T),W=R.map(H=>new L(H,this.nodeMapper,()=>this.compressibleNodeMapper,this._onDidChangeNodeSlowState.event)),A=E(P)||{};return new I.CompressibleObjectTree(O,B,F,W,A)}asTreeElement(O,B){return Object.assign({incompressible:this.compressionDelegate.isIncompressible(O.element)},super.asTreeElement(O,B))}updateOptions(O={}){this.tree.updateOptions(O)}render(O,B){if(!this.identityProvider)return super.render(O,B);const T=G=>this.identityProvider.getId(G).toString(),R=G=>{const re=new Set;for(const ae of G){const oe=this.tree.getCompressedTreeNode(ae===this.root?null:ae);if(!!oe.element)for(const Z of oe.element.elements)re.add(T(Z.element))}return re},P=R(this.tree.getSelection()),F=R(this.tree.getFocus());super.render(O,B);const W=this.getSelection();let A=!1;const H=this.getFocus();let q=!1;const X=G=>{const re=G.element;if(re)for(let ae=0;ae<re.elements.length;ae++){const oe=T(re.elements[ae].element),Z=re.elements[re.elements.length-1].element;P.has(oe)&&W.indexOf(Z)===-1&&(W.push(Z),A=!0),F.has(oe)&&H.indexOf(Z)===-1&&(H.push(Z),q=!0)}G.children.forEach(X)};X(this.tree.getCompressedTreeNode(O===this.root?null:O)),A&&this.setSelection(W),q&&this.setFocus(H)}processChildren(O){return this.filter&&(O=t.Iterable.filter(O,B=>{const T=this.filter.filter(B,1),R=k(T);if(R===2)throw new Error("Recursive tree visibility not supported in async data compressed trees");return R===1})),super.processChildren(O)}}e.CompressibleAsyncDataTree=N;function k(M){return typeof M=="boolean"?M?1:0:(0,D.isFilterResult)(M)?(0,D.getVisibleState)(M.visibility):(0,D.getVisibleState)(M)}}),define(te[482],ie([5,6]),function(j,e){return j.create("vs/base/common/actions",e)}),define(te[44],ie([1,0,4,2,482]),function(j,e,y,m,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.EmptySubmenuAction=e.SubmenuAction=e.Separator=e.ActionRunner=e.Action=void 0;class I extends m.Disposable{constructor(t,i="",n="",l=!0,c){super();this._onDidChange=this._register(new y.Emitter),this.onDidChange=this._onDidChange.event,this._enabled=!0,this._id=t,this._label=i,this._cssClass=n,this._enabled=l,this._actionCallback=c}get id(){return this._id}get label(){return this._label}set label(t){this._setLabel(t)}_setLabel(t){this._label!==t&&(this._label=t,this._onDidChange.fire({label:t}))}get tooltip(){return this._tooltip||""}set tooltip(t){this._setTooltip(t)}_setTooltip(t){this._tooltip!==t&&(this._tooltip=t,this._onDidChange.fire({tooltip:t}))}get class(){return this._cssClass}set class(t){this._setClass(t)}_setClass(t){this._cssClass!==t&&(this._cssClass=t,this._onDidChange.fire({class:t}))}get enabled(){return this._enabled}set enabled(t){this._setEnabled(t)}_setEnabled(t){this._enabled!==t&&(this._enabled=t,this._onDidChange.fire({enabled:t}))}get checked(){return this._checked}set checked(t){this._setChecked(t)}_setChecked(t){this._checked!==t&&(this._checked=t,this._onDidChange.fire({checked:t}))}run(t,i){return ye(this,void 0,void 0,function*(){this._actionCallback&&(yield this._actionCallback(t))})}}e.Action=I;class w extends m.Disposable{constructor(){super(...arguments);this._onBeforeRun=this._register(new y.Emitter),this.onBeforeRun=this._onBeforeRun.event,this._onDidRun=this._register(new y.Emitter),this.onDidRun=this._onDidRun.event}run(t,i){return ye(this,void 0,void 0,function*(){if(!t.enabled)return;this._onBeforeRun.fire({action:t});let n;try{yield this.runAction(t,i)}catch(l){n=l}this._onDidRun.fire({action:t,error:n})})}runAction(t,i){return ye(this,void 0,void 0,function*(){yield t.run(i)})}}e.ActionRunner=w;class b extends I{constructor(t){super(b.ID,t,t?"separator text":"separator");this.checked=!1,this.enabled=!1}}e.Separator=b,b.ID="vs.actions.separator";class p{constructor(t,i,n,l){this.tooltip="",this.enabled=!0,this.checked=void 0,this.id=t,this.label=i,this.class=l,this._actions=n}get actions(){return this._actions}dispose(){}run(){return ye(this,void 0,void 0,function*(){})}}e.SubmenuAction=p;class h extends I{constructor(){super(h.ID,D.localize(0,null),void 0,!1)}}e.EmptySubmenuAction=h,h.ID="vs.actions.empty"}),define(te[125],ie([1,0,34,164,7,57,44,2,17,20,471,221]),function(j,e,y,m,D,I,w,b,p,h,g){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ActionViewItem=e.BaseActionViewItem=void 0;class t extends b.Disposable{constructor(l,c,r={}){super();this.options=r,this._context=l||this,this._action=c,c instanceof w.Action&&this._register(c.onDidChange(s=>{!this.element||this.handleActionChangeEvent(s)}))}handleActionChangeEvent(l){l.enabled!==void 0&&this.updateEnabled(),l.checked!==void 0&&this.updateChecked(),l.class!==void 0&&this.updateClass(),l.label!==void 0&&(this.updateLabel(),this.updateTooltip()),l.tooltip!==void 0&&this.updateTooltip()}get actionRunner(){return this._actionRunner||(this._actionRunner=this._register(new w.ActionRunner)),this._actionRunner}set actionRunner(l){this._actionRunner=l}getAction(){return this._action}isEnabled(){return this._action.enabled}setActionContext(l){this._context=l}render(l){const c=this.element=l;this._register(I.Gesture.addTarget(l));const r=this.options&&this.options.draggable;r&&(l.draggable=!0,y.isFirefox&&this._register((0,D.addDisposableListener)(l,D.EventType.DRAG_START,s=>{var o;return(o=s.dataTransfer)===null||o===void 0?void 0:o.setData(m.DataTransfers.TEXT,this._action.label)}))),this._register((0,D.addDisposableListener)(c,I.EventType.Tap,s=>this.onClick(s,!0))),this._register((0,D.addDisposableListener)(c,D.EventType.MOUSE_DOWN,s=>{r||D.EventHelper.stop(s,!0),this._action.enabled&&s.button===0&&c.classList.add("active")})),p.isMacintosh&&this._register((0,D.addDisposableListener)(c,D.EventType.CONTEXT_MENU,s=>{s.button===0&&s.ctrlKey===!0&&this.onClick(s)})),this._register((0,D.addDisposableListener)(c,D.EventType.CLICK,s=>{D.EventHelper.stop(s,!0),this.options&&this.options.isMenu||this.onClick(s)})),this._register((0,D.addDisposableListener)(c,D.EventType.DBLCLICK,s=>{D.EventHelper.stop(s,!0)})),[D.EventType.MOUSE_UP,D.EventType.MOUSE_OUT].forEach(s=>{this._register((0,D.addDisposableListener)(c,s,o=>{D.EventHelper.stop(o),c.classList.remove("active")}))})}onClick(l,c=!1){var r;D.EventHelper.stop(l,!0);const s=h.isUndefinedOrNull(this._context)?((r=this.options)===null||r===void 0?void 0:r.useEventAsContext)?l:{preserveFocus:c}:this._context;this.actionRunner.run(this._action,s)}focus(){this.element&&(this.element.tabIndex=0,this.element.focus(),this.element.classList.add("focused"))}blur(){this.element&&(this.element.blur(),this.element.tabIndex=-1,this.element.classList.remove("focused"))}setFocusable(l){this.element&&(this.element.tabIndex=l?0:-1)}get trapsArrowNavigation(){return!1}updateEnabled(){}updateLabel(){}updateTooltip(){}updateClass(){}updateChecked(){}dispose(){this.element&&(this.element.remove(),this.element=void 0),super.dispose()}}e.BaseActionViewItem=t;class i extends t{constructor(l,c,r={}){super(l,c,r);this.options=r,this.options.icon=r.icon!==void 0?r.icon:!1,this.options.label=r.label!==void 0?r.label:!0,this.cssClass=""}render(l){super.render(l),this.element&&(this.label=(0,D.append)(this.element,(0,D.$)("a.action-label"))),this.label&&(this._action.id===w.Separator.ID?this.label.setAttribute("role","presentation"):this.options.isMenu?this.label.setAttribute("role","menuitem"):this.label.setAttribute("role","button")),this.options.label&&this.options.keybinding&&this.element&&((0,D.append)(this.element,(0,D.$)("span.keybinding")).textContent=this.options.keybinding),this.updateClass(),this.updateLabel(),this.updateTooltip(),this.updateEnabled(),this.updateChecked()}focus(){this.label&&(this.label.tabIndex=0,this.label.focus())}blur(){this.label&&(this.label.tabIndex=-1)}setFocusable(l){this.label&&(this.label.tabIndex=l?0:-1)}updateLabel(){this.options.label&&this.label&&(this.label.textContent=this.getAction().label)}updateTooltip(){let l=null;this.getAction().tooltip?l=this.getAction().tooltip:!this.options.label&&this.getAction().label&&this.options.icon&&(l=this.getAction().label,this.options.keybinding&&(l=g.localize(0,null,l,this.options.keybinding))),l&&this.label&&(this.label.title=l)}updateClass(){this.cssClass&&this.label&&this.label.classList.remove(...this.cssClass.split(" ")),this.options.icon?(this.cssClass=this.getAction().class,this.label&&(this.label.classList.add("codicon"),this.cssClass&&this.label.classList.add(...this.cssClass.split(" "))),this.updateEnabled()):this.label&&this.label.classList.remove("codicon")}updateEnabled(){this.getAction().enabled?(this.label&&(this.label.removeAttribute("aria-disabled"),this.label.classList.remove("disabled")),this.element&&this.element.classList.remove("disabled")):(this.label&&(this.label.setAttribute("aria-disabled","true"),this.label.classList.add("disabled")),this.element&&this.element.classList.add("disabled"))}updateChecked(){this.label&&(this.getAction().checked?this.label.classList.add("checked"):this.label.classList.remove("checked"))}}e.ActionViewItem=i}),define(te[84],ie([1,0,7,46,125,44,4,2,20,221]),function(j,e,y,m,D,I,w,b,p){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ActionBar=void 0;class h extends b.Disposable{constructor(t,i={}){var n,l,c,r,s,o;super();this.triggerKeyDown=!1,this.focusable=!0,this._onDidBlur=this._register(new w.Emitter),this.onDidBlur=this._onDidBlur.event,this._onDidCancel=this._register(new w.Emitter({onFirstListenerAdd:()=>this.cancelHasListener=!0})),this.onDidCancel=this._onDidCancel.event,this.cancelHasListener=!1,this._onDidRun=this._register(new w.Emitter),this.onDidRun=this._onDidRun.event,this._onBeforeRun=this._register(new w.Emitter),this.onBeforeRun=this._onBeforeRun.event,this.options=i,this._context=(n=i.context)!==null&&n!==void 0?n:null,this._orientation=(l=this.options.orientation)!==null&&l!==void 0?l:0,this._triggerKeys={keyDown:(r=(c=this.options.triggerKeys)===null||c===void 0?void 0:c.keyDown)!==null&&r!==void 0?r:!1,keys:(o=(s=this.options.triggerKeys)===null||s===void 0?void 0:s.keys)!==null&&o!==void 0?o:[3,10]},this.options.actionRunner?this._actionRunner=this.options.actionRunner:(this._actionRunner=new I.ActionRunner,this._register(this._actionRunner)),this._register(this._actionRunner.onDidRun(u=>this._onDidRun.fire(u))),this._register(this._actionRunner.onBeforeRun(u=>this._onBeforeRun.fire(u))),this._actionIds=[],this.viewItems=[],this.focusedItem=void 0,this.domNode=document.createElement("div"),this.domNode.className="monaco-action-bar",i.animated!==!1&&this.domNode.classList.add("animated");let a,d;switch(this._orientation){case 0:a=[15],d=[17];break;case 1:a=[16],d=[18],this.domNode.className+=" vertical";break}this._register(y.addDisposableListener(this.domNode,y.EventType.KEY_DOWN,u=>{const f=new m.StandardKeyboardEvent(u);let S=!0;const v=typeof this.focusedItem=="number"?this.viewItems[this.focusedItem]:void 0;a&&(f.equals(a[0])||f.equals(a[1]))?S=this.focusPrevious():d&&(f.equals(d[0])||f.equals(d[1]))?S=this.focusNext():f.equals(9)&&this.cancelHasListener?this._onDidCancel.fire():f.equals(14)?S=this.focusFirst():f.equals(13)?S=this.focusLast():f.equals(2)&&v instanceof D.BaseActionViewItem&&v.trapsArrowNavigation?S=this.focusNext():this.isTriggerKeyEvent(f)?this._triggerKeys.keyDown?this.doTrigger(f):this.triggerKeyDown=!0:S=!1,S&&(f.preventDefault(),f.stopPropagation())})),this._register(y.addDisposableListener(this.domNode,y.EventType.KEY_UP,u=>{const f=new m.StandardKeyboardEvent(u);this.isTriggerKeyEvent(f)?(!this._triggerKeys.keyDown&&this.triggerKeyDown&&(this.triggerKeyDown=!1,this.doTrigger(f)),f.preventDefault(),f.stopPropagation()):(f.equals(2)||f.equals(1024|2))&&this.updateFocusedItem()})),this.focusTracker=this._register(y.trackFocus(this.domNode)),this._register(this.focusTracker.onDidBlur(()=>{(y.getActiveElement()===this.domNode||!y.isAncestor(y.getActiveElement(),this.domNode))&&(this._onDidBlur.fire(),this.focusedItem=void 0,this.previouslyFocusedItem=void 0,this.triggerKeyDown=!1)})),this._register(this.focusTracker.onDidFocus(()=>this.updateFocusedItem())),this.actionsList=document.createElement("ul"),this.actionsList.className="actions-container",this.actionsList.setAttribute("role","toolbar"),this.options.ariaLabel&&this.actionsList.setAttribute("aria-label",this.options.ariaLabel),this.domNode.appendChild(this.actionsList),t.appendChild(this.domNode)}setFocusable(t){if(this.focusable=t,this.focusable){const i=this.viewItems.find(n=>n instanceof D.BaseActionViewItem&&n.isEnabled());i instanceof D.BaseActionViewItem&&i.setFocusable(!0)}else this.viewItems.forEach(i=>{i instanceof D.BaseActionViewItem&&i.setFocusable(!1)})}isTriggerKeyEvent(t){let i=!1;return this._triggerKeys.keys.forEach(n=>{i=i||t.equals(n)}),i}updateFocusedItem(){for(let t=0;t<this.actionsList.children.length;t++){const i=this.actionsList.children[t];if(y.isAncestor(y.getActiveElement(),i)){this.focusedItem=t;break}}}get context(){return this._context}set context(t){this._context=t,this.viewItems.forEach(i=>i.setActionContext(t))}get actionRunner(){return this._actionRunner}set actionRunner(t){t&&(this._actionRunner=t,this.viewItems.forEach(i=>i.actionRunner=t))}getContainer(){return this.domNode}push(t,i={}){const n=Array.isArray(t)?t:[t];let l=p.isNumber(i.index)?i.index:null;n.forEach(c=>{const r=document.createElement("li");r.className="action-item",r.setAttribute("role","presentation"),this.options.allowContextMenu||this._register(y.addDisposableListener(r,y.EventType.CONTEXT_MENU,o=>{y.EventHelper.stop(o,!0)}));let s;this.options.actionViewItemProvider&&(s=this.options.actionViewItemProvider(c)),s||(s=new D.ActionViewItem(this.context,c,i)),s.actionRunner=this._actionRunner,s.setActionContext(this.context),s.render(r),this.focusable&&s instanceof D.BaseActionViewItem&&this.viewItems.length===0&&s.setFocusable(!0),l===null||l<0||l>=this.actionsList.children.length?(this.actionsList.appendChild(r),this.viewItems.push(s),this._actionIds.push(c.id)):(this.actionsList.insertBefore(r,this.actionsList.children[l]),this.viewItems.splice(l,0,s),this._actionIds.splice(l,0,c.id),l++)}),typeof this.focusedItem=="number"&&this.focus(this.focusedItem)}clear(){(0,b.dispose)(this.viewItems),this.viewItems=[],this._actionIds=[],y.clearNode(this.actionsList)}length(){return this.viewItems.length}focus(t){let i=!1,n;if(t===void 0?i=!0:typeof t=="number"?n=t:typeof t=="boolean"&&(i=t),i&&typeof this.focusedItem=="undefined"){const l=this.viewItems.findIndex(c=>c.isEnabled());this.focusedItem=l===-1?void 0:l,this.updateFocus(void 0,void 0,!0)}else n!==void 0&&(this.focusedItem=n),this.updateFocus(void 0,void 0,!0)}focusFirst(){return this.focusedItem=this.length()-1,this.focusNext(!0)}focusLast(){return this.focusedItem=0,this.focusPrevious(!0)}focusNext(t){if(typeof this.focusedItem=="undefined")this.focusedItem=this.viewItems.length-1;else if(this.viewItems.length<=1)return!1;const i=this.focusedItem;let n;do{if(!t&&this.options.preventLoopNavigation&&this.focusedItem+1>=this.viewItems.length)return this.focusedItem=i,!1;this.focusedItem=(this.focusedItem+1)%this.viewItems.length,n=this.viewItems[this.focusedItem]}while(this.focusedItem!==i&&this.options.focusOnlyEnabledItems&&!n.isEnabled());return this.updateFocus(),!0}focusPrevious(t){if(typeof this.focusedItem=="undefined")this.focusedItem=0;else if(this.viewItems.length<=1)return!1;const i=this.focusedItem;let n;do{if(this.focusedItem=this.focusedItem-1,this.focusedItem<0){if(!t&&this.options.preventLoopNavigation)return this.focusedItem=i,!1;this.focusedItem=this.viewItems.length-1}n=this.viewItems[this.focusedItem]}while(this.focusedItem!==i&&this.options.focusOnlyEnabledItems&&!n.isEnabled());return this.updateFocus(!0),!0}updateFocus(t,i,n=!1){var l;typeof this.focusedItem=="undefined"&&this.actionsList.focus({preventScroll:i}),this.previouslyFocusedItem!==void 0&&this.previouslyFocusedItem!==this.focusedItem&&((l=this.viewItems[this.previouslyFocusedItem])===null||l===void 0||l.blur());const c=this.focusedItem!==void 0&&this.viewItems[this.focusedItem];if(c){let r=!0;p.isFunction(c.focus)||(r=!1),this.options.focusOnlyEnabledItems&&p.isFunction(c.isEnabled)&&!c.isEnabled()&&(r=!1),r?(n||this.previouslyFocusedItem!==this.focusedItem)&&(c.focus(t),this.previouslyFocusedItem=this.focusedItem):(this.actionsList.focus({preventScroll:i}),this.previouslyFocusedItem=void 0)}}doTrigger(t){if(typeof this.focusedItem=="undefined")return;const i=this.viewItems[this.focusedItem];if(i instanceof D.BaseActionViewItem){const n=i._context===null||i._context===void 0?t:i._context;this.run(i._action,n)}}run(t,i){return ye(this,void 0,void 0,function*(){yield this._actionRunner.run(t,i)})}dispose(){(0,b.dispose)(this.viewItems),this.viewItems=[],this._actionIds=[],this.getContainer().remove(),super.dispose()}}e.ActionBar=h}),define(te[483],ie([1,0,7,46,57,44,4,224]),function(j,e,y,m,D,I,w){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DropdownMenu=e.BaseDropdown=void 0;class b extends I.ActionRunner{constructor(g,t){super();this._onDidChangeVisibility=this._register(new w.Emitter),this.onDidChangeVisibility=this._onDidChangeVisibility.event,this._element=(0,y.append)(g,(0,y.$)(".monaco-dropdown")),this._label=(0,y.append)(this._element,(0,y.$)(".dropdown-label"));let i=t.labelRenderer;i||(i=l=>(l.textContent=t.label||"",null));for(const l of[y.EventType.CLICK,y.EventType.MOUSE_DOWN,D.EventType.Tap])this._register((0,y.addDisposableListener)(this.element,l,c=>y.EventHelper.stop(c,!0)));for(const l of[y.EventType.MOUSE_DOWN,D.EventType.Tap])this._register((0,y.addDisposableListener)(this._label,l,c=>{c instanceof MouseEvent&&c.detail>1||(this.visible?this.hide():this.show())}));this._register((0,y.addDisposableListener)(this._label,y.EventType.KEY_UP,l=>{const c=new m.StandardKeyboardEvent(l);(c.equals(3)||c.equals(10))&&(y.EventHelper.stop(l,!0),this.visible?this.hide():this.show())}));const n=i(this._label);n&&this._register(n),this._register(D.Gesture.addTarget(this._label))}get element(){return this._element}show(){this.visible||(this.visible=!0,this._onDidChangeVisibility.fire(!0))}hide(){this.visible&&(this.visible=!1,this._onDidChangeVisibility.fire(!1))}dispose(){super.dispose(),this.hide(),this.boxContainer&&(this.boxContainer.remove(),this.boxContainer=void 0),this.contents&&(this.contents.remove(),this.contents=void 0),this._label&&(this._label.remove(),this._label=void 0)}}e.BaseDropdown=b;class p extends b{constructor(g,t){super(g,t);this._actions=[],this._contextMenuProvider=t.contextMenuProvider,this.actions=t.actions||[],this.actionProvider=t.actionProvider,this.menuClassName=t.menuClassName||"",this.menuAsChild=!!t.menuAsChild}set menuOptions(g){this._menuOptions=g}get menuOptions(){return this._menuOptions}get actions(){return this.actionProvider?this.actionProvider.getActions():this._actions}set actions(g){this._actions=g}show(){super.show(),this.element.classList.add("active"),this._contextMenuProvider.showContextMenu({getAnchor:()=>this.element,getActions:()=>this.actions,getActionsContext:()=>this.menuOptions?this.menuOptions.context:null,getActionViewItem:g=>this.menuOptions&&this.menuOptions.actionViewItemProvider?this.menuOptions.actionViewItemProvider(g):void 0,getKeyBinding:g=>this.menuOptions&&this.menuOptions.getKeyBinding?this.menuOptions.getKeyBinding(g):void 0,getMenuClassName:()=>this.menuClassName,onHide:()=>this.onHide(),actionRunner:this.menuOptions?this.menuOptions.actionRunner:void 0,anchorAlignment:this.menuOptions?this.menuOptions.anchorAlignment:0,domForShadowRoot:this.menuAsChild?this.element:void 0})}hide(){super.hide()}onHide(){this.hide(),this.element.classList.remove("active")}}e.DropdownMenu=p}),define(te[484],ie([1,0,7,125,483,4,224]),function(j,e,y,m,D,I){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DropdownMenuActionViewItem=void 0;class w extends m.BaseActionViewItem{constructor(p,h,g,t=Object.create(null)){super(null,p,t);this.actionItem=null,this._onDidChangeVisibility=this._register(new I.Emitter),this.menuActionsOrProvider=h,this.contextMenuProvider=g,this.options=t,this.options.actionRunner&&(this.actionRunner=this.options.actionRunner)}render(p){this.actionItem=p;const h=i=>{this.element=(0,y.append)(i,(0,y.$)("a.action-label"));let n=[];return typeof this.options.classNames=="string"?n=this.options.classNames.split(/\s+/g).filter(l=>!!l):this.options.classNames&&(n=this.options.classNames),n.find(l=>l==="icon")||n.push("codicon"),this.element.classList.add(...n),this.element.setAttribute("role","button"),this.element.setAttribute("aria-haspopup","true"),this.element.setAttribute("aria-expanded","false"),this.element.title=this._action.label||"",null},g=Array.isArray(this.menuActionsOrProvider),t={contextMenuProvider:this.contextMenuProvider,labelRenderer:h,menuAsChild:this.options.menuAsChild,actions:g?this.menuActionsOrProvider:void 0,actionProvider:g?void 0:this.menuActionsOrProvider};if(this.dropdownMenu=this._register(new D.DropdownMenu(p,t)),this._register(this.dropdownMenu.onDidChangeVisibility(i=>{var n;(n=this.element)===null||n===void 0||n.setAttribute("aria-expanded",`${i}`),this._onDidChangeVisibility.fire(i)})),this.dropdownMenu.menuOptions={actionViewItemProvider:this.options.actionViewItemProvider,actionRunner:this.actionRunner,getKeyBinding:this.options.keybindingProvider,context:this._context},this.options.anchorAlignmentProvider){const i=this;this.dropdownMenu.menuOptions=Object.assign(Object.assign({},this.dropdownMenu.menuOptions),{get anchorAlignment(){return i.options.anchorAlignmentProvider()}})}this.updateEnabled()}setActionContext(p){super.setActionContext(p),this.dropdownMenu&&(this.dropdownMenu.menuOptions?this.dropdownMenu.menuOptions.context=p:this.dropdownMenu.menuOptions={context:p})}updateEnabled(){var p,h;const g=!this.getAction().enabled;(p=this.actionItem)===null||p===void 0||p.classList.toggle("disabled",g),(h=this.element)===null||h===void 0||h.classList.toggle("disabled",g)}}e.DropdownMenuActionViewItem=w}),define(te[192],ie([1,0,7,89,169,84,43,67,60,29,4,313,39,477,338]),function(j,e,y,m,D,I,w,b,p,h,g,t,i,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.HistoryInputBox=e.InputBox=void 0;const l=y.$,c={inputBackground:h.Color.fromHex("#3C3C3C"),inputForeground:h.Color.fromHex("#CCCCCC"),inputValidationInfoBorder:h.Color.fromHex("#55AAFF"),inputValidationInfoBackground:h.Color.fromHex("#063B49"),inputValidationWarningBorder:h.Color.fromHex("#B89500"),inputValidationWarningBackground:h.Color.fromHex("#352A05"),inputValidationErrorBorder:h.Color.fromHex("#BE1100"),inputValidationErrorBackground:h.Color.fromHex("#5A1D1D")};class r extends p.Widget{constructor(a,d,u){var f;super();this.state="idle",this.maxHeight=Number.POSITIVE_INFINITY,this._onDidChange=this._register(new g.Emitter),this.onDidChange=this._onDidChange.event,this._onDidHeightChange=this._register(new g.Emitter),this.onDidHeightChange=this._onDidHeightChange.event,this.contextViewProvider=d,this.options=u||Object.create(null),(0,i.mixin)(this.options,c,!1),this.message=null,this.placeholder=this.options.placeholder||"",this.tooltip=(f=this.options.tooltip)!==null&&f!==void 0?f:this.placeholder||"",this.ariaLabel=this.options.ariaLabel||"",this.inputBackground=this.options.inputBackground,this.inputForeground=this.options.inputForeground,this.inputBorder=this.options.inputBorder,this.inputValidationInfoBorder=this.options.inputValidationInfoBorder,this.inputValidationInfoBackground=this.options.inputValidationInfoBackground,this.inputValidationInfoForeground=this.options.inputValidationInfoForeground,this.inputValidationWarningBorder=this.options.inputValidationWarningBorder,this.inputValidationWarningBackground=this.options.inputValidationWarningBackground,this.inputValidationWarningForeground=this.options.inputValidationWarningForeground,this.inputValidationErrorBorder=this.options.inputValidationErrorBorder,this.inputValidationErrorBackground=this.options.inputValidationErrorBackground,this.inputValidationErrorForeground=this.options.inputValidationErrorForeground,this.options.validationOptions&&(this.validation=this.options.validationOptions.validation),this.element=y.append(a,l(".monaco-inputbox.idle"));let S=this.options.flexibleHeight?"textarea":"input",v=y.append(this.element,l(".ibwrapper"));if(this.input=y.append(v,l(S+".input.empty")),this.input.setAttribute("autocorrect","off"),this.input.setAttribute("autocapitalize","off"),this.input.setAttribute("spellcheck","false"),this.onfocus(this.input,()=>this.element.classList.add("synthetic-focus")),this.onblur(this.input,()=>this.element.classList.remove("synthetic-focus")),this.options.flexibleHeight){this.maxHeight=typeof this.options.flexibleMaxHeight=="number"?this.options.flexibleMaxHeight:Number.POSITIVE_INFINITY,this.mirror=y.append(v,l("div.mirror")),this.mirror.innerText="\xA0",this.scrollableElement=new b.ScrollableElement(this.element,{vertical:1}),this.options.flexibleWidth&&(this.input.setAttribute("wrap","off"),this.mirror.style.whiteSpace="pre",this.mirror.style.wordWrap="initial"),y.append(a,this.scrollableElement.getDomNode()),this._register(this.scrollableElement),this._register(this.scrollableElement.onScroll(L=>this.input.scrollTop=L.scrollTop));const C=this._register(new m.DomEmitter(document,"selectionchange")),_=g.Event.filter(C.event,()=>{const L=document.getSelection();return(L==null?void 0:L.anchorNode)===v});this._register(_(this.updateScrollDimensions,this)),this._register(this.onDidHeightChange(this.updateScrollDimensions,this))}else this.input.type=this.options.type||"text",this.input.setAttribute("wrap","off");this.ariaLabel&&this.input.setAttribute("aria-label",this.ariaLabel),this.placeholder&&!this.options.showPlaceholderOnFocus&&this.setPlaceHolder(this.placeholder),this.tooltip&&this.setTooltip(this.tooltip),this.oninput(this.input,()=>this.onValueChange()),this.onblur(this.input,()=>this.onBlur()),this.onfocus(this.input,()=>this.onFocus()),this.ignoreGesture(this.input),setTimeout(()=>this.updateMirror(),0),this.options.actions&&(this.actionbar=this._register(new I.ActionBar(this.element)),this.actionbar.push(this.options.actions,{icon:!0,label:!1})),this.applyStyles()}onBlur(){this._hideMessage(),this.options.showPlaceholderOnFocus&&this.input.setAttribute("placeholder","")}onFocus(){this._showMessage(),this.options.showPlaceholderOnFocus&&this.input.setAttribute("placeholder",this.placeholder||"")}setPlaceHolder(a){this.placeholder=a,this.input.setAttribute("placeholder",a)}setTooltip(a){this.tooltip=a,this.input.title=a}setAriaLabel(a){this.ariaLabel=a,a?this.input.setAttribute("aria-label",this.ariaLabel):this.input.removeAttribute("aria-label")}getAriaLabel(){return this.ariaLabel}get inputElement(){return this.input}get value(){return this.input.value}set value(a){this.input.value!==a&&(this.input.value=a,this.onValueChange())}get height(){return typeof this.cachedHeight=="number"?this.cachedHeight:y.getTotalHeight(this.element)}focus(){this.input.focus()}blur(){this.input.blur()}hasFocus(){return document.activeElement===this.input}select(a=null){this.input.select(),a&&(this.input.setSelectionRange(a.start,a.end),a.end===this.input.value.length&&(this.input.scrollLeft=this.input.scrollWidth))}isSelectionAtEnd(){return this.input.selectionEnd===this.input.value.length&&this.input.selectionStart===this.input.selectionEnd}enable(){this.input.removeAttribute("disabled")}disable(){this.blur(),this.input.disabled=!0,this._hideMessage()}get width(){return y.getTotalWidth(this.input)}set width(a){if(this.options.flexibleHeight&&this.options.flexibleWidth){let d=0;if(this.mirror){const u=parseFloat(this.mirror.style.paddingLeft||"")||0,f=parseFloat(this.mirror.style.paddingRight||"")||0;d=u+f}this.input.style.width=a-d+"px"}else this.input.style.width=a+"px";this.mirror&&(this.mirror.style.width=a+"px")}set paddingRight(a){this.input.style.width=`calc(100% - ${a}px)`,this.mirror&&(this.mirror.style.paddingRight=a+"px")}updateScrollDimensions(){if(typeof this.cachedContentHeight!="number"||typeof this.cachedHeight!="number"||!this.scrollableElement)return;const a=this.cachedContentHeight,d=this.cachedHeight,u=this.input.scrollTop;this.scrollableElement.setScrollDimensions({scrollHeight:a,height:d}),this.scrollableElement.setScrollPosition({scrollTop:u})}showMessage(a,d){this.message=a,this.element.classList.remove("idle"),this.element.classList.remove("info"),this.element.classList.remove("warning"),this.element.classList.remove("error"),this.element.classList.add(this.classForType(a.type));const u=this.stylesForType(this.message.type);this.element.style.border=u.border?`1px solid ${u.border}`:"",(this.hasFocus()||d)&&this._showMessage()}hideMessage(){this.message=null,this.element.classList.remove("info"),this.element.classList.remove("warning"),this.element.classList.remove("error"),this.element.classList.add("idle"),this._hideMessage(),this.applyStyles()}validate(){let a=null;return this.validation&&(a=this.validation(this.value),a?(this.inputElement.setAttribute("aria-invalid","true"),this.showMessage(a)):this.inputElement.hasAttribute("aria-invalid")&&(this.inputElement.removeAttribute("aria-invalid"),this.hideMessage())),a==null?void 0:a.type}stylesForType(a){switch(a){case 1:return{border:this.inputValidationInfoBorder,background:this.inputValidationInfoBackground,foreground:this.inputValidationInfoForeground};case 2:return{border:this.inputValidationWarningBorder,background:this.inputValidationWarningBackground,foreground:this.inputValidationWarningForeground};default:return{border:this.inputValidationErrorBorder,background:this.inputValidationErrorBackground,foreground:this.inputValidationErrorForeground}}}classForType(a){switch(a){case 1:return"info";case 2:return"warning";default:return"error"}}_showMessage(){if(!this.contextViewProvider||!this.message)return;let a,d=()=>a.style.width=y.getTotalWidth(this.element)+"px";this.contextViewProvider.showContextView({getAnchor:()=>this.element,anchorAlignment:1,render:f=>{if(!this.message)return null;a=y.append(f,l(".monaco-inputbox-container")),d();const S={inline:!0,className:"monaco-inputbox-message"},v=this.message.formatContent?(0,D.renderFormattedText)(this.message.content,S):(0,D.renderText)(this.message.content,S);v.classList.add(this.classForType(this.message.type));const C=this.stylesForType(this.message.type);return v.style.backgroundColor=C.background?C.background.toString():"",v.style.color=C.foreground?C.foreground.toString():"",v.style.border=C.border?`1px solid ${C.border}`:"",y.append(a,v),null},onHide:()=>{this.state="closed"},layout:d});let u;this.message.type===3?u=n.localize(0,null,this.message.content):this.message.type===2?u=n.localize(1,null,this.message.content):u=n.localize(2,null,this.message.content),w.alert(u),this.state="open"}_hideMessage(){!this.contextViewProvider||(this.state==="open"&&this.contextViewProvider.hideContextView(),this.state="idle")}onValueChange(){this._onDidChange.fire(this.value),this.validate(),this.updateMirror(),this.input.classList.toggle("empty",!this.value),this.state==="open"&&this.contextViewProvider&&this.contextViewProvider.layout()}updateMirror(){if(!this.mirror)return;const a=this.value,u=a.charCodeAt(a.length-1)===10?" ":"";(a+u).replace(/\u000c/g,"")?this.mirror.textContent=a+u:this.mirror.innerText="\xA0",this.layout()}style(a){this.inputBackground=a.inputBackground,this.inputForeground=a.inputForeground,this.inputBorder=a.inputBorder,this.inputValidationInfoBackground=a.inputValidationInfoBackground,this.inputValidationInfoForeground=a.inputValidationInfoForeground,this.inputValidationInfoBorder=a.inputValidationInfoBorder,this.inputValidationWarningBackground=a.inputValidationWarningBackground,this.inputValidationWarningForeground=a.inputValidationWarningForeground,this.inputValidationWarningBorder=a.inputValidationWarningBorder,this.inputValidationErrorBackground=a.inputValidationErrorBackground,this.inputValidationErrorForeground=a.inputValidationErrorForeground,this.inputValidationErrorBorder=a.inputValidationErrorBorder,this.applyStyles()}applyStyles(){const a=this.inputBackground?this.inputBackground.toString():"",d=this.inputForeground?this.inputForeground.toString():"",u=this.inputBorder?this.inputBorder.toString():"";this.element.style.backgroundColor=a,this.element.style.color=d,this.input.style.backgroundColor="inherit",this.input.style.color=d,this.element.style.borderWidth=u?"1px":"",this.element.style.borderStyle=u?"solid":"",this.element.style.borderColor=u}layout(){if(!this.mirror)return;const a=this.cachedContentHeight;this.cachedContentHeight=y.getTotalHeight(this.mirror),a!==this.cachedContentHeight&&(this.cachedHeight=Math.min(this.cachedContentHeight,this.maxHeight),this.input.style.height=this.cachedHeight+"px",this._onDidHeightChange.fire(this.cachedContentHeight))}insertAtCursor(a){const d=this.inputElement,u=d.selectionStart,f=d.selectionEnd,S=d.value;u!==null&&f!==null&&(this.value=S.substr(0,u)+a+S.substr(f),d.setSelectionRange(u+1,u+1),this.layout())}dispose(){this._hideMessage(),this.message=null,this.actionbar&&this.actionbar.dispose(),super.dispose()}}e.InputBox=r;class s extends r{constructor(a,d,u){const f=n.localize(3,null),S=` or \u21C5 ${f}`,v=` (\u21C5 ${f})`;super(a,d,u);this.history=new t.HistoryNavigator(u.history,100);const C=()=>{if(u.showHistoryHint&&u.showHistoryHint()&&!this.placeholder.endsWith(S)&&!this.placeholder.endsWith(v)&&this.history.getHistory().length){const _=this.placeholder.endsWith(")")?S:v,L=this.placeholder+_;u.showPlaceholderOnFocus&&document.activeElement!==this.input?this.placeholder=L:this.setPlaceHolder(L)}};this.observer=new MutationObserver((_,L)=>{_.forEach(E=>{E.target.textContent||C()})}),this.observer.observe(this.input,{attributeFilter:["class"]}),this.onfocus(this.input,()=>C()),this.onblur(this.input,()=>{const _=L=>{if(this.placeholder.endsWith(L)){const E=this.placeholder.slice(0,this.placeholder.length-L.length);return u.showPlaceholderOnFocus?this.placeholder=E:this.setPlaceHolder(E),!0}else return!1};_(v)||_(S)})}dispose(){super.dispose(),this.observer&&(this.observer.disconnect(),this.observer=void 0)}addToHistory(){this.value&&this.value!==this.getCurrentValue()&&this.history.add(this.value)}showNextValue(){this.history.has(this.value)||this.addToHistory();let a=this.getNextValue();a&&(a=a===this.value?this.getNextValue():a),a&&(this.value=a,w.status(this.value))}showPreviousValue(){this.history.has(this.value)||this.addToHistory();let a=this.getPreviousValue();a&&(a=a===this.value?this.getPreviousValue():a),a&&(this.value=a,w.status(this.value))}getCurrentValue(){let a=this.history.current();return a||(a=this.history.last(),this.history.next()),a}getPreviousValue(){return this.history.previous()||this.history.first()}getNextValue(){return this.history.next()||this.history.last()}}e.HistoryInputBox=s}),define(te[485],ie([1,0,7,264,192,60,4,472,225]),function(j,e,y,m,D,I,w,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.FindInput=void 0;const p=b.localize(0,null);class h extends I.Widget{constructor(t,i,n,l){super();this._showOptionButtons=n,this.fixFocusOnOptionClickEnabled=!0,this.imeSessionInProgress=!1,this._onDidOptionChange=this._register(new w.Emitter),this.onDidOptionChange=this._onDidOptionChange.event,this._onKeyDown=this._register(new w.Emitter),this.onKeyDown=this._onKeyDown.event,this._onMouseDown=this._register(new w.Emitter),this.onMouseDown=this._onMouseDown.event,this._onInput=this._register(new w.Emitter),this._onKeyUp=this._register(new w.Emitter),this._onCaseSensitiveKeyDown=this._register(new w.Emitter),this.onCaseSensitiveKeyDown=this._onCaseSensitiveKeyDown.event,this._onRegexKeyDown=this._register(new w.Emitter),this.onRegexKeyDown=this._onRegexKeyDown.event,this._lastHighlightFindOptions=0,this.contextViewProvider=i,this.placeholder=l.placeholder||"",this.validation=l.validation,this.label=l.label||p,this.inputActiveOptionBorder=l.inputActiveOptionBorder,this.inputActiveOptionForeground=l.inputActiveOptionForeground,this.inputActiveOptionBackground=l.inputActiveOptionBackground,this.inputBackground=l.inputBackground,this.inputForeground=l.inputForeground,this.inputBorder=l.inputBorder,this.inputValidationInfoBorder=l.inputValidationInfoBorder,this.inputValidationInfoBackground=l.inputValidationInfoBackground,this.inputValidationInfoForeground=l.inputValidationInfoForeground,this.inputValidationWarningBorder=l.inputValidationWarningBorder,this.inputValidationWarningBackground=l.inputValidationWarningBackground,this.inputValidationWarningForeground=l.inputValidationWarningForeground,this.inputValidationErrorBorder=l.inputValidationErrorBorder,this.inputValidationErrorBackground=l.inputValidationErrorBackground,this.inputValidationErrorForeground=l.inputValidationErrorForeground;const c=l.appendCaseSensitiveLabel||"",r=l.appendWholeWordsLabel||"",s=l.appendRegexLabel||"",o=l.history||[],a=!!l.flexibleHeight,d=!!l.flexibleWidth,u=l.flexibleMaxHeight;this.domNode=document.createElement("div"),this.domNode.classList.add("monaco-findInput"),this.inputBox=this._register(new D.HistoryInputBox(this.domNode,this.contextViewProvider,{placeholder:this.placeholder||"",ariaLabel:this.label||"",validationOptions:{validation:this.validation},inputBackground:this.inputBackground,inputForeground:this.inputForeground,inputBorder:this.inputBorder,inputValidationInfoBackground:this.inputValidationInfoBackground,inputValidationInfoForeground:this.inputValidationInfoForeground,inputValidationInfoBorder:this.inputValidationInfoBorder,inputValidationWarningBackground:this.inputValidationWarningBackground,inputValidationWarningForeground:this.inputValidationWarningForeground,inputValidationWarningBorder:this.inputValidationWarningBorder,inputValidationErrorBackground:this.inputValidationErrorBackground,inputValidationErrorForeground:this.inputValidationErrorForeground,inputValidationErrorBorder:this.inputValidationErrorBorder,history:o,showHistoryHint:l.showHistoryHint,flexibleHeight:a,flexibleWidth:d,flexibleMaxHeight:u})),this.regex=this._register(new m.RegexCheckbox({appendTitle:s,isChecked:!1,inputActiveOptionBorder:this.inputActiveOptionBorder,inputActiveOptionForeground:this.inputActiveOptionForeground,inputActiveOptionBackground:this.inputActiveOptionBackground})),this._register(this.regex.onChange(S=>{this._onDidOptionChange.fire(S),!S&&this.fixFocusOnOptionClickEnabled&&this.inputBox.focus(),this.validate()})),this._register(this.regex.onKeyDown(S=>{this._onRegexKeyDown.fire(S)})),this.wholeWords=this._register(new m.WholeWordsCheckbox({appendTitle:r,isChecked:!1,inputActiveOptionBorder:this.inputActiveOptionBorder,inputActiveOptionForeground:this.inputActiveOptionForeground,inputActiveOptionBackground:this.inputActiveOptionBackground})),this._register(this.wholeWords.onChange(S=>{this._onDidOptionChange.fire(S),!S&&this.fixFocusOnOptionClickEnabled&&this.inputBox.focus(),this.validate()})),this.caseSensitive=this._register(new m.CaseSensitiveCheckbox({appendTitle:c,isChecked:!1,inputActiveOptionBorder:this.inputActiveOptionBorder,inputActiveOptionForeground:this.inputActiveOptionForeground,inputActiveOptionBackground:this.inputActiveOptionBackground})),this._register(this.caseSensitive.onChange(S=>{this._onDidOptionChange.fire(S),!S&&this.fixFocusOnOptionClickEnabled&&this.inputBox.focus(),this.validate()})),this._register(this.caseSensitive.onKeyDown(S=>{this._onCaseSensitiveKeyDown.fire(S)})),this._showOptionButtons&&(this.inputBox.paddingRight=this.caseSensitive.width()+this.wholeWords.width()+this.regex.width());let f=[this.caseSensitive.domNode,this.wholeWords.domNode,this.regex.domNode];this.onkeydown(this.domNode,S=>{if(S.equals(15)||S.equals(17)||S.equals(9)){let v=f.indexOf(document.activeElement);if(v>=0){let C=-1;S.equals(17)?C=(v+1)%f.length:S.equals(15)&&(v===0?C=f.length-1:C=v-1),S.equals(9)?(f[v].blur(),this.inputBox.focus()):C>=0&&f[C].focus(),y.EventHelper.stop(S,!0)}}}),this.controls=document.createElement("div"),this.controls.className="controls",this.controls.style.display=this._showOptionButtons?"block":"none",this.controls.appendChild(this.caseSensitive.domNode),this.controls.appendChild(this.wholeWords.domNode),this.controls.appendChild(this.regex.domNode),this.domNode.appendChild(this.controls),t&&t.appendChild(this.domNode),this._register(y.addDisposableListener(this.inputBox.inputElement,"compositionstart",S=>{this.imeSessionInProgress=!0})),this._register(y.addDisposableListener(this.inputBox.inputElement,"compositionend",S=>{this.imeSessionInProgress=!1,this._onInput.fire()})),this.onkeydown(this.inputBox.inputElement,S=>this._onKeyDown.fire(S)),this.onkeyup(this.inputBox.inputElement,S=>this._onKeyUp.fire(S)),this.oninput(this.inputBox.inputElement,S=>this._onInput.fire()),this.onmousedown(this.inputBox.inputElement,S=>this._onMouseDown.fire(S))}enable(){this.domNode.classList.remove("disabled"),this.inputBox.enable(),this.regex.enable(),this.wholeWords.enable(),this.caseSensitive.enable()}disable(){this.domNode.classList.add("disabled"),this.inputBox.disable(),this.regex.disable(),this.wholeWords.disable(),this.caseSensitive.disable()}setFocusInputOnOptionClick(t){this.fixFocusOnOptionClickEnabled=t}setEnabled(t){t?this.enable():this.disable()}getValue(){return this.inputBox.value}setValue(t){this.inputBox.value!==t&&(this.inputBox.value=t)}style(t){this.inputActiveOptionBorder=t.inputActiveOptionBorder,this.inputActiveOptionForeground=t.inputActiveOptionForeground,this.inputActiveOptionBackground=t.inputActiveOptionBackground,this.inputBackground=t.inputBackground,this.inputForeground=t.inputForeground,this.inputBorder=t.inputBorder,this.inputValidationInfoBackground=t.inputValidationInfoBackground,this.inputValidationInfoForeground=t.inputValidationInfoForeground,this.inputValidationInfoBorder=t.inputValidationInfoBorder,this.inputValidationWarningBackground=t.inputValidationWarningBackground,this.inputValidationWarningForeground=t.inputValidationWarningForeground,this.inputValidationWarningBorder=t.inputValidationWarningBorder,this.inputValidationErrorBackground=t.inputValidationErrorBackground,this.inputValidationErrorForeground=t.inputValidationErrorForeground,this.inputValidationErrorBorder=t.inputValidationErrorBorder,this.applyStyles()}applyStyles(){if(this.domNode){const t={inputActiveOptionBorder:this.inputActiveOptionBorder,inputActiveOptionForeground:this.inputActiveOptionForeground,inputActiveOptionBackground:this.inputActiveOptionBackground};this.regex.style(t),this.wholeWords.style(t),this.caseSensitive.style(t);const i={inputBackground:this.inputBackground,inputForeground:this.inputForeground,inputBorder:this.inputBorder,inputValidationInfoBackground:this.inputValidationInfoBackground,inputValidationInfoForeground:this.inputValidationInfoForeground,inputValidationInfoBorder:this.inputValidationInfoBorder,inputValidationWarningBackground:this.inputValidationWarningBackground,inputValidationWarningForeground:this.inputValidationWarningForeground,inputValidationWarningBorder:this.inputValidationWarningBorder,inputValidationErrorBackground:this.inputValidationErrorBackground,inputValidationErrorForeground:this.inputValidationErrorForeground,inputValidationErrorBorder:this.inputValidationErrorBorder};this.inputBox.style(i)}}select(){this.inputBox.select()}focus(){this.inputBox.focus()}getCaseSensitive(){return this.caseSensitive.checked}setCaseSensitive(t){this.caseSensitive.checked=t}getWholeWords(){return this.wholeWords.checked}setWholeWords(t){this.wholeWords.checked=t}getRegex(){return this.regex.checked}setRegex(t){this.regex.checked=t,this.validate()}focusOnCaseSensitive(){this.caseSensitive.focus()}highlightFindOptions(){this.domNode.classList.remove("highlight-"+this._lastHighlightFindOptions),this._lastHighlightFindOptions=1-this._lastHighlightFindOptions,this.domNode.classList.add("highlight-"+this._lastHighlightFindOptions)}validate(){this.inputBox.validate()}clearMessage(){this.inputBox.hideMessage()}}e.FindInput=h}),define(te[486],ie([1,0,7,172,192,60,27,4,474,225]),function(j,e,y,m,D,I,w,b,p){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ReplaceInput=e.PreserveCaseCheckbox=void 0;const h=p.localize(0,null),g=p.localize(1,null);class t extends m.Checkbox{constructor(l){super({icon:w.Codicon.preserveCase,title:g+l.appendTitle,isChecked:l.isChecked,inputActiveOptionBorder:l.inputActiveOptionBorder,inputActiveOptionForeground:l.inputActiveOptionForeground,inputActiveOptionBackground:l.inputActiveOptionBackground})}}e.PreserveCaseCheckbox=t;class i extends I.Widget{constructor(l,c,r,s){super();this._showOptionButtons=r,this.fixFocusOnOptionClickEnabled=!0,this.cachedOptionsWidth=0,this._onDidOptionChange=this._register(new b.Emitter),this.onDidOptionChange=this._onDidOptionChange.event,this._onKeyDown=this._register(new b.Emitter),this.onKeyDown=this._onKeyDown.event,this._onMouseDown=this._register(new b.Emitter),this._onInput=this._register(new b.Emitter),this._onKeyUp=this._register(new b.Emitter),this._onPreserveCaseKeyDown=this._register(new b.Emitter),this.onPreserveCaseKeyDown=this._onPreserveCaseKeyDown.event,this.contextViewProvider=c,this.placeholder=s.placeholder||"",this.validation=s.validation,this.label=s.label||h,this.inputActiveOptionBorder=s.inputActiveOptionBorder,this.inputActiveOptionForeground=s.inputActiveOptionForeground,this.inputActiveOptionBackground=s.inputActiveOptionBackground,this.inputBackground=s.inputBackground,this.inputForeground=s.inputForeground,this.inputBorder=s.inputBorder,this.inputValidationInfoBorder=s.inputValidationInfoBorder,this.inputValidationInfoBackground=s.inputValidationInfoBackground,this.inputValidationInfoForeground=s.inputValidationInfoForeground,this.inputValidationWarningBorder=s.inputValidationWarningBorder,this.inputValidationWarningBackground=s.inputValidationWarningBackground,this.inputValidationWarningForeground=s.inputValidationWarningForeground,this.inputValidationErrorBorder=s.inputValidationErrorBorder,this.inputValidationErrorBackground=s.inputValidationErrorBackground,this.inputValidationErrorForeground=s.inputValidationErrorForeground;const o=s.appendPreserveCaseLabel||"",a=s.history||[],d=!!s.flexibleHeight,u=!!s.flexibleWidth,f=s.flexibleMaxHeight;this.domNode=document.createElement("div"),this.domNode.classList.add("monaco-findInput"),this.inputBox=this._register(new D.HistoryInputBox(this.domNode,this.contextViewProvider,{ariaLabel:this.label||"",placeholder:this.placeholder||"",validationOptions:{validation:this.validation},inputBackground:this.inputBackground,inputForeground:this.inputForeground,inputBorder:this.inputBorder,inputValidationInfoBackground:this.inputValidationInfoBackground,inputValidationInfoForeground:this.inputValidationInfoForeground,inputValidationInfoBorder:this.inputValidationInfoBorder,inputValidationWarningBackground:this.inputValidationWarningBackground,inputValidationWarningForeground:this.inputValidationWarningForeground,inputValidationWarningBorder:this.inputValidationWarningBorder,inputValidationErrorBackground:this.inputValidationErrorBackground,inputValidationErrorForeground:this.inputValidationErrorForeground,inputValidationErrorBorder:this.inputValidationErrorBorder,history:a,showHistoryHint:s.showHistoryHint,flexibleHeight:d,flexibleWidth:u,flexibleMaxHeight:f})),this.preserveCase=this._register(new t({appendTitle:o,isChecked:!1,inputActiveOptionBorder:this.inputActiveOptionBorder,inputActiveOptionForeground:this.inputActiveOptionForeground,inputActiveOptionBackground:this.inputActiveOptionBackground})),this._register(this.preserveCase.onChange(C=>{this._onDidOptionChange.fire(C),!C&&this.fixFocusOnOptionClickEnabled&&this.inputBox.focus(),this.validate()})),this._register(this.preserveCase.onKeyDown(C=>{this._onPreserveCaseKeyDown.fire(C)})),this._showOptionButtons?this.cachedOptionsWidth=this.preserveCase.width():this.cachedOptionsWidth=0;let S=[this.preserveCase.domNode];this.onkeydown(this.domNode,C=>{if(C.equals(15)||C.equals(17)||C.equals(9)){let _=S.indexOf(document.activeElement);if(_>=0){let L=-1;C.equals(17)?L=(_+1)%S.length:C.equals(15)&&(_===0?L=S.length-1:L=_-1),C.equals(9)?(S[_].blur(),this.inputBox.focus()):L>=0&&S[L].focus(),y.EventHelper.stop(C,!0)}}});let v=document.createElement("div");v.className="controls",v.style.display=this._showOptionButtons?"block":"none",v.appendChild(this.preserveCase.domNode),this.domNode.appendChild(v),l&&l.appendChild(this.domNode),this.onkeydown(this.inputBox.inputElement,C=>this._onKeyDown.fire(C)),this.onkeyup(this.inputBox.inputElement,C=>this._onKeyUp.fire(C)),this.oninput(this.inputBox.inputElement,C=>this._onInput.fire()),this.onmousedown(this.inputBox.inputElement,C=>this._onMouseDown.fire(C))}enable(){this.domNode.classList.remove("disabled"),this.inputBox.enable(),this.preserveCase.enable()}disable(){this.domNode.classList.add("disabled"),this.inputBox.disable(),this.preserveCase.disable()}setEnabled(l){l?this.enable():this.disable()}style(l){this.inputActiveOptionBorder=l.inputActiveOptionBorder,this.inputActiveOptionForeground=l.inputActiveOptionForeground,this.inputActiveOptionBackground=l.inputActiveOptionBackground,this.inputBackground=l.inputBackground,this.inputForeground=l.inputForeground,this.inputBorder=l.inputBorder,this.inputValidationInfoBackground=l.inputValidationInfoBackground,this.inputValidationInfoForeground=l.inputValidationInfoForeground,this.inputValidationInfoBorder=l.inputValidationInfoBorder,this.inputValidationWarningBackground=l.inputValidationWarningBackground,this.inputValidationWarningForeground=l.inputValidationWarningForeground,this.inputValidationWarningBorder=l.inputValidationWarningBorder,this.inputValidationErrorBackground=l.inputValidationErrorBackground,this.inputValidationErrorForeground=l.inputValidationErrorForeground,this.inputValidationErrorBorder=l.inputValidationErrorBorder,this.applyStyles()}applyStyles(){if(this.domNode){const l={inputActiveOptionBorder:this.inputActiveOptionBorder,inputActiveOptionForeground:this.inputActiveOptionForeground,inputActiveOptionBackground:this.inputActiveOptionBackground};this.preserveCase.style(l);const c={inputBackground:this.inputBackground,inputForeground:this.inputForeground,inputBorder:this.inputBorder,inputValidationInfoBackground:this.inputValidationInfoBackground,inputValidationInfoForeground:this.inputValidationInfoForeground,inputValidationInfoBorder:this.inputValidationInfoBorder,inputValidationWarningBackground:this.inputValidationWarningBackground,inputValidationWarningForeground:this.inputValidationWarningForeground,inputValidationWarningBorder:this.inputValidationWarningBorder,inputValidationErrorBackground:this.inputValidationErrorBackground,inputValidationErrorForeground:this.inputValidationErrorForeground,inputValidationErrorBorder:this.inputValidationErrorBorder};this.inputBox.style(c)}}select(){this.inputBox.select()}focus(){this.inputBox.focus()}getPreserveCase(){return this.preserveCase.checked}setPreserveCase(l){this.preserveCase.checked=l}focusOnPreserve(){this.preserveCase.focus()}validate(){this.inputBox&&this.inputBox.validate()}set width(l){this.inputBox.paddingRight=this.cachedOptionsWidth,this.inputBox.width=l,this.domNode.style.width=l+"px"}dispose(){super.dispose()}}e.ReplaceInput=i}),define(te[487],ie([1,0,34,57,7,46,56,84,125,140,222,67,44,10,27,95,2,17,8]),function(j,e,y,m,D,I,w,b,p,h,g,t,i,n,l,c,r,s,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.cleanMnemonic=e.Menu=e.Direction=e.MENU_ESCAPED_MNEMONIC_REGEX=e.MENU_MNEMONIC_REGEX=void 0,e.MENU_MNEMONIC_REGEX=/\(&([^\s&])\)|(^|[^&])&([^\s&])/,e.MENU_ESCAPED_MNEMONIC_REGEX=/(&)?(&)([^\s&])/g;var a;(function(_){_[_.Right=0]="Right",_[_.Left=1]="Left"})(a=e.Direction||(e.Direction={}));class d extends b.ActionBar{constructor(L,E,N={}){L.classList.add("monaco-menu-container"),L.setAttribute("role","presentation");const k=document.createElement("div");k.classList.add("monaco-menu"),k.setAttribute("role","presentation");super(k,{orientation:1,actionViewItemProvider:B=>this.doGetActionViewItem(B,N,M),context:N.context,actionRunner:N.actionRunner,ariaLabel:N.ariaLabel,focusOnlyEnabledItems:!0,triggerKeys:{keys:[3,...s.isMacintosh||s.isLinux?[10]:[]],keyDown:!0}});this.menuElement=k,this.actionsList.setAttribute("role","menu"),this.actionsList.tabIndex=0,this.menuDisposables=this._register(new r.DisposableStore),this.initializeOrUpdateStyleSheet(L,{}),this._register(m.Gesture.addTarget(k)),(0,D.addDisposableListener)(k,D.EventType.KEY_DOWN,B=>{new I.StandardKeyboardEvent(B).equals(2)&&B.preventDefault()}),N.enableMnemonics&&this.menuDisposables.add((0,D.addDisposableListener)(k,D.EventType.KEY_DOWN,B=>{const T=B.key.toLocaleLowerCase();if(this.mnemonics.has(T)){D.EventHelper.stop(B,!0);const R=this.mnemonics.get(T);if(R.length===1&&(R[0]instanceof f&&R[0].container&&this.focusItemByElement(R[0].container),R[0].onClick(B)),R.length>1){const P=R.shift();P&&P.container&&(this.focusItemByElement(P.container),R.push(P)),this.mnemonics.set(T,R)}}})),s.isLinux&&this._register((0,D.addDisposableListener)(k,D.EventType.KEY_DOWN,B=>{const T=new I.StandardKeyboardEvent(B);T.equals(14)||T.equals(11)?(this.focusedItem=this.viewItems.length-1,this.focusNext(),D.EventHelper.stop(B,!0)):(T.equals(13)||T.equals(12))&&(this.focusedItem=0,this.focusPrevious(),D.EventHelper.stop(B,!0))})),this._register((0,D.addDisposableListener)(this.domNode,D.EventType.MOUSE_OUT,B=>{let T=B.relatedTarget;(0,D.isAncestor)(T,this.domNode)||(this.focusedItem=void 0,this.updateFocus(),B.stopPropagation())})),this._register((0,D.addDisposableListener)(this.actionsList,D.EventType.MOUSE_OVER,B=>{let T=B.target;if(!(!T||!(0,D.isAncestor)(T,this.actionsList)||T===this.actionsList)){for(;T.parentElement!==this.actionsList&&T.parentElement!==null;)T=T.parentElement;if(T.classList.contains("action-item")){const R=this.focusedItem;this.setFocusedItem(T),R!==this.focusedItem&&this.updateFocus()}}})),this._register(m.Gesture.addTarget(this.actionsList)),this._register((0,D.addDisposableListener)(this.actionsList,m.EventType.Tap,B=>{let T=B.initialTarget;if(!(!T||!(0,D.isAncestor)(T,this.actionsList)||T===this.actionsList)){for(;T.parentElement!==this.actionsList&&T.parentElement!==null;)T=T.parentElement;if(T.classList.contains("action-item")){const R=this.focusedItem;this.setFocusedItem(T),R!==this.focusedItem&&this.updateFocus()}}}));let M={parent:this};this.mnemonics=new Map,this.scrollableElement=this._register(new t.DomScrollableElement(k,{alwaysConsumeMouseWheel:!0,horizontal:2,vertical:3,verticalScrollbarSize:7,handleMouseWheel:!0,useShadows:!0}));const O=this.scrollableElement.getDomNode();O.style.position="",this._register((0,D.addDisposableListener)(k,m.EventType.Change,B=>{D.EventHelper.stop(B,!0);const T=this.scrollableElement.getScrollPosition().scrollTop;this.scrollableElement.setScrollPosition({scrollTop:T-B.translationY})})),this._register((0,D.addDisposableListener)(O,D.EventType.MOUSE_UP,B=>{B.preventDefault()})),k.style.maxHeight=`${Math.max(10,window.innerHeight-L.getBoundingClientRect().top-35)}px`,E=E.filter(B=>{var T;return((T=N.submenuIds)===null||T===void 0?void 0:T.has(B.id))?(console.warn(`Found submenu cycle: ${B.id}`),!1):!0}),this.push(E,{icon:!0,label:!0,isMenu:!0}),L.appendChild(this.scrollableElement.getDomNode()),this.scrollableElement.scanDomNode(),this.viewItems.filter(B=>!(B instanceof S)).forEach((B,T,R)=>{B.updatePositionInSet(T+1,R.length)})}initializeOrUpdateStyleSheet(L,E){this.styleSheet||((0,D.isInShadowDOM)(L)?this.styleSheet=(0,D.createStyleSheet)(L):(d.globalStyleSheet||(d.globalStyleSheet=(0,D.createStyleSheet)()),this.styleSheet=d.globalStyleSheet)),this.styleSheet.textContent=C(E)}style(L){const E=this.getContainer();this.initializeOrUpdateStyleSheet(E,L);const N=L.foregroundColor?`${L.foregroundColor}`:"",k=L.backgroundColor?`${L.backgroundColor}`:"",M=L.borderColor?`1px solid ${L.borderColor}`:"",O=L.shadowColor?`0 2px 4px ${L.shadowColor}`:"";E.style.border=M,this.domNode.style.color=N,this.domNode.style.backgroundColor=k,E.style.boxShadow=O,this.viewItems&&this.viewItems.forEach(B=>{(B instanceof u||B instanceof S)&&B.style(L)})}getContainer(){return this.scrollableElement.getDomNode()}get onScroll(){return this.scrollableElement.onScroll}focusItemByElement(L){const E=this.focusedItem;this.setFocusedItem(L),E!==this.focusedItem&&this.updateFocus()}setFocusedItem(L){for(let E=0;E<this.actionsList.children.length;E++){let N=this.actionsList.children[E];if(L===N){this.focusedItem=E;break}}}updateFocus(L){super.updateFocus(L,!0,!0),typeof this.focusedItem!="undefined"&&this.scrollableElement.setScrollPosition({scrollTop:Math.round(this.menuElement.scrollTop)})}doGetActionViewItem(L,E,N){if(L instanceof i.Separator)return new S(E.context,L,{icon:!0});if(L instanceof i.SubmenuAction){const k=new f(L,L.actions,N,Object.assign(Object.assign({},E),{submenuIds:new Set([...E.submenuIds||[],L.id])}));if(E.enableMnemonics){const M=k.getMnemonic();if(M&&k.isEnabled()){let O=[];this.mnemonics.has(M)&&(O=this.mnemonics.get(M)),O.push(k),this.mnemonics.set(M,O)}}return k}else{const k={enableMnemonics:E.enableMnemonics,useEventAsContext:E.useEventAsContext};if(E.getKeyBinding){const O=E.getKeyBinding(L);if(O){const B=O.getLabel();B&&(k.keybinding=B)}}const M=new u(E.context,L,k);if(E.enableMnemonics){const O=M.getMnemonic();if(O&&M.isEnabled()){let B=[];this.mnemonics.has(O)&&(B=this.mnemonics.get(O)),B.push(M),this.mnemonics.set(O,B)}}return M}}}e.Menu=d;class u extends p.BaseActionViewItem{constructor(L,E,N={}){N.isMenu=!0;super(E,E,N);if(this.options=N,this.options.icon=N.icon!==void 0?N.icon:!1,this.options.label=N.label!==void 0?N.label:!0,this.cssClass="",this.options.label&&N.enableMnemonics){let k=this.getAction().label;if(k){let M=e.MENU_MNEMONIC_REGEX.exec(k);M&&(this.mnemonic=(M[1]?M[1]:M[3]).toLocaleLowerCase())}}this.runOnceToEnableMouseUp=new n.RunOnceScheduler(()=>{!this.element||(this._register((0,D.addDisposableListener)(this.element,D.EventType.MOUSE_UP,k=>{if(D.EventHelper.stop(k,!0),y.isFirefox){if(new w.StandardMouseEvent(k).rightButton)return;this.onClick(k)}else setTimeout(()=>{this.onClick(k)},0)})),this._register((0,D.addDisposableListener)(this.element,D.EventType.CONTEXT_MENU,k=>{D.EventHelper.stop(k,!0)})))},100),this._register(this.runOnceToEnableMouseUp)}render(L){super.render(L),!!this.element&&(this.container=L,this.item=(0,D.append)(this.element,(0,D.$)("a.action-menu-item")),this._action.id===i.Separator.ID?this.item.setAttribute("role","presentation"):(this.item.setAttribute("role","menuitem"),this.mnemonic&&this.item.setAttribute("aria-keyshortcuts",`${this.mnemonic}`)),this.check=(0,D.append)(this.item,(0,D.$)("span.menu-item-check"+l.Codicon.menuSelection.cssSelector)),this.check.setAttribute("role","none"),this.label=(0,D.append)(this.item,(0,D.$)("span.action-label")),this.options.label&&this.options.keybinding&&((0,D.append)(this.item,(0,D.$)("span.keybinding")).textContent=this.options.keybinding),this.runOnceToEnableMouseUp.schedule(),this.updateClass(),this.updateLabel(),this.updateTooltip(),this.updateEnabled(),this.updateChecked())}blur(){super.blur(),this.applyStyle()}focus(){super.focus(),this.item&&this.item.focus(),this.applyStyle()}updatePositionInSet(L,E){this.item&&(this.item.setAttribute("aria-posinset",`${L}`),this.item.setAttribute("aria-setsize",`${E}`))}updateLabel(){if(!!this.label&&this.options.label){(0,D.clearNode)(this.label);let L=(0,c.stripIcons)(this.getAction().label);if(L){const E=v(L);this.options.enableMnemonics||(L=E),this.label.setAttribute("aria-label",E.replace(/&&/g,"&"));const N=e.MENU_MNEMONIC_REGEX.exec(L);if(N){L=o.escape(L),e.MENU_ESCAPED_MNEMONIC_REGEX.lastIndex=0;let k=e.MENU_ESCAPED_MNEMONIC_REGEX.exec(L);for(;k&&k[1];)k=e.MENU_ESCAPED_MNEMONIC_REGEX.exec(L);const M=O=>O.replace(/&&/g,"&");k?this.label.append(o.ltrim(M(L.substr(0,k.index))," "),(0,D.$)("u",{"aria-hidden":"true"},k[3]),o.rtrim(M(L.substr(k.index+k[0].length))," ")):this.label.innerText=M(L).trim(),this.item&&this.item.setAttribute("aria-keyshortcuts",(N[1]?N[1]:N[3]).toLocaleLowerCase())}else this.label.innerText=L.replace(/&&/g,"&").trim()}}}updateTooltip(){}updateClass(){this.cssClass&&this.item&&this.item.classList.remove(...this.cssClass.split(" ")),this.options.icon&&this.label?(this.cssClass=this.getAction().class||"",this.label.classList.add("icon"),this.cssClass&&this.label.classList.add(...this.cssClass.split(" ")),this.updateEnabled()):this.label&&this.label.classList.remove("icon")}updateEnabled(){this.getAction().enabled?(this.element&&(this.element.classList.remove("disabled"),this.element.removeAttribute("aria-disabled")),this.item&&(this.item.classList.remove("disabled"),this.item.removeAttribute("aria-disabled"),this.item.tabIndex=0)):(this.element&&(this.element.classList.add("disabled"),this.element.setAttribute("aria-disabled","true")),this.item&&(this.item.classList.add("disabled"),this.item.setAttribute("aria-disabled","true")))}updateChecked(){if(!this.item)return;const L=this.getAction().checked;this.item.classList.toggle("checked",!!L),L!==void 0?(this.item.setAttribute("role","menuitemcheckbox"),this.item.setAttribute("aria-checked",L?"true":"false")):(this.item.setAttribute("role","menuitem"),this.item.setAttribute("aria-checked",""))}getMnemonic(){return this.mnemonic}applyStyle(){if(!this.menuStyle)return;const L=this.element&&this.element.classList.contains("focused"),E=L&&this.menuStyle.selectionForegroundColor?this.menuStyle.selectionForegroundColor:this.menuStyle.foregroundColor,N=L&&this.menuStyle.selectionBackgroundColor?this.menuStyle.selectionBackgroundColor:void 0,k=L&&this.menuStyle.selectionBorderColor?`thin solid ${this.menuStyle.selectionBorderColor}`:"";this.item&&(this.item.style.color=E?E.toString():"",this.item.style.backgroundColor=N?N.toString():""),this.check&&(this.check.style.color=E?E.toString():""),this.container&&(this.container.style.border=k)}style(L){this.menuStyle=L,this.applyStyle()}}class f extends u{constructor(L,E,N,k){super(L,L,k);this.submenuActions=E,this.parentData=N,this.submenuOptions=k,this.mysubmenu=null,this.submenuDisposables=this._register(new r.DisposableStore),this.mouseOver=!1,this.expandDirection=k&&k.expandDirection!==void 0?k.expandDirection:a.Right,this.showScheduler=new n.RunOnceScheduler(()=>{this.mouseOver&&(this.cleanupExistingSubmenu(!1),this.createSubmenu(!1))},250),this.hideScheduler=new n.RunOnceScheduler(()=>{this.element&&!(0,D.isAncestor)((0,D.getActiveElement)(),this.element)&&this.parentData.submenu===this.mysubmenu&&(this.parentData.parent.focus(!1),this.cleanupExistingSubmenu(!0))},750)}render(L){super.render(L),!!this.element&&(this.item&&(this.item.classList.add("monaco-submenu-item"),this.item.tabIndex=0,this.item.setAttribute("aria-haspopup","true"),this.updateAriaExpanded("false"),this.submenuIndicator=(0,D.append)(this.item,(0,D.$)("span.submenu-indicator"+l.Codicon.menuSubmenu.cssSelector)),this.submenuIndicator.setAttribute("aria-hidden","true")),this._register((0,D.addDisposableListener)(this.element,D.EventType.KEY_UP,E=>{let N=new I.StandardKeyboardEvent(E);(N.equals(17)||N.equals(3))&&(D.EventHelper.stop(E,!0),this.createSubmenu(!0))})),this._register((0,D.addDisposableListener)(this.element,D.EventType.KEY_DOWN,E=>{let N=new I.StandardKeyboardEvent(E);(0,D.getActiveElement)()===this.item&&(N.equals(17)||N.equals(3))&&D.EventHelper.stop(E,!0)})),this._register((0,D.addDisposableListener)(this.element,D.EventType.MOUSE_OVER,E=>{this.mouseOver||(this.mouseOver=!0,this.showScheduler.schedule())})),this._register((0,D.addDisposableListener)(this.element,D.EventType.MOUSE_LEAVE,E=>{this.mouseOver=!1})),this._register((0,D.addDisposableListener)(this.element,D.EventType.FOCUS_OUT,E=>{this.element&&!(0,D.isAncestor)((0,D.getActiveElement)(),this.element)&&this.hideScheduler.schedule()})),this._register(this.parentData.parent.onScroll(()=>{this.parentData.parent.focus(!1),this.cleanupExistingSubmenu(!1)})))}updateEnabled(){}onClick(L){D.EventHelper.stop(L,!0),this.cleanupExistingSubmenu(!1),this.createSubmenu(!0)}cleanupExistingSubmenu(L){if(this.parentData.submenu&&(L||this.parentData.submenu!==this.mysubmenu)){try{this.parentData.submenu.dispose()}catch{}this.parentData.submenu=void 0,this.updateAriaExpanded("false"),this.submenuContainer&&(this.submenuDisposables.clear(),this.submenuContainer=void 0)}}calculateSubmenuMenuLayout(L,E,N,k){const M={top:0,left:0};return M.left=(0,g.layout)(L.width,E.width,{position:k===a.Right?0:1,offset:N.left,size:N.width}),M.left>=N.left&&M.left<N.left+N.width&&(N.left+10+E.width<=L.width&&(M.left=N.left+10),N.top+=10,N.height=0),M.top=(0,g.layout)(L.height,E.height,{position:0,offset:N.top,size:0}),M.top+E.height===N.top&&M.top+N.height+E.height<=L.height&&(M.top+=N.height),M}createSubmenu(L=!0){if(!!this.element)if(this.parentData.submenu)this.parentData.submenu.focus(!1);else{this.updateAriaExpanded("true"),this.submenuContainer=(0,D.append)(this.element,(0,D.$)("div.monaco-submenu")),this.submenuContainer.classList.add("menubar-menu-items-holder","context-view");const E=getComputedStyle(this.parentData.parent.domNode),N=parseFloat(E.paddingTop||"0")||0;this.submenuContainer.style.zIndex="1",this.submenuContainer.style.position="fixed",this.submenuContainer.style.top="0",this.submenuContainer.style.left="0",this.parentData.submenu=new d(this.submenuContainer,this.submenuActions.length?this.submenuActions:[new i.EmptySubmenuAction],this.submenuOptions),this.menuStyle&&this.parentData.submenu.style(this.menuStyle);const k=this.element.getBoundingClientRect(),M={top:k.top-N,left:k.left,height:k.height+2*N,width:k.width},O=this.submenuContainer.getBoundingClientRect(),{top:B,left:T}=this.calculateSubmenuMenuLayout(new D.Dimension(window.innerWidth,window.innerHeight),D.Dimension.lift(O),M,this.expandDirection);this.submenuContainer.style.left=`${T-O.left}px`,this.submenuContainer.style.top=`${B-O.top}px`,this.submenuDisposables.add((0,D.addDisposableListener)(this.submenuContainer,D.EventType.KEY_UP,R=>{new I.StandardKeyboardEvent(R).equals(15)&&(D.EventHelper.stop(R,!0),this.parentData.parent.focus(),this.cleanupExistingSubmenu(!0))})),this.submenuDisposables.add((0,D.addDisposableListener)(this.submenuContainer,D.EventType.KEY_DOWN,R=>{new I.StandardKeyboardEvent(R).equals(15)&&D.EventHelper.stop(R,!0)})),this.submenuDisposables.add(this.parentData.submenu.onDidCancel(()=>{this.parentData.parent.focus(),this.cleanupExistingSubmenu(!0)})),this.parentData.submenu.focus(L),this.mysubmenu=this.parentData.submenu}}updateAriaExpanded(L){var E;this.item&&((E=this.item)===null||E===void 0||E.setAttribute("aria-expanded",L))}applyStyle(){if(super.applyStyle(),!this.menuStyle)return;const E=this.element&&this.element.classList.contains("focused")&&this.menuStyle.selectionForegroundColor?this.menuStyle.selectionForegroundColor:this.menuStyle.foregroundColor;this.submenuIndicator&&(this.submenuIndicator.style.color=E?`${E}`:""),this.parentData.submenu&&this.parentData.submenu.style(this.menuStyle)}dispose(){super.dispose(),this.hideScheduler.dispose(),this.mysubmenu&&(this.mysubmenu.dispose(),this.mysubmenu=null),this.submenuContainer&&(this.submenuContainer=void 0)}}class S extends p.ActionViewItem{style(L){this.label&&(this.label.style.borderBottomColor=L.separatorColor?`${L.separatorColor}`:"")}}function v(_){const L=e.MENU_MNEMONIC_REGEX,E=L.exec(_);if(!E)return _;const N=!E[1];return _.replace(L,N?"$2$3":"").trim()}e.cleanMnemonic=v;function C(_){let L=`
|
||
.monaco-menu {
|
||
font-size: 13px;
|
||
|
||
}
|
||
|
||
${(0,h.formatRule)(l.Codicon.menuSelection)}
|
||
${(0,h.formatRule)(l.Codicon.menuSubmenu)}
|
||
|
||
.monaco-menu .monaco-action-bar {
|
||
text-align: right;
|
||
overflow: hidden;
|
||
white-space: nowrap;
|
||
}
|
||
|
||
.monaco-menu .monaco-action-bar .actions-container {
|
||
display: flex;
|
||
margin: 0 auto;
|
||
padding: 0;
|
||
width: 100%;
|
||
justify-content: flex-end;
|
||
}
|
||
|
||
.monaco-menu .monaco-action-bar.vertical .actions-container {
|
||
display: inline-block;
|
||
}
|
||
|
||
.monaco-menu .monaco-action-bar.reverse .actions-container {
|
||
flex-direction: row-reverse;
|
||
}
|
||
|
||
.monaco-menu .monaco-action-bar .action-item {
|
||
cursor: pointer;
|
||
display: inline-block;
|
||
transition: transform 50ms ease;
|
||
position: relative; /* DO NOT REMOVE - this is the key to preventing the ghosting icon bug in Chrome 42 */
|
||
}
|
||
|
||
.monaco-menu .monaco-action-bar .action-item.disabled {
|
||
cursor: default;
|
||
}
|
||
|
||
.monaco-menu .monaco-action-bar.animated .action-item.active {
|
||
transform: scale(1.272019649, 1.272019649); /* 1.272019649 = \u221A\u03C6 */
|
||
}
|
||
|
||
.monaco-menu .monaco-action-bar .action-item .icon,
|
||
.monaco-menu .monaco-action-bar .action-item .codicon {
|
||
display: inline-block;
|
||
}
|
||
|
||
.monaco-menu .monaco-action-bar .action-item .codicon {
|
||
display: flex;
|
||
align-items: center;
|
||
}
|
||
|
||
.monaco-menu .monaco-action-bar .action-label {
|
||
font-size: 11px;
|
||
margin-right: 4px;
|
||
}
|
||
|
||
.monaco-menu .monaco-action-bar .action-item.disabled .action-label,
|
||
.monaco-menu .monaco-action-bar .action-item.disabled .action-label:hover {
|
||
opacity: 0.4;
|
||
}
|
||
|
||
/* Vertical actions */
|
||
|
||
.monaco-menu .monaco-action-bar.vertical {
|
||
text-align: left;
|
||
}
|
||
|
||
.monaco-menu .monaco-action-bar.vertical .action-item {
|
||
display: block;
|
||
}
|
||
|
||
.monaco-menu .monaco-action-bar.vertical .action-label.separator {
|
||
display: block;
|
||
border-bottom: 1px solid #bbb;
|
||
padding-top: 1px;
|
||
margin-left: .8em;
|
||
margin-right: .8em;
|
||
}
|
||
|
||
.monaco-menu .secondary-actions .monaco-action-bar .action-label {
|
||
margin-left: 6px;
|
||
}
|
||
|
||
/* Action Items */
|
||
.monaco-menu .monaco-action-bar .action-item.select-container {
|
||
overflow: hidden; /* somehow the dropdown overflows its container, we prevent it here to not push */
|
||
flex: 1;
|
||
max-width: 170px;
|
||
min-width: 60px;
|
||
display: flex;
|
||
align-items: center;
|
||
justify-content: center;
|
||
margin-right: 10px;
|
||
}
|
||
|
||
.monaco-menu .monaco-action-bar.vertical {
|
||
margin-left: 0;
|
||
overflow: visible;
|
||
}
|
||
|
||
.monaco-menu .monaco-action-bar.vertical .actions-container {
|
||
display: block;
|
||
}
|
||
|
||
.monaco-menu .monaco-action-bar.vertical .action-item {
|
||
padding: 0;
|
||
transform: none;
|
||
display: flex;
|
||
}
|
||
|
||
.monaco-menu .monaco-action-bar.vertical .action-item.active {
|
||
transform: none;
|
||
}
|
||
|
||
.monaco-menu .monaco-action-bar.vertical .action-menu-item {
|
||
flex: 1 1 auto;
|
||
display: flex;
|
||
height: 2em;
|
||
align-items: center;
|
||
position: relative;
|
||
}
|
||
|
||
.monaco-menu .monaco-action-bar.vertical .action-label {
|
||
flex: 1 1 auto;
|
||
text-decoration: none;
|
||
padding: 0 1em;
|
||
background: none;
|
||
font-size: 12px;
|
||
line-height: 1;
|
||
}
|
||
|
||
.monaco-menu .monaco-action-bar.vertical .keybinding,
|
||
.monaco-menu .monaco-action-bar.vertical .submenu-indicator {
|
||
display: inline-block;
|
||
flex: 2 1 auto;
|
||
padding: 0 1em;
|
||
text-align: right;
|
||
font-size: 12px;
|
||
line-height: 1;
|
||
}
|
||
|
||
.monaco-menu .monaco-action-bar.vertical .submenu-indicator {
|
||
height: 100%;
|
||
}
|
||
|
||
.monaco-menu .monaco-action-bar.vertical .submenu-indicator.codicon {
|
||
font-size: 16px !important;
|
||
display: flex;
|
||
align-items: center;
|
||
}
|
||
|
||
.monaco-menu .monaco-action-bar.vertical .submenu-indicator.codicon::before {
|
||
margin-left: auto;
|
||
margin-right: -20px;
|
||
}
|
||
|
||
.monaco-menu .monaco-action-bar.vertical .action-item.disabled .keybinding,
|
||
.monaco-menu .monaco-action-bar.vertical .action-item.disabled .submenu-indicator {
|
||
opacity: 0.4;
|
||
}
|
||
|
||
.monaco-menu .monaco-action-bar.vertical .action-label:not(.separator) {
|
||
display: inline-block;
|
||
box-sizing: border-box;
|
||
margin: 0;
|
||
}
|
||
|
||
.monaco-menu .monaco-action-bar.vertical .action-item {
|
||
position: static;
|
||
overflow: visible;
|
||
}
|
||
|
||
.monaco-menu .monaco-action-bar.vertical .action-item .monaco-submenu {
|
||
position: absolute;
|
||
}
|
||
|
||
.monaco-menu .monaco-action-bar.vertical .action-label.separator {
|
||
padding: 0.5em 0 0 0;
|
||
margin-bottom: 0.5em;
|
||
width: 100%;
|
||
height: 0px !important;
|
||
margin-left: .8em !important;
|
||
margin-right: .8em !important;
|
||
}
|
||
|
||
.monaco-menu .monaco-action-bar.vertical .action-label.separator.text {
|
||
padding: 0.7em 1em 0.1em 1em;
|
||
font-weight: bold;
|
||
opacity: 1;
|
||
}
|
||
|
||
.monaco-menu .monaco-action-bar.vertical .action-label:hover {
|
||
color: inherit;
|
||
}
|
||
|
||
.monaco-menu .monaco-action-bar.vertical .menu-item-check {
|
||
position: absolute;
|
||
visibility: hidden;
|
||
width: 1em;
|
||
height: 100%;
|
||
}
|
||
|
||
.monaco-menu .monaco-action-bar.vertical .action-menu-item.checked .menu-item-check {
|
||
visibility: visible;
|
||
display: flex;
|
||
align-items: center;
|
||
justify-content: center;
|
||
}
|
||
|
||
/* Context Menu */
|
||
|
||
.context-view.monaco-menu-container {
|
||
outline: 0;
|
||
border: none;
|
||
animation: fadeIn 0.083s linear;
|
||
-webkit-app-region: no-drag;
|
||
}
|
||
|
||
.context-view.monaco-menu-container :focus,
|
||
.context-view.monaco-menu-container .monaco-action-bar.vertical:focus,
|
||
.context-view.monaco-menu-container .monaco-action-bar.vertical :focus {
|
||
outline: 0;
|
||
}
|
||
|
||
.monaco-menu .monaco-action-bar.vertical .action-item {
|
||
border: thin solid transparent; /* prevents jumping behaviour on hover or focus */
|
||
}
|
||
|
||
|
||
/* High Contrast Theming */
|
||
:host-context(.hc-black) .context-view.monaco-menu-container {
|
||
box-shadow: none;
|
||
}
|
||
|
||
:host-context(.hc-black) .monaco-menu .monaco-action-bar.vertical .action-item.focused {
|
||
background: none;
|
||
}
|
||
|
||
/* Vertical Action Bar Styles */
|
||
|
||
.monaco-menu .monaco-action-bar.vertical {
|
||
padding: .5em 0;
|
||
}
|
||
|
||
.monaco-menu .monaco-action-bar.vertical .action-menu-item {
|
||
height: 1.8em;
|
||
}
|
||
|
||
.monaco-menu .monaco-action-bar.vertical .action-label:not(.separator),
|
||
.monaco-menu .monaco-action-bar.vertical .keybinding {
|
||
font-size: inherit;
|
||
padding: 0 2em;
|
||
}
|
||
|
||
.monaco-menu .monaco-action-bar.vertical .menu-item-check {
|
||
font-size: inherit;
|
||
width: 2em;
|
||
}
|
||
|
||
.monaco-menu .monaco-action-bar.vertical .action-label.separator {
|
||
font-size: inherit;
|
||
padding: 0.2em 0 0 0;
|
||
margin-bottom: 0.2em;
|
||
}
|
||
|
||
:host-context(.linux) .monaco-menu .monaco-action-bar.vertical .action-label.separator {
|
||
margin-left: 0;
|
||
margin-right: 0;
|
||
}
|
||
|
||
.monaco-menu .monaco-action-bar.vertical .submenu-indicator {
|
||
font-size: 60%;
|
||
padding: 0 1.8em;
|
||
}
|
||
|
||
:host-context(.linux) .monaco-menu .monaco-action-bar.vertical .submenu-indicator {
|
||
height: 100%;
|
||
mask-size: 10px 10px;
|
||
-webkit-mask-size: 10px 10px;
|
||
}
|
||
|
||
.monaco-menu .action-item {
|
||
cursor: default;
|
||
}
|
||
|
||
/* Arrows */
|
||
.monaco-scrollable-element > .scrollbar > .scra {
|
||
cursor: pointer;
|
||
font-size: 11px !important;
|
||
}
|
||
|
||
.monaco-scrollable-element > .visible {
|
||
opacity: 1;
|
||
|
||
/* Background rule added for IE9 - to allow clicks on dom node */
|
||
background:rgba(0,0,0,0);
|
||
|
||
transition: opacity 100ms linear;
|
||
}
|
||
.monaco-scrollable-element > .invisible {
|
||
opacity: 0;
|
||
pointer-events: none;
|
||
}
|
||
.monaco-scrollable-element > .invisible.fade {
|
||
transition: opacity 800ms linear;
|
||
}
|
||
|
||
/* Scrollable Content Inset Shadow */
|
||
.monaco-scrollable-element > .shadow {
|
||
position: absolute;
|
||
display: none;
|
||
}
|
||
.monaco-scrollable-element > .shadow.top {
|
||
display: block;
|
||
top: 0;
|
||
left: 3px;
|
||
height: 3px;
|
||
width: 100%;
|
||
}
|
||
.monaco-scrollable-element > .shadow.left {
|
||
display: block;
|
||
top: 3px;
|
||
left: 0;
|
||
height: 100%;
|
||
width: 3px;
|
||
}
|
||
.monaco-scrollable-element > .shadow.top-left-corner {
|
||
display: block;
|
||
top: 0;
|
||
left: 0;
|
||
height: 3px;
|
||
width: 3px;
|
||
}
|
||
`;const E=_.scrollbarShadow;E&&(L+=`
|
||
.monaco-scrollable-element > .shadow.top {
|
||
box-shadow: ${E} 0 6px 6px -6px inset;
|
||
}
|
||
|
||
.monaco-scrollable-element > .shadow.left {
|
||
box-shadow: ${E} 6px 0 6px -6px inset;
|
||
}
|
||
|
||
.monaco-scrollable-element > .shadow.top.left {
|
||
box-shadow: ${E} 6px 6px 6px -6px inset;
|
||
}
|
||
`);const N=_.scrollbarSliderBackground;N&&(L+=`
|
||
.monaco-scrollable-element > .scrollbar > .slider {
|
||
background: ${N};
|
||
}
|
||
`);const k=_.scrollbarSliderHoverBackground;k&&(L+=`
|
||
.monaco-scrollable-element > .scrollbar > .slider:hover {
|
||
background: ${k};
|
||
}
|
||
`);const M=_.scrollbarSliderActiveBackground;return M&&(L+=`
|
||
.monaco-scrollable-element > .scrollbar > .slider.active {
|
||
background: ${M};
|
||
}
|
||
`),L}}),define(te[488],ie([1,0,7,46,56,192,2,74,142]),function(j,e,y,m,D,I,w,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.QuickInputBox=void 0;const p=y.$;class h extends w.Disposable{constructor(t){super();this.parent=t,this.onKeyDown=i=>y.addDisposableListener(this.inputBox.inputElement,y.EventType.KEY_DOWN,n=>{i(new m.StandardKeyboardEvent(n))}),this.onMouseDown=i=>y.addDisposableListener(this.inputBox.inputElement,y.EventType.MOUSE_DOWN,n=>{i(new D.StandardMouseEvent(n))}),this.onDidChange=i=>this.inputBox.onDidChange(i),this.container=y.append(this.parent,p(".quick-input-box")),this.inputBox=this._register(new I.InputBox(this.container,void 0))}get value(){return this.inputBox.value}set value(t){this.inputBox.value=t}select(t=null){this.inputBox.select(t)}isSelectionAtEnd(){return this.inputBox.isSelectionAtEnd()}get placeholder(){return this.inputBox.inputElement.getAttribute("placeholder")||""}set placeholder(t){this.inputBox.setPlaceHolder(t)}get ariaLabel(){return this.inputBox.getAriaLabel()}set ariaLabel(t){this.inputBox.setAriaLabel(t)}get password(){return this.inputBox.inputElement.type==="password"}set password(t){this.inputBox.inputElement.type=t?"password":"text"}setAttribute(t,i){this.inputBox.inputElement.setAttribute(t,i)}removeAttribute(t){this.inputBox.inputElement.removeAttribute(t)}showDecoration(t){t===b.default.Ignore?this.inputBox.hideMessage():this.inputBox.showMessage({type:t===b.default.Info?1:t===b.default.Warning?2:3,content:""})}stylesForType(t){return this.inputBox.stylesForType(t===b.default.Info?1:t===b.default.Warning?2:3)}setFocus(){this.inputBox.focus()}layout(){this.inputBox.layout()}style(t){this.inputBox.style(t)}}e.QuickInputBox=h}),define(te[489],ie([5,6]),function(j,e){return j.create("vs/base/common/errorMessage",e)}),define(te[490],ie([1,0,19,20,489]),function(j,e,y,m,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.toErrorMessage=void 0;function I(h,g){return g&&(h.stack||h.stacktrace)?D.localize(0,null,b(h),w(h.stack)||w(h.stacktrace)):b(h)}function w(h){return Array.isArray(h)?h.join(`
|
||
`):h}function b(h){return typeof h.code=="string"&&typeof h.errno=="number"&&typeof h.syscall=="string"?D.localize(1,null,h.message):h.message||D.localize(2,null)}function p(h=null,g=!1){if(!h)return D.localize(3,null);if(Array.isArray(h)){const t=y.coalesce(h),i=p(t[0],g);return t.length>1?D.localize(4,null,i,t.length):i}if(m.isString(h))return h;if(h.detail){const t=h.detail;if(t.error)return I(t.error,g);if(t.exception)return I(t.exception,g)}return h.stack?I(h,g):h.message?h.message:D.localize(5,null)}e.toErrorMessage=p}),define(te[491],ie([5,6]),function(j,e){return j.create("vs/base/common/keybindingLabels",e)}),define(te[193],ie([1,0,491]),function(j,e,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.UserSettingsLabelProvider=e.ElectronAcceleratorLabelProvider=e.AriaLabelProvider=e.UILabelProvider=e.ModifierLabelProvider=void 0;class m{constructor(w,b,p=b){this.modifierLabels=[null],this.modifierLabels[2]=w,this.modifierLabels[1]=b,this.modifierLabels[3]=p}toLabel(w,b,p){if(b.length===0)return null;const h=[];for(let g=0,t=b.length;g<t;g++){const i=b[g],n=p(i);if(n===null)return null;h[g]=D(i,n,this.modifierLabels[w])}return h.join(" ")}}e.ModifierLabelProvider=m,e.UILabelProvider=new m({ctrlKey:"\u2303",shiftKey:"\u21E7",altKey:"\u2325",metaKey:"\u2318",separator:""},{ctrlKey:y.localize(0,null),shiftKey:y.localize(1,null),altKey:y.localize(2,null),metaKey:y.localize(3,null),separator:"+"},{ctrlKey:y.localize(4,null),shiftKey:y.localize(5,null),altKey:y.localize(6,null),metaKey:y.localize(7,null),separator:"+"}),e.AriaLabelProvider=new m({ctrlKey:y.localize(8,null),shiftKey:y.localize(9,null),altKey:y.localize(10,null),metaKey:y.localize(11,null),separator:"+"},{ctrlKey:y.localize(12,null),shiftKey:y.localize(13,null),altKey:y.localize(14,null),metaKey:y.localize(15,null),separator:"+"},{ctrlKey:y.localize(16,null),shiftKey:y.localize(17,null),altKey:y.localize(18,null),metaKey:y.localize(19,null),separator:"+"}),e.ElectronAcceleratorLabelProvider=new m({ctrlKey:"Ctrl",shiftKey:"Shift",altKey:"Alt",metaKey:"Cmd",separator:"+"},{ctrlKey:"Ctrl",shiftKey:"Shift",altKey:"Alt",metaKey:"Super",separator:"+"}),e.UserSettingsLabelProvider=new m({ctrlKey:"ctrl",shiftKey:"shift",altKey:"alt",metaKey:"cmd",separator:"+"},{ctrlKey:"ctrl",shiftKey:"shift",altKey:"alt",metaKey:"win",separator:"+"},{ctrlKey:"ctrl",shiftKey:"shift",altKey:"alt",metaKey:"meta",separator:"+"});function D(I,w,b){if(w===null)return"";const p=[];return I.ctrlKey&&p.push(b.ctrlKey),I.shiftKey&&p.push(b.shiftKey),I.altKey&&p.push(b.altKey),I.metaKey&&p.push(b.metaKey),w!==""&&p.push(w),p.join(b.separator)}}),define(te[492],ie([1,0,7,193,39,478,339]),function(j,e,y,m,D,I){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.KeybindingLabel=void 0;const w=y.$;class b{constructor(h,g,t){this.os=g,this.keyElements=new Set,this.options=t||Object.create(null),this.labelBackground=this.options.keybindingLabelBackground,this.labelForeground=this.options.keybindingLabelForeground,this.labelBorder=this.options.keybindingLabelBorder,this.labelBottomBorder=this.options.keybindingLabelBottomBorder,this.labelShadow=this.options.keybindingLabelShadow,this.domNode=y.append(h,w(".monaco-keybinding")),this.didEverRender=!1,h.appendChild(this.domNode)}get element(){return this.domNode}set(h,g){this.didEverRender&&this.keybinding===h&&b.areSame(this.matches,g)||(this.keybinding=h,this.matches=g,this.render())}render(){if(this.clear(),this.keybinding){let[h,g]=this.keybinding.getParts();h&&this.renderPart(this.domNode,h,this.matches?this.matches.firstPart:null),g&&(y.append(this.domNode,w("span.monaco-keybinding-key-chord-separator",void 0," ")),this.renderPart(this.domNode,g,this.matches?this.matches.chordPart:null)),this.domNode.title=this.keybinding.getAriaLabel()||""}else this.options&&this.options.renderUnboundKeybindings&&this.renderUnbound(this.domNode);this.applyStyles(),this.didEverRender=!0}clear(){y.clearNode(this.domNode),this.keyElements.clear()}renderPart(h,g,t){const i=m.UILabelProvider.modifierLabels[this.os];g.ctrlKey&&this.renderKey(h,i.ctrlKey,Boolean(t==null?void 0:t.ctrlKey),i.separator),g.shiftKey&&this.renderKey(h,i.shiftKey,Boolean(t==null?void 0:t.shiftKey),i.separator),g.altKey&&this.renderKey(h,i.altKey,Boolean(t==null?void 0:t.altKey),i.separator),g.metaKey&&this.renderKey(h,i.metaKey,Boolean(t==null?void 0:t.metaKey),i.separator);const n=g.keyLabel;n&&this.renderKey(h,n,Boolean(t==null?void 0:t.keyCode),"")}renderKey(h,g,t,i){y.append(h,this.createKeyElement(g,t?".highlight":"")),i&&y.append(h,w("span.monaco-keybinding-key-separator",void 0,i))}renderUnbound(h){y.append(h,this.createKeyElement((0,I.localize)(0,null)))}createKeyElement(h,g=""){const t=w("span.monaco-keybinding-key"+g,void 0,h);return this.keyElements.add(t),t}style(h){this.labelBackground=h.keybindingLabelBackground,this.labelForeground=h.keybindingLabelForeground,this.labelBorder=h.keybindingLabelBorder,this.labelBottomBorder=h.keybindingLabelBottomBorder,this.labelShadow=h.keybindingLabelShadow,this.applyStyles()}applyStyles(){var h;if(this.element){for(const g of this.keyElements)this.labelBackground&&(g.style.backgroundColor=(h=this.labelBackground)===null||h===void 0?void 0:h.toString()),this.labelBorder&&(g.style.borderColor=this.labelBorder.toString()),this.labelBottomBorder&&(g.style.borderBottomColor=this.labelBottomBorder.toString()),this.labelShadow&&(g.style.boxShadow=`inset 0 -1px 0 ${this.labelShadow}`);this.labelForeground&&(this.element.style.color=this.labelForeground.toString())}}static areSame(h,g){return h===g||!h&&!g?!0:!!h&&!!g&&(0,D.equals)(h.firstPart,g.firstPart)&&(0,D.equals)(h.chordPart,g.chordPart)}}e.KeybindingLabel=b}),define(te[493],ie([5,6]),function(j,e){return j.create("vs/base/parts/quickinput/browser/quickInput",e)}),define(te[494],ie([5,6]),function(j,e){return j.create("vs/base/parts/quickinput/browser/quickInputList",e)}),define(te[495],ie([1,0,7,46,84,190,492,44,19,27,317,93,4,95,2,17,20,229,494,142]),function(j,e,y,m,D,I,w,b,p,h,g,t,i,n,l,c,r,s,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.QuickInputList=e.QuickInputListFocus=void 0;const a=y.$;class d{constructor(E){this.hidden=!1,this._onChecked=new i.Emitter,this.onChecked=this._onChecked.event,Object.assign(this,E)}get checked(){return!!this._checked}set checked(E){E!==this._checked&&(this._checked=E,this._onChecked.fire(E))}dispose(){this._onChecked.dispose()}}class u{get templateId(){return u.ID}renderTemplate(E){const N=Object.create(null);N.toDisposeElement=[],N.toDisposeTemplate=[],N.entry=y.append(E,a(".quick-input-list-entry"));const k=y.append(N.entry,a("label.quick-input-list-label"));N.toDisposeTemplate.push(y.addStandardDisposableListener(k,y.EventType.CLICK,P=>{N.checkbox.offsetParent||P.preventDefault()})),N.checkbox=y.append(k,a("input.quick-input-list-checkbox")),N.checkbox.type="checkbox",N.toDisposeTemplate.push(y.addStandardDisposableListener(N.checkbox,y.EventType.CHANGE,P=>{N.element.checked=N.checkbox.checked}));const M=y.append(k,a(".quick-input-list-rows")),O=y.append(M,a(".quick-input-list-row")),B=y.append(M,a(".quick-input-list-row"));N.label=new I.IconLabel(O,{supportHighlights:!0,supportDescriptionHighlights:!0,supportIcons:!0});const T=y.append(O,a(".quick-input-list-entry-keybinding"));N.keybinding=new w.KeybindingLabel(T,c.OS);const R=y.append(B,a(".quick-input-list-label-meta"));return N.detail=new I.IconLabel(R,{supportHighlights:!0,supportIcons:!0}),N.separator=y.append(N.entry,a(".quick-input-list-separator")),N.actionBar=new D.ActionBar(N.entry),N.actionBar.domNode.classList.add("quick-input-list-entry-action-bar"),N.toDisposeTemplate.push(N.actionBar),N}renderElement(E,N,k){k.toDisposeElement=(0,l.dispose)(k.toDisposeElement),k.element=E,k.checkbox.checked=E.checked,k.toDisposeElement.push(E.onChecked(P=>k.checkbox.checked=P));const{labelHighlights:M,descriptionHighlights:O,detailHighlights:B}=E,T=Object.create(null);T.matches=M||[],T.descriptionTitle=E.saneDescription,T.descriptionMatches=O||[],T.extraClasses=E.item.iconClasses,T.italic=E.item.italic,T.strikethrough=E.item.strikethrough,k.label.setLabel(E.saneLabel,E.saneDescription,T),k.keybinding.set(E.item.keybinding),E.saneDetail&&k.detail.setLabel(E.saneDetail,void 0,{matches:B,title:E.saneDetail}),E.separator&&E.separator.label?(k.separator.textContent=E.separator.label,k.separator.style.display=""):k.separator.style.display="none",k.entry.classList.toggle("quick-input-list-separator-border",!!E.separator),k.actionBar.clear();const R=E.item.buttons;R&&R.length?(k.actionBar.push(R.map((P,F)=>{let W=P.iconClass||(P.iconPath?(0,s.getIconClass)(P.iconPath):void 0);P.alwaysVisible&&(W=W?`${W} always-visible`:"always-visible");const A=new b.Action(`id-${F}`,"",W,!0,()=>ye(this,void 0,void 0,function*(){E.fireButtonTriggered({button:P,item:E.item})}));return A.tooltip=P.tooltip||"",A}),{icon:!0,label:!1}),k.entry.classList.add("has-actions")):k.entry.classList.remove("has-actions")}disposeElement(E,N,k){k.toDisposeElement=(0,l.dispose)(k.toDisposeElement)}disposeTemplate(E){E.toDisposeElement=(0,l.dispose)(E.toDisposeElement),E.toDisposeTemplate=(0,l.dispose)(E.toDisposeTemplate)}}u.ID="listelement";class f{getHeight(E){return E.saneDetail?44:22}getTemplateId(E){return u.ID}}var S;(function(L){L[L.First=1]="First",L[L.Second=2]="Second",L[L.Last=3]="Last",L[L.Next=4]="Next",L[L.Previous=5]="Previous",L[L.NextPage=6]="NextPage",L[L.PreviousPage=7]="PreviousPage"})(S=e.QuickInputListFocus||(e.QuickInputListFocus={}));class v{constructor(E,N,k){this.parent=E,this.inputElements=[],this.elements=[],this.elementsToIndexes=new Map,this.matchOnDescription=!1,this.matchOnDetail=!1,this.matchOnLabel=!0,this.matchOnMeta=!0,this.sortByLabel=!0,this._onChangedAllVisibleChecked=new i.Emitter,this.onChangedAllVisibleChecked=this._onChangedAllVisibleChecked.event,this._onChangedCheckedCount=new i.Emitter,this.onChangedCheckedCount=this._onChangedCheckedCount.event,this._onChangedVisibleCount=new i.Emitter,this.onChangedVisibleCount=this._onChangedVisibleCount.event,this._onChangedCheckedElements=new i.Emitter,this.onChangedCheckedElements=this._onChangedCheckedElements.event,this._onButtonTriggered=new i.Emitter,this.onButtonTriggered=this._onButtonTriggered.event,this._onKeyDown=new i.Emitter,this.onKeyDown=this._onKeyDown.event,this._onLeave=new i.Emitter,this.onLeave=this._onLeave.event,this._fireCheckedEvents=!0,this.elementDisposables=[],this.disposables=[],this.id=N,this.container=y.append(this.parent,a(".quick-input-list"));const M=new f,O=new _;this.list=k.createList("QuickInput",this.container,M,[new u],{identityProvider:{getId:B=>B.saneLabel},setRowLineHeight:!1,multipleSelectionSupport:!1,horizontalScrolling:!1,accessibilityProvider:O}),this.list.getHTMLElement().id=N,this.disposables.push(this.list),this.disposables.push(this.list.onKeyDown(B=>{const T=new m.StandardKeyboardEvent(B);switch(T.keyCode){case 10:this.toggleCheckbox();break;case 31:(c.isMacintosh?B.metaKey:B.ctrlKey)&&this.list.setFocus((0,p.range)(this.list.length));break;case 16:{const R=this.list.getFocus();R.length===1&&R[0]===0&&this._onLeave.fire();break}case 18:{const R=this.list.getFocus();R.length===1&&R[0]===this.list.length-1&&this._onLeave.fire();break}}this._onKeyDown.fire(T)})),this.disposables.push(this.list.onMouseDown(B=>{B.browserEvent.button!==2&&B.browserEvent.preventDefault()})),this.disposables.push(y.addDisposableListener(this.container,y.EventType.CLICK,B=>{(B.x||B.y)&&this._onLeave.fire()})),this.disposables.push(this.list.onMouseMiddleClick(B=>{this._onLeave.fire()})),this.disposables.push(this.list.onContextMenu(B=>{typeof B.index=="number"&&(B.browserEvent.preventDefault(),this.list.setSelection([B.index]))})),this.disposables.push(this._onChangedAllVisibleChecked,this._onChangedCheckedCount,this._onChangedVisibleCount,this._onChangedCheckedElements,this._onButtonTriggered,this._onLeave,this._onKeyDown)}get onDidChangeFocus(){return i.Event.map(this.list.onDidChangeFocus,E=>E.elements.map(N=>N.item))}get onDidChangeSelection(){return i.Event.map(this.list.onDidChangeSelection,E=>({items:E.elements.map(N=>N.item),event:E.browserEvent}))}get scrollTop(){return this.list.scrollTop}set scrollTop(E){this.list.scrollTop=E}getAllVisibleChecked(){return this.allVisibleChecked(this.elements,!1)}allVisibleChecked(E,N=!0){for(let k=0,M=E.length;k<M;k++){const O=E[k];if(!O.hidden)if(O.checked)N=!0;else return!1}return N}getCheckedCount(){let E=0;const N=this.elements;for(let k=0,M=N.length;k<M;k++)N[k].checked&&E++;return E}getVisibleCount(){let E=0;const N=this.elements;for(let k=0,M=N.length;k<M;k++)N[k].hidden||E++;return E}setAllVisibleChecked(E){try{this._fireCheckedEvents=!1,this.elements.forEach(N=>{N.hidden||(N.checked=E)})}finally{this._fireCheckedEvents=!0,this.fireCheckedEvents()}}setElements(E){this.elementDisposables=(0,l.dispose)(this.elementDisposables);const N=k=>this.fireButtonTriggered(k);this.inputElements=E,this.elements=E.reduce((k,M,O)=>{var B,T,R;if(M.type!=="separator"){const P=O&&E[O-1],F=M.label&&M.label.replace(/\r?\n/g," "),W=M.meta&&M.meta.replace(/\r?\n/g," "),A=M.description&&M.description.replace(/\r?\n/g," "),H=M.detail&&M.detail.replace(/\r?\n/g," "),q=M.ariaLabel||[F,A,H].map(X=>(0,h.getCodiconAriaLabel)(X)).filter(X=>!!X).join(", ");k.push(new d({index:O,item:M,saneLabel:F,saneMeta:W,saneAriaLabel:q,saneDescription:A,saneDetail:H,labelHighlights:(B=M.highlights)===null||B===void 0?void 0:B.label,descriptionHighlights:(T=M.highlights)===null||T===void 0?void 0:T.description,detailHighlights:(R=M.highlights)===null||R===void 0?void 0:R.detail,checked:!1,separator:P&&P.type==="separator"?P:void 0,fireButtonTriggered:N}))}return k},[]),this.elementDisposables.push(...this.elements),this.elementDisposables.push(...this.elements.map(k=>k.onChecked(()=>this.fireCheckedEvents()))),this.elementsToIndexes=this.elements.reduce((k,M,O)=>(k.set(M.item,O),k),new Map),this.list.splice(0,this.list.length),this.list.splice(0,this.list.length,this.elements),this._onChangedVisibleCount.fire(this.elements.length)}getFocusedElements(){return this.list.getFocusedElements().map(E=>E.item)}setFocusedElements(E){if(this.list.setFocus(E.filter(N=>this.elementsToIndexes.has(N)).map(N=>this.elementsToIndexes.get(N))),E.length>0){const N=this.list.getFocus()[0];typeof N=="number"&&this.list.reveal(N)}}getActiveDescendant(){return this.list.getHTMLElement().getAttribute("aria-activedescendant")}setSelectedElements(E){this.list.setSelection(E.filter(N=>this.elementsToIndexes.has(N)).map(N=>this.elementsToIndexes.get(N)))}getCheckedElements(){return this.elements.filter(E=>E.checked).map(E=>E.item)}setCheckedElements(E){try{this._fireCheckedEvents=!1;const N=new Set;for(const k of E)N.add(k);for(const k of this.elements)k.checked=N.has(k.item)}finally{this._fireCheckedEvents=!0,this.fireCheckedEvents()}}set enabled(E){this.list.getHTMLElement().style.pointerEvents=E?"":"none"}focus(E){if(!this.list.length)return;switch(E===S.Next&&this.list.getFocus()[0]===this.list.length-1&&(E=S.First),E===S.Previous&&this.list.getFocus()[0]===0&&(E=S.Last),E===S.Second&&this.list.length<2&&(E=S.First),E){case S.First:this.list.focusFirst();break;case S.Second:this.list.focusNth(1);break;case S.Last:this.list.focusLast();break;case S.Next:this.list.focusNext();break;case S.Previous:this.list.focusPrevious();break;case S.NextPage:this.list.focusNextPage();break;case S.PreviousPage:this.list.focusPreviousPage();break}const N=this.list.getFocus()[0];typeof N=="number"&&this.list.reveal(N)}clearFocus(){this.list.setFocus([])}domFocus(){this.list.domFocus()}layout(E){this.list.getHTMLElement().style.maxHeight=E?`calc(${Math.floor(E/44)*44}px)`:"",this.list.layout()}filter(E){if(!(this.sortByLabel||this.matchOnLabel||this.matchOnDescription||this.matchOnDetail))return this.list.layout(),!1;if(E=E.trim(),!E||!(this.matchOnLabel||this.matchOnDescription||this.matchOnDetail))this.elements.forEach(k=>{k.labelHighlights=void 0,k.descriptionHighlights=void 0,k.detailHighlights=void 0,k.hidden=!1;const M=k.index&&this.inputElements[k.index-1];k.separator=M&&M.type==="separator"?M:void 0});else{let k;this.elements.forEach(M=>{const O=this.matchOnLabel?(0,r.withNullAsUndefined)((0,n.matchesFuzzyIconAware)(E,(0,n.parseLabelWithIcons)(M.saneLabel))):void 0,B=this.matchOnDescription?(0,r.withNullAsUndefined)((0,n.matchesFuzzyIconAware)(E,(0,n.parseLabelWithIcons)(M.saneDescription||""))):void 0,T=this.matchOnDetail?(0,r.withNullAsUndefined)((0,n.matchesFuzzyIconAware)(E,(0,n.parseLabelWithIcons)(M.saneDetail||""))):void 0,R=this.matchOnMeta?(0,r.withNullAsUndefined)((0,n.matchesFuzzyIconAware)(E,(0,n.parseLabelWithIcons)(M.saneMeta||""))):void 0;if(O||B||T||R?(M.labelHighlights=O,M.descriptionHighlights=B,M.detailHighlights=T,M.hidden=!1):(M.labelHighlights=void 0,M.descriptionHighlights=void 0,M.detailHighlights=void 0,M.hidden=!M.item.alwaysShow),M.separator=void 0,!this.sortByLabel){const P=M.index&&this.inputElements[M.index-1];k=P&&P.type==="separator"?P:k,k&&!M.hidden&&(M.separator=k,k=void 0)}})}const N=this.elements.filter(k=>!k.hidden);if(this.sortByLabel&&E){const k=E.toLowerCase();N.sort((M,O)=>C(M,O,k))}return this.elementsToIndexes=N.reduce((k,M,O)=>(k.set(M.item,O),k),new Map),this.list.splice(0,this.list.length,N),this.list.setFocus([]),this.list.layout(),this._onChangedAllVisibleChecked.fire(this.getAllVisibleChecked()),this._onChangedVisibleCount.fire(N.length),!0}toggleCheckbox(){try{this._fireCheckedEvents=!1;const E=this.list.getFocusedElements(),N=this.allVisibleChecked(E);for(const k of E)k.checked=!N}finally{this._fireCheckedEvents=!0,this.fireCheckedEvents()}}display(E){this.container.style.display=E?"":"none"}isDisplayed(){return this.container.style.display!=="none"}dispose(){this.elementDisposables=(0,l.dispose)(this.elementDisposables),this.disposables=(0,l.dispose)(this.disposables)}fireCheckedEvents(){this._fireCheckedEvents&&(this._onChangedAllVisibleChecked.fire(this.getAllVisibleChecked()),this._onChangedCheckedCount.fire(this.getCheckedCount()),this._onChangedCheckedElements.fire(this.getCheckedElements()))}fireButtonTriggered(E){this._onButtonTriggered.fire(E)}style(E){this.list.style(E)}}Ie([t.memoize],v.prototype,"onDidChangeFocus",null),Ie([t.memoize],v.prototype,"onDidChangeSelection",null),e.QuickInputList=v;function C(L,E,N){const k=L.labelHighlights||[],M=E.labelHighlights||[];return k.length&&!M.length?-1:!k.length&&M.length?1:k.length===0&&M.length===0?0:(0,g.compareAnything)(L.saneLabel,E.saneLabel,N)}class _{getWidgetAriaLabel(){return(0,o.localize)(0,null)}getAriaLabel(E){return E.saneAriaLabel}getWidgetRole(){return"listbox"}getRole(){return"option"}}}),define(te[496],ie([1,0,7,46,84,330,223,113,342,44,19,10,21,27,4,2,17,74,20,229,220,493,488,495,142]),function(j,e,y,m,D,I,w,b,p,h,g,t,i,n,l,c,r,s,o,a,d,u,f,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.QuickInputController=void 0;const v=y.$,C={iconClass:n.Codicon.quickInputBack.classNames,tooltip:(0,u.localize)(0,null),handle:-1};class _ extends c.Disposable{constructor(k){super();this.ui=k,this.visible=!1,this._enabled=!0,this._busy=!1,this._ignoreFocusOut=!1,this._buttons=[],this.noValidationMessage=_.noPromptMessage,this._severity=s.default.Ignore,this.buttonsUpdated=!1,this.onDidTriggerButtonEmitter=this._register(new l.Emitter),this.onDidHideEmitter=this._register(new l.Emitter),this.onDisposeEmitter=this._register(new l.Emitter),this.visibleDisposables=this._register(new c.DisposableStore),this.onDidHide=this.onDidHideEmitter.event}get title(){return this._title}set title(k){this._title=k,this.update()}get description(){return this._description}set description(k){this._description=k,this.update()}get step(){return this._steps}set step(k){this._steps=k,this.update()}get totalSteps(){return this._totalSteps}set totalSteps(k){this._totalSteps=k,this.update()}get enabled(){return this._enabled}set enabled(k){this._enabled=k,this.update()}get contextKey(){return this._contextKey}set contextKey(k){this._contextKey=k,this.update()}get busy(){return this._busy}set busy(k){this._busy=k,this.update()}get ignoreFocusOut(){return this._ignoreFocusOut}set ignoreFocusOut(k){const M=this._ignoreFocusOut!==k&&!r.isIOS;this._ignoreFocusOut=k&&!r.isIOS,M&&this.update()}get buttons(){return this._buttons}set buttons(k){this._buttons=k,this.buttonsUpdated=!0,this.update()}get validationMessage(){return this._validationMessage}set validationMessage(k){this._validationMessage=k,this.update()}get severity(){return this._severity}set severity(k){this._severity=k,this.update()}show(){this.visible||(this.visibleDisposables.add(this.ui.onDidTriggerButton(k=>{this.buttons.indexOf(k)!==-1&&this.onDidTriggerButtonEmitter.fire(k)})),this.ui.show(this),this.visible=!0,this._lastValidationMessage=void 0,this._lastSeverity=void 0,this.buttons.length&&(this.buttonsUpdated=!0),this.update())}hide(){!this.visible||this.ui.hide()}didHide(k=d.QuickInputHideReason.Other){this.visible=!1,this.visibleDisposables.clear(),this.onDidHideEmitter.fire({reason:k})}update(){if(!this.visible)return;const k=this.getTitle();k&&this.ui.title.textContent!==k?this.ui.title.textContent=k:!k&&this.ui.title.innerHTML!==" "&&(this.ui.title.innerText="\xA0");const M=this.getDescription();if(this.ui.description1.textContent!==M&&(this.ui.description1.textContent=M),this.ui.description2.textContent!==M&&(this.ui.description2.textContent=M),this.busy&&!this.busyDelay&&(this.busyDelay=new t.TimeoutTimer,this.busyDelay.setIfNotSet(()=>{this.visible&&this.ui.progressBar.infinite()},800)),!this.busy&&this.busyDelay&&(this.ui.progressBar.stop(),this.busyDelay.cancel(),this.busyDelay=void 0),this.buttonsUpdated){this.buttonsUpdated=!1,this.ui.leftActionBar.clear();const B=this.buttons.filter(R=>R===C);this.ui.leftActionBar.push(B.map((R,P)=>{const F=new h.Action(`id-${P}`,"",R.iconClass||(0,a.getIconClass)(R.iconPath),!0,()=>ye(this,void 0,void 0,function*(){this.onDidTriggerButtonEmitter.fire(R)}));return F.tooltip=R.tooltip||"",F}),{icon:!0,label:!1}),this.ui.rightActionBar.clear();const T=this.buttons.filter(R=>R!==C);this.ui.rightActionBar.push(T.map((R,P)=>{const F=new h.Action(`id-${P}`,"",R.iconClass||(0,a.getIconClass)(R.iconPath),!0,()=>ye(this,void 0,void 0,function*(){this.onDidTriggerButtonEmitter.fire(R)}));return F.tooltip=R.tooltip||"",F}),{icon:!0,label:!1})}this.ui.ignoreFocusOut=this.ignoreFocusOut,this.ui.setEnabled(this.enabled),this.ui.setContextKey(this.contextKey);const O=this.validationMessage||this.noValidationMessage;this._lastValidationMessage!==O&&(this._lastValidationMessage=O,y.reset(this.ui.message,...(0,b.renderLabelWithIcons)(O))),this._lastSeverity!==this.severity&&(this._lastSeverity=this.severity,this.showMessageDecoration(this.severity))}getTitle(){return this.title&&this.step?`${this.title} (${this.getSteps()})`:this.title?this.title:this.step?this.getSteps():""}getDescription(){return this.description||""}getSteps(){return this.step&&this.totalSteps?(0,u.localize)(2,null,this.step,this.totalSteps):this.step?String(this.step):""}showMessageDecoration(k){if(this.ui.inputBox.showDecoration(k),k!==s.default.Ignore){const M=this.ui.inputBox.stylesForType(k);this.ui.message.style.color=M.foreground?`${M.foreground}`:"",this.ui.message.style.backgroundColor=M.background?`${M.background}`:"",this.ui.message.style.border=M.border?`1px solid ${M.border}`:"",this.ui.message.style.marginBottom="-2px"}else this.ui.message.style.color="",this.ui.message.style.backgroundColor="",this.ui.message.style.border="",this.ui.message.style.marginBottom=""}dispose(){this.hide(),this.onDisposeEmitter.fire(),super.dispose()}}_.noPromptMessage=(0,u.localize)(1,null);class L extends _{constructor(){super(...arguments);this._value="",this.onDidChangeValueEmitter=this._register(new l.Emitter),this.onWillAcceptEmitter=this._register(new l.Emitter),this.onDidAcceptEmitter=this._register(new l.Emitter),this.onDidCustomEmitter=this._register(new l.Emitter),this._items=[],this.itemsUpdated=!1,this._canSelectMany=!1,this._canAcceptInBackground=!1,this._matchOnDescription=!1,this._matchOnDetail=!1,this._matchOnLabel=!0,this._sortByLabel=!0,this._autoFocusOnList=!0,this._keepScrollPosition=!1,this._itemActivation=this.ui.isScreenReaderOptimized()?d.ItemActivation.NONE:d.ItemActivation.FIRST,this._activeItems=[],this.activeItemsUpdated=!1,this.activeItemsToConfirm=[],this.onDidChangeActiveEmitter=this._register(new l.Emitter),this._selectedItems=[],this.selectedItemsUpdated=!1,this.selectedItemsToConfirm=[],this.onDidChangeSelectionEmitter=this._register(new l.Emitter),this.onDidTriggerItemButtonEmitter=this._register(new l.Emitter),this.valueSelectionUpdated=!0,this._ok="default",this._customButton=!1,this.filterValue=k=>k,this.onDidChangeValue=this.onDidChangeValueEmitter.event,this.onWillAccept=this.onWillAcceptEmitter.event,this.onDidAccept=this.onDidAcceptEmitter.event,this.onDidChangeActive=this.onDidChangeActiveEmitter.event,this.onDidChangeSelection=this.onDidChangeSelectionEmitter.event,this.onDidTriggerItemButton=this.onDidTriggerItemButtonEmitter.event}get quickNavigate(){return this._quickNavigate}set quickNavigate(k){this._quickNavigate=k,this.update()}get value(){return this._value}set value(k){this.doSetValue(k)}doSetValue(k,M){this._value!==k&&(this._value=k,M||this.update(),this.visible&&this.ui.list.filter(this.filterValue(this._value))&&this.trySelectFirst(),this.onDidChangeValueEmitter.fire(this._value))}set ariaLabel(k){this._ariaLabel=k,this.update()}get ariaLabel(){return this._ariaLabel}get placeholder(){return this._placeholder}set placeholder(k){this._placeholder=k,this.update()}get items(){return this._items}get scrollTop(){return this.ui.list.scrollTop}set scrollTop(k){this.ui.list.scrollTop=k}set items(k){this._items=k,this.itemsUpdated=!0,this.update()}get canSelectMany(){return this._canSelectMany}set canSelectMany(k){this._canSelectMany=k,this.update()}get canAcceptInBackground(){return this._canAcceptInBackground}set canAcceptInBackground(k){this._canAcceptInBackground=k}get matchOnDescription(){return this._matchOnDescription}set matchOnDescription(k){this._matchOnDescription=k,this.update()}get matchOnDetail(){return this._matchOnDetail}set matchOnDetail(k){this._matchOnDetail=k,this.update()}get matchOnLabel(){return this._matchOnLabel}set matchOnLabel(k){this._matchOnLabel=k,this.update()}get sortByLabel(){return this._sortByLabel}set sortByLabel(k){this._sortByLabel=k,this.update()}get autoFocusOnList(){return this._autoFocusOnList}set autoFocusOnList(k){this._autoFocusOnList=k,this.update()}get keepScrollPosition(){return this._keepScrollPosition}set keepScrollPosition(k){this._keepScrollPosition=k}get itemActivation(){return this._itemActivation}set itemActivation(k){this._itemActivation=k}get activeItems(){return this._activeItems}set activeItems(k){this._activeItems=k,this.activeItemsUpdated=!0,this.update()}get selectedItems(){return this._selectedItems}set selectedItems(k){this._selectedItems=k,this.selectedItemsUpdated=!0,this.update()}get keyMods(){return this._quickNavigate?d.NO_KEY_MODS:this.ui.keyMods}set valueSelection(k){this._valueSelection=k,this.valueSelectionUpdated=!0,this.update()}get customButton(){return this._customButton}set customButton(k){this._customButton=k,this.update()}get customLabel(){return this._customButtonLabel}set customLabel(k){this._customButtonLabel=k,this.update()}get customHover(){return this._customButtonHover}set customHover(k){this._customButtonHover=k,this.update()}get ok(){return this._ok}set ok(k){this._ok=k,this.update()}get hideInput(){return!!this._hideInput}set hideInput(k){this._hideInput=k,this.update()}trySelectFirst(){this.autoFocusOnList&&(this.canSelectMany||this.ui.list.focus(S.QuickInputListFocus.First))}show(){this.visible||(this.visibleDisposables.add(this.ui.inputBox.onDidChange(k=>{this.doSetValue(k,!0)})),this.visibleDisposables.add(this.ui.inputBox.onMouseDown(k=>{this.autoFocusOnList||this.ui.list.clearFocus()})),this.visibleDisposables.add((this._hideInput?this.ui.list:this.ui.inputBox).onKeyDown(k=>{switch(k.keyCode){case 18:this.ui.list.focus(S.QuickInputListFocus.Next),this.canSelectMany&&this.ui.list.domFocus(),y.EventHelper.stop(k,!0);break;case 16:this.ui.list.getFocusedElements().length?this.ui.list.focus(S.QuickInputListFocus.Previous):this.ui.list.focus(S.QuickInputListFocus.Last),this.canSelectMany&&this.ui.list.domFocus(),y.EventHelper.stop(k,!0);break;case 12:this.ui.list.focus(S.QuickInputListFocus.NextPage),this.canSelectMany&&this.ui.list.domFocus(),y.EventHelper.stop(k,!0);break;case 11:this.ui.list.focus(S.QuickInputListFocus.PreviousPage),this.canSelectMany&&this.ui.list.domFocus(),y.EventHelper.stop(k,!0);break;case 17:if(!this._canAcceptInBackground||!this.ui.inputBox.isSelectionAtEnd())return;this.activeItems[0]&&(this._selectedItems=[this.activeItems[0]],this.onDidChangeSelectionEmitter.fire(this.selectedItems),this.handleAccept(!0));break;case 14:(k.ctrlKey||k.metaKey)&&!k.shiftKey&&!k.altKey&&(this.ui.list.focus(S.QuickInputListFocus.First),y.EventHelper.stop(k,!0));break;case 13:(k.ctrlKey||k.metaKey)&&!k.shiftKey&&!k.altKey&&(this.ui.list.focus(S.QuickInputListFocus.Last),y.EventHelper.stop(k,!0));break}})),this.visibleDisposables.add(this.ui.onDidAccept(()=>{this.canSelectMany?this.ui.list.getCheckedElements().length||(this._selectedItems=[],this.onDidChangeSelectionEmitter.fire(this.selectedItems)):this.activeItems[0]&&(this._selectedItems=[this.activeItems[0]],this.onDidChangeSelectionEmitter.fire(this.selectedItems)),this.handleAccept(!1)})),this.visibleDisposables.add(this.ui.onDidCustom(()=>{this.onDidCustomEmitter.fire()})),this.visibleDisposables.add(this.ui.list.onDidChangeFocus(k=>{this.activeItemsUpdated||this.activeItemsToConfirm!==this._activeItems&&(0,g.equals)(k,this._activeItems,(M,O)=>M===O)||(this._activeItems=k,this.onDidChangeActiveEmitter.fire(k))})),this.visibleDisposables.add(this.ui.list.onDidChangeSelection(({items:k,event:M})=>{if(this.canSelectMany){k.length&&this.ui.list.setSelectedElements([]);return}this.selectedItemsToConfirm!==this._selectedItems&&(0,g.equals)(k,this._selectedItems,(O,B)=>O===B)||(this._selectedItems=k,this.onDidChangeSelectionEmitter.fire(k),k.length&&this.handleAccept(M instanceof MouseEvent&&M.button===1))})),this.visibleDisposables.add(this.ui.list.onChangedCheckedElements(k=>{!this.canSelectMany||this.selectedItemsToConfirm!==this._selectedItems&&(0,g.equals)(k,this._selectedItems,(M,O)=>M===O)||(this._selectedItems=k,this.onDidChangeSelectionEmitter.fire(k))})),this.visibleDisposables.add(this.ui.list.onButtonTriggered(k=>this.onDidTriggerItemButtonEmitter.fire(k))),this.visibleDisposables.add(this.registerQuickNavigation()),this.valueSelectionUpdated=!0),super.show()}handleAccept(k){let M=!1;this.onWillAcceptEmitter.fire({veto:()=>M=!0}),M||this.onDidAcceptEmitter.fire({inBackground:k})}registerQuickNavigation(){return y.addDisposableListener(this.ui.container,y.EventType.KEY_UP,k=>{if(this.canSelectMany||!this._quickNavigate)return;const M=new m.StandardKeyboardEvent(k),O=M.keyCode;this._quickNavigate.keybindings.some(R=>{const[P,F]=R.getParts();return F?!1:P.shiftKey&&O===4?!(M.ctrlKey||M.altKey||M.metaKey):!!(P.altKey&&O===6||P.ctrlKey&&O===5||P.metaKey&&O===57)})&&(this.activeItems[0]&&(this._selectedItems=[this.activeItems[0]],this.onDidChangeSelectionEmitter.fire(this.selectedItems),this.handleAccept(!1)),this._quickNavigate=void 0)})}update(){if(!this.visible)return;const k=this.keepScrollPosition?this.scrollTop:0,M=!!this._hideInput&&this._items.length>0;this.ui.container.classList.toggle("hidden-input",M&&!this.description);const O={title:!!this.title||!!this.step||!!this.buttons.length,description:!!this.description,checkAll:this.canSelectMany&&!this._hideCheckAll,checkBox:this.canSelectMany,inputBox:!M,progressBar:!M,visibleCount:!0,count:this.canSelectMany,ok:this.ok==="default"?this.canSelectMany:this.ok,list:!0,message:!!this.validationMessage,customButton:this.customButton};this.ui.setVisibilities(O),super.update(),this.ui.inputBox.value!==this.value&&(this.ui.inputBox.value=this.value),this.valueSelectionUpdated&&(this.valueSelectionUpdated=!1,this.ui.inputBox.select(this._valueSelection&&{start:this._valueSelection[0],end:this._valueSelection[1]})),this.ui.inputBox.placeholder!==(this.placeholder||"")&&(this.ui.inputBox.placeholder=this.placeholder||"");const B=this.ariaLabel||this.placeholder||L.DEFAULT_ARIA_LABEL;if(this.ui.inputBox.ariaLabel!==B&&(this.ui.inputBox.ariaLabel=B),this.ui.list.matchOnDescription=this.matchOnDescription,this.ui.list.matchOnDetail=this.matchOnDetail,this.ui.list.matchOnLabel=this.matchOnLabel,this.ui.list.sortByLabel=this.sortByLabel,this.itemsUpdated)switch(this.itemsUpdated=!1,this.ui.list.setElements(this.items),this.ui.list.filter(this.filterValue(this.ui.inputBox.value)),this.ui.checkAll.checked=this.ui.list.getAllVisibleChecked(),this.ui.visibleCount.setCount(this.ui.list.getVisibleCount()),this.ui.count.setCount(this.ui.list.getCheckedCount()),this._itemActivation){case d.ItemActivation.NONE:this._itemActivation=d.ItemActivation.FIRST;break;case d.ItemActivation.SECOND:this.ui.list.focus(S.QuickInputListFocus.Second),this._itemActivation=d.ItemActivation.FIRST;break;case d.ItemActivation.LAST:this.ui.list.focus(S.QuickInputListFocus.Last),this._itemActivation=d.ItemActivation.FIRST;break;default:this.trySelectFirst();break}this.ui.container.classList.contains("show-checkboxes")!==!!this.canSelectMany&&(this.canSelectMany?this.ui.list.clearFocus():this.trySelectFirst()),this.activeItemsUpdated&&(this.activeItemsUpdated=!1,this.activeItemsToConfirm=this._activeItems,this.ui.list.setFocusedElements(this.activeItems),this.activeItemsToConfirm===this._activeItems&&(this.activeItemsToConfirm=null)),this.selectedItemsUpdated&&(this.selectedItemsUpdated=!1,this.selectedItemsToConfirm=this._selectedItems,this.canSelectMany?this.ui.list.setCheckedElements(this.selectedItems):this.ui.list.setSelectedElements(this.selectedItems),this.selectedItemsToConfirm===this._selectedItems&&(this.selectedItemsToConfirm=null)),this.ui.customButton.label=this.customLabel||"",this.ui.customButton.element.title=this.customHover||"",this.ui.setComboboxAccessibility(!0),O.inputBox||(this.ui.list.domFocus(),this.canSelectMany&&this.ui.list.focus(S.QuickInputListFocus.First)),this.keepScrollPosition&&(this.scrollTop=k)}}L.DEFAULT_ARIA_LABEL=(0,u.localize)(3,null);class E extends c.Disposable{constructor(k){super();this.options=k,this.comboboxAccessibility=!1,this.enabled=!0,this.onDidAcceptEmitter=this._register(new l.Emitter),this.onDidCustomEmitter=this._register(new l.Emitter),this.onDidTriggerButtonEmitter=this._register(new l.Emitter),this.keyMods={ctrlCmd:!1,alt:!1},this.controller=null,this.onShowEmitter=this._register(new l.Emitter),this.onShow=this.onShowEmitter.event,this.onHideEmitter=this._register(new l.Emitter),this.onHide=this.onHideEmitter.event,this.idPrefix=k.idPrefix,this.parentElement=k.container,this.styles=k.styles,this.registerKeyModsListeners()}registerKeyModsListeners(){const k=M=>{this.keyMods.ctrlCmd=M.ctrlKey||M.metaKey,this.keyMods.alt=M.altKey};this._register(y.addDisposableListener(window,y.EventType.KEY_DOWN,k,!0)),this._register(y.addDisposableListener(window,y.EventType.KEY_UP,k,!0)),this._register(y.addDisposableListener(window,y.EventType.MOUSE_DOWN,k,!0))}getUI(){if(this.ui)return this.ui;const k=y.append(this.parentElement,v(".quick-input-widget.show-file-icons"));k.tabIndex=-1,k.style.display="none";const M=y.createStyleSheet(k),O=y.append(k,v(".quick-input-titlebar")),B=this._register(new D.ActionBar(O));B.domNode.classList.add("quick-input-left-action-bar");const T=y.append(O,v(".quick-input-title")),R=this._register(new D.ActionBar(O));R.domNode.classList.add("quick-input-right-action-bar");const P=y.append(k,v(".quick-input-description")),F=y.append(k,v(".quick-input-header")),W=y.append(F,v("input.quick-input-check-all"));W.type="checkbox",this._register(y.addStandardDisposableListener(W,y.EventType.CHANGE,z=>{const V=W.checked;ce.setAllVisibleChecked(V)})),this._register(y.addDisposableListener(W,y.EventType.CLICK,z=>{(z.x||z.y)&&X.setFocus()}));const A=y.append(F,v(".quick-input-description")),H=y.append(F,v(".quick-input-and-message")),q=y.append(H,v(".quick-input-filter")),X=this._register(new f.QuickInputBox(q));X.setAttribute("aria-describedby",`${this.idPrefix}message`);const G=y.append(q,v(".quick-input-visible-count"));G.setAttribute("aria-live","polite"),G.setAttribute("aria-atomic","true");const re=new w.CountBadge(G,{countFormat:(0,u.localize)(4,null)}),ae=y.append(q,v(".quick-input-count"));ae.setAttribute("aria-live","polite");const oe=new w.CountBadge(ae,{countFormat:(0,u.localize)(5,null)}),Z=y.append(F,v(".quick-input-action")),x=new I.Button(Z);x.label=(0,u.localize)(6,null),this._register(x.onDidClick(z=>{this.onDidAcceptEmitter.fire()}));const U=y.append(F,v(".quick-input-action")),Q=new I.Button(U);Q.label=(0,u.localize)(7,null),this._register(Q.onDidClick(z=>{this.onDidCustomEmitter.fire()}));const ne=y.append(H,v(`#${this.idPrefix}message.quick-input-message`)),ce=this._register(new S.QuickInputList(k,this.idPrefix+"list",this.options));this._register(ce.onChangedAllVisibleChecked(z=>{W.checked=z})),this._register(ce.onChangedVisibleCount(z=>{re.setCount(z)})),this._register(ce.onChangedCheckedCount(z=>{oe.setCount(z)})),this._register(ce.onLeave(()=>{setTimeout(()=>{X.setFocus(),this.controller instanceof L&&this.controller.canSelectMany&&ce.clearFocus()},0)})),this._register(ce.onDidChangeFocus(()=>{this.comboboxAccessibility&&this.getUI().inputBox.setAttribute("aria-activedescendant",this.getUI().list.getActiveDescendant()||"")}));const ee=new p.ProgressBar(k);ee.getContainer().classList.add("quick-input-progress");const ue=y.trackFocus(k);return this._register(ue),this._register(y.addDisposableListener(k,y.EventType.FOCUS,z=>{this.previousFocusElement=z.relatedTarget instanceof HTMLElement?z.relatedTarget:void 0},!0)),this._register(ue.onDidBlur(()=>{!this.getUI().ignoreFocusOut&&!this.options.ignoreFocusOut()&&this.hide(d.QuickInputHideReason.Blur),this.previousFocusElement=void 0})),this._register(y.addDisposableListener(k,y.EventType.FOCUS,z=>{X.setFocus()})),this._register(y.addDisposableListener(k,y.EventType.KEY_DOWN,z=>{const V=new m.StandardKeyboardEvent(z);switch(V.keyCode){case 3:y.EventHelper.stop(z,!0),this.onDidAcceptEmitter.fire();break;case 9:y.EventHelper.stop(z,!0),this.hide(d.QuickInputHideReason.Gesture);break;case 2:if(!V.altKey&&!V.ctrlKey&&!V.metaKey){const $=[".action-label.codicon"];k.classList.contains("show-checkboxes")?$.push("input"):$.push("input[type=text]"),this.getUI().list.isDisplayed()&&$.push(".monaco-list");const K=k.querySelectorAll($.join(", "));V.shiftKey&&V.target===K[0]?(y.EventHelper.stop(z,!0),K[K.length-1].focus()):!V.shiftKey&&V.target===K[K.length-1]&&(y.EventHelper.stop(z,!0),K[0].focus())}break}})),this.ui={container:k,styleSheet:M,leftActionBar:B,titleBar:O,title:T,description1:P,description2:A,rightActionBar:R,checkAll:W,filterContainer:q,inputBox:X,visibleCountContainer:G,visibleCount:re,countContainer:ae,count:oe,okContainer:Z,ok:x,message:ne,customButtonContainer:U,customButton:Q,list:ce,progressBar:ee,onDidAccept:this.onDidAcceptEmitter.event,onDidCustom:this.onDidCustomEmitter.event,onDidTriggerButton:this.onDidTriggerButtonEmitter.event,ignoreFocusOut:!1,keyMods:this.keyMods,isScreenReaderOptimized:()=>this.options.isScreenReaderOptimized(),show:z=>this.show(z),hide:()=>this.hide(),setVisibilities:z=>this.setVisibilities(z),setComboboxAccessibility:z=>this.setComboboxAccessibility(z),setEnabled:z=>this.setEnabled(z),setContextKey:z=>this.options.setContextKey(z)},this.updateStyles(),this.ui}pick(k,M={},O=i.CancellationToken.None){return new Promise((B,T)=>{let R=A=>{R=B,M.onKeyMods&&M.onKeyMods(P.keyMods),B(A)};if(O.isCancellationRequested){R(void 0);return}const P=this.createQuickPick();let F;const W=[P,P.onDidAccept(()=>{if(P.canSelectMany)R(P.selectedItems.slice()),P.hide();else{const A=P.activeItems[0];A&&(R(A),P.hide())}}),P.onDidChangeActive(A=>{const H=A[0];H&&M.onDidFocus&&M.onDidFocus(H)}),P.onDidChangeSelection(A=>{if(!P.canSelectMany){const H=A[0];H&&(R(H),P.hide())}}),P.onDidTriggerItemButton(A=>M.onDidTriggerItemButton&&M.onDidTriggerItemButton(Object.assign(Object.assign({},A),{removeItem:()=>{const H=P.items.indexOf(A.item);if(H!==-1){const q=P.items.slice(),X=q.splice(H,1),G=P.activeItems.filter(ae=>ae!==X[0]),re=P.keepScrollPosition;P.keepScrollPosition=!0,P.items=q,G&&(P.activeItems=G),P.keepScrollPosition=re}}}))),P.onDidChangeValue(A=>{F&&!A&&(P.activeItems.length!==1||P.activeItems[0]!==F)&&(P.activeItems=[F])}),O.onCancellationRequested(()=>{P.hide()}),P.onDidHide(()=>{(0,c.dispose)(W),R(void 0)})];P.title=M.title,P.canSelectMany=!!M.canPickMany,P.placeholder=M.placeHolder,P.ignoreFocusOut=!!M.ignoreFocusLost,P.matchOnDescription=!!M.matchOnDescription,P.matchOnDetail=!!M.matchOnDetail,P.matchOnLabel=M.matchOnLabel===void 0||M.matchOnLabel,P.autoFocusOnList=M.autoFocusOnList===void 0||M.autoFocusOnList,P.quickNavigate=M.quickNavigate,P.contextKey=M.contextKey,P.busy=!0,Promise.all([k,M.activeItem]).then(([A,H])=>{F=H,P.busy=!1,P.items=A,P.canSelectMany&&(P.selectedItems=A.filter(q=>q.type!=="separator"&&q.picked)),F&&(P.activeItems=[F])}),P.show(),Promise.resolve(k).then(void 0,A=>{T(A),P.hide()})})}createQuickPick(){const k=this.getUI();return new L(k)}show(k){const M=this.getUI();this.onShowEmitter.fire();const O=this.controller;this.controller=k,O&&O.didHide(),this.setEnabled(!0),M.leftActionBar.clear(),M.title.textContent="",M.description1.textContent="",M.description2.textContent="",M.rightActionBar.clear(),M.checkAll.checked=!1,M.inputBox.placeholder="",M.inputBox.password=!1,M.inputBox.showDecoration(s.default.Ignore),M.visibleCount.setCount(0),M.count.setCount(0),y.reset(M.message),M.progressBar.stop(),M.list.setElements([]),M.list.matchOnDescription=!1,M.list.matchOnDetail=!1,M.list.matchOnLabel=!0,M.list.sortByLabel=!0,M.ignoreFocusOut=!1,this.setComboboxAccessibility(!1),M.inputBox.ariaLabel="";const B=this.options.backKeybindingLabel();C.tooltip=B?(0,u.localize)(8,null,B):(0,u.localize)(9,null),M.container.style.display="",this.updateLayout(),M.inputBox.setFocus()}setVisibilities(k){const M=this.getUI();M.title.style.display=k.title?"":"none",M.description1.style.display=k.description&&(k.inputBox||k.checkAll)?"":"none",M.description2.style.display=k.description&&!(k.inputBox||k.checkAll)?"":"none",M.checkAll.style.display=k.checkAll?"":"none",M.filterContainer.style.display=k.inputBox?"":"none",M.visibleCountContainer.style.display=k.visibleCount?"":"none",M.countContainer.style.display=k.count?"":"none",M.okContainer.style.display=k.ok?"":"none",M.customButtonContainer.style.display=k.customButton?"":"none",M.message.style.display=k.message?"":"none",M.progressBar.getContainer().style.display=k.progressBar?"":"none",M.list.display(!!k.list),M.container.classList[k.checkBox?"add":"remove"]("show-checkboxes"),this.updateLayout()}setComboboxAccessibility(k){if(k!==this.comboboxAccessibility){const M=this.getUI();this.comboboxAccessibility=k,this.comboboxAccessibility?(M.inputBox.setAttribute("role","combobox"),M.inputBox.setAttribute("aria-haspopup","true"),M.inputBox.setAttribute("aria-autocomplete","list"),M.inputBox.setAttribute("aria-activedescendant",M.list.getActiveDescendant()||"")):(M.inputBox.removeAttribute("role"),M.inputBox.removeAttribute("aria-haspopup"),M.inputBox.removeAttribute("aria-autocomplete"),M.inputBox.removeAttribute("aria-activedescendant"))}}setEnabled(k){if(k!==this.enabled){this.enabled=k;for(const M of this.getUI().leftActionBar.viewItems)M.getAction().enabled=k;for(const M of this.getUI().rightActionBar.viewItems)M.getAction().enabled=k;this.getUI().checkAll.disabled=!k,this.getUI().ok.enabled=k,this.getUI().list.enabled=k}}hide(k){var M;const O=this.controller;if(O){const B=!((M=this.ui)===null||M===void 0?void 0:M.container.contains(document.activeElement));if(this.controller=null,this.onHideEmitter.fire(),this.getUI().container.style.display="none",!B){let T=this.previousFocusElement;for(;T&&!T.offsetParent;)T=(0,o.withNullAsUndefined)(T.parentElement);(T==null?void 0:T.offsetParent)?(T.focus(),this.previousFocusElement=void 0):this.options.returnFocus()}O.didHide(k)}}layout(k,M){this.dimension=k,this.titleBarOffset=M,this.updateLayout()}updateLayout(){if(this.ui){this.ui.container.style.top=`${this.titleBarOffset}px`;const k=this.ui.container.style,M=Math.min(this.dimension.width*.62,E.MAX_WIDTH);k.width=M+"px",k.marginLeft="-"+M/2+"px",this.ui.inputBox.layout(),this.ui.list.layout(this.dimension&&this.dimension.height*.4)}}applyStyles(k){this.styles=k,this.updateStyles()}updateStyles(){if(this.ui){const{quickInputTitleBackground:k,quickInputBackground:M,quickInputForeground:O,contrastBorder:B,widgetShadow:T}=this.styles.widget;this.ui.titleBar.style.backgroundColor=k?k.toString():"",this.ui.container.style.backgroundColor=M?M.toString():"",this.ui.container.style.color=O?O.toString():"",this.ui.container.style.border=B?`1px solid ${B}`:"",this.ui.container.style.boxShadow=T?`0 0 8px 2px ${T}`:"",this.ui.inputBox.style(this.styles.inputBox),this.ui.count.style(this.styles.countBadge),this.ui.ok.style(this.styles.button),this.ui.customButton.style(this.styles.button),this.ui.progressBar.style(this.styles.progressBar),this.ui.list.style(this.styles.list);const R=[];this.styles.list.pickerGroupBorder&&R.push(`.quick-input-list .quick-input-list-entry { border-top-color: ${this.styles.list.pickerGroupBorder}; }`),this.styles.list.pickerGroupForeground&&R.push(`.quick-input-list .quick-input-list-separator { color: ${this.styles.list.pickerGroupForeground}; }`),(this.styles.keybindingLabel.keybindingLabelBackground||this.styles.keybindingLabel.keybindingLabelBorder||this.styles.keybindingLabel.keybindingLabelBottomBorder||this.styles.keybindingLabel.keybindingLabelShadow||this.styles.keybindingLabel.keybindingLabelForeground)&&(R.push(".quick-input-list .monaco-keybinding > .monaco-keybinding-key {"),this.styles.keybindingLabel.keybindingLabelBackground&&R.push(`background-color: ${this.styles.keybindingLabel.keybindingLabelBackground};`),this.styles.keybindingLabel.keybindingLabelBorder&&R.push(`border-color: ${this.styles.keybindingLabel.keybindingLabelBorder};`),this.styles.keybindingLabel.keybindingLabelBottomBorder&&R.push(`border-bottom-color: ${this.styles.keybindingLabel.keybindingLabelBottomBorder};`),this.styles.keybindingLabel.keybindingLabelShadow&&R.push(`box-shadow: inset 0 -1px 0 ${this.styles.keybindingLabel.keybindingLabelShadow};`),this.styles.keybindingLabel.keybindingLabelForeground&&R.push(`color: ${this.styles.keybindingLabel.keybindingLabelForeground};`),R.push("}"));const P=R.join(`
|
||
`);P!==this.ui.styleSheet.textContent&&(this.ui.styleSheet.textContent=P)}}}e.QuickInputController=E,E.MAX_WIDTH=600}),define(te[497],ie([5,6]),function(j,e){return j.create("vs/editor/browser/controller/coreCommands",e)}),define(te[498],ie([5,6]),function(j,e){return j.create("vs/editor/browser/controller/textAreaHandler",e)}),define(te[499],ie([5,6]),function(j,e){return j.create("vs/editor/browser/editorExtensions",e)}),define(te[500],ie([5,6]),function(j,e){return j.create("vs/editor/browser/widget/codeEditorWidget",e)}),define(te[501],ie([5,6]),function(j,e){return j.create("vs/editor/browser/widget/diffEditorWidget",e)}),define(te[502],ie([5,6]),function(j,e){return j.create("vs/editor/browser/widget/diffReview",e)}),define(te[503],ie([5,6]),function(j,e){return j.create("vs/editor/browser/widget/inlineDiffMargin",e)}),define(te[504],ie([1,0,503,7,44,2,3,27]),function(j,e,y,m,D,I,w,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.InlineDiffMargin=void 0;class p extends I.Disposable{constructor(g,t,i,n,l,c){super();this._viewZoneId=g,this._marginDomNode=t,this.editor=i,this.diff=n,this._contextMenuService=l,this._clipboardService=c,this._visibility=!1,this._marginDomNode.style.zIndex="10",this._diffActions=document.createElement("div"),this._diffActions.className=b.Codicon.lightBulb.classNames+" lightbulb-glyph",this._diffActions.style.position="absolute";const r=i.getOption(59),s=i.getModel().getEOL();this._diffActions.style.right="0px",this._diffActions.style.visibility="hidden",this._diffActions.style.height=`${r}px`,this._diffActions.style.lineHeight=`${r}px`,this._marginDomNode.appendChild(this._diffActions);const o=[],a=n.modifiedEndLineNumber===0;o.push(new D.Action("diff.clipboard.copyDeletedContent",a?n.originalEndLineNumber>n.modifiedStartLineNumber?y.localize(0,null):y.localize(1,null):n.originalEndLineNumber>n.modifiedStartLineNumber?y.localize(2,null):y.localize(3,null),void 0,!0,()=>ye(this,void 0,void 0,function*(){const v=new w.Range(n.originalStartLineNumber,1,n.originalEndLineNumber+1,1),C=n.originalModel.getValueInRange(v);yield this._clipboardService.writeText(C)})));let d=0,u;n.originalEndLineNumber>n.modifiedStartLineNumber&&(u=new D.Action("diff.clipboard.copyDeletedLineContent",a?y.localize(4,null,n.originalStartLineNumber):y.localize(5,null,n.originalStartLineNumber),void 0,!0,()=>ye(this,void 0,void 0,function*(){const v=n.originalModel.getLineContent(n.originalStartLineNumber+d);if(v===""){const C=n.originalModel.getEndOfLineSequence();yield this._clipboardService.writeText(C===0?`
|
||
`:`\r
|
||
`)}else yield this._clipboardService.writeText(v)})),o.push(u)),i.getOption(81)||o.push(new D.Action("diff.inline.revertChange",y.localize(6,null),void 0,!0,()=>ye(this,void 0,void 0,function*(){const v=new w.Range(n.originalStartLineNumber,1,n.originalEndLineNumber,n.originalModel.getLineMaxColumn(n.originalEndLineNumber)),C=n.originalModel.getValueInRange(v);if(n.modifiedEndLineNumber===0){const _=i.getModel().getLineMaxColumn(n.modifiedStartLineNumber);i.executeEdits("diffEditor",[{range:new w.Range(n.modifiedStartLineNumber,_,n.modifiedStartLineNumber,_),text:s+C}])}else{const _=i.getModel().getLineMaxColumn(n.modifiedEndLineNumber);i.executeEdits("diffEditor",[{range:new w.Range(n.modifiedStartLineNumber,1,n.modifiedEndLineNumber,_),text:C}])}})));const S=(v,C)=>{this._contextMenuService.showContextMenu({getAnchor:()=>({x:v,y:C}),getActions:()=>(u&&(u.label=a?y.localize(7,null,n.originalStartLineNumber+d):y.localize(8,null,n.originalStartLineNumber+d)),o),autoSelectFirstItem:!0})};this._register(m.addStandardDisposableListener(this._diffActions,"mousedown",v=>{const{top:C,height:_}=m.getDomNodePagePosition(this._diffActions),L=Math.floor(r/3);v.preventDefault(),S(v.posx,C+_+L)})),this._register(i.onMouseMove(v=>{v.target.type===8||v.target.type===5?v.target.detail.viewZoneId===this._viewZoneId?(this.visibility=!0,d=this._updateLightBulbPosition(this._marginDomNode,v.event.browserEvent.y,r)):this.visibility=!1:this.visibility=!1})),this._register(i.onMouseDown(v=>{!v.event.rightButton||(v.target.type===8||v.target.type===5)&&v.target.detail.viewZoneId===this._viewZoneId&&(v.event.preventDefault(),d=this._updateLightBulbPosition(this._marginDomNode,v.event.browserEvent.y,r),S(v.event.posx,v.event.posy+r))}))}get visibility(){return this._visibility}set visibility(g){this._visibility!==g&&(this._visibility=g,g?this._diffActions.style.visibility="visible":this._diffActions.style.visibility="hidden")}_updateLightBulbPosition(g,t,i){const{top:n}=m.getDomNodePagePosition(g),l=t-n,c=Math.floor(l/i),r=c*i;if(this._diffActions.style.top=`${r}px`,this.diff.viewLineCounts){let s=0;for(let o=0;o<this.diff.viewLineCounts.length;o++)if(s+=this.diff.viewLineCounts[o],c<s)return o}return c}}e.InlineDiffMargin=p}),define(te[505],ie([5,6]),function(j,e){return j.create("vs/editor/common/config/editorConfigurationSchema",e)}),define(te[506],ie([5,6]),function(j,e){return j.create("vs/editor/common/config/editorOptions",e)}),define(te[31],ie([1,0,506,17,146,19,39,145]),function(j,e,y,m,D,I,w,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.EditorOptions=e.editorOptionsRegistry=e.EDITOR_FONT_DEFAULTS=e.unicodeHighlightConfigKeys=e.inUntrustedWorkspace=e.filterValidationDecorations=e.EditorLayoutInfoComputer=e.EditorFontLigatures=e.TextEditorCursorStyle=e.stringSet=e.clampedInt=e.boolean=e.ApplyUpdateResult=e.ComputeOptionsMemory=e.ConfigurationChangedEvent=e.MINIMAP_GUTTER_WIDTH=void 0,e.MINIMAP_GUTTER_WIDTH=8;class p{constructor(de){this._values=de}hasChanged(de){return this._values[de]}}e.ConfigurationChangedEvent=p;class h{constructor(){this.stableMinimapLayoutInput=null,this.stableFitMaxMinimapScale=0,this.stableFitRemainingWidth=0}}e.ComputeOptionsMemory=h;class g{constructor(de,fe,_e,Le){this.id=de,this.name=fe,this.defaultValue=_e,this.schema=Le}applyUpdate(de,fe){return i(de,fe)}compute(de,fe,_e){return _e}}class t{constructor(de,fe){this.newValue=de,this.didChange=fe}}e.ApplyUpdateResult=t;function i(be,de){if(typeof be!="object"||typeof de!="object"||!be||!de)return new t(de,be!==de);if(Array.isArray(be)||Array.isArray(de)){const _e=Array.isArray(be)&&Array.isArray(de)&&I.equals(be,de);return new t(de,_e)}let fe=!1;for(const _e in de)if(de.hasOwnProperty(_e)){const Le=i(be[_e],de[_e]);Le.didChange&&(be[_e]=Le.newValue,fe=!0)}return new t(be,fe)}class n{constructor(de){this.schema=void 0,this.id=de,this.name="_never_",this.defaultValue=void 0}applyUpdate(de,fe){return i(de,fe)}validate(de){return this.defaultValue}}class l{constructor(de,fe,_e,Le){this.id=de,this.name=fe,this.defaultValue=_e,this.schema=Le}applyUpdate(de,fe){return i(de,fe)}validate(de){return typeof de=="undefined"?this.defaultValue:de}compute(de,fe,_e){return _e}}function c(be,de){return typeof be=="undefined"?de:be==="false"?!1:Boolean(be)}e.boolean=c;class r extends l{constructor(de,fe,_e,Le=void 0){typeof Le!="undefined"&&(Le.type="boolean",Le.default=_e);super(de,fe,_e,Le)}validate(de){return c(de,this.defaultValue)}}function s(be,de,fe,_e){if(typeof be=="undefined")return de;let Le=parseInt(be,10);return isNaN(Le)?de:(Le=Math.max(fe,Le),Le=Math.min(_e,Le),Le|0)}e.clampedInt=s;class o extends l{constructor(de,fe,_e,Le,Te,ke=void 0){typeof ke!="undefined"&&(ke.type="integer",ke.default=_e,ke.minimum=Le,ke.maximum=Te);super(de,fe,_e,ke);this.minimum=Le,this.maximum=Te}static clampedInt(de,fe,_e,Le){return s(de,fe,_e,Le)}validate(de){return o.clampedInt(de,this.defaultValue,this.minimum,this.maximum)}}class a extends l{constructor(de,fe,_e,Le,Te){typeof Te!="undefined"&&(Te.type="number",Te.default=_e);super(de,fe,_e,Te);this.validationFn=Le}static clamp(de,fe,_e){return de<fe?fe:de>_e?_e:de}static float(de,fe){if(typeof de=="number")return de;if(typeof de=="undefined")return fe;const _e=parseFloat(de);return isNaN(_e)?fe:_e}validate(de){return this.validationFn(a.float(de,this.defaultValue))}}class d extends l{static string(de,fe){return typeof de!="string"?fe:de}constructor(de,fe,_e,Le=void 0){typeof Le!="undefined"&&(Le.type="string",Le.default=_e);super(de,fe,_e,Le)}validate(de){return d.string(de,this.defaultValue)}}function u(be,de,fe){return typeof be!="string"||fe.indexOf(be)===-1?de:be}e.stringSet=u;class f extends l{constructor(de,fe,_e,Le,Te=void 0){typeof Te!="undefined"&&(Te.type="string",Te.enum=Le,Te.default=_e);super(de,fe,_e,Te);this._allowedValues=Le}validate(de){return u(de,this.defaultValue,this._allowedValues)}}class S extends g{constructor(de,fe,_e,Le,Te,ke,Me=void 0){typeof Me!="undefined"&&(Me.type="string",Me.enum=Te,Me.default=Le);super(de,fe,_e,Me);this._allowedValues=Te,this._convert=ke}validate(de){return typeof de!="string"?this.defaultValue:this._allowedValues.indexOf(de)===-1?this.defaultValue:this._convert(de)}}function v(be){switch(be){case"none":return 0;case"keep":return 1;case"brackets":return 2;case"advanced":return 3;case"full":return 4}}class C extends g{constructor(){super(2,"accessibilitySupport",0,{type:"string",enum:["auto","on","off"],enumDescriptions:[y.localize(0,null),y.localize(1,null),y.localize(2,null)],default:"auto",description:y.localize(3,null)})}validate(de){switch(de){case"auto":return 0;case"off":return 1;case"on":return 2}return this.defaultValue}compute(de,fe,_e){return _e===0?de.accessibilitySupport:_e}}class _ extends g{constructor(){const de={insertSpace:!0,ignoreEmptyLines:!0};super(19,"comments",de,{"editor.comments.insertSpace":{type:"boolean",default:de.insertSpace,description:y.localize(4,null)},"editor.comments.ignoreEmptyLines":{type:"boolean",default:de.ignoreEmptyLines,description:y.localize(5,null)}})}validate(de){if(!de||typeof de!="object")return this.defaultValue;const fe=de;return{insertSpace:c(fe.insertSpace,this.defaultValue.insertSpace),ignoreEmptyLines:c(fe.ignoreEmptyLines,this.defaultValue.ignoreEmptyLines)}}}function L(be){switch(be){case"blink":return 1;case"smooth":return 2;case"phase":return 3;case"expand":return 4;case"solid":return 5}}var E;(function(be){be[be.Line=1]="Line",be[be.Block=2]="Block",be[be.Underline=3]="Underline",be[be.LineThin=4]="LineThin",be[be.BlockOutline=5]="BlockOutline",be[be.UnderlineThin=6]="UnderlineThin"})(E=e.TextEditorCursorStyle||(e.TextEditorCursorStyle={}));function N(be){switch(be){case"line":return E.Line;case"block":return E.Block;case"underline":return E.Underline;case"line-thin":return E.LineThin;case"block-outline":return E.BlockOutline;case"underline-thin":return E.UnderlineThin}}class k extends n{constructor(){super(128)}compute(de,fe,_e){const Le=["monaco-editor"];return fe.get(33)&&Le.push(fe.get(33)),de.extraEditorClassName&&Le.push(de.extraEditorClassName),fe.get(66)==="default"?Le.push("mouse-default"):fe.get(66)==="copy"&&Le.push("mouse-copy"),fe.get(100)&&Le.push("showUnused"),fe.get(126)&&Le.push("showDeprecated"),Le.join(" ")}}class M extends r{constructor(){super(32,"emptySelectionClipboard",!0,{description:y.localize(6,null)})}compute(de,fe,_e){return _e&&de.emptySelectionClipboard}}class O extends g{constructor(){const de={cursorMoveOnType:!0,seedSearchStringFromSelection:"always",autoFindInSelection:"never",globalFindClipboard:!1,addExtraSpaceOnTop:!0,loop:!0};super(35,"find",de,{"editor.find.cursorMoveOnType":{type:"boolean",default:de.cursorMoveOnType,description:y.localize(7,null)},"editor.find.seedSearchStringFromSelection":{type:"string",enum:["never","always","selection"],default:de.seedSearchStringFromSelection,enumDescriptions:[y.localize(8,null),y.localize(9,null),y.localize(10,null)],description:y.localize(11,null)},"editor.find.autoFindInSelection":{type:"string",enum:["never","always","multiline"],default:de.autoFindInSelection,enumDescriptions:[y.localize(12,null),y.localize(13,null),y.localize(14,null)],description:y.localize(15,null)},"editor.find.globalFindClipboard":{type:"boolean",default:de.globalFindClipboard,description:y.localize(16,null),included:m.isMacintosh},"editor.find.addExtraSpaceOnTop":{type:"boolean",default:de.addExtraSpaceOnTop,description:y.localize(17,null)},"editor.find.loop":{type:"boolean",default:de.loop,description:y.localize(18,null)}})}validate(de){if(!de||typeof de!="object")return this.defaultValue;const fe=de;return{cursorMoveOnType:c(fe.cursorMoveOnType,this.defaultValue.cursorMoveOnType),seedSearchStringFromSelection:typeof de.seedSearchStringFromSelection=="boolean"?de.seedSearchStringFromSelection?"always":"never":u(fe.seedSearchStringFromSelection,this.defaultValue.seedSearchStringFromSelection,["never","always","selection"]),autoFindInSelection:typeof de.autoFindInSelection=="boolean"?de.autoFindInSelection?"always":"never":u(fe.autoFindInSelection,this.defaultValue.autoFindInSelection,["never","always","multiline"]),globalFindClipboard:c(fe.globalFindClipboard,this.defaultValue.globalFindClipboard),addExtraSpaceOnTop:c(fe.addExtraSpaceOnTop,this.defaultValue.addExtraSpaceOnTop),loop:c(fe.loop,this.defaultValue.loop)}}}class B extends g{constructor(){super(45,"fontLigatures",B.OFF,{anyOf:[{type:"boolean",description:y.localize(19,null)},{type:"string",description:y.localize(20,null)}],description:y.localize(21,null),default:!1})}validate(de){return typeof de=="undefined"?this.defaultValue:typeof de=="string"?de==="false"?B.OFF:de==="true"?B.ON:de:Boolean(de)?B.ON:B.OFF}}e.EditorFontLigatures=B,B.OFF='"liga" off, "calt" off',B.ON='"liga" on, "calt" on';class T extends n{constructor(){super(44)}compute(de,fe,_e){return de.fontInfo}}class R extends l{constructor(){super(46,"fontSize",e.EDITOR_FONT_DEFAULTS.fontSize,{type:"number",minimum:6,maximum:100,default:e.EDITOR_FONT_DEFAULTS.fontSize,description:y.localize(22,null)})}validate(de){const fe=a.float(de,this.defaultValue);return fe===0?e.EDITOR_FONT_DEFAULTS.fontSize:a.clamp(fe,6,100)}compute(de,fe,_e){return de.fontInfo.fontSize}}class P extends g{constructor(){super(47,"fontWeight",e.EDITOR_FONT_DEFAULTS.fontWeight,{anyOf:[{type:"number",minimum:P.MINIMUM_VALUE,maximum:P.MAXIMUM_VALUE,errorMessage:y.localize(23,null)},{type:"string",pattern:"^(normal|bold|1000|[1-9][0-9]{0,2})$"},{enum:P.SUGGESTION_VALUES}],default:e.EDITOR_FONT_DEFAULTS.fontWeight,description:y.localize(24,null)})}validate(de){return de==="normal"||de==="bold"?de:String(o.clampedInt(de,e.EDITOR_FONT_DEFAULTS.fontWeight,P.MINIMUM_VALUE,P.MAXIMUM_VALUE))}}P.SUGGESTION_VALUES=["normal","bold","100","200","300","400","500","600","700","800","900"],P.MINIMUM_VALUE=1,P.MAXIMUM_VALUE=1e3;class F extends g{constructor(){const de={multiple:"peek",multipleDefinitions:"peek",multipleTypeDefinitions:"peek",multipleDeclarations:"peek",multipleImplementations:"peek",multipleReferences:"peek",alternativeDefinitionCommand:"editor.action.goToReferences",alternativeTypeDefinitionCommand:"editor.action.goToReferences",alternativeDeclarationCommand:"editor.action.goToReferences",alternativeImplementationCommand:"",alternativeReferenceCommand:""},fe={type:"string",enum:["peek","gotoAndPeek","goto"],default:de.multiple,enumDescriptions:[y.localize(25,null),y.localize(26,null),y.localize(27,null)]},_e=["","editor.action.referenceSearch.trigger","editor.action.goToReferences","editor.action.peekImplementation","editor.action.goToImplementation","editor.action.peekTypeDefinition","editor.action.goToTypeDefinition","editor.action.peekDeclaration","editor.action.revealDeclaration","editor.action.peekDefinition","editor.action.revealDefinitionAside","editor.action.revealDefinition"];super(51,"gotoLocation",de,{"editor.gotoLocation.multiple":{deprecationMessage:y.localize(28,null)},"editor.gotoLocation.multipleDefinitions":Object.assign({description:y.localize(29,null)},fe),"editor.gotoLocation.multipleTypeDefinitions":Object.assign({description:y.localize(30,null)},fe),"editor.gotoLocation.multipleDeclarations":Object.assign({description:y.localize(31,null)},fe),"editor.gotoLocation.multipleImplementations":Object.assign({description:y.localize(32,null)},fe),"editor.gotoLocation.multipleReferences":Object.assign({description:y.localize(33,null)},fe),"editor.gotoLocation.alternativeDefinitionCommand":{type:"string",default:de.alternativeDefinitionCommand,enum:_e,description:y.localize(34,null)},"editor.gotoLocation.alternativeTypeDefinitionCommand":{type:"string",default:de.alternativeTypeDefinitionCommand,enum:_e,description:y.localize(35,null)},"editor.gotoLocation.alternativeDeclarationCommand":{type:"string",default:de.alternativeDeclarationCommand,enum:_e,description:y.localize(36,null)},"editor.gotoLocation.alternativeImplementationCommand":{type:"string",default:de.alternativeImplementationCommand,enum:_e,description:y.localize(37,null)},"editor.gotoLocation.alternativeReferenceCommand":{type:"string",default:de.alternativeReferenceCommand,enum:_e,description:y.localize(38,null)}})}validate(de){var fe,_e,Le,Te,ke;if(!de||typeof de!="object")return this.defaultValue;const Me=de;return{multiple:u(Me.multiple,this.defaultValue.multiple,["peek","gotoAndPeek","goto"]),multipleDefinitions:(fe=Me.multipleDefinitions)!==null&&fe!==void 0?fe:u(Me.multipleDefinitions,"peek",["peek","gotoAndPeek","goto"]),multipleTypeDefinitions:(_e=Me.multipleTypeDefinitions)!==null&&_e!==void 0?_e:u(Me.multipleTypeDefinitions,"peek",["peek","gotoAndPeek","goto"]),multipleDeclarations:(Le=Me.multipleDeclarations)!==null&&Le!==void 0?Le:u(Me.multipleDeclarations,"peek",["peek","gotoAndPeek","goto"]),multipleImplementations:(Te=Me.multipleImplementations)!==null&&Te!==void 0?Te:u(Me.multipleImplementations,"peek",["peek","gotoAndPeek","goto"]),multipleReferences:(ke=Me.multipleReferences)!==null&&ke!==void 0?ke:u(Me.multipleReferences,"peek",["peek","gotoAndPeek","goto"]),alternativeDefinitionCommand:d.string(Me.alternativeDefinitionCommand,this.defaultValue.alternativeDefinitionCommand),alternativeTypeDefinitionCommand:d.string(Me.alternativeTypeDefinitionCommand,this.defaultValue.alternativeTypeDefinitionCommand),alternativeDeclarationCommand:d.string(Me.alternativeDeclarationCommand,this.defaultValue.alternativeDeclarationCommand),alternativeImplementationCommand:d.string(Me.alternativeImplementationCommand,this.defaultValue.alternativeImplementationCommand),alternativeReferenceCommand:d.string(Me.alternativeReferenceCommand,this.defaultValue.alternativeReferenceCommand)}}}class W extends g{constructor(){const de={enabled:!0,delay:300,sticky:!0,above:!0};super(53,"hover",de,{"editor.hover.enabled":{type:"boolean",default:de.enabled,description:y.localize(39,null)},"editor.hover.delay":{type:"number",default:de.delay,minimum:0,maximum:1e4,description:y.localize(40,null)},"editor.hover.sticky":{type:"boolean",default:de.sticky,description:y.localize(41,null)},"editor.hover.above":{type:"boolean",default:de.above,description:y.localize(42,null)}})}validate(de){if(!de||typeof de!="object")return this.defaultValue;const fe=de;return{enabled:c(fe.enabled,this.defaultValue.enabled),delay:o.clampedInt(fe.delay,this.defaultValue.delay,0,1e4),sticky:c(fe.sticky,this.defaultValue.sticky),above:c(fe.above,this.defaultValue.above)}}}class A extends n{constructor(){super(131)}compute(de,fe,_e){return A.computeLayout(fe,{memory:de.memory,outerWidth:de.outerWidth,outerHeight:de.outerHeight,isDominatedByLongLines:de.isDominatedByLongLines,lineHeight:de.fontInfo.lineHeight,viewLineCount:de.viewLineCount,lineNumbersDigitCount:de.lineNumbersDigitCount,typicalHalfwidthCharacterWidth:de.fontInfo.typicalHalfwidthCharacterWidth,maxDigitWidth:de.fontInfo.maxDigitWidth,pixelRatio:de.pixelRatio})}static computeContainedMinimapLineCount(de){const fe=de.height/de.lineHeight,_e=de.scrollBeyondLastLine?fe-1:0,Le=(de.viewLineCount+_e)/(de.pixelRatio*de.height),Te=Math.floor(de.viewLineCount/Le);return{typicalViewportLineCount:fe,extraLinesBeyondLastLine:_e,desiredRatio:Le,minimapLineCount:Te}}static _computeMinimapLayout(de,fe){const _e=de.outerWidth,Le=de.outerHeight,Te=de.pixelRatio;if(!de.minimap.enabled)return{renderMinimap:0,minimapLeft:0,minimapWidth:0,minimapHeightIsEditorHeight:!1,minimapIsSampling:!1,minimapScale:1,minimapLineHeight:1,minimapCanvasInnerWidth:0,minimapCanvasInnerHeight:Math.floor(Te*Le),minimapCanvasOuterWidth:0,minimapCanvasOuterHeight:Le};const ke=fe.stableMinimapLayoutInput,Me=ke&&de.outerHeight===ke.outerHeight&&de.lineHeight===ke.lineHeight&&de.typicalHalfwidthCharacterWidth===ke.typicalHalfwidthCharacterWidth&&de.pixelRatio===ke.pixelRatio&&de.scrollBeyondLastLine===ke.scrollBeyondLastLine&&de.minimap.enabled===ke.minimap.enabled&&de.minimap.side===ke.minimap.side&&de.minimap.size===ke.minimap.size&&de.minimap.showSlider===ke.minimap.showSlider&&de.minimap.renderCharacters===ke.minimap.renderCharacters&&de.minimap.maxColumn===ke.minimap.maxColumn&&de.minimap.scale===ke.minimap.scale&&de.verticalScrollbarWidth===ke.verticalScrollbarWidth&&de.isViewportWrapping===ke.isViewportWrapping,$e=de.lineHeight,He=de.typicalHalfwidthCharacterWidth,Ge=de.scrollBeyondLastLine,we=de.minimap.renderCharacters;let Se=Te>=2?Math.round(de.minimap.scale*2):de.minimap.scale;const De=de.minimap.maxColumn,Pe=de.minimap.size,Fe=de.minimap.side,xe=de.verticalScrollbarWidth,Ve=de.viewLineCount,qe=de.remainingWidth,We=de.isViewportWrapping,tt=we?2:3;let Be=Math.floor(Te*Le);const Ee=Be/Te;let Re=!1,Ae=!1,Ue=tt*Se,et=Se/Te,Ze=1;if(Pe==="fill"||Pe==="fit"){const{typicalViewportLineCount:Ye,extraLinesBeyondLastLine:Xe,desiredRatio:it,minimapLineCount:lt}=A.computeContainedMinimapLineCount({viewLineCount:Ve,scrollBeyondLastLine:Ge,height:Le,lineHeight:$e,pixelRatio:Te});if(Ve/lt>1)Re=!0,Ae=!0,Se=1,Ue=1,et=Se/Te;else{let dt=!1,at=Se+1;if(Pe==="fit"){const nt=Math.ceil((Ve+Xe)*Ue);We&&Me&&qe<=fe.stableFitRemainingWidth?(dt=!0,at=fe.stableFitMaxMinimapScale):dt=nt>Be}if(Pe==="fill"||dt){Re=!0;const nt=Se;Ue=Math.min($e*Te,Math.max(1,Math.floor(1/it))),We&&Me&&qe<=fe.stableFitRemainingWidth&&(at=fe.stableFitMaxMinimapScale),Se=Math.min(at,Math.max(1,Math.floor(Ue/tt))),Se>nt&&(Ze=Math.min(2,Se/nt)),et=Se/Te/Ze,Be=Math.ceil(Math.max(Ye,Ve+Xe)*Ue),We?(fe.stableMinimapLayoutInput=de,fe.stableFitRemainingWidth=qe,fe.stableFitMaxMinimapScale=Se):(fe.stableMinimapLayoutInput=null,fe.stableFitRemainingWidth=0)}}}const Ke=Math.floor(De*et),Ne=Math.min(Ke,Math.max(0,Math.floor((qe-xe-2)*et/(He+et)))+e.MINIMAP_GUTTER_WIDTH);let Oe=Math.floor(Te*Ne);const ze=Oe/Te;Oe=Math.floor(Oe*Ze);const je=we?1:2,Je=Fe==="left"?0:_e-Ne-xe;return{renderMinimap:je,minimapLeft:Je,minimapWidth:Ne,minimapHeightIsEditorHeight:Re,minimapIsSampling:Ae,minimapScale:Se,minimapLineHeight:Ue,minimapCanvasInnerWidth:Oe,minimapCanvasInnerHeight:Be,minimapCanvasOuterWidth:ze,minimapCanvasOuterHeight:Ee}}static computeLayout(de,fe){const _e=fe.outerWidth|0,Le=fe.outerHeight|0,Te=fe.lineHeight|0,ke=fe.lineNumbersDigitCount|0,Me=fe.typicalHalfwidthCharacterWidth,$e=fe.maxDigitWidth,He=fe.pixelRatio,Ge=fe.viewLineCount,we=de.get(123),Se=we==="inherit"?de.get(122):we,De=Se==="inherit"?de.get(118):Se,Pe=de.get(121),Fe=de.get(2),xe=fe.isDominatedByLongLines,Ve=de.get(50),qe=de.get(60).renderType!==0,We=de.get(61),tt=de.get(94),Be=de.get(65),Ee=de.get(92),Re=Ee.verticalScrollbarSize,Ae=Ee.verticalHasArrows,Ue=Ee.arrowSize,et=Ee.horizontalScrollbarSize,Ze=de.get(58),Ke=de.get(37);let Ne;if(typeof Ze=="string"&&/^\d+(\.\d+)?ch$/.test(Ze)){const ct=parseFloat(Ze.substr(0,Ze.length-2));Ne=o.clampedInt(ct*Me,0,0,1e3)}else Ne=o.clampedInt(Ze,0,0,1e3);Ke&&(Ne+=16);let Oe=0;if(qe){const ct=Math.max(ke,We);Oe=Math.round(ct*$e)}let ze=0;Ve&&(ze=Te);let je=0,Je=je+ze,Ye=Je+Oe,Xe=Ye+Ne;const it=_e-ze-Oe-Ne;let lt=!1,_t=!1,dt=-1;Fe!==2&&(Se==="inherit"&&xe?(lt=!0,_t=!0):De==="on"||De==="bounded"?_t=!0:De==="wordWrapColumn"&&(dt=Pe));const at=A._computeMinimapLayout({outerWidth:_e,outerHeight:Le,lineHeight:Te,typicalHalfwidthCharacterWidth:Me,pixelRatio:He,scrollBeyondLastLine:tt,minimap:Be,verticalScrollbarWidth:Re,viewLineCount:Ge,remainingWidth:it,isViewportWrapping:_t},fe.memory||new h);at.renderMinimap!==0&&at.minimapLeft===0&&(je+=at.minimapWidth,Je+=at.minimapWidth,Ye+=at.minimapWidth,Xe+=at.minimapWidth);const nt=it-at.minimapWidth,ht=Math.max(1,Math.floor((nt-Re-2)/Me)),Ct=Ae?Ue:0;return _t&&(dt=Math.max(1,ht),De==="bounded"&&(dt=Math.min(dt,Pe))),{width:_e,height:Le,glyphMarginLeft:je,glyphMarginWidth:ze,lineNumbersLeft:Je,lineNumbersWidth:Oe,decorationsLeft:Ye,decorationsWidth:Ne,contentLeft:Xe,contentWidth:nt,minimap:at,viewportColumn:ht,isWordWrapMinified:lt,isViewportWrapping:_t,wrappingColumn:dt,verticalScrollbarWidth:Re,horizontalScrollbarHeight:et,overviewRuler:{top:Ct,width:Re,height:Le-2*Ct,right:0}}}}e.EditorLayoutInfoComputer=A;class H extends g{constructor(){const de={enabled:!0};super(57,"lightbulb",de,{"editor.lightbulb.enabled":{type:"boolean",default:de.enabled,description:y.localize(43,null)}})}validate(de){return!de||typeof de!="object"?this.defaultValue:{enabled:c(de.enabled,this.defaultValue.enabled)}}}class q extends g{constructor(){const de={enabled:!0,fontSize:0,fontFamily:""};super(127,"inlayHints",de,{"editor.inlayHints.enabled":{type:"boolean",default:de.enabled,description:y.localize(44,null)},"editor.inlayHints.fontSize":{type:"number",default:de.fontSize,markdownDescription:y.localize(45,null)},"editor.inlayHints.fontFamily":{type:"string",default:de.fontFamily,markdownDescription:y.localize(46,null)}})}validate(de){if(!de||typeof de!="object")return this.defaultValue;const fe=de;return{enabled:c(fe.enabled,this.defaultValue.enabled),fontSize:o.clampedInt(fe.fontSize,this.defaultValue.fontSize,0,100),fontFamily:d.string(fe.fontFamily,this.defaultValue.fontFamily)}}}class X extends a{constructor(){super(59,"lineHeight",e.EDITOR_FONT_DEFAULTS.lineHeight,de=>a.clamp(de,0,150),{markdownDescription:y.localize(47,null)})}compute(de,fe,_e){return de.fontInfo.lineHeight}}class G extends g{constructor(){const de={enabled:!0,size:"proportional",side:"right",showSlider:"mouseover",renderCharacters:!0,maxColumn:120,scale:1};super(65,"minimap",de,{"editor.minimap.enabled":{type:"boolean",default:de.enabled,description:y.localize(48,null)},"editor.minimap.size":{type:"string",enum:["proportional","fill","fit"],enumDescriptions:[y.localize(49,null),y.localize(50,null),y.localize(51,null)],default:de.size,description:y.localize(52,null)},"editor.minimap.side":{type:"string",enum:["left","right"],default:de.side,description:y.localize(53,null)},"editor.minimap.showSlider":{type:"string",enum:["always","mouseover"],default:de.showSlider,description:y.localize(54,null)},"editor.minimap.scale":{type:"number",default:de.scale,minimum:1,maximum:3,enum:[1,2,3],description:y.localize(55,null)},"editor.minimap.renderCharacters":{type:"boolean",default:de.renderCharacters,description:y.localize(56,null)},"editor.minimap.maxColumn":{type:"number",default:de.maxColumn,description:y.localize(57,null)}})}validate(de){if(!de||typeof de!="object")return this.defaultValue;const fe=de;return{enabled:c(fe.enabled,this.defaultValue.enabled),size:u(fe.size,this.defaultValue.size,["proportional","fill","fit"]),side:u(fe.side,this.defaultValue.side,["right","left"]),showSlider:u(fe.showSlider,this.defaultValue.showSlider,["always","mouseover"]),renderCharacters:c(fe.renderCharacters,this.defaultValue.renderCharacters),scale:o.clampedInt(fe.scale,1,1,3),maxColumn:o.clampedInt(fe.maxColumn,this.defaultValue.maxColumn,1,1e4)}}}function re(be){return be==="ctrlCmd"?m.isMacintosh?"metaKey":"ctrlKey":"altKey"}class ae extends g{constructor(){super(75,"padding",{top:0,bottom:0},{"editor.padding.top":{type:"number",default:0,minimum:0,maximum:1e3,description:y.localize(58,null)},"editor.padding.bottom":{type:"number",default:0,minimum:0,maximum:1e3,description:y.localize(59,null)}})}validate(de){if(!de||typeof de!="object")return this.defaultValue;const fe=de;return{top:o.clampedInt(fe.top,0,0,1e3),bottom:o.clampedInt(fe.bottom,0,0,1e3)}}}class oe extends g{constructor(){const de={enabled:!0,cycle:!1};super(76,"parameterHints",de,{"editor.parameterHints.enabled":{type:"boolean",default:de.enabled,description:y.localize(60,null)},"editor.parameterHints.cycle":{type:"boolean",default:de.cycle,description:y.localize(61,null)}})}validate(de){if(!de||typeof de!="object")return this.defaultValue;const fe=de;return{enabled:c(fe.enabled,this.defaultValue.enabled),cycle:c(fe.cycle,this.defaultValue.cycle)}}}class Z extends n{constructor(){super(129)}compute(de,fe,_e){return de.pixelRatio}}class x extends g{constructor(){const de={other:!0,comments:!1,strings:!1};super(79,"quickSuggestions",de,{anyOf:[{type:"boolean"},{type:"object",properties:{strings:{type:"boolean",default:de.strings,description:y.localize(62,null)},comments:{type:"boolean",default:de.comments,description:y.localize(63,null)},other:{type:"boolean",default:de.other,description:y.localize(64,null)}}}],default:de,description:y.localize(65,null)});this.defaultValue=de}validate(de){if(typeof de=="boolean")return de;if(de&&typeof de=="object"){const fe=de,_e={other:c(fe.other,this.defaultValue.other),comments:c(fe.comments,this.defaultValue.comments),strings:c(fe.strings,this.defaultValue.strings)};return _e.other&&_e.comments&&_e.strings?!0:!_e.other&&!_e.comments&&!_e.strings?!1:_e}return this.defaultValue}}class U extends g{constructor(){super(60,"lineNumbers",{renderType:1,renderFn:null},{type:"string",enum:["off","on","relative","interval"],enumDescriptions:[y.localize(66,null),y.localize(67,null),y.localize(68,null),y.localize(69,null)],default:"on",description:y.localize(70,null)})}validate(de){let fe=this.defaultValue.renderType,_e=this.defaultValue.renderFn;return typeof de!="undefined"&&(typeof de=="function"?(fe=4,_e=de):de==="interval"?fe=3:de==="relative"?fe=2:de==="on"?fe=1:fe=0),{renderType:fe,renderFn:_e}}}function Q(be){const de=be.get(87);return de==="editable"?be.get(81):de!=="on"}e.filterValidationDecorations=Q;class ne extends g{constructor(){const de=[],fe={type:"number",description:y.localize(71,null)};super(91,"rulers",de,{type:"array",items:{anyOf:[fe,{type:["object"],properties:{column:fe,color:{type:"string",description:y.localize(72,null),format:"color-hex"}}}]},default:de,description:y.localize(73,null)})}validate(de){if(Array.isArray(de)){const fe=[];for(let _e of de)if(typeof _e=="number")fe.push({column:o.clampedInt(_e,0,0,1e4),color:null});else if(_e&&typeof _e=="object"){const Le=_e;fe.push({column:o.clampedInt(Le.column,0,0,1e4),color:Le.color})}return fe.sort((_e,Le)=>_e.column-Le.column),fe}return this.defaultValue}}function ce(be,de){if(typeof be!="string")return de;switch(be){case"hidden":return 2;case"visible":return 3;default:return 1}}class ee extends g{constructor(){const de={vertical:1,horizontal:1,arrowSize:11,useShadows:!0,verticalHasArrows:!1,horizontalHasArrows:!1,horizontalScrollbarSize:12,horizontalSliderSize:12,verticalScrollbarSize:14,verticalSliderSize:14,handleMouseWheel:!0,alwaysConsumeMouseWheel:!0,scrollByPage:!1};super(92,"scrollbar",de,{"editor.scrollbar.vertical":{type:"string",enum:["auto","visible","hidden"],enumDescriptions:[y.localize(74,null),y.localize(75,null),y.localize(76,null)],default:"auto",description:y.localize(77,null)},"editor.scrollbar.horizontal":{type:"string",enum:["auto","visible","hidden"],enumDescriptions:[y.localize(78,null),y.localize(79,null),y.localize(80,null)],default:"auto",description:y.localize(81,null)},"editor.scrollbar.verticalScrollbarSize":{type:"number",default:de.verticalScrollbarSize,description:y.localize(82,null)},"editor.scrollbar.horizontalScrollbarSize":{type:"number",default:de.horizontalScrollbarSize,description:y.localize(83,null)},"editor.scrollbar.scrollByPage":{type:"boolean",default:de.scrollByPage,description:y.localize(84,null)}})}validate(de){if(!de||typeof de!="object")return this.defaultValue;const fe=de,_e=o.clampedInt(fe.horizontalScrollbarSize,this.defaultValue.horizontalScrollbarSize,0,1e3),Le=o.clampedInt(fe.verticalScrollbarSize,this.defaultValue.verticalScrollbarSize,0,1e3);return{arrowSize:o.clampedInt(fe.arrowSize,this.defaultValue.arrowSize,0,1e3),vertical:ce(fe.vertical,this.defaultValue.vertical),horizontal:ce(fe.horizontal,this.defaultValue.horizontal),useShadows:c(fe.useShadows,this.defaultValue.useShadows),verticalHasArrows:c(fe.verticalHasArrows,this.defaultValue.verticalHasArrows),horizontalHasArrows:c(fe.horizontalHasArrows,this.defaultValue.horizontalHasArrows),handleMouseWheel:c(fe.handleMouseWheel,this.defaultValue.handleMouseWheel),alwaysConsumeMouseWheel:c(fe.alwaysConsumeMouseWheel,this.defaultValue.alwaysConsumeMouseWheel),horizontalScrollbarSize:_e,horizontalSliderSize:o.clampedInt(fe.horizontalSliderSize,_e,0,1e3),verticalScrollbarSize:Le,verticalSliderSize:o.clampedInt(fe.verticalSliderSize,Le,0,1e3),scrollByPage:c(fe.scrollByPage,this.defaultValue.scrollByPage)}}}e.inUntrustedWorkspace="inUntrustedWorkspace",e.unicodeHighlightConfigKeys={allowedCharacters:"editor.unicodeHighlight.allowedCharacters",invisibleCharacters:"editor.unicodeHighlight.invisibleCharacters",nonBasicASCII:"editor.unicodeHighlight.nonBasicASCII",ambiguousCharacters:"editor.unicodeHighlight.ambiguousCharacters",includeComments:"editor.unicodeHighlight.includeComments",includeStrings:"editor.unicodeHighlight.includeStrings",allowedLocales:"editor.unicodeHighlight.allowedLocales"};class ue extends g{constructor(){const de={nonBasicASCII:e.inUntrustedWorkspace,invisibleCharacters:!0,ambiguousCharacters:!0,includeComments:e.inUntrustedWorkspace,includeStrings:!0,allowedCharacters:{},allowedLocales:{_os:!0,_vscode:!0}};super(113,"unicodeHighlight",de,{[e.unicodeHighlightConfigKeys.nonBasicASCII]:{restricted:!0,type:["boolean","string"],enum:[!0,!1,e.inUntrustedWorkspace],default:de.nonBasicASCII,description:y.localize(85,null)},[e.unicodeHighlightConfigKeys.invisibleCharacters]:{restricted:!0,type:"boolean",default:de.invisibleCharacters,description:y.localize(86,null)},[e.unicodeHighlightConfigKeys.ambiguousCharacters]:{restricted:!0,type:"boolean",default:de.ambiguousCharacters,description:y.localize(87,null)},[e.unicodeHighlightConfigKeys.includeComments]:{restricted:!0,type:["boolean","string"],enum:[!0,!1,e.inUntrustedWorkspace],default:de.includeComments,description:y.localize(88,null)},[e.unicodeHighlightConfigKeys.includeStrings]:{restricted:!0,type:["boolean","string"],enum:[!0,!1,e.inUntrustedWorkspace],default:de.includeStrings,description:y.localize(89,null)},[e.unicodeHighlightConfigKeys.allowedCharacters]:{restricted:!0,type:"object",default:de.allowedCharacters,description:y.localize(90,null),additionalProperties:{type:"boolean"}},[e.unicodeHighlightConfigKeys.allowedLocales]:{restricted:!0,type:"object",additionalProperties:{type:"boolean"},default:de.allowedLocales,description:y.localize(91,null)}})}applyUpdate(de,fe){let _e=!1;fe.allowedCharacters&&(w.equals(de.allowedCharacters,fe.allowedCharacters)||(de=Object.assign(Object.assign({},de),{allowedCharacters:fe.allowedCharacters}),_e=!0)),fe.allowedLocales&&(w.equals(de.allowedLocales,fe.allowedLocales)||(de=Object.assign(Object.assign({},de),{allowedLocales:fe.allowedLocales}),_e=!0));const Le=super.applyUpdate(de,fe);return _e?new t(Le.newValue,!0):Le}validate(de){if(!de||typeof de!="object")return this.defaultValue;const fe=de;return{nonBasicASCII:K(fe.nonBasicASCII,e.inUntrustedWorkspace,[!0,!1,e.inUntrustedWorkspace]),invisibleCharacters:c(fe.invisibleCharacters,this.defaultValue.invisibleCharacters),ambiguousCharacters:c(fe.ambiguousCharacters,this.defaultValue.ambiguousCharacters),includeComments:K(fe.includeComments,e.inUntrustedWorkspace,[!0,!1,e.inUntrustedWorkspace]),includeStrings:K(fe.includeStrings,e.inUntrustedWorkspace,[!0,!1,e.inUntrustedWorkspace]),allowedCharacters:this.validateBooleanMap(de.allowedCharacters,this.defaultValue.allowedCharacters),allowedLocales:this.validateBooleanMap(de.allowedLocales,this.defaultValue.allowedLocales)}}validateBooleanMap(de,fe){if(typeof de!="object"||!de)return fe;const _e={};for(const[Le,Te]of Object.entries(de))Te===!0&&(_e[Le]=!0);return _e}}class z extends g{constructor(){const de={enabled:!0,mode:"subwordSmart"};super(55,"inlineSuggest",de,{"editor.inlineSuggest.enabled":{type:"boolean",default:de.enabled,description:y.localize(92,null)}})}validate(de){if(!de||typeof de!="object")return this.defaultValue;const fe=de;return{enabled:c(fe.enabled,this.defaultValue.enabled),mode:u(fe.mode,this.defaultValue.mode,["prefix","subword","subwordSmart"])}}}class V extends g{constructor(){const de={enabled:b.EDITOR_MODEL_DEFAULTS.bracketPairColorizationOptions.enabled};super(12,"bracketPairColorization",de,{"editor.bracketPairColorization.enabled":{type:"boolean",default:de.enabled,description:y.localize(93,null)}})}validate(de){return!de||typeof de!="object"?this.defaultValue:{enabled:c(de.enabled,this.defaultValue.enabled)}}}class $ extends g{constructor(){const de={bracketPairs:!1,bracketPairsHorizontal:"active",highlightActiveBracketPair:!0,indentation:!0,highlightActiveIndentation:!0};super(13,"guides",de,{"editor.guides.bracketPairs":{type:["boolean","string"],enum:[!0,"active",!1],enumDescriptions:[y.localize(94,null),y.localize(95,null),y.localize(96,null)],default:de.bracketPairs,description:y.localize(97,null)},"editor.guides.bracketPairsHorizontal":{type:["boolean","string"],enum:[!0,"active",!1],enumDescriptions:[y.localize(98,null),y.localize(99,null),y.localize(100,null)],default:de.bracketPairsHorizontal,description:y.localize(101,null)},"editor.guides.highlightActiveBracketPair":{type:"boolean",default:de.highlightActiveBracketPair,description:y.localize(102,null)},"editor.guides.indentation":{type:"boolean",default:de.indentation,description:y.localize(103,null)},"editor.guides.highlightActiveIndentation":{type:"boolean",default:de.highlightActiveIndentation,description:y.localize(104,null)}})}validate(de){if(!de||typeof de!="object")return this.defaultValue;const fe=de;return{bracketPairs:K(fe.bracketPairs,this.defaultValue.bracketPairs,[!0,!1,"active"]),bracketPairsHorizontal:K(fe.bracketPairsHorizontal,this.defaultValue.bracketPairsHorizontal,[!0,!1,"active"]),highlightActiveBracketPair:c(fe.highlightActiveBracketPair,this.defaultValue.highlightActiveBracketPair),indentation:c(fe.indentation,this.defaultValue.indentation),highlightActiveIndentation:c(fe.highlightActiveIndentation,this.defaultValue.highlightActiveIndentation)}}}function K(be,de,fe){const _e=fe.indexOf(be);return _e===-1?de:fe[_e]}class J extends g{constructor(){const de={insertMode:"insert",filterGraceful:!0,snippetsPreventQuickSuggestions:!0,localityBonus:!1,shareSuggestSelections:!1,showIcons:!0,showStatusBar:!1,preview:!1,previewMode:"subwordSmart",showInlineDetails:!0,showMethods:!0,showFunctions:!0,showConstructors:!0,showDeprecated:!0,showFields:!0,showVariables:!0,showClasses:!0,showStructs:!0,showInterfaces:!0,showModules:!0,showProperties:!0,showEvents:!0,showOperators:!0,showUnits:!0,showValues:!0,showConstants:!0,showEnums:!0,showEnumMembers:!0,showKeywords:!0,showWords:!0,showColors:!0,showFiles:!0,showReferences:!0,showFolders:!0,showTypeParameters:!0,showSnippets:!0,showUsers:!0,showIssues:!0};super(106,"suggest",de,{"editor.suggest.insertMode":{type:"string",enum:["insert","replace"],enumDescriptions:[y.localize(105,null),y.localize(106,null)],default:de.insertMode,description:y.localize(107,null)},"editor.suggest.filterGraceful":{type:"boolean",default:de.filterGraceful,description:y.localize(108,null)},"editor.suggest.localityBonus":{type:"boolean",default:de.localityBonus,description:y.localize(109,null)},"editor.suggest.shareSuggestSelections":{type:"boolean",default:de.shareSuggestSelections,markdownDescription:y.localize(110,null)},"editor.suggest.snippetsPreventQuickSuggestions":{type:"boolean",default:de.snippetsPreventQuickSuggestions,description:y.localize(111,null)},"editor.suggest.showIcons":{type:"boolean",default:de.showIcons,description:y.localize(112,null)},"editor.suggest.showStatusBar":{type:"boolean",default:de.showStatusBar,description:y.localize(113,null)},"editor.suggest.preview":{type:"boolean",default:de.preview,description:y.localize(114,null)},"editor.suggest.showInlineDetails":{type:"boolean",default:de.showInlineDetails,description:y.localize(115,null)},"editor.suggest.maxVisibleSuggestions":{type:"number",deprecationMessage:y.localize(116,null)},"editor.suggest.filteredTypes":{type:"object",deprecationMessage:y.localize(117,null)},"editor.suggest.showMethods":{type:"boolean",default:!0,markdownDescription:y.localize(118,null)},"editor.suggest.showFunctions":{type:"boolean",default:!0,markdownDescription:y.localize(119,null)},"editor.suggest.showConstructors":{type:"boolean",default:!0,markdownDescription:y.localize(120,null)},"editor.suggest.showDeprecated":{type:"boolean",default:!0,markdownDescription:y.localize(121,null)},"editor.suggest.showFields":{type:"boolean",default:!0,markdownDescription:y.localize(122,null)},"editor.suggest.showVariables":{type:"boolean",default:!0,markdownDescription:y.localize(123,null)},"editor.suggest.showClasses":{type:"boolean",default:!0,markdownDescription:y.localize(124,null)},"editor.suggest.showStructs":{type:"boolean",default:!0,markdownDescription:y.localize(125,null)},"editor.suggest.showInterfaces":{type:"boolean",default:!0,markdownDescription:y.localize(126,null)},"editor.suggest.showModules":{type:"boolean",default:!0,markdownDescription:y.localize(127,null)},"editor.suggest.showProperties":{type:"boolean",default:!0,markdownDescription:y.localize(128,null)},"editor.suggest.showEvents":{type:"boolean",default:!0,markdownDescription:y.localize(129,null)},"editor.suggest.showOperators":{type:"boolean",default:!0,markdownDescription:y.localize(130,null)},"editor.suggest.showUnits":{type:"boolean",default:!0,markdownDescription:y.localize(131,null)},"editor.suggest.showValues":{type:"boolean",default:!0,markdownDescription:y.localize(132,null)},"editor.suggest.showConstants":{type:"boolean",default:!0,markdownDescription:y.localize(133,null)},"editor.suggest.showEnums":{type:"boolean",default:!0,markdownDescription:y.localize(134,null)},"editor.suggest.showEnumMembers":{type:"boolean",default:!0,markdownDescription:y.localize(135,null)},"editor.suggest.showKeywords":{type:"boolean",default:!0,markdownDescription:y.localize(136,null)},"editor.suggest.showWords":{type:"boolean",default:!0,markdownDescription:y.localize(137,null)},"editor.suggest.showColors":{type:"boolean",default:!0,markdownDescription:y.localize(138,null)},"editor.suggest.showFiles":{type:"boolean",default:!0,markdownDescription:y.localize(139,null)},"editor.suggest.showReferences":{type:"boolean",default:!0,markdownDescription:y.localize(140,null)},"editor.suggest.showCustomcolors":{type:"boolean",default:!0,markdownDescription:y.localize(141,null)},"editor.suggest.showFolders":{type:"boolean",default:!0,markdownDescription:y.localize(142,null)},"editor.suggest.showTypeParameters":{type:"boolean",default:!0,markdownDescription:y.localize(143,null)},"editor.suggest.showSnippets":{type:"boolean",default:!0,markdownDescription:y.localize(144,null)},"editor.suggest.showUsers":{type:"boolean",default:!0,markdownDescription:y.localize(145,null)},"editor.suggest.showIssues":{type:"boolean",default:!0,markdownDescription:y.localize(146,null)}})}validate(de){if(!de||typeof de!="object")return this.defaultValue;const fe=de;return{insertMode:u(fe.insertMode,this.defaultValue.insertMode,["insert","replace"]),filterGraceful:c(fe.filterGraceful,this.defaultValue.filterGraceful),snippetsPreventQuickSuggestions:c(fe.snippetsPreventQuickSuggestions,this.defaultValue.filterGraceful),localityBonus:c(fe.localityBonus,this.defaultValue.localityBonus),shareSuggestSelections:c(fe.shareSuggestSelections,this.defaultValue.shareSuggestSelections),showIcons:c(fe.showIcons,this.defaultValue.showIcons),showStatusBar:c(fe.showStatusBar,this.defaultValue.showStatusBar),preview:c(fe.preview,this.defaultValue.preview),previewMode:u(fe.previewMode,this.defaultValue.previewMode,["prefix","subword","subwordSmart"]),showInlineDetails:c(fe.showInlineDetails,this.defaultValue.showInlineDetails),showMethods:c(fe.showMethods,this.defaultValue.showMethods),showFunctions:c(fe.showFunctions,this.defaultValue.showFunctions),showConstructors:c(fe.showConstructors,this.defaultValue.showConstructors),showDeprecated:c(fe.showDeprecated,this.defaultValue.showDeprecated),showFields:c(fe.showFields,this.defaultValue.showFields),showVariables:c(fe.showVariables,this.defaultValue.showVariables),showClasses:c(fe.showClasses,this.defaultValue.showClasses),showStructs:c(fe.showStructs,this.defaultValue.showStructs),showInterfaces:c(fe.showInterfaces,this.defaultValue.showInterfaces),showModules:c(fe.showModules,this.defaultValue.showModules),showProperties:c(fe.showProperties,this.defaultValue.showProperties),showEvents:c(fe.showEvents,this.defaultValue.showEvents),showOperators:c(fe.showOperators,this.defaultValue.showOperators),showUnits:c(fe.showUnits,this.defaultValue.showUnits),showValues:c(fe.showValues,this.defaultValue.showValues),showConstants:c(fe.showConstants,this.defaultValue.showConstants),showEnums:c(fe.showEnums,this.defaultValue.showEnums),showEnumMembers:c(fe.showEnumMembers,this.defaultValue.showEnumMembers),showKeywords:c(fe.showKeywords,this.defaultValue.showKeywords),showWords:c(fe.showWords,this.defaultValue.showWords),showColors:c(fe.showColors,this.defaultValue.showColors),showFiles:c(fe.showFiles,this.defaultValue.showFiles),showReferences:c(fe.showReferences,this.defaultValue.showReferences),showFolders:c(fe.showFolders,this.defaultValue.showFolders),showTypeParameters:c(fe.showTypeParameters,this.defaultValue.showTypeParameters),showSnippets:c(fe.showSnippets,this.defaultValue.showSnippets),showUsers:c(fe.showUsers,this.defaultValue.showUsers),showIssues:c(fe.showIssues,this.defaultValue.showIssues)}}}class Y extends g{constructor(){super(102,"smartSelect",{selectLeadingAndTrailingWhitespace:!0},{"editor.smartSelect.selectLeadingAndTrailingWhitespace":{description:y.localize(147,null),default:!0,type:"boolean"}})}validate(de){return!de||typeof de!="object"?this.defaultValue:{selectLeadingAndTrailingWhitespace:c(de.selectLeadingAndTrailingWhitespace,this.defaultValue.selectLeadingAndTrailingWhitespace)}}}class se extends n{constructor(){super(130)}compute(de,fe,_e){return fe.get(81)?!0:de.tabFocusMode}}function ge(be){switch(be){case"none":return 0;case"same":return 1;case"indent":return 2;case"deepIndent":return 3}}class me extends n{constructor(){super(132)}compute(de,fe,_e){const Le=fe.get(131);return{isDominatedByLongLines:de.isDominatedByLongLines,isWordWrapMinified:Le.isWordWrapMinified,isViewportWrapping:Le.isViewportWrapping,wrappingColumn:Le.wrappingColumn}}}const le="Consolas, 'Courier New', monospace",he="Menlo, Monaco, 'Courier New', monospace",ve="'Droid Sans Mono', 'monospace', monospace";e.EDITOR_FONT_DEFAULTS={fontFamily:m.isMacintosh?he:m.isLinux?ve:le,fontWeight:"normal",fontSize:m.isMacintosh?12:14,lineHeight:0,letterSpacing:0},e.editorOptionsRegistry=[];function pe(be){return e.editorOptionsRegistry[be.id]=be,be}e.EditorOptions={acceptSuggestionOnCommitCharacter:pe(new r(0,"acceptSuggestionOnCommitCharacter",!0,{markdownDescription:y.localize(148,null)})),acceptSuggestionOnEnter:pe(new f(1,"acceptSuggestionOnEnter","on",["on","smart","off"],{markdownEnumDescriptions:["",y.localize(149,null),""],markdownDescription:y.localize(150,null)})),accessibilitySupport:pe(new C),accessibilityPageSize:pe(new o(3,"accessibilityPageSize",10,1,1073741824,{description:y.localize(151,null)})),ariaLabel:pe(new d(4,"ariaLabel",y.localize(152,null))),autoClosingBrackets:pe(new f(5,"autoClosingBrackets","languageDefined",["always","languageDefined","beforeWhitespace","never"],{enumDescriptions:["",y.localize(153,null),y.localize(154,null),""],description:y.localize(155,null)})),autoClosingDelete:pe(new f(6,"autoClosingDelete","auto",["always","auto","never"],{enumDescriptions:["",y.localize(156,null),""],description:y.localize(157,null)})),autoClosingOvertype:pe(new f(7,"autoClosingOvertype","auto",["always","auto","never"],{enumDescriptions:["",y.localize(158,null),""],description:y.localize(159,null)})),autoClosingQuotes:pe(new f(8,"autoClosingQuotes","languageDefined",["always","languageDefined","beforeWhitespace","never"],{enumDescriptions:["",y.localize(160,null),y.localize(161,null),""],description:y.localize(162,null)})),autoIndent:pe(new S(9,"autoIndent",4,"full",["none","keep","brackets","advanced","full"],v,{enumDescriptions:[y.localize(163,null),y.localize(164,null),y.localize(165,null),y.localize(166,null),y.localize(167,null)],description:y.localize(168,null)})),automaticLayout:pe(new r(10,"automaticLayout",!1)),autoSurround:pe(new f(11,"autoSurround","languageDefined",["languageDefined","quotes","brackets","never"],{enumDescriptions:[y.localize(169,null),y.localize(170,null),y.localize(171,null),""],description:y.localize(172,null)})),bracketPairColorization:pe(new V),bracketPairGuides:pe(new $),stickyTabStops:pe(new r(104,"stickyTabStops",!1,{description:y.localize(173,null)})),codeLens:pe(new r(14,"codeLens",!0,{description:y.localize(174,null)})),codeLensFontFamily:pe(new d(15,"codeLensFontFamily","",{description:y.localize(175,null)})),codeLensFontSize:pe(new o(16,"codeLensFontSize",0,0,100,{type:"number",default:0,minimum:0,maximum:100,markdownDescription:y.localize(176,null)})),colorDecorators:pe(new r(17,"colorDecorators",!0,{description:y.localize(177,null)})),columnSelection:pe(new r(18,"columnSelection",!1,{description:y.localize(178,null)})),comments:pe(new _),contextmenu:pe(new r(20,"contextmenu",!0)),copyWithSyntaxHighlighting:pe(new r(21,"copyWithSyntaxHighlighting",!0,{description:y.localize(179,null)})),cursorBlinking:pe(new S(22,"cursorBlinking",1,"blink",["blink","smooth","phase","expand","solid"],L,{description:y.localize(180,null)})),cursorSmoothCaretAnimation:pe(new r(23,"cursorSmoothCaretAnimation",!1,{description:y.localize(181,null)})),cursorStyle:pe(new S(24,"cursorStyle",E.Line,"line",["line","block","underline","line-thin","block-outline","underline-thin"],N,{description:y.localize(182,null)})),cursorSurroundingLines:pe(new o(25,"cursorSurroundingLines",0,0,1073741824,{description:y.localize(183,null)})),cursorSurroundingLinesStyle:pe(new f(26,"cursorSurroundingLinesStyle","default",["default","all"],{enumDescriptions:[y.localize(184,null),y.localize(185,null)],description:y.localize(186,null)})),cursorWidth:pe(new o(27,"cursorWidth",0,0,1073741824,{markdownDescription:y.localize(187,null)})),disableLayerHinting:pe(new r(28,"disableLayerHinting",!1)),disableMonospaceOptimizations:pe(new r(29,"disableMonospaceOptimizations",!1)),domReadOnly:pe(new r(30,"domReadOnly",!1)),dragAndDrop:pe(new r(31,"dragAndDrop",!0,{description:y.localize(188,null)})),emptySelectionClipboard:pe(new M),extraEditorClassName:pe(new d(33,"extraEditorClassName","")),fastScrollSensitivity:pe(new a(34,"fastScrollSensitivity",5,be=>be<=0?5:be,{markdownDescription:y.localize(189,null)})),find:pe(new O),fixedOverflowWidgets:pe(new r(36,"fixedOverflowWidgets",!1)),folding:pe(new r(37,"folding",!0,{description:y.localize(190,null)})),foldingStrategy:pe(new f(38,"foldingStrategy","auto",["auto","indentation"],{enumDescriptions:[y.localize(191,null),y.localize(192,null)],description:y.localize(193,null)})),foldingHighlight:pe(new r(39,"foldingHighlight",!0,{description:y.localize(194,null)})),foldingImportsByDefault:pe(new r(40,"foldingImportsByDefault",!1,{description:y.localize(195,null)})),foldingMaximumRegions:pe(new o(41,"foldingMaximumRegions",5e3,10,65e3,{description:y.localize(196,null)})),unfoldOnClickAfterEndOfLine:pe(new r(42,"unfoldOnClickAfterEndOfLine",!1,{description:y.localize(197,null)})),fontFamily:pe(new d(43,"fontFamily",e.EDITOR_FONT_DEFAULTS.fontFamily,{description:y.localize(198,null)})),fontInfo:pe(new T),fontLigatures2:pe(new B),fontSize:pe(new R),fontWeight:pe(new P),formatOnPaste:pe(new r(48,"formatOnPaste",!1,{description:y.localize(199,null)})),formatOnType:pe(new r(49,"formatOnType",!1,{description:y.localize(200,null)})),glyphMargin:pe(new r(50,"glyphMargin",!0,{description:y.localize(201,null)})),gotoLocation:pe(new F),hideCursorInOverviewRuler:pe(new r(52,"hideCursorInOverviewRuler",!1,{description:y.localize(202,null)})),hover:pe(new W),inDiffEditor:pe(new r(54,"inDiffEditor",!1)),letterSpacing:pe(new a(56,"letterSpacing",e.EDITOR_FONT_DEFAULTS.letterSpacing,be=>a.clamp(be,-5,20),{description:y.localize(203,null)})),lightbulb:pe(new H),lineDecorationsWidth:pe(new l(58,"lineDecorationsWidth",10)),lineHeight:pe(new X),lineNumbers:pe(new U),lineNumbersMinChars:pe(new o(61,"lineNumbersMinChars",5,1,300)),linkedEditing:pe(new r(62,"linkedEditing",!1,{description:y.localize(204,null)})),links:pe(new r(63,"links",!0,{description:y.localize(205,null)})),matchBrackets:pe(new f(64,"matchBrackets","always",["always","near","never"],{description:y.localize(206,null)})),minimap:pe(new G),mouseStyle:pe(new f(66,"mouseStyle","text",["text","default","copy"])),mouseWheelScrollSensitivity:pe(new a(67,"mouseWheelScrollSensitivity",1,be=>be===0?1:be,{markdownDescription:y.localize(207,null)})),mouseWheelZoom:pe(new r(68,"mouseWheelZoom",!1,{markdownDescription:y.localize(208,null)})),multiCursorMergeOverlapping:pe(new r(69,"multiCursorMergeOverlapping",!0,{description:y.localize(209,null)})),multiCursorModifier:pe(new S(70,"multiCursorModifier","altKey","alt",["ctrlCmd","alt"],re,{markdownEnumDescriptions:[y.localize(210,null),y.localize(211,null)],markdownDescription:y.localize(212,null)})),multiCursorPaste:pe(new f(71,"multiCursorPaste","spread",["spread","full"],{markdownEnumDescriptions:[y.localize(213,null),y.localize(214,null)],markdownDescription:y.localize(215,null)})),occurrencesHighlight:pe(new r(72,"occurrencesHighlight",!0,{description:y.localize(216,null)})),overviewRulerBorder:pe(new r(73,"overviewRulerBorder",!0,{description:y.localize(217,null)})),overviewRulerLanes:pe(new o(74,"overviewRulerLanes",3,0,3)),padding:pe(new ae),parameterHints:pe(new oe),peekWidgetDefaultFocus:pe(new f(77,"peekWidgetDefaultFocus","tree",["tree","editor"],{enumDescriptions:[y.localize(218,null),y.localize(219,null)],description:y.localize(220,null)})),definitionLinkOpensInPeek:pe(new r(78,"definitionLinkOpensInPeek",!1,{description:y.localize(221,null)})),quickSuggestions:pe(new x),quickSuggestionsDelay:pe(new o(80,"quickSuggestionsDelay",10,0,1073741824,{description:y.localize(222,null)})),readOnly:pe(new r(81,"readOnly",!1)),renameOnType:pe(new r(82,"renameOnType",!1,{description:y.localize(223,null),markdownDeprecationMessage:y.localize(224,null)})),renderControlCharacters:pe(new r(83,"renderControlCharacters",!0,{description:y.localize(225,null),restricted:!0})),renderFinalNewline:pe(new r(84,"renderFinalNewline",!0,{description:y.localize(226,null)})),renderLineHighlight:pe(new f(85,"renderLineHighlight","line",["none","gutter","line","all"],{enumDescriptions:["","","",y.localize(227,null)],description:y.localize(228,null)})),renderLineHighlightOnlyWhenFocus:pe(new r(86,"renderLineHighlightOnlyWhenFocus",!1,{description:y.localize(229,null)})),renderValidationDecorations:pe(new f(87,"renderValidationDecorations","editable",["editable","on","off"])),renderWhitespace:pe(new f(88,"renderWhitespace","selection",["none","boundary","selection","trailing","all"],{enumDescriptions:["",y.localize(230,null),y.localize(231,null),y.localize(232,null),""],description:y.localize(233,null)})),revealHorizontalRightPadding:pe(new o(89,"revealHorizontalRightPadding",30,0,1e3)),roundedSelection:pe(new r(90,"roundedSelection",!0,{description:y.localize(234,null)})),rulers:pe(new ne),scrollbar:pe(new ee),scrollBeyondLastColumn:pe(new o(93,"scrollBeyondLastColumn",5,0,1073741824,{description:y.localize(235,null)})),scrollBeyondLastLine:pe(new r(94,"scrollBeyondLastLine",!0,{description:y.localize(236,null)})),scrollPredominantAxis:pe(new r(95,"scrollPredominantAxis",!0,{description:y.localize(237,null)})),selectionClipboard:pe(new r(96,"selectionClipboard",!0,{description:y.localize(238,null),included:m.isLinux})),selectionHighlight:pe(new r(97,"selectionHighlight",!0,{description:y.localize(239,null)})),selectOnLineNumbers:pe(new r(98,"selectOnLineNumbers",!0)),showFoldingControls:pe(new f(99,"showFoldingControls","mouseover",["always","mouseover"],{enumDescriptions:[y.localize(240,null),y.localize(241,null)],description:y.localize(242,null)})),showUnused:pe(new r(100,"showUnused",!0,{description:y.localize(243,null)})),showDeprecated:pe(new r(126,"showDeprecated",!0,{description:y.localize(244,null)})),inlayHints:pe(new q),snippetSuggestions:pe(new f(101,"snippetSuggestions","inline",["top","bottom","inline","none"],{enumDescriptions:[y.localize(245,null),y.localize(246,null),y.localize(247,null),y.localize(248,null)],description:y.localize(249,null)})),smartSelect:pe(new Y),smoothScrolling:pe(new r(103,"smoothScrolling",!1,{description:y.localize(250,null)})),stopRenderingLineAfter:pe(new o(105,"stopRenderingLineAfter",1e4,-1,1073741824)),suggest:pe(new J),inlineSuggest:pe(new z),suggestFontSize:pe(new o(107,"suggestFontSize",0,0,1e3,{markdownDescription:y.localize(251,null)})),suggestLineHeight:pe(new o(108,"suggestLineHeight",0,0,1e3,{markdownDescription:y.localize(252,null)})),suggestOnTriggerCharacters:pe(new r(109,"suggestOnTriggerCharacters",!0,{description:y.localize(253,null)})),suggestSelection:pe(new f(110,"suggestSelection","first",["first","recentlyUsed","recentlyUsedByPrefix"],{markdownEnumDescriptions:[y.localize(254,null),y.localize(255,null),y.localize(256,null)],description:y.localize(257,null)})),tabCompletion:pe(new f(111,"tabCompletion","off",["on","off","onlySnippets"],{enumDescriptions:[y.localize(258,null),y.localize(259,null),y.localize(260,null)],description:y.localize(261,null)})),tabIndex:pe(new o(112,"tabIndex",0,-1,1073741824)),unicodeHighlight:pe(new ue),unusualLineTerminators:pe(new f(114,"unusualLineTerminators","prompt",["auto","off","prompt"],{enumDescriptions:[y.localize(262,null),y.localize(263,null),y.localize(264,null)],description:y.localize(265,null)})),useShadowDOM:pe(new r(115,"useShadowDOM",!0)),useTabStops:pe(new r(116,"useTabStops",!0,{description:y.localize(266,null)})),wordSeparators:pe(new d(117,"wordSeparators",D.USUAL_WORD_SEPARATORS,{description:y.localize(267,null)})),wordWrap:pe(new f(118,"wordWrap","off",["off","on","wordWrapColumn","bounded"],{markdownEnumDescriptions:[y.localize(268,null),y.localize(269,null),y.localize(270,null),y.localize(271,null)],description:y.localize(272,null)})),wordWrapBreakAfterCharacters:pe(new d(119,"wordWrapBreakAfterCharacters"," })]?|/&.,;\xA2\xB0\u2032\u2033\u2030\u2103\u3001\u3002\uFF61\uFF64\uFFE0\uFF0C\uFF0E\uFF1A\uFF1B\uFF1F\uFF01\uFF05\u30FB\uFF65\u309D\u309E\u30FD\u30FE\u30FC\u30A1\u30A3\u30A5\u30A7\u30A9\u30C3\u30E3\u30E5\u30E7\u30EE\u30F5\u30F6\u3041\u3043\u3045\u3047\u3049\u3063\u3083\u3085\u3087\u308E\u3095\u3096\u31F0\u31F1\u31F2\u31F3\u31F4\u31F5\u31F6\u31F7\u31F8\u31F9\u31FA\u31FB\u31FC\u31FD\u31FE\u31FF\u3005\u303B\uFF67\uFF68\uFF69\uFF6A\uFF6B\uFF6C\uFF6D\uFF6E\uFF6F\uFF70\u201D\u3009\u300B\u300D\u300F\u3011\u3015\uFF09\uFF3D\uFF5D\uFF63")),wordWrapBreakBeforeCharacters:pe(new d(120,"wordWrapBreakBeforeCharacters","([{\u2018\u201C\u3008\u300A\u300C\u300E\u3010\u3014\uFF08\uFF3B\uFF5B\uFF62\xA3\xA5\uFF04\uFFE1\uFFE5+\uFF0B")),wordWrapColumn:pe(new o(121,"wordWrapColumn",80,1,1073741824,{markdownDescription:y.localize(273,null)})),wordWrapOverride1:pe(new f(122,"wordWrapOverride1","inherit",["off","on","inherit"])),wordWrapOverride2:pe(new f(123,"wordWrapOverride2","inherit",["off","on","inherit"])),wrappingIndent:pe(new S(124,"wrappingIndent",1,"same",["none","same","indent","deepIndent"],ge,{enumDescriptions:[y.localize(274,null),y.localize(275,null),y.localize(276,null),y.localize(277,null)],description:y.localize(278,null)})),wrappingStrategy:pe(new f(125,"wrappingStrategy","simple",["simple","advanced"],{enumDescriptions:[y.localize(279,null),y.localize(280,null)],description:y.localize(281,null)})),editorClassName:pe(new k),pixelRatio:pe(new Z),tabFocusMode:pe(new se),layoutInfo:pe(new A),wrappingInfo:pe(new me)}}),define(te[62],ie([1,0,34,30,31]),function(j,e,y,m,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.applyFontInfo=void 0;function I(w,b){w instanceof m.FastDomNode?(w.setFontFamily(b.getMassagedFontFamily(y.isSafari?D.EDITOR_FONT_DEFAULTS.fontFamily:null)),w.setFontWeight(b.fontWeight),w.setFontSize(b.fontSize),w.setFontFeatureSettings(b.fontFeatureSettings),w.setLineHeight(b.lineHeight),w.setLetterSpacing(b.letterSpacing)):(w.style.fontFamily=b.getMassagedFontFamily(y.isSafari?D.EDITOR_FONT_DEFAULTS.fontFamily:null),w.style.fontWeight=b.fontWeight,w.style.fontSize=b.fontSize+"px",w.style.fontFeatureSettings=b.fontFeatureSettings,w.style.lineHeight=b.lineHeight+"px",w.style.letterSpacing=b.letterSpacing+"px")}e.applyFontInfo=I}),define(te[507],ie([1,0,62]),function(j,e,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.readCharWidths=e.CharWidthRequest=void 0;class m{constructor(b,p){this.chr=b,this.type=p,this.width=0}fulfill(b){this.width=b}}e.CharWidthRequest=m;class D{constructor(b,p){this._bareFontInfo=b,this._requests=p,this._container=null,this._testElements=null}read(){this._createDomElements(),document.body.appendChild(this._container),this._readFromDomElements(),document.body.removeChild(this._container),this._container=null,this._testElements=null}_createDomElements(){const b=document.createElement("div");b.style.position="absolute",b.style.top="-50000px",b.style.width="50000px";const p=document.createElement("div");(0,y.applyFontInfo)(p,this._bareFontInfo),b.appendChild(p);const h=document.createElement("div");(0,y.applyFontInfo)(h,this._bareFontInfo),h.style.fontWeight="bold",b.appendChild(h);const g=document.createElement("div");(0,y.applyFontInfo)(g,this._bareFontInfo),g.style.fontStyle="italic",b.appendChild(g);const t=[];for(const i of this._requests){let n;i.type===0&&(n=p),i.type===2&&(n=h),i.type===1&&(n=g),n.appendChild(document.createElement("br"));const l=document.createElement("span");D._render(l,i),n.appendChild(l),t.push(l)}this._container=b,this._testElements=t}static _render(b,p){if(p.chr===" "){let h="\xA0";for(let g=0;g<8;g++)h+=h;b.innerText=h}else{let h=p.chr;for(let g=0;g<8;g++)h+=h;b.textContent=h}}_readFromDomElements(){for(let b=0,p=this._requests.length;b<p;b++){const h=this._requests[b],g=this._testElements[b];h.fulfill(g.offsetWidth/256)}}}function I(w,b){new D(w,b).read()}e.readCharWidths=I}),define(te[266],ie([1,0,34,4,2,507,31,174]),function(j,e,y,m,D,I,w,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.FontMeasurements=void 0;class p extends D.Disposable{constructor(){super();this._onDidChange=this._register(new m.Emitter),this.onDidChange=this._onDidChange.event,this._cache=new h,this._evictUntrustedReadingsTimeout=-1}dispose(){this._evictUntrustedReadingsTimeout!==-1&&(window.clearTimeout(this._evictUntrustedReadingsTimeout),this._evictUntrustedReadingsTimeout=-1),super.dispose()}clearAllFontInfos(){this._cache=new h,this._onDidChange.fire()}_writeToCache(t,i){this._cache.put(t,i),!i.isTrusted&&this._evictUntrustedReadingsTimeout===-1&&(this._evictUntrustedReadingsTimeout=window.setTimeout(()=>{this._evictUntrustedReadingsTimeout=-1,this._evictUntrustedReadings()},5e3))}_evictUntrustedReadings(){const t=this._cache.getValues();let i=!1;for(const n of t)n.isTrusted||(i=!0,this._cache.remove(n));i&&this._onDidChange.fire()}readFontInfo(t){if(!this._cache.has(t)){let i=this._actualReadFontInfo(t);(i.typicalHalfwidthCharacterWidth<=2||i.typicalFullwidthCharacterWidth<=2||i.spaceWidth<=2||i.maxDigitWidth<=2)&&(i=new b.FontInfo({pixelRatio:y.PixelRatio.value,fontFamily:i.fontFamily,fontWeight:i.fontWeight,fontSize:i.fontSize,fontFeatureSettings:i.fontFeatureSettings,lineHeight:i.lineHeight,letterSpacing:i.letterSpacing,isMonospace:i.isMonospace,typicalHalfwidthCharacterWidth:Math.max(i.typicalHalfwidthCharacterWidth,5),typicalFullwidthCharacterWidth:Math.max(i.typicalFullwidthCharacterWidth,5),canUseHalfwidthRightwardsArrow:i.canUseHalfwidthRightwardsArrow,spaceWidth:Math.max(i.spaceWidth,5),middotWidth:Math.max(i.middotWidth,5),wsmiddotWidth:Math.max(i.wsmiddotWidth,5),maxDigitWidth:Math.max(i.maxDigitWidth,5)},!1)),this._writeToCache(t,i)}return this._cache.get(t)}_createRequest(t,i,n,l){const c=new I.CharWidthRequest(t,i);return n.push(c),l&&l.push(c),c}_actualReadFontInfo(t){const i=[],n=[],l=this._createRequest("n",0,i,n),c=this._createRequest("\uFF4D",0,i,null),r=this._createRequest(" ",0,i,n),s=this._createRequest("0",0,i,n),o=this._createRequest("1",0,i,n),a=this._createRequest("2",0,i,n),d=this._createRequest("3",0,i,n),u=this._createRequest("4",0,i,n),f=this._createRequest("5",0,i,n),S=this._createRequest("6",0,i,n),v=this._createRequest("7",0,i,n),C=this._createRequest("8",0,i,n),_=this._createRequest("9",0,i,n),L=this._createRequest("\u2192",0,i,n),E=this._createRequest("\uFFEB",0,i,null),N=this._createRequest("\xB7",0,i,n),k=this._createRequest(String.fromCharCode(11825),0,i,null),M="|/-_ilm%";for(let P=0,F=M.length;P<F;P++)this._createRequest(M.charAt(P),0,i,n),this._createRequest(M.charAt(P),1,i,n),this._createRequest(M.charAt(P),2,i,n);(0,I.readCharWidths)(t,i);const O=Math.max(s.width,o.width,a.width,d.width,u.width,f.width,S.width,v.width,C.width,_.width);let B=t.fontFeatureSettings===w.EditorFontLigatures.OFF;const T=n[0].width;for(let P=1,F=n.length;B&&P<F;P++){const W=T-n[P].width;if(W<-.001||W>.001){B=!1;break}}let R=!0;return B&&E.width!==T&&(R=!1),E.width>L.width&&(R=!1),new b.FontInfo({pixelRatio:y.PixelRatio.value,fontFamily:t.fontFamily,fontWeight:t.fontWeight,fontSize:t.fontSize,fontFeatureSettings:t.fontFeatureSettings,lineHeight:t.lineHeight,letterSpacing:t.letterSpacing,isMonospace:B,typicalHalfwidthCharacterWidth:l.width,typicalFullwidthCharacterWidth:c.width,canUseHalfwidthRightwardsArrow:R,spaceWidth:r.width,middotWidth:N.width,wsmiddotWidth:k.width,maxDigitWidth:O},!0)}}class h{constructor(){this._keys=Object.create(null),this._values=Object.create(null)}has(t){const i=t.getId();return!!this._values[i]}get(t){const i=t.getId();return this._values[i]}put(t,i){const n=t.getId();this._keys[n]=t,this._values[n]=i}remove(t){const i=t.getId();delete this._keys[i],delete this._values[i]}getValues(){return Object.keys(this._keys).map(t=>this._values[t])}}e.FontMeasurements=new p}),define(te[508],ie([1,0,90,8,62,91,251]),function(j,e,y,m,D,I,w){"use strict";var b;Object.defineProperty(e,"__esModule",{value:!0}),e.DOMLineBreaksComputerFactory=void 0;const p=(b=window.trustedTypes)===null||b===void 0?void 0:b.createPolicy("domLineBreaksComputer",{createHTML:c=>c});class h{static create(){return new h}constructor(){}createLineBreaksComputer(r,s,o,a){const d=[],u=[];return{addRequest:(f,S,v)=>{d.push(f),u.push(S)},finalize:()=>g(d,r,s,o,a,u)}}}e.DOMLineBreaksComputerFactory=h;function g(c,r,s,o,a,d){var u;function f(A){const H=d[A];if(H){const q=I.LineInjectedText.applyInjectedText(c[A],H),X=H.map(re=>re.options),G=H.map(re=>re.column-1);return new w.ModelLineProjectionData(G,X,[q.length],[],0)}else return null}if(o===-1){const A=[];for(let H=0,q=c.length;H<q;H++)A[H]=f(H);return A}const S=Math.round(o*r.typicalHalfwidthCharacterWidth),C=Math.round(s*(a===3?2:a===2?1:0)),_=Math.ceil(r.spaceWidth*C),L=document.createElement("div");(0,D.applyFontInfo)(L,r);const E=(0,y.createStringBuilder)(1e4),N=[],k=[],M=[],O=[],B=[];for(let A=0;A<c.length;A++){const H=I.LineInjectedText.applyInjectedText(c[A],d[A]);let q=0,X=0,G=S;if(a!==0)if(q=m.firstNonWhitespaceIndex(H),q===-1)q=0;else{for(let Z=0;Z<q;Z++)X+=H.charCodeAt(Z)===9?s-X%s:1;const oe=Math.ceil(r.spaceWidth*X);oe+r.typicalFullwidthCharacterWidth>S?(q=0,X=0):G=S-oe}const re=H.substr(q),ae=t(re,X,s,G,E,_);N[A]=q,k[A]=X,M[A]=re,O[A]=ae[0],B[A]=ae[1]}const T=E.build(),R=(u=p==null?void 0:p.createHTML(T))!==null&&u!==void 0?u:T;L.innerHTML=R,L.style.position="absolute",L.style.top="10000",L.style.wordWrap="break-word",document.body.appendChild(L);const P=document.createRange(),F=Array.prototype.slice.call(L.children,0),W=[];for(let A=0;A<c.length;A++){const H=F[A],q=i(P,H,M[A],O[A]);if(q===null){W[A]=f(A);continue}const X=N[A],G=k[A]+C,re=B[A],ae=[];for(let U=0,Q=q.length;U<Q;U++)ae[U]=re[q[U]];if(X!==0)for(let U=0,Q=q.length;U<Q;U++)q[U]+=X;let oe,Z;const x=d[A];x?(oe=x.map(U=>U.options),Z=x.map(U=>U.column-1)):(oe=null,Z=null),W[A]=new w.ModelLineProjectionData(Z,oe,q,ae,G)}return document.body.removeChild(L),W}function t(c,r,s,o,a,d){if(d!==0){const L=String(d);a.appendASCIIString('<div style="text-indent: -'),a.appendASCIIString(L),a.appendASCIIString("px; padding-left: "),a.appendASCIIString(L),a.appendASCIIString("px; box-sizing: border-box; width:")}else a.appendASCIIString('<div style="width:');a.appendASCIIString(String(o)),a.appendASCIIString('px;">');const u=c.length;let f=r,S=0;const v=[],C=[];let _=0<u?c.charCodeAt(0):0;a.appendASCIIString("<span>");for(let L=0;L<u;L++){L!==0&&L%16384==0&&a.appendASCIIString("</span><span>"),v[L]=S,C[L]=f;const E=_;_=L+1<u?c.charCodeAt(L+1):0;let N=1,k=1;switch(E){case 9:N=s-f%s,k=N;for(let M=1;M<=N;M++)M<N?a.write1(160):a.appendASCII(32);break;case 32:_===32?a.write1(160):a.appendASCII(32);break;case 60:a.appendASCIIString("<");break;case 62:a.appendASCIIString(">");break;case 38:a.appendASCIIString("&");break;case 0:a.appendASCIIString("�");break;case 65279:case 8232:case 8233:case 133:a.write1(65533);break;default:m.isFullWidthCharacter(E)&&k++,E<32?a.write1(9216+E):a.write1(E)}S+=N,f+=k}return a.appendASCIIString("</span>"),v[c.length]=S,C[c.length]=f,a.appendASCIIString("</div>"),[v,C]}function i(c,r,s,o){if(s.length<=1)return null;const a=Array.prototype.slice.call(r.children,0),d=[];try{n(c,a,o,0,null,s.length-1,null,d)}catch(u){return console.log(u),null}return d.length===0?null:(d.push(s.length),d)}function n(c,r,s,o,a,d,u,f){if(o===d||(a=a||l(c,r,s[o],s[o+1]),u=u||l(c,r,s[d],s[d+1]),Math.abs(a[0].top-u[0].top)<=.1))return;if(o+1===d){f.push(d);return}const S=o+(d-o)/2|0,v=l(c,r,s[S],s[S+1]);n(c,r,s,o,a,S,v,f),n(c,r,s,S,v,d,u,f)}function l(c,r,s,o){return c.setStart(r[s/16384|0].firstChild,s%16384),c.setEnd(r[o/16384|0].firstChild,o%16384),c.getClientRects()}}),define(te[509],ie([1,0,30,62,176,50]),function(j,e,y,m,D,I){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MarginViewOverlays=e.ContentViewOverlays=e.ViewOverlayLine=e.ViewOverlays=void 0;class w extends I.ViewPart{constructor(t){super(t);this._visibleLines=new D.VisibleLinesCollection(this),this.domNode=this._visibleLines.domNode,this._dynamicOverlays=[],this._isFocused=!1,this.domNode.setClassName("view-overlays")}shouldRender(){if(super.shouldRender())return!0;for(let t=0,i=this._dynamicOverlays.length;t<i;t++)if(this._dynamicOverlays[t].shouldRender())return!0;return!1}dispose(){super.dispose();for(let t=0,i=this._dynamicOverlays.length;t<i;t++)this._dynamicOverlays[t].dispose();this._dynamicOverlays=[]}getDomNode(){return this.domNode}createVisibleLine(){return new b(this._context.configuration,this._dynamicOverlays)}addDynamicOverlay(t){this._dynamicOverlays.push(t)}onConfigurationChanged(t){this._visibleLines.onConfigurationChanged(t);const i=this._visibleLines.getStartLineNumber(),n=this._visibleLines.getEndLineNumber();for(let l=i;l<=n;l++)this._visibleLines.getVisibleLine(l).onConfigurationChanged(t);return!0}onFlushed(t){return this._visibleLines.onFlushed(t)}onFocusChanged(t){return this._isFocused=t.isFocused,!0}onLinesChanged(t){return this._visibleLines.onLinesChanged(t)}onLinesDeleted(t){return this._visibleLines.onLinesDeleted(t)}onLinesInserted(t){return this._visibleLines.onLinesInserted(t)}onScrollChanged(t){return this._visibleLines.onScrollChanged(t)||!0}onTokensChanged(t){return this._visibleLines.onTokensChanged(t)}onZonesChanged(t){return this._visibleLines.onZonesChanged(t)}prepareRender(t){const i=this._dynamicOverlays.filter(n=>n.shouldRender());for(let n=0,l=i.length;n<l;n++){const c=i[n];c.prepareRender(t),c.onDidRender()}}render(t){this._viewOverlaysRender(t),this.domNode.toggleClassName("focused",this._isFocused)}_viewOverlaysRender(t){this._visibleLines.renderLines(t.viewportData)}}e.ViewOverlays=w;class b{constructor(t,i){this._configuration=t,this._lineHeight=this._configuration.options.get(59),this._dynamicOverlays=i,this._domNode=null,this._renderedContent=null}getDomNode(){return this._domNode?this._domNode.domNode:null}setDomNode(t){this._domNode=(0,y.createFastDomNode)(t)}onContentChanged(){}onTokensChanged(){}onConfigurationChanged(t){this._lineHeight=this._configuration.options.get(59)}renderLine(t,i,n,l){let c="";for(let r=0,s=this._dynamicOverlays.length;r<s;r++)c+=this._dynamicOverlays[r].render(n.startLineNumber,t);return this._renderedContent===c?!1:(this._renderedContent=c,l.appendASCIIString('<div style="position:absolute;top:'),l.appendASCIIString(String(i)),l.appendASCIIString("px;width:100%;height:"),l.appendASCIIString(String(this._lineHeight)),l.appendASCIIString('px;">'),l.appendASCIIString(c),l.appendASCIIString("</div>"),!0)}layoutLine(t,i){this._domNode&&(this._domNode.setTop(i),this._domNode.setHeight(this._lineHeight))}}e.ViewOverlayLine=b;class p extends w{constructor(t){super(t);const n=this._context.configuration.options.get(131);this._contentWidth=n.contentWidth,this.domNode.setHeight(0)}onConfigurationChanged(t){const n=this._context.configuration.options.get(131);return this._contentWidth=n.contentWidth,super.onConfigurationChanged(t)||!0}onScrollChanged(t){return super.onScrollChanged(t)||t.scrollWidthChanged}_viewOverlaysRender(t){super._viewOverlaysRender(t),this.domNode.setWidth(Math.max(t.scrollWidth,this._contentWidth))}}e.ContentViewOverlays=p;class h extends w{constructor(t){super(t);const i=this._context.configuration.options,n=i.get(131);this._contentLeft=n.contentLeft,this.domNode.setClassName("margin-view-overlays"),this.domNode.setWidth(1),(0,m.applyFontInfo)(this.domNode,i.get(44))}onConfigurationChanged(t){const i=this._context.configuration.options;(0,m.applyFontInfo)(this.domNode,i.get(44));const n=i.get(131);return this._contentLeft=n.contentLeft,super.onConfigurationChanged(t)||!0}onScrollChanged(t){return super.onScrollChanged(t)||t.scrollHeightChanged}_viewOverlaysRender(t){super._viewOverlaysRender(t);const i=Math.min(t.scrollHeight,1e6);this.domNode.setHeight(i),this.domNode.setWidth(this._contentLeft)}}e.MarginViewOverlays=h}),define(te[510],ie([1,0,7,30,8,62,31,11,3,141]),function(j,e,y,m,D,I,w,b,p,h){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ViewCursor=void 0;class g{constructor(n,l,c,r,s,o){this.top=n,this.left=l,this.width=c,this.height=r,this.textContent=s,this.textContentClassName=o}}class t{constructor(n){this._context=n;const l=this._context.configuration.options,c=l.get(44);this._cursorStyle=l.get(24),this._lineHeight=l.get(59),this._typicalHalfwidthCharacterWidth=c.typicalHalfwidthCharacterWidth,this._lineCursorWidth=Math.min(l.get(27),this._typicalHalfwidthCharacterWidth),this._isVisible=!0,this._domNode=(0,m.createFastDomNode)(document.createElement("div")),this._domNode.setClassName(`cursor ${h.MOUSE_CURSOR_TEXT_CSS_CLASS_NAME}`),this._domNode.setHeight(this._lineHeight),this._domNode.setTop(0),this._domNode.setLeft(0),(0,I.applyFontInfo)(this._domNode,c),this._domNode.setDisplay("none"),this._position=new b.Position(1,1),this._lastRenderedContent="",this._renderData=null}getDomNode(){return this._domNode}getPosition(){return this._position}show(){this._isVisible||(this._domNode.setVisibility("inherit"),this._isVisible=!0)}hide(){this._isVisible&&(this._domNode.setVisibility("hidden"),this._isVisible=!1)}onConfigurationChanged(n){const l=this._context.configuration.options,c=l.get(44);return this._cursorStyle=l.get(24),this._lineHeight=l.get(59),this._typicalHalfwidthCharacterWidth=c.typicalHalfwidthCharacterWidth,this._lineCursorWidth=Math.min(l.get(27),this._typicalHalfwidthCharacterWidth),(0,I.applyFontInfo)(this._domNode,c),!0}onCursorPositionChanged(n){return this._position=n,!0}_getGraphemeAwarePosition(){const{lineNumber:n,column:l}=this._position,c=this._context.model.getLineContent(n),[r,s]=D.getCharContainingOffset(c,l-1);return[new b.Position(n,r+1),c.substring(r,s)]}_prepareRender(n){let l="";const[c,r]=this._getGraphemeAwarePosition();if(this._cursorStyle===w.TextEditorCursorStyle.Line||this._cursorStyle===w.TextEditorCursorStyle.LineThin){const v=n.visibleRangeForPosition(c);if(!v||v.outsideRenderedLine)return null;let C;this._cursorStyle===w.TextEditorCursorStyle.Line?(C=y.computeScreenAwareSize(this._lineCursorWidth>0?this._lineCursorWidth:2),C>2&&(l=r)):C=y.computeScreenAwareSize(1);let _=v.left;C>=2&&_>=1&&(_-=1);const L=n.getVerticalOffsetForLineNumber(c.lineNumber)-n.bigNumbersDelta;return new g(L,_,C,this._lineHeight,l,"")}const s=n.linesVisibleRangesForRange(new p.Range(c.lineNumber,c.column,c.lineNumber,c.column+r.length),!1);if(!s||s.length===0)return null;const o=s[0];if(o.outsideRenderedLine||o.ranges.length===0)return null;const a=o.ranges[0],d=a.width<1?this._typicalHalfwidthCharacterWidth:a.width;let u="";if(this._cursorStyle===w.TextEditorCursorStyle.Block){const v=this._context.model.getViewLineData(c.lineNumber);l=r;const C=v.tokens.findTokenIndexAtOffset(c.column-1);u=v.tokens.getClassName(C)}let f=n.getVerticalOffsetForLineNumber(c.lineNumber)-n.bigNumbersDelta,S=this._lineHeight;return(this._cursorStyle===w.TextEditorCursorStyle.Underline||this._cursorStyle===w.TextEditorCursorStyle.UnderlineThin)&&(f+=this._lineHeight-2,S=2),new g(f,a.left,d,S,l,u)}prepareRender(n){this._renderData=this._prepareRender(n)}render(n){return this._renderData?(this._lastRenderedContent!==this._renderData.textContent&&(this._lastRenderedContent=this._renderData.textContent,this._domNode.domNode.textContent=this._lastRenderedContent),this._domNode.setClassName(`cursor ${h.MOUSE_CURSOR_TEXT_CSS_CLASS_NAME} ${this._renderData.textContentClassName}`),this._domNode.setDisplay("block"),this._domNode.setTop(this._renderData.top),this._domNode.setLeft(this._renderData.left),this._domNode.setWidth(this._renderData.width),this._domNode.setLineHeight(this._renderData.height),this._domNode.setHeight(this._renderData.height),{domNode:this._domNode.domNode,position:this._position,contentLeft:this._renderData.left,height:this._renderData.height,width:2}):(this._domNode.setDisplay("none"),null)}}e.ViewCursor=t}),define(te[267],ie([1,0,11,3,69,31]),function(j,e,y,m,D,I){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.isModelDecorationInString=e.isModelDecorationInComment=e.isModelDecorationVisible=e.ViewModelDecorations=void 0;class w{constructor(i,n,l,c,r){this.editorId=i,this.model=n,this.configuration=l,this._linesCollection=c,this._coordinatesConverter=r,this._decorationsCache=Object.create(null),this._cachedModelDecorationsResolver=null,this._cachedModelDecorationsResolverViewRange=null}_clearCachedModelDecorationsResolver(){this._cachedModelDecorationsResolver=null,this._cachedModelDecorationsResolverViewRange=null}dispose(){this._decorationsCache=Object.create(null),this._clearCachedModelDecorationsResolver()}reset(){this._decorationsCache=Object.create(null),this._clearCachedModelDecorationsResolver()}onModelDecorationsChanged(){this._decorationsCache=Object.create(null),this._clearCachedModelDecorationsResolver()}onLineMappingChanged(){this._decorationsCache=Object.create(null),this._clearCachedModelDecorationsResolver()}_getOrCreateViewModelDecoration(i){const n=i.id;let l=this._decorationsCache[n];if(!l){const c=i.range,r=i.options;let s;if(r.isWholeLine){const o=this._coordinatesConverter.convertModelPositionToViewPosition(new y.Position(c.startLineNumber,1),0),a=this._coordinatesConverter.convertModelPositionToViewPosition(new y.Position(c.endLineNumber,this.model.getLineMaxColumn(c.endLineNumber)),1);s=new m.Range(o.lineNumber,o.column,a.lineNumber,a.column)}else s=this._coordinatesConverter.convertModelRangeToViewRange(c,1);l=new D.ViewModelDecoration(s,r),this._decorationsCache[n]=l}return l}getDecorationsViewportData(i){let n=this._cachedModelDecorationsResolver!==null;return n=n&&i.equalsRange(this._cachedModelDecorationsResolverViewRange),n||(this._cachedModelDecorationsResolver=this._getDecorationsViewportData(i),this._cachedModelDecorationsResolverViewRange=i),this._cachedModelDecorationsResolver}_getDecorationsViewportData(i){const n=this._linesCollection.getDecorationsInRange(i,this.editorId,(0,I.filterValidationDecorations)(this.configuration.options)),l=i.startLineNumber,c=i.endLineNumber,r=[];let s=0;const o=[];for(let a=l;a<=c;a++)o[a-l]=[];for(let a=0,d=n.length;a<d;a++){const u=n[a],f=u.options;if(!b(this.model,u))continue;const S=this._getOrCreateViewModelDecoration(u),v=S.range;if(r[s++]=S,f.inlineClassName){const C=new D.InlineDecoration(v,f.inlineClassName,f.inlineClassNameAffectsLetterSpacing?3:0),_=Math.max(l,v.startLineNumber),L=Math.min(c,v.endLineNumber);for(let E=_;E<=L;E++)o[E-l].push(C)}if(f.beforeContentClassName&&l<=v.startLineNumber&&v.startLineNumber<=c){const C=new D.InlineDecoration(new m.Range(v.startLineNumber,v.startColumn,v.startLineNumber,v.startColumn),f.beforeContentClassName,1);o[v.startLineNumber-l].push(C)}if(f.afterContentClassName&&l<=v.endLineNumber&&v.endLineNumber<=c){const C=new D.InlineDecoration(new m.Range(v.endLineNumber,v.endColumn,v.endLineNumber,v.endColumn),f.afterContentClassName,2);o[v.endLineNumber-l].push(C)}}return{decorations:r,inlineDecorations:o}}}e.ViewModelDecorations=w;function b(t,i){return!(i.options.hideInCommentTokens&&p(t,i)||i.options.hideInStringTokens&&h(t,i))}e.isModelDecorationVisible=b;function p(t,i){return g(t,i.range,n=>n===1)}e.isModelDecorationInComment=p;function h(t,i){return g(t,i.range,n=>n===2)}e.isModelDecorationInString=h;function g(t,i,n){for(let l=i.startLineNumber;l<=i.endLineNumber;l++){const c=t.getLineTokens(l),r=l===i.startLineNumber,s=l===i.endLineNumber;let o=r?c.findTokenIndexAtOffset(i.startColumn-1):0;for(;o<c.getCount()&&!(s&&c.getStartOffset(o)>i.endColumn-1);){if(!n(c.getStandardTokenType(o)))return!1;o++}}return!0}}),define(te[511],ie([5,6]),function(j,e){return j.create("vs/editor/common/core/editorColorRegistry",e)}),define(te[512],ie([5,6]),function(j,e){return j.create("vs/editor/common/editorContextKeys",e)}),define(te[513],ie([5,6]),function(j,e){return j.create("vs/editor/common/languages/modesRegistry",e)}),define(te[514],ie([5,6]),function(j,e){return j.create("vs/editor/common/model/editStack",e)}),define(te[268],ie([1,0,514,13,22,25,237,110,41]),function(j,e,y,m,D,I,w,b,p){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.EditStack=e.isEditStackElement=e.MultiModelEditStackElement=e.SingleModelEditStackElement=e.SingleModelEditStackData=void 0;function h(r){return r.toString()}class g{constructor(s,o,a,d,u,f,S){this.beforeVersionId=s,this.afterVersionId=o,this.beforeEOL=a,this.afterEOL=d,this.beforeCursorState=u,this.afterCursorState=f,this.changes=S}static create(s,o){const a=s.getAlternativeVersionId(),d=n(s);return new g(a,a,d,d,o,o,[])}append(s,o,a,d,u){o.length>0&&(this.changes=(0,w.compressConsecutiveTextChanges)(this.changes,o)),this.afterEOL=a,this.afterVersionId=d,this.afterCursorState=u}static _writeSelectionsSize(s){return 4+4*4*(s?s.length:0)}static _writeSelections(s,o,a){if(b.writeUInt32BE(s,o?o.length:0,a),a+=4,o)for(const d of o)b.writeUInt32BE(s,d.selectionStartLineNumber,a),a+=4,b.writeUInt32BE(s,d.selectionStartColumn,a),a+=4,b.writeUInt32BE(s,d.positionLineNumber,a),a+=4,b.writeUInt32BE(s,d.positionColumn,a),a+=4;return a}static _readSelections(s,o,a){const d=b.readUInt32BE(s,o);o+=4;for(let u=0;u<d;u++){const f=b.readUInt32BE(s,o);o+=4;const S=b.readUInt32BE(s,o);o+=4;const v=b.readUInt32BE(s,o);o+=4;const C=b.readUInt32BE(s,o);o+=4,a.push(new D.Selection(f,S,v,C))}return o}serialize(){let s=4+4+1+1+g._writeSelectionsSize(this.beforeCursorState)+g._writeSelectionsSize(this.afterCursorState)+4;for(const d of this.changes)s+=d.writeSize();const o=new Uint8Array(s);let a=0;b.writeUInt32BE(o,this.beforeVersionId,a),a+=4,b.writeUInt32BE(o,this.afterVersionId,a),a+=4,b.writeUInt8(o,this.beforeEOL,a),a+=1,b.writeUInt8(o,this.afterEOL,a),a+=1,a=g._writeSelections(o,this.beforeCursorState,a),a=g._writeSelections(o,this.afterCursorState,a),b.writeUInt32BE(o,this.changes.length,a),a+=4;for(const d of this.changes)a=d.write(o,a);return o.buffer}static deserialize(s){const o=new Uint8Array(s);let a=0;const d=b.readUInt32BE(o,a);a+=4;const u=b.readUInt32BE(o,a);a+=4;const f=b.readUInt8(o,a);a+=1;const S=b.readUInt8(o,a);a+=1;const v=[];a=g._readSelections(o,a,v);const C=[];a=g._readSelections(o,a,C);const _=b.readUInt32BE(o,a);a+=4;const L=[];for(let E=0;E<_;E++)a=w.TextChange.read(o,a,L);return new g(d,u,f,S,v,C,L)}}e.SingleModelEditStackData=g;class t{constructor(s,o){this.model=s,this._data=g.create(s,o)}get type(){return 0}get resource(){return I.URI.isUri(this.model)?this.model:this.model.uri}get label(){return y.localize(0,null)}toString(){return(this._data instanceof g?this._data:g.deserialize(this._data)).changes.map(o=>o.toString()).join(", ")}matchesResource(s){return(I.URI.isUri(this.model)?this.model:this.model.uri).toString()===s.toString()}setModel(s){this.model=s}canAppend(s){return this.model===s&&this._data instanceof g}append(s,o,a,d,u){this._data instanceof g&&this._data.append(s,o,a,d,u)}close(){this._data instanceof g&&(this._data=this._data.serialize())}open(){this._data instanceof g||(this._data=g.deserialize(this._data))}undo(){if(I.URI.isUri(this.model))throw new Error("Invalid SingleModelEditStackElement");this._data instanceof g&&(this._data=this._data.serialize());const s=g.deserialize(this._data);this.model._applyUndo(s.changes,s.beforeEOL,s.beforeVersionId,s.beforeCursorState)}redo(){if(I.URI.isUri(this.model))throw new Error("Invalid SingleModelEditStackElement");this._data instanceof g&&(this._data=this._data.serialize());const s=g.deserialize(this._data);this.model._applyRedo(s.changes,s.afterEOL,s.afterVersionId,s.afterCursorState)}heapSize(){return this._data instanceof g&&(this._data=this._data.serialize()),this._data.byteLength+168}}e.SingleModelEditStackElement=t;class i{constructor(s,o){this.type=1,this.label=s,this._isOpen=!0,this._editStackElementsArr=o.slice(0),this._editStackElementsMap=new Map;for(const a of this._editStackElementsArr){const d=h(a.resource);this._editStackElementsMap.set(d,a)}this._delegate=null}get resources(){return this._editStackElementsArr.map(s=>s.resource)}prepareUndoRedo(){if(this._delegate)return this._delegate.prepareUndoRedo(this)}matchesResource(s){const o=h(s);return this._editStackElementsMap.has(o)}setModel(s){const o=h(I.URI.isUri(s)?s:s.uri);this._editStackElementsMap.has(o)&&this._editStackElementsMap.get(o).setModel(s)}canAppend(s){if(!this._isOpen)return!1;const o=h(s.uri);return this._editStackElementsMap.has(o)?this._editStackElementsMap.get(o).canAppend(s):!1}append(s,o,a,d,u){const f=h(s.uri);this._editStackElementsMap.get(f).append(s,o,a,d,u)}close(){this._isOpen=!1}open(){}undo(){this._isOpen=!1;for(const s of this._editStackElementsArr)s.undo()}redo(){for(const s of this._editStackElementsArr)s.redo()}heapSize(s){const o=h(s);return this._editStackElementsMap.has(o)?this._editStackElementsMap.get(o).heapSize():0}split(){return this._editStackElementsArr}toString(){let s=[];for(const o of this._editStackElementsArr)s.push(`${(0,p.basename)(o.resource)}: ${o}`);return`{${s.join(", ")}}`}}e.MultiModelEditStackElement=i;function n(r){return r.getEOL()===`
|
||
`?0:1}function l(r){return r?r instanceof t||r instanceof i:!1}e.isEditStackElement=l;class c{constructor(s,o){this._model=s,this._undoRedoService=o}pushStackElement(){const s=this._undoRedoService.getLastElement(this._model.uri);l(s)&&s.close()}popStackElement(){const s=this._undoRedoService.getLastElement(this._model.uri);l(s)&&s.open()}clear(){this._undoRedoService.removeElements(this._model.uri)}_getOrCreateEditStackElement(s){const o=this._undoRedoService.getLastElement(this._model.uri);if(l(o)&&o.canAppend(this._model))return o;const a=new t(this._model,s);return this._undoRedoService.pushElement(a),a}pushEOL(s){const o=this._getOrCreateEditStackElement(null);this._model.setEOL(s),o.append(this._model,[],n(this._model),this._model.getAlternativeVersionId(),null)}pushEditOperation(s,o,a){const d=this._getOrCreateEditStackElement(s),u=this._model.applyEdits(o,!0),f=c._computeCursorState(a,u),S=u.map((v,C)=>({index:C,textChange:v.textChange}));return S.sort((v,C)=>v.textChange.oldPosition===C.textChange.oldPosition?v.index-C.index:v.textChange.oldPosition-C.textChange.oldPosition),d.append(this._model,S.map(v=>v.textChange),n(this._model),this._model.getAlternativeVersionId(),f),f}static _computeCursorState(s,o){try{return s?s(o):null}catch(a){return(0,m.onUnexpectedError)(a),null}}}e.EditStack=c}),define(te[515],ie([5,6]),function(j,e){return j.create("vs/editor/common/standaloneStrings",e)}),define(te[70],ie([1,0,515]),function(j,e,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.StandaloneServicesNLS=e.ToggleHighContrastNLS=e.StandaloneCodeEditorNLS=e.QuickOutlineNLS=e.QuickCommandNLS=e.QuickHelpNLS=e.GoToLineNLS=e.InspectTokensNLS=e.AccessibilityHelpNLS=void 0;var m;(function(i){i.noSelection=y.localize(0,null),i.singleSelectionRange=y.localize(1,null),i.singleSelection=y.localize(2,null),i.multiSelectionRange=y.localize(3,null),i.multiSelection=y.localize(4,null),i.emergencyConfOn=y.localize(5,null),i.openingDocs=y.localize(6,null),i.readonlyDiffEditor=y.localize(7,null),i.editableDiffEditor=y.localize(8,null),i.readonlyEditor=y.localize(9,null),i.editableEditor=y.localize(10,null),i.changeConfigToOnMac=y.localize(11,null),i.changeConfigToOnWinLinux=y.localize(12,null),i.auto_on=y.localize(13,null),i.auto_off=y.localize(14,null),i.tabFocusModeOnMsg=y.localize(15,null),i.tabFocusModeOnMsgNoKb=y.localize(16,null),i.tabFocusModeOffMsg=y.localize(17,null),i.tabFocusModeOffMsgNoKb=y.localize(18,null),i.openDocMac=y.localize(19,null),i.openDocWinLinux=y.localize(20,null),i.outroMsg=y.localize(21,null),i.showAccessibilityHelpAction=y.localize(22,null)})(m=e.AccessibilityHelpNLS||(e.AccessibilityHelpNLS={}));var D;(function(i){i.inspectTokensAction=y.localize(23,null)})(D=e.InspectTokensNLS||(e.InspectTokensNLS={}));var I;(function(i){i.gotoLineActionLabel=y.localize(24,null)})(I=e.GoToLineNLS||(e.GoToLineNLS={}));var w;(function(i){i.helpQuickAccessActionLabel=y.localize(25,null)})(w=e.QuickHelpNLS||(e.QuickHelpNLS={}));var b;(function(i){i.quickCommandActionLabel=y.localize(26,null),i.quickCommandHelp=y.localize(27,null)})(b=e.QuickCommandNLS||(e.QuickCommandNLS={}));var p;(function(i){i.quickOutlineActionLabel=y.localize(28,null),i.quickOutlineByCategoryActionLabel=y.localize(29,null)})(p=e.QuickOutlineNLS||(e.QuickOutlineNLS={}));var h;(function(i){i.editorViewAccessibleLabel=y.localize(30,null),i.accessibilityHelpMessage=y.localize(31,null)})(h=e.StandaloneCodeEditorNLS||(e.StandaloneCodeEditorNLS={}));var g;(function(i){i.toggleHighContrast=y.localize(32,null)})(g=e.ToggleHighContrastNLS||(e.ToggleHighContrastNLS={}));var t;(function(i){i.bulkEditServiceSummary=y.localize(33,null)})(t=e.StandaloneServicesNLS||(e.StandaloneServicesNLS={}))}),define(te[516],ie([5,6]),function(j,e){return j.create("vs/editor/contrib/anchorSelect/browser/anchorSelect",e)}),define(te[517],ie([5,6]),function(j,e){return j.create("vs/editor/contrib/bracketMatching/browser/bracketMatching",e)}),define(te[518],ie([5,6]),function(j,e){return j.create("vs/editor/contrib/caretOperations/browser/caretOperations",e)}),define(te[519],ie([5,6]),function(j,e){return j.create("vs/editor/contrib/caretOperations/browser/transpose",e)}),define(te[520],ie([5,6]),function(j,e){return j.create("vs/editor/contrib/clipboard/browser/clipboard",e)}),define(te[521],ie([5,6]),function(j,e){return j.create("vs/editor/contrib/codeAction/browser/codeActionCommands",e)}),define(te[522],ie([5,6]),function(j,e){return j.create("vs/editor/contrib/codeAction/browser/lightBulbWidget",e)}),define(te[523],ie([5,6]),function(j,e){return j.create("vs/editor/contrib/codelens/browser/codelensController",e)}),define(te[524],ie([5,6]),function(j,e){return j.create("vs/editor/contrib/colorPicker/browser/colorPickerWidget",e)}),define(te[525],ie([5,6]),function(j,e){return j.create("vs/editor/contrib/comment/browser/comment",e)}),define(te[526],ie([5,6]),function(j,e){return j.create("vs/editor/contrib/contextmenu/browser/contextmenu",e)}),define(te[527],ie([5,6]),function(j,e){return j.create("vs/editor/contrib/cursorUndo/browser/cursorUndo",e)}),define(te[528],ie([5,6]),function(j,e){return j.create("vs/editor/contrib/editorState/browser/keybindingCancellation",e)}),define(te[529],ie([5,6]),function(j,e){return j.create("vs/editor/contrib/find/browser/findController",e)}),define(te[530],ie([5,6]),function(j,e){return j.create("vs/editor/contrib/find/browser/findWidget",e)}),define(te[531],ie([5,6]),function(j,e){return j.create("vs/editor/contrib/folding/browser/folding",e)}),define(te[532],ie([5,6]),function(j,e){return j.create("vs/editor/contrib/folding/browser/foldingDecorations",e)}),define(te[533],ie([5,6]),function(j,e){return j.create("vs/editor/contrib/fontZoom/browser/fontZoom",e)}),define(te[534],ie([5,6]),function(j,e){return j.create("vs/editor/contrib/format/browser/format",e)}),define(te[535],ie([5,6]),function(j,e){return j.create("vs/editor/contrib/format/browser/formatActions",e)}),define(te[536],ie([5,6]),function(j,e){return j.create("vs/editor/contrib/gotoError/browser/gotoError",e)}),define(te[537],ie([5,6]),function(j,e){return j.create("vs/editor/contrib/gotoError/browser/gotoErrorWidget",e)}),define(te[538],ie([5,6]),function(j,e){return j.create("vs/editor/contrib/gotoSymbol/browser/goToCommands",e)}),define(te[539],ie([5,6]),function(j,e){return j.create("vs/editor/contrib/gotoSymbol/browser/link/goToDefinitionAtPosition",e)}),define(te[540],ie([5,6]),function(j,e){return j.create("vs/editor/contrib/gotoSymbol/browser/peek/referencesController",e)}),define(te[541],ie([5,6]),function(j,e){return j.create("vs/editor/contrib/gotoSymbol/browser/peek/referencesTree",e)}),define(te[542],ie([5,6]),function(j,e){return j.create("vs/editor/contrib/gotoSymbol/browser/peek/referencesWidget",e)}),define(te[543],ie([5,6]),function(j,e){return j.create("vs/editor/contrib/gotoSymbol/browser/referencesModel",e)}),define(te[126],ie([1,0,13,4,133,2,47,41,8,3,543]),function(j,e,y,m,D,I,w,b,p,h,g){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ReferencesModel=e.FileReferences=e.FilePreview=e.OneReference=void 0;class t{constructor(r,s,o,a){this.isProviderFirst=r,this.parent=s,this.link=o,this._rangeCallback=a,this.id=D.defaultGenerator.nextId()}get uri(){return this.link.uri}get range(){var r,s;return(s=(r=this._range)!==null&&r!==void 0?r:this.link.targetSelectionRange)!==null&&s!==void 0?s:this.link.range}set range(r){this._range=r,this._rangeCallback(this)}get ariaMessage(){var r;const s=(r=this.parent.getPreview(this))===null||r===void 0?void 0:r.preview(this.range);return s?(0,g.localize)(1,null,(0,b.basename)(this.uri),this.range.startLineNumber,this.range.startColumn,s.value):(0,g.localize)(0,null,(0,b.basename)(this.uri),this.range.startLineNumber,this.range.startColumn)}}e.OneReference=t;class i{constructor(r){this._modelReference=r}dispose(){this._modelReference.dispose()}preview(r,s=8){const o=this._modelReference.object.textEditorModel;if(!o)return;const{startLineNumber:a,startColumn:d,endLineNumber:u,endColumn:f}=r,S=o.getWordUntilPosition({lineNumber:a,column:d-s}),v=new h.Range(a,S.startColumn,a,d),C=new h.Range(u,f,u,1073741824),_=o.getValueInRange(v).replace(/^\s+/,""),L=o.getValueInRange(r),E=o.getValueInRange(C).replace(/\s+$/,"");return{value:_+L+E,highlight:{start:_.length,end:_.length+L.length}}}}e.FilePreview=i;class n{constructor(r,s){this.parent=r,this.uri=s,this.children=[],this._previews=new w.ResourceMap}dispose(){(0,I.dispose)(this._previews.values()),this._previews.clear()}getPreview(r){return this._previews.get(r.uri)}get ariaMessage(){const r=this.children.length;return r===1?(0,g.localize)(2,null,(0,b.basename)(this.uri),this.uri.fsPath):(0,g.localize)(3,null,r,(0,b.basename)(this.uri),this.uri.fsPath)}resolve(r){return ye(this,void 0,void 0,function*(){if(this._previews.size!==0)return this;for(let s of this.children)if(!this._previews.has(s.uri))try{const o=yield r.createModelReference(s.uri);this._previews.set(s.uri,new i(o))}catch(o){(0,y.onUnexpectedError)(o)}return this})}}e.FileReferences=n;class l{constructor(r,s){this.groups=[],this.references=[],this._onDidChangeReferenceRange=new m.Emitter,this.onDidChangeReferenceRange=this._onDidChangeReferenceRange.event,this._links=r,this._title=s;const[o]=r;r.sort(l._compareReferences);let a;for(let d of r)if((!a||!b.extUri.isEqual(a.uri,d.uri,!0))&&(a=new n(this,d.uri),this.groups.push(a)),a.children.length===0||l._compareReferences(d,a.children[a.children.length-1])!==0){const u=new t(o===d,a,d,f=>this._onDidChangeReferenceRange.fire(f));this.references.push(u),a.children.push(u)}}dispose(){(0,I.dispose)(this.groups),this._onDidChangeReferenceRange.dispose(),this.groups.length=0}clone(){return new l(this._links,this._title)}get title(){return this._title}get isEmpty(){return this.groups.length===0}get ariaMessage(){return this.isEmpty?(0,g.localize)(4,null):this.references.length===1?(0,g.localize)(5,null,this.references[0].uri.fsPath):this.groups.length===1?(0,g.localize)(6,null,this.references.length,this.groups[0].uri.fsPath):(0,g.localize)(7,null,this.references.length,this.groups.length)}nextOrPreviousReference(r,s){let{parent:o}=r,a=o.children.indexOf(r),d=o.children.length,u=o.parent.groups.length;return u===1||s&&a+1<d||!s&&a>0?(s?a=(a+1)%d:a=(a+d-1)%d,o.children[a]):(a=o.parent.groups.indexOf(o),s?(a=(a+1)%u,o.parent.groups[a].children[0]):(a=(a+u-1)%u,o.parent.groups[a].children[o.parent.groups[a].children.length-1]))}nearestReference(r,s){const o=this.references.map((a,d)=>({idx:d,prefixLen:p.commonPrefixLength(a.uri.toString(),r.toString()),offsetDist:Math.abs(a.range.startLineNumber-s.lineNumber)*100+Math.abs(a.range.startColumn-s.column)})).sort((a,d)=>a.prefixLen>d.prefixLen?-1:a.prefixLen<d.prefixLen?1:a.offsetDist<d.offsetDist?-1:a.offsetDist>d.offsetDist?1:0)[0];if(o)return this.references[o.idx]}referenceAt(r,s){for(const o of this.references)if(o.uri.toString()===r.toString()&&h.Range.containsPosition(o.range,s))return o}firstReference(){for(const r of this.references)if(r.isProviderFirst)return r;return this.references[0]}static _compareReferences(r,s){return b.extUri.compare(r.uri,s.uri)||h.Range.compareRangesUsingStarts(r.range,s.range)}}e.ReferencesModel=l}),define(te[544],ie([5,6]),function(j,e){return j.create("vs/editor/contrib/gotoSymbol/browser/symbolNavigation",e)}),define(te[545],ie([5,6]),function(j,e){return j.create("vs/editor/contrib/hover/browser/hover",e)}),define(te[546],ie([5,6]),function(j,e){return j.create("vs/editor/contrib/hover/browser/markdownHoverParticipant",e)}),define(te[547],ie([5,6]),function(j,e){return j.create("vs/editor/contrib/hover/browser/markerHoverParticipant",e)}),define(te[548],ie([5,6]),function(j,e){return j.create("vs/editor/contrib/inPlaceReplace/browser/inPlaceReplace",e)}),define(te[549],ie([5,6]),function(j,e){return j.create("vs/editor/contrib/indentation/browser/indentation",e)}),define(te[550],ie([5,6]),function(j,e){return j.create("vs/editor/contrib/inlineCompletions/browser/ghostTextController",e)}),define(te[551],ie([5,6]),function(j,e){return j.create("vs/editor/contrib/inlineCompletions/browser/inlineCompletionsHoverParticipant",e)}),define(te[552],ie([5,6]),function(j,e){return j.create("vs/editor/contrib/lineSelection/browser/lineSelection",e)}),define(te[553],ie([5,6]),function(j,e){return j.create("vs/editor/contrib/linesOperations/browser/linesOperations",e)}),define(te[554],ie([5,6]),function(j,e){return j.create("vs/editor/contrib/linkedEditing/browser/linkedEditing",e)}),define(te[555],ie([5,6]),function(j,e){return j.create("vs/editor/contrib/links/browser/links",e)}),define(te[556],ie([5,6]),function(j,e){return j.create("vs/editor/contrib/message/browser/messageController",e)}),define(te[557],ie([5,6]),function(j,e){return j.create("vs/editor/contrib/multicursor/browser/multicursor",e)}),define(te[558],ie([5,6]),function(j,e){return j.create("vs/editor/contrib/parameterHints/browser/parameterHints",e)}),define(te[559],ie([5,6]),function(j,e){return j.create("vs/editor/contrib/parameterHints/browser/parameterHintsWidget",e)}),define(te[560],ie([5,6]),function(j,e){return j.create("vs/editor/contrib/peekView/browser/peekView",e)}),define(te[561],ie([5,6]),function(j,e){return j.create("vs/editor/contrib/quickAccess/browser/gotoLineQuickAccess",e)}),define(te[562],ie([5,6]),function(j,e){return j.create("vs/editor/contrib/quickAccess/browser/gotoSymbolQuickAccess",e)}),define(te[563],ie([5,6]),function(j,e){return j.create("vs/editor/contrib/rename/browser/rename",e)}),define(te[564],ie([5,6]),function(j,e){return j.create("vs/editor/contrib/rename/browser/renameInputField",e)}),define(te[565],ie([5,6]),function(j,e){return j.create("vs/editor/contrib/smartSelect/browser/smartSelect",e)}),define(te[566],ie([5,6]),function(j,e){return j.create("vs/editor/contrib/snippet/browser/snippetController2",e)}),define(te[567],ie([5,6]),function(j,e){return j.create("vs/editor/contrib/snippet/browser/snippetVariables",e)}),define(te[568],ie([5,6]),function(j,e){return j.create("vs/editor/contrib/suggest/browser/suggest",e)}),define(te[569],ie([5,6]),function(j,e){return j.create("vs/editor/contrib/suggest/browser/suggestController",e)}),define(te[570],ie([5,6]),function(j,e){return j.create("vs/editor/contrib/suggest/browser/suggestWidget",e)}),define(te[571],ie([5,6]),function(j,e){return j.create("vs/editor/contrib/suggest/browser/suggestWidgetDetails",e)}),define(te[572],ie([5,6]),function(j,e){return j.create("vs/editor/contrib/suggest/browser/suggestWidgetRenderer",e)}),define(te[573],ie([5,6]),function(j,e){return j.create("vs/editor/contrib/suggest/browser/suggestWidgetStatus",e)}),define(te[574],ie([5,6]),function(j,e){return j.create("vs/editor/contrib/symbolIcons/browser/symbolIcons",e)}),define(te[575],ie([5,6]),function(j,e){return j.create("vs/editor/contrib/toggleTabFocusMode/browser/toggleTabFocusMode",e)}),define(te[576],ie([5,6]),function(j,e){return j.create("vs/editor/contrib/tokenization/browser/tokenization",e)}),define(te[577],ie([5,6]),function(j,e){return j.create("vs/editor/contrib/unicodeHighlighter/browser/unicodeHighlighter",e)}),define(te[578],ie([5,6]),function(j,e){return j.create("vs/editor/contrib/unusualLineTerminators/browser/unusualLineTerminators",e)}),define(te[579],ie([5,6]),function(j,e){return j.create("vs/editor/contrib/wordHighlighter/browser/wordHighlighter",e)}),define(te[580],ie([5,6]),function(j,e){return j.create("vs/editor/contrib/wordOperations/browser/wordOperations",e)}),define(te[581],ie([5,6]),function(j,e){return j.create("vs/platform/actions/browser/menuEntryActionViewItem",e)}),define(te[582],ie([5,6]),function(j,e){return j.create("vs/platform/configuration/common/configurationRegistry",e)}),define(te[583],ie([5,6]),function(j,e){return j.create("vs/platform/contextkey/browser/contextKeyService",e)}),define(te[584],ie([5,6]),function(j,e){return j.create("vs/platform/contextkey/common/contextkeys",e)}),define(te[585],ie([5,6]),function(j,e){return j.create("vs/platform/keybinding/common/abstractKeybindingService",e)}),define(te[586],ie([5,6]),function(j,e){return j.create("vs/platform/list/browser/listService",e)}),define(te[587],ie([5,6]),function(j,e){return j.create("vs/platform/markers/common/markers",e)}),define(te[588],ie([5,6]),function(j,e){return j.create("vs/platform/quickinput/browser/commandsQuickAccess",e)}),define(te[589],ie([5,6]),function(j,e){return j.create("vs/platform/quickinput/browser/helpQuickAccess",e)}),define(te[590],ie([5,6]),function(j,e){return j.create("vs/platform/theme/common/colorRegistry",e)}),define(te[591],ie([5,6]),function(j,e){return j.create("vs/platform/theme/common/iconRegistry",e)}),define(te[592],ie([5,6]),function(j,e){return j.create("vs/platform/undoRedo/common/undoRedoService",e)}),define(te[593],ie([5,6]),function(j,e){return j.create("vs/platform/workspaces/common/workspaces",e)}),define(te[594],ie([1,0]),function(j,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.EditorOpenContext=void 0;var y;(function(m){m[m.API=0]="API",m[m.USER=1]="USER"})(y=e.EditorOpenContext||(e.EditorOpenContext={}))}),define(te[595],ie([1,0]),function(j,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ExtensionIdentifier=void 0;class y{constructor(D){this.value=D,this._lower=D.toLowerCase()}static toKey(D){return typeof D=="string"?D.toLowerCase():D._lower}}e.ExtensionIdentifier=y}),define(te[269],ie([1,0]),function(j,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.FileKind=void 0;var y;(function(m){m[m.FILE=0]="FILE",m[m.FOLDER=1]="FOLDER",m[m.ROOT_FOLDER=2]="ROOT_FOLDER"})(y=e.FileKind||(e.FileKind={}))}),define(te[596],ie([1,0]),function(j,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.showHistoryKeybindingHint=void 0;function y(m){var D,I;return((D=m.lookupKeybinding("history.showPrevious"))===null||D===void 0?void 0:D.getElectronAccelerator())==="Up"&&((I=m.lookupKeybinding("history.showNext"))===null||I===void 0?void 0:I.getElectronAccelerator())==="Down"}e.showHistoryKeybindingHint=y}),define(te[194],ie([1,0]),function(j,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SyncDescriptor=void 0;class y{constructor(D,I=[],w=!1){this.ctor=D,this.staticArguments=I,this.supportsDelayedInstantiation=w}}e.SyncDescriptor=y}),define(te[53],ie([1,0,194]),function(j,e,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getSingletonServiceDescriptors=e.registerSingleton=void 0;const m=[];function D(w,b,p){b instanceof y.SyncDescriptor||(b=new y.SyncDescriptor(b,[],p)),m.push([w,b])}e.registerSingleton=D;function I(){return m}e.getSingletonServiceDescriptors=I}),define(te[597],ie([1,0]),function(j,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Graph=e.Node=void 0;class y{constructor(I){this.incoming=new Map,this.outgoing=new Map,this.data=I}}e.Node=y;class m{constructor(I){this._hashFn=I,this._nodes=new Map}roots(){const I=[];for(let w of this._nodes.values())w.outgoing.size===0&&I.push(w);return I}insertEdge(I,w){const b=this.lookupOrInsertNode(I),p=this.lookupOrInsertNode(w);b.outgoing.set(this._hashFn(w),p),p.incoming.set(this._hashFn(I),b)}removeNode(I){const w=this._hashFn(I);this._nodes.delete(w);for(let b of this._nodes.values())b.outgoing.delete(w),b.incoming.delete(w)}lookupOrInsertNode(I){const w=this._hashFn(I);let b=this._nodes.get(w);return b||(b=new y(I),this._nodes.set(w,b)),b}isEmpty(){return this._nodes.size===0}toString(){let I=[];for(let[w,b]of this._nodes)I.push(`${w}, (incoming)[${[...b.incoming.keys()].join(", ")}], (outgoing)[${[...b.outgoing.keys()].join(",")}]`);return I.join(`
|
||
`)}findCycleSlow(){for(let[I,w]of this._nodes){const b=new Set([I]),p=this._findCycle(w,b);if(p)return p}}_findCycle(I,w){for(let[b,p]of I.outgoing){if(w.has(b))return[...w,b].join(" -> ");w.add(b);const h=this._findCycle(p,w);if(h)return h;w.delete(b)}}}e.Graph=m}),define(te[9],ie([1,0]),function(j,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.createDecorator=e.IInstantiationService=e._util=void 0;var y;(function(I){I.serviceIds=new Map,I.DI_TARGET="$di$target",I.DI_DEPENDENCIES="$di$dependencies";function w(b){return b[I.DI_DEPENDENCIES]||[]}I.getServiceDependencies=w})(y=e._util||(e._util={})),e.IInstantiationService=D("instantiationService");function m(I,w,b,p){w[y.DI_TARGET]===w?w[y.DI_DEPENDENCIES].push({id:I,index:b,optional:p}):(w[y.DI_DEPENDENCIES]=[{id:I,index:b,optional:p}],w[y.DI_TARGET]=w)}function D(I){if(y.serviceIds.has(I))return y.serviceIds.get(I);const w=function(b,p,h){if(arguments.length!==3)throw new Error("@IServiceName-decorator can only be used to decorate a parameter");m(w,b,h,!1)};return w.toString=()=>I,y.serviceIds.set(I,w),w}e.createDecorator=D}),define(te[195],ie([1,0,9,25,20]),function(j,e,y,m,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ResourceFileEdit=e.ResourceTextEdit=e.ResourceEdit=e.IBulkEditService=void 0,e.IBulkEditService=(0,y.createDecorator)("IWorkspaceEditService");function I(g){return(0,D.isObject)(g)&&(Boolean(g.newUri)||Boolean(g.oldUri))}function w(g){return(0,D.isObject)(g)&&m.URI.isUri(g.resource)&&(0,D.isObject)(g.edit)}class b{constructor(t){this.metadata=t}static convert(t){return t.edits.map(i=>{if(w(i))return new p(i.resource,i.edit,i.modelVersionId,i.metadata);if(I(i))return new h(i.oldUri,i.newUri,i.options,i.metadata);throw new Error("Unsupported edit")})}}e.ResourceEdit=b;class p extends b{constructor(t,i,n,l){super(l);this.resource=t,this.textEdit=i,this.versionId=n}}e.ResourceTextEdit=p;class h extends b{constructor(t,i,n,l){super(l);this.oldResource=t,this.newResource=i,this.options=n}}e.ResourceFileEdit=h}),define(te[28],ie([1,0,9]),function(j,e,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ICodeEditorService=void 0,e.ICodeEditorService=(0,y.createDecorator)("codeEditorService")}),define(te[85],ie([1,0,9]),function(j,e,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IEditorWorkerService=e.ID_EDITOR_WORKER_SERVICE=void 0,e.ID_EDITOR_WORKER_SERVICE="editorWorkerService",e.IEditorWorkerService=(0,y.createDecorator)(e.ID_EDITOR_WORKER_SERVICE)}),define(te[35],ie([1,0,9]),function(j,e,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ILanguageService=void 0,e.ILanguageService=(0,y.createDecorator)("languageService")}),define(te[196],ie([1,0,9]),function(j,e,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IMarkerDecorationsService=void 0,e.IMarkerDecorationsService=(0,y.createDecorator)("markerDecorationsService")}),define(te[45],ie([1,0,9]),function(j,e,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IModelService=void 0,e.IModelService=(0,y.createDecorator)("modelService")}),define(te[58],ie([1,0,9]),function(j,e,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ITextModelService=void 0,e.ITextModelService=(0,y.createDecorator)("textModelService")}),define(te[153],ie([1,0,9]),function(j,e,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ITextResourcePropertiesService=e.ITextResourceConfigurationService=void 0,e.ITextResourceConfigurationService=(0,y.createDecorator)("textResourceConfigurationService"),e.ITextResourcePropertiesService=(0,y.createDecorator)("textResourcePropertiesService")}),define(te[101],ie([1,0,9]),function(j,e,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IStandaloneThemeService=void 0,e.IStandaloneThemeService=(0,y.createDecorator)("themeService")}),define(te[102],ie([1,0,9]),function(j,e,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IClipboardService=void 0,e.IClipboardService=(0,y.createDecorator)("clipboardService")}),define(te[26],ie([1,0,4,54,2,81,20,9]),function(j,e,y,m,D,I,w,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.NullCommandService=e.CommandsRegistry=e.ICommandService=void 0,e.ICommandService=(0,b.createDecorator)("commandService"),e.CommandsRegistry=new class{constructor(){this._commands=new Map,this._onDidRegisterCommand=new y.Emitter,this.onDidRegisterCommand=this._onDidRegisterCommand.event}registerCommand(p,h){if(!p)throw new Error("invalid command");if(typeof p=="string"){if(!h)throw new Error("invalid command");return this.registerCommand({id:p,handler:h})}if(p.description){const l=[];for(let r of p.description.args)l.push(r.constraint);const c=p.handler;p.handler=function(r,...s){return(0,w.validateConstraints)(s,l),c(r,...s)}}const{id:g}=p;let t=this._commands.get(g);t||(t=new I.LinkedList,this._commands.set(g,t));let i=t.unshift(p),n=(0,D.toDisposable)(()=>{i();const l=this._commands.get(g);(l==null?void 0:l.isEmpty())&&this._commands.delete(g)});return this._onDidRegisterCommand.fire(g),n}registerCommandAlias(p,h){return e.CommandsRegistry.registerCommand(p,(g,...t)=>g.get(e.ICommandService).executeCommand(h,...t))}getCommand(p){const h=this._commands.get(p);if(!(!h||h.isEmpty()))return m.Iterable.first(h)}getCommands(){const p=new Map;for(const h of this._commands.keys()){const g=this.getCommand(h);g&&p.set(h,g)}return p}},e.NullCommandService={_serviceBrand:void 0,onWillExecuteCommand:()=>D.Disposable.None,onDidExecuteCommand:()=>D.Disposable.None,executeCommand(){return Promise.resolve(void 0)}},e.CommandsRegistry.registerCommand("noop",()=>{})}),define(te[270],ie([1,0,21,13,25,18,45,26,20,423,3]),function(j,e,y,m,D,I,w,b,p,h,g){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getDocumentRangeSemanticTokens=e.hasDocumentRangeSemanticTokensProvider=e.getDocumentSemanticTokens=e.hasDocumentSemanticTokensProvider=e.DocumentSemanticTokensResult=e.isSemanticTokensEdits=e.isSemanticTokens=void 0;function t(f){return f&&!!f.data}e.isSemanticTokens=t;function i(f){return f&&Array.isArray(f.edits)}e.isSemanticTokensEdits=i;class n{constructor(S,v,C){this.provider=S,this.tokens=v,this.error=C}}e.DocumentSemanticTokensResult=n;function l(f){return I.DocumentSemanticTokensProviderRegistry.has(f)}e.hasDocumentSemanticTokensProvider=l;function c(f){const S=I.DocumentSemanticTokensProviderRegistry.orderedGroups(f);return S.length>0?S[0]:[]}function r(f,S,v,C){return ye(this,void 0,void 0,function*(){const _=c(f),L=yield Promise.all(_.map(E=>ye(this,void 0,void 0,function*(){let N,k=null;try{N=yield E.provideDocumentSemanticTokens(f,E===S?v:null,C)}catch(M){k=M,N=null}return(!N||!t(N)&&!i(N))&&(N=null),new n(E,N,k)})));for(const E of L){if(E.error)throw E.error;if(E.tokens)return E}return L.length>0?L[0]:null})}e.getDocumentSemanticTokens=r;function s(f){const S=I.DocumentSemanticTokensProviderRegistry.orderedGroups(f);return S.length>0?S[0]:null}class o{constructor(S,v){this.provider=S,this.tokens=v}}function a(f){return I.DocumentRangeSemanticTokensProviderRegistry.has(f)}e.hasDocumentRangeSemanticTokensProvider=a;function d(f){const S=I.DocumentRangeSemanticTokensProviderRegistry.orderedGroups(f);return S.length>0?S[0]:[]}function u(f,S,v){return ye(this,void 0,void 0,function*(){const C=d(f),_=yield Promise.all(C.map(L=>ye(this,void 0,void 0,function*(){let E;try{E=yield L.provideDocumentRangeSemanticTokens(f,S,v)}catch(N){(0,m.onUnexpectedExternalError)(N),E=null}return(!E||!t(E))&&(E=null),new o(L,E)})));for(const L of _)if(L.tokens)return L;return _.length>0?_[0]:null})}e.getDocumentRangeSemanticTokens=u,b.CommandsRegistry.registerCommand("_provideDocumentSemanticTokensLegend",(f,...S)=>ye(void 0,void 0,void 0,function*(){const[v]=S;(0,p.assertType)(v instanceof D.URI);const C=f.get(w.IModelService).getModel(v);if(!C)return;const _=s(C);return _?_[0].getLegend():f.get(b.ICommandService).executeCommand("_provideDocumentRangeSemanticTokensLegend",v)})),b.CommandsRegistry.registerCommand("_provideDocumentSemanticTokens",(f,...S)=>ye(void 0,void 0,void 0,function*(){const[v]=S;(0,p.assertType)(v instanceof D.URI);const C=f.get(w.IModelService).getModel(v);if(!C)return;if(!l(C))return f.get(b.ICommandService).executeCommand("_provideDocumentRangeSemanticTokens",v,C.getFullModelRange());const _=yield r(C,null,null,y.CancellationToken.None);if(!_)return;const{provider:L,tokens:E}=_;if(!E||!t(E))return;const N=(0,h.encodeSemanticTokensDto)({id:0,type:"full",data:E.data});return E.resultId&&L.releaseDocumentSemanticTokens(E.resultId),N})),b.CommandsRegistry.registerCommand("_provideDocumentRangeSemanticTokensLegend",(f,...S)=>ye(void 0,void 0,void 0,function*(){const[v,C]=S;(0,p.assertType)(v instanceof D.URI);const _=f.get(w.IModelService).getModel(v);if(!_)return;const L=d(_);if(L.length===0)return;if(L.length===1)return L[0].getLegend();if(!C||!g.Range.isIRange(C))return console.warn("provideDocumentRangeSemanticTokensLegend might be out-of-sync with provideDocumentRangeSemanticTokens unless a range argument is passed in"),L[0].getLegend();const E=yield u(_,g.Range.lift(C),y.CancellationToken.None);if(!!E)return E.provider.getLegend()})),b.CommandsRegistry.registerCommand("_provideDocumentRangeSemanticTokens",(f,...S)=>ye(void 0,void 0,void 0,function*(){const[v,C]=S;(0,p.assertType)(v instanceof D.URI),(0,p.assertType)(g.Range.isIRange(C));const _=f.get(w.IModelService).getModel(v);if(!_)return;const L=yield u(_,g.Range.lift(C),y.CancellationToken.None);if(!(!L||!L.tokens))return(0,h.encodeSemanticTokensDto)({id:0,type:"full",data:L.tokens.data})}))}),define(te[271],ie([1,0,21,13,2,20,25,18,45,26]),function(j,e,y,m,D,I,w,b,p,h){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getCodeLensModel=e.CodeLensModel=void 0;class g{constructor(){this.lenses=[],this._disposables=new D.DisposableStore}dispose(){this._disposables.dispose()}get isDisposed(){return this._disposables.isDisposed}add(n,l){this._disposables.add(n);for(const c of n.lenses)this.lenses.push({symbol:c,provider:l})}}e.CodeLensModel=g;function t(i,n){return ye(this,void 0,void 0,function*(){const l=b.CodeLensProviderRegistry.ordered(i),c=new Map,r=new g,s=l.map((o,a)=>ye(this,void 0,void 0,function*(){c.set(o,a);try{const d=yield Promise.resolve(o.provideCodeLenses(i,n));d&&r.add(d,o)}catch(d){(0,m.onUnexpectedExternalError)(d)}}));return yield Promise.all(s),r.lenses=r.lenses.sort((o,a)=>o.symbol.range.startLineNumber<a.symbol.range.startLineNumber?-1:o.symbol.range.startLineNumber>a.symbol.range.startLineNumber?1:c.get(o.provider)<c.get(a.provider)?-1:c.get(o.provider)>c.get(a.provider)?1:o.symbol.range.startColumn<a.symbol.range.startColumn?-1:o.symbol.range.startColumn>a.symbol.range.startColumn?1:0),r})}e.getCodeLensModel=t,h.CommandsRegistry.registerCommand("_executeCodeLensProvider",function(i,...n){let[l,c]=n;(0,I.assertType)(w.URI.isUri(l)),(0,I.assertType)(typeof c=="number"||!c);const r=i.get(p.IModelService).getModel(l);if(!r)throw(0,m.illegalArgument)();const s=[],o=new D.DisposableStore;return t(r,y.CancellationToken.None).then(a=>{o.add(a);let d=[];for(const u of a.lenses)c==null||Boolean(u.symbol.command)?s.push(u.symbol):c-- >0&&u.provider.resolveCodeLens&&d.push(Promise.resolve(u.provider.resolveCodeLens(r,u.symbol,y.CancellationToken.None)).then(f=>s.push(f||u.symbol)));return Promise.all(d)}).then(()=>s).finally(()=>{setTimeout(()=>o.dispose(),100)})})}),define(te[272],ie([1,0,21,13,25,3,18,45,26]),function(j,e,y,m,D,I,w,b,p){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getColorPresentations=e.getColors=void 0;function h(t,i){const n=[],c=w.ColorProviderRegistry.ordered(t).reverse().map(r=>Promise.resolve(r.provideDocumentColors(t,i)).then(s=>{if(Array.isArray(s))for(let o of s)n.push({colorInfo:o,provider:r})}));return Promise.all(c).then(()=>n)}e.getColors=h;function g(t,i,n,l){return Promise.resolve(n.provideColorPresentations(t,i,l))}e.getColorPresentations=g,p.CommandsRegistry.registerCommand("_executeDocumentColorProvider",function(t,...i){const[n]=i;if(!(n instanceof D.URI))throw(0,m.illegalArgument)();const l=t.get(b.IModelService).getModel(n);if(!l)throw(0,m.illegalArgument)();const c=[],s=w.ColorProviderRegistry.ordered(l).reverse().map(o=>Promise.resolve(o.provideDocumentColors(l,y.CancellationToken.None)).then(a=>{if(Array.isArray(a))for(let d of a)c.push({range:d.range,color:[d.color.red,d.color.green,d.color.blue,d.color.alpha]})}));return Promise.all(s).then(()=>c)}),p.CommandsRegistry.registerCommand("_executeColorPresentationProvider",function(t,...i){const[n,l]=i,{uri:c,range:r}=l;if(!(c instanceof D.URI)||!Array.isArray(n)||n.length!==4||!I.Range.isIRange(r))throw(0,m.illegalArgument)();const[s,o,a,d]=n,u=t.get(b.IModelService).getModel(c);if(!u)throw(0,m.illegalArgument)();const f={range:r,color:{red:s,green:o,blue:a,alpha:d}},S=[],C=w.ColorProviderRegistry.ordered(u).reverse().map(_=>Promise.resolve(_.provideColorPresentations(u,f,y.CancellationToken.None)).then(L=>{Array.isArray(L)&&S.push(...L)}));return Promise.all(C).then(()=>S)})}),define(te[598],ie([1,0,19,21,13,2,20,25,3,18,45,26]),function(j,e,y,m,D,I,w,b,p,h,g,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getLinks=e.LinksList=e.Link=void 0;class i{constructor(r,s){this._link=r,this._provider=s}toJSON(){return{range:this.range,url:this.url,tooltip:this.tooltip}}get range(){return this._link.range}get url(){return this._link.url}get tooltip(){return this._link.tooltip}resolve(r){return ye(this,void 0,void 0,function*(){return this._link.url?this._link.url:typeof this._provider.resolveLink=="function"?Promise.resolve(this._provider.resolveLink(this._link,r)).then(s=>(this._link=s||this._link,this._link.url?this.resolve(r):Promise.reject(new Error("missing")))):Promise.reject(new Error("missing"))})}}e.Link=i;class n{constructor(r){this._disposables=new I.DisposableStore;let s=[];for(const[o,a]of r){const d=o.links.map(u=>new i(u,a));s=n._union(s,d),(0,I.isDisposable)(o)&&this._disposables.add(o)}this.links=s}dispose(){this._disposables.dispose(),this.links.length=0}static _union(r,s){let o=[],a,d,u,f;for(a=0,u=0,d=r.length,f=s.length;a<d&&u<f;){const S=r[a],v=s[u];if(p.Range.areIntersectingOrTouching(S.range,v.range)){a++;continue}p.Range.compareRangesUsingStarts(S.range,v.range)<0?(o.push(S),a++):(o.push(v),u++)}for(;a<d;a++)o.push(r[a]);for(;u<f;u++)o.push(s[u]);return o}}e.LinksList=n;function l(c,r){const s=[],o=h.LinkProviderRegistry.ordered(c).reverse().map((a,d)=>Promise.resolve(a.provideLinks(c,r)).then(u=>{u&&(s[d]=[u,a])},D.onUnexpectedExternalError));return Promise.all(o).then(()=>{const a=new n((0,y.coalesce)(s));return r.isCancellationRequested?(a.dispose(),new n([])):a})}e.getLinks=l,t.CommandsRegistry.registerCommand("_executeLinkProvider",(c,...r)=>ye(void 0,void 0,void 0,function*(){let[s,o]=r;(0,w.assertType)(s instanceof b.URI),typeof o!="number"&&(o=0);const a=c.get(g.IModelService).getModel(s);if(!a)return[];const d=yield l(a,m.CancellationToken.None);if(!d)return[];for(let f=0;f<Math.min(o,d.links.length);f++)yield d.links[f].resolve(m.CancellationToken.None);const u=d.links.slice(0);return d.dispose(),u}))}),define(te[40],ie([1,0,9]),function(j,e,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getConfigurationValue=e.removeFromValueTree=e.addToValueTree=e.toValuesTree=e.IConfigurationService=void 0,e.IConfigurationService=(0,y.createDecorator)("configurationService");function m(p,h){const g=Object.create(null);for(let t in p)D(g,t,p[t],h);return g}e.toValuesTree=m;function D(p,h,g,t){const i=h.split("."),n=i.pop();let l=p;for(let c=0;c<i.length;c++){let r=i[c],s=l[r];switch(typeof s){case"undefined":s=l[r]=Object.create(null);break;case"object":break;default:t(`Ignoring ${h} as ${i.slice(0,c+1).join(".")} is ${JSON.stringify(s)}`);return}l=s}if(typeof l=="object"&&l!==null)try{l[n]=g}catch{t(`Ignoring ${h} as ${i.join(".")} is ${JSON.stringify(l)}`)}else t(`Ignoring ${h} as ${i.join(".")} is ${JSON.stringify(l)}`)}e.addToValueTree=D;function I(p,h){const g=h.split(".");w(p,g)}e.removeFromValueTree=I;function w(p,h){const g=h.shift();if(h.length===0){delete p[g];return}if(Object.keys(p).indexOf(g)!==-1){const t=p[g];typeof t=="object"&&!Array.isArray(t)&&(w(t,h),Object.keys(t).length===0&&delete p[g])}}function b(p,h,g){function t(l,c){let r=l;for(const s of c){if(typeof r!="object"||r===null)return;r=r[s]}return r}const i=h.split("."),n=t(p,i);return typeof n=="undefined"?g:n}e.getConfigurationValue=b});var Ce=this&&this.__param||function(j,e){return function(y,m){e(y,m,j)}};define(te[32],ie([1,0,4,2,8,146,119,120,407,411,408,410,177,9,40,35,53]),function(j,e,y,m,D,I,w,b,p,h,g,t,i,n,l,c,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ResolvedLanguageConfiguration=e.LanguageConfigurationRegistry=e.LanguageConfigurationRegistryImpl=e.LanguageConfigurationChangeEvent=e.LanguageConfigurationService=e.ILanguageConfigurationService=e.LanguageConfigurationServiceChangeEvent=void 0;class s{constructor(k){this.languageId=k}affects(k){return this.languageId?this.languageId===k:!0}}e.LanguageConfigurationServiceChangeEvent=s,e.ILanguageConfigurationService=(0,n.createDecorator)("languageConfigurationService");let o=class extends m.Disposable{constructor(k,M){super();this.configurationService=k,this.languageService=M,this.onDidChangeEmitter=this._register(new y.Emitter),this.onDidChange=this.onDidChangeEmitter.event,this.configurations=new Map;const O=new Set(Object.values(d));this._register(this.configurationService.onDidChangeConfiguration(B=>{const T=B.change.keys.some(P=>O.has(P)),R=B.change.overrides.filter(([P,F])=>F.some(W=>O.has(W))).map(([P])=>P);if(T)this.configurations.clear(),this.onDidChangeEmitter.fire(new s(void 0));else for(const P of R)this.languageService.isRegisteredLanguageId(P)&&(this.configurations.delete(P),this.onDidChangeEmitter.fire(new s(P)))})),this._register(e.LanguageConfigurationRegistry.onDidChange(B=>{this.configurations.delete(B.languageId),this.onDidChangeEmitter.fire(new s(B.languageId))}))}getLanguageConfiguration(k){let M=this.configurations.get(k);return M||(M=a(k,this.configurationService,this.languageService),this.configurations.set(k,M)),M}};o=Ie([Ce(0,l.IConfigurationService),Ce(1,c.ILanguageService)],o),e.LanguageConfigurationService=o;function a(N,k,M){let O=e.LanguageConfigurationRegistry.getLanguageConfiguration(N);if(!O){if(!M.isRegisteredLanguageId(N))throw new Error("Unexpected languageId");O=new E(N,{})}const B=u(O.languageId,k),T=_([O.underlyingConfig,B]);return new E(O.languageId,T)}const d={brackets:"editor.language.brackets",colorizedBracketPairs:"editor.language.colorizedBracketPairs"};function u(N,k){const M=k.getValue(d.brackets,{overrideIdentifier:N}),O=k.getValue(d.colorizedBracketPairs,{overrideIdentifier:N});return{brackets:f(M),colorizedBracketPairs:f(O)}}function f(N){if(!!Array.isArray(N))return N.map(k=>{if(!(!Array.isArray(k)||k.length!==2))return[k[0],k[1]]}).filter(k=>!!k)}class S{constructor(k){this.languageId=k}}e.LanguageConfigurationChangeEvent=S;class v{constructor(){this._entries=new Map,this._onDidChange=new y.Emitter,this.onDidChange=this._onDidChange.event}register(k,M,O=0){let B=this._entries.get(k);B||(B=new C(k),this._entries.set(k,B));const T=B.register(M,O);return this._onDidChange.fire(new S(k)),(0,m.toDisposable)(()=>{T.dispose(),this._onDidChange.fire(new S(k))})}getLanguageConfiguration(k){const M=this._entries.get(k);return(M==null?void 0:M.getResolvedConfiguration())||null}getComments(k){const M=this.getLanguageConfiguration(k);return M&&M.comments||null}getIndentRulesSupport(k){const M=this.getLanguageConfiguration(k);return M&&M.indentRulesSupport||null}getPrecedingValidLine(k,M,O){const B=k.getLanguageIdAtPosition(M,0);if(M>1){let T,R=-1;for(T=M-1;T>=1;T--){if(k.getLanguageIdAtPosition(T,0)!==B)return R;const P=k.getLineContent(T);if(O.shouldIgnore(P)||/^\s+$/.test(P)||P===""){R=T;continue}return T}}return-1}getInheritIndentForLine(k,M,O,B=!0){if(k<4)return null;const T=this.getIndentRulesSupport(M.getLanguageId());if(!T)return null;if(O<=1)return{indentation:"",action:null};const R=this.getPrecedingValidLine(M,O,T);if(R<0)return null;if(R<1)return{indentation:"",action:null};const P=M.getLineContent(R);if(T.shouldIncrease(P)||T.shouldIndentNextLine(P))return{indentation:D.getLeadingWhitespace(P),action:w.IndentAction.Indent,line:R};if(T.shouldDecrease(P))return{indentation:D.getLeadingWhitespace(P),action:null,line:R};{if(R===1)return{indentation:D.getLeadingWhitespace(M.getLineContent(R)),action:null,line:R};const F=R-1,W=T.getIndentMetadata(M.getLineContent(F));if(!(W&(1|2))&&W&4){let A=0;for(let H=F-1;H>0;H--)if(!T.shouldIndentNextLine(M.getLineContent(H))){A=H;break}return{indentation:D.getLeadingWhitespace(M.getLineContent(A+1)),action:null,line:A+1}}if(B)return{indentation:D.getLeadingWhitespace(M.getLineContent(R)),action:null,line:R};for(let A=R;A>0;A--){const H=M.getLineContent(A);if(T.shouldIncrease(H))return{indentation:D.getLeadingWhitespace(H),action:w.IndentAction.Indent,line:A};if(T.shouldIndentNextLine(H)){let q=0;for(let X=A-1;X>0;X--)if(!T.shouldIndentNextLine(M.getLineContent(A))){q=X;break}return{indentation:D.getLeadingWhitespace(M.getLineContent(q+1)),action:null,line:q+1}}else if(T.shouldDecrease(H))return{indentation:D.getLeadingWhitespace(H),action:null,line:A}}return{indentation:D.getLeadingWhitespace(M.getLineContent(1)),action:null,line:1}}}getGoodIndentForLine(k,M,O,B,T){if(k<4)return null;const R=this.getLanguageConfiguration(O);if(!R)return null;const P=this.getIndentRulesSupport(O);if(!P)return null;const F=this.getInheritIndentForLine(k,M,B),W=M.getLineContent(B);if(F){const A=F.line;if(A!==void 0){const H=R.onEnter(k,"",M.getLineContent(A),"");if(H){let q=D.getLeadingWhitespace(M.getLineContent(A));return H.removeText&&(q=q.substring(0,q.length-H.removeText)),H.indentAction===w.IndentAction.Indent||H.indentAction===w.IndentAction.IndentOutdent?q=T.shiftIndent(q):H.indentAction===w.IndentAction.Outdent&&(q=T.unshiftIndent(q)),P.shouldDecrease(W)&&(q=T.unshiftIndent(q)),H.appendText&&(q+=H.appendText),D.getLeadingWhitespace(q)}}return P.shouldDecrease(W)?F.action===w.IndentAction.Indent?F.indentation:T.unshiftIndent(F.indentation):F.action===w.IndentAction.Indent?T.shiftIndent(F.indentation):F.indentation}return null}getIndentForEnter(k,M,O,B){if(k<4)return null;M.forceTokenization(O.startLineNumber);const T=M.getLineTokens(O.startLineNumber),R=(0,b.createScopedLineTokens)(T,O.startColumn-1),P=R.getLineContent();let F=!1,W;R.firstCharOffset>0&&T.getLanguageId(0)!==R.languageId?(F=!0,W=P.substr(0,O.startColumn-1-R.firstCharOffset)):W=T.getLineContent().substring(0,O.startColumn-1);let A;O.isEmpty()?A=P.substr(O.startColumn-1-R.firstCharOffset):A=this.getScopedLineTokens(M,O.endLineNumber,O.endColumn).getLineContent().substr(O.endColumn-1-R.firstCharOffset);const H=this.getIndentRulesSupport(R.languageId);if(!H)return null;const q=W,X=D.getLeadingWhitespace(W),G={getLineTokens:Z=>M.getLineTokens(Z),getLanguageId:()=>M.getLanguageId(),getLanguageIdAtPosition:(Z,x)=>M.getLanguageIdAtPosition(Z,x),getLineContent:Z=>Z===O.startLineNumber?q:M.getLineContent(Z)},re=D.getLeadingWhitespace(T.getLineContent()),ae=this.getInheritIndentForLine(k,G,O.startLineNumber+1);if(!ae){const Z=F?re:X;return{beforeEnter:Z,afterEnter:Z}}let oe=F?re:ae.indentation;return ae.action===w.IndentAction.Indent&&(oe=B.shiftIndent(oe)),H.shouldDecrease(A)&&(oe=B.unshiftIndent(oe)),{beforeEnter:F?re:X,afterEnter:oe}}getIndentActionForType(k,M,O,B,T){if(k<4)return null;const R=this.getScopedLineTokens(M,O.startLineNumber,O.startColumn);if(R.firstCharOffset)return null;const P=this.getIndentRulesSupport(R.languageId);if(!P)return null;const F=R.getLineContent(),W=F.substr(0,O.startColumn-1-R.firstCharOffset);let A;if(O.isEmpty()?A=F.substr(O.startColumn-1-R.firstCharOffset):A=this.getScopedLineTokens(M,O.endLineNumber,O.endColumn).getLineContent().substr(O.endColumn-1-R.firstCharOffset),!P.shouldDecrease(W+A)&&P.shouldDecrease(W+B+A)){const H=this.getInheritIndentForLine(k,M,O.startLineNumber,!1);if(!H)return null;let q=H.indentation;return H.action!==w.IndentAction.Indent&&(q=T.unshiftIndent(q)),q}return null}getIndentMetadata(k,M){const O=this.getIndentRulesSupport(k.getLanguageId());return!O||M<1||M>k.getLineCount()?null:O.getIndentMetadata(k.getLineContent(M))}getEnterAction(k,M,O){const B=this.getScopedLineTokens(M,O.startLineNumber,O.startColumn),T=this.getLanguageConfiguration(B.languageId);if(!T)return null;const R=B.getLineContent(),P=R.substr(0,O.startColumn-1-B.firstCharOffset);let F;O.isEmpty()?F=R.substr(O.startColumn-1-B.firstCharOffset):F=this.getScopedLineTokens(M,O.endLineNumber,O.endColumn).getLineContent().substr(O.endColumn-1-B.firstCharOffset);let W="";if(O.startLineNumber>1&&B.firstCharOffset===0){const re=this.getScopedLineTokens(M,O.startLineNumber-1);re.languageId===B.languageId&&(W=re.getLineContent())}const A=T.onEnter(k,W,P,F);if(!A)return null;const H=A.indentAction;let q=A.appendText;const X=A.removeText||0;q?H===w.IndentAction.Indent&&(q=" "+q):H===w.IndentAction.Indent||H===w.IndentAction.IndentOutdent?q=" ":q="";let G=this.getIndentationAtPosition(M,O.startLineNumber,O.startColumn);return X&&(G=G.substring(0,G.length-X)),{indentAction:H,appendText:q,removeText:X,indentation:G}}getIndentationAtPosition(k,M,O){const B=k.getLineContent(M);let T=D.getLeadingWhitespace(B);return T.length>O-1&&(T=T.substring(0,O-1)),T}getScopedLineTokens(k,M,O){k.forceTokenization(M);const B=k.getLineTokens(M),T=typeof O=="undefined"?k.getLineMaxColumn(M)-1:O-1;return(0,b.createScopedLineTokens)(B,T)}}e.LanguageConfigurationRegistryImpl=v,e.LanguageConfigurationRegistry=new v;class C{constructor(k){this.languageId=k,this._resolved=null,this._entries=[],this._order=0,this._resolved=null}register(k,M){const O=new L(k,M,++this._order);return this._entries.push(O),this._resolved=null,(0,m.toDisposable)(()=>{for(let B=0;B<this._entries.length;B++)if(this._entries[B]===O){this._entries.splice(B,1),this._resolved=null;break}})}getResolvedConfiguration(){if(!this._resolved){const k=this._resolve();k&&(this._resolved=new E(this.languageId,k))}return this._resolved}_resolve(){return this._entries.length===0?null:(this._entries.sort(L.cmp),_(this._entries.map(k=>k.configuration)))}}function _(N){let k={comments:void 0,brackets:void 0,wordPattern:void 0,indentationRules:void 0,onEnterRules:void 0,autoClosingPairs:void 0,surroundingPairs:void 0,autoCloseBefore:void 0,folding:void 0,colorizedBracketPairs:void 0,__electricCharacterSupport:void 0};for(const M of N)k={comments:M.comments||k.comments,brackets:M.brackets||k.brackets,wordPattern:M.wordPattern||k.wordPattern,indentationRules:M.indentationRules||k.indentationRules,onEnterRules:M.onEnterRules||k.onEnterRules,autoClosingPairs:M.autoClosingPairs||k.autoClosingPairs,surroundingPairs:M.surroundingPairs||k.surroundingPairs,autoCloseBefore:M.autoCloseBefore||k.autoCloseBefore,folding:M.folding||k.folding,colorizedBracketPairs:M.colorizedBracketPairs||k.colorizedBracketPairs,__electricCharacterSupport:M.__electricCharacterSupport||k.__electricCharacterSupport};return k}class L{constructor(k,M,O){this.configuration=k,this.priority=M,this.order=O}static cmp(k,M){return k.priority===M.priority?k.order-M.order:k.priority-M.priority}}class E{constructor(k,M){this.languageId=k,this.underlyingConfig=M,this._brackets=null,this._electricCharacter=null,this._onEnterSupport=this.underlyingConfig.brackets||this.underlyingConfig.indentationRules||this.underlyingConfig.onEnterRules?new t.OnEnterSupport(this.underlyingConfig):null,this.comments=E._handleComments(this.underlyingConfig),this.characterPair=new p.CharacterPairSupport(this.underlyingConfig),this.wordDefinition=this.underlyingConfig.wordPattern||I.DEFAULT_WORD_REGEXP,this.indentationRules=this.underlyingConfig.indentationRules,this.underlyingConfig.indentationRules?this.indentRulesSupport=new g.IndentRulesSupport(this.underlyingConfig.indentationRules):this.indentRulesSupport=null,this.foldingRules=this.underlyingConfig.folding||{}}getWordDefinition(){return(0,I.ensureValidWordDefinition)(this.wordDefinition)}get brackets(){return!this._brackets&&this.underlyingConfig.brackets&&(this._brackets=new i.RichEditBrackets(this.languageId,this.underlyingConfig.brackets)),this._brackets}get electricCharacter(){return this._electricCharacter||(this._electricCharacter=new h.BracketElectricCharacterSupport(this.brackets)),this._electricCharacter}onEnter(k,M,O,B){return this._onEnterSupport?this._onEnterSupport.onEnter(k,M,O,B):null}getAutoClosingPairs(){return new w.AutoClosingPairs(this.characterPair.getAutoClosingPairs())}getAutoCloseBeforeSet(){return this.characterPair.getAutoCloseBeforeSet()}getSurroundingPairs(){return this.characterPair.getSurroundingPairs()}static _handleComments(k){const M=k.comments;if(!M)return null;const O={};if(M.lineComment&&(O.lineCommentToken=M.lineComment),M.blockComment){const[B,T]=M.blockComment;O.blockCommentStartToken=B,O.blockCommentEndToken=T}return O}}e.ResolvedLanguageConfiguration=E,(0,r.registerSingleton)(e.ILanguageConfigurationService,o)}),define(te[197],ie([1,0,8,68,3,22,32]),function(j,e,y,m,D,I,w){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ShiftCommand=e.cachedStringRepeat=void 0;const b=Object.create(null);function p(g,t){if(t<=0)return"";b[g]||(b[g]=["",g]);const i=b[g];for(let n=i.length;n<=t;n++)i[n]=i[n-1]+g;return i[t]}e.cachedStringRepeat=p;class h{constructor(t,i){this._opts=i,this._selection=t,this._selectionId=null,this._useLastEditRangeForCursorEndPosition=!1,this._selectionStartColumnStaysPut=!1}static unshiftIndent(t,i,n,l,c){const r=m.CursorColumns.visibleColumnFromColumn(t,i,n);if(c){const s=p(" ",l),a=m.CursorColumns.prevIndentTabStop(r,l)/l;return p(s,a)}else{const s=" ",a=m.CursorColumns.prevRenderTabStop(r,n)/n;return p(s,a)}}static shiftIndent(t,i,n,l,c){const r=m.CursorColumns.visibleColumnFromColumn(t,i,n);if(c){const s=p(" ",l),a=m.CursorColumns.nextIndentTabStop(r,l)/l;return p(s,a)}else{const s=" ",a=m.CursorColumns.nextRenderTabStop(r,n)/n;return p(s,a)}}_addEditOperation(t,i,n){this._useLastEditRangeForCursorEndPosition?t.addTrackedEditOperation(i,n):t.addEditOperation(i,n)}getEditOperations(t,i){const n=this._selection.startLineNumber;let l=this._selection.endLineNumber;this._selection.endColumn===1&&n!==l&&(l=l-1);const{tabSize:c,indentSize:r,insertSpaces:s}=this._opts,o=n===l;if(this._opts.useTabStops){this._selection.isEmpty()&&/^\s*$/.test(t.getLineContent(n))&&(this._useLastEditRangeForCursorEndPosition=!0);let a=0,d=0;for(let u=n;u<=l;u++,a=d){d=0;const f=t.getLineContent(u);let S=y.firstNonWhitespaceIndex(f);if(this._opts.isUnshift&&(f.length===0||S===0)||!o&&!this._opts.isUnshift&&f.length===0)continue;if(S===-1&&(S=f.length),u>1&&m.CursorColumns.visibleColumnFromColumn(f,S+1,c)%r!=0&&t.isCheapToTokenize(u-1)){const _=w.LanguageConfigurationRegistry.getEnterAction(this._opts.autoIndent,t,new D.Range(u-1,t.getLineMaxColumn(u-1),u-1,t.getLineMaxColumn(u-1)));if(_){if(d=a,_.appendText)for(let L=0,E=_.appendText.length;L<E&&d<r&&_.appendText.charCodeAt(L)===32;L++)d++;_.removeText&&(d=Math.max(0,d-_.removeText));for(let L=0;L<d&&!(S===0||f.charCodeAt(S-1)!==32);L++)S--}}if(this._opts.isUnshift&&S===0)continue;let v;this._opts.isUnshift?v=h.unshiftIndent(f,S+1,c,r,s):v=h.shiftIndent(f,S+1,c,r,s),this._addEditOperation(i,new D.Range(u,1,u,S+1),v),u===n&&!this._selection.isEmpty()&&(this._selectionStartColumnStaysPut=this._selection.startColumn<=S+1)}}else{!this._opts.isUnshift&&this._selection.isEmpty()&&t.getLineLength(n)===0&&(this._useLastEditRangeForCursorEndPosition=!0);const a=s?p(" ",r):" ";for(let d=n;d<=l;d++){const u=t.getLineContent(d);let f=y.firstNonWhitespaceIndex(u);if(!(this._opts.isUnshift&&(u.length===0||f===0))&&!(!o&&!this._opts.isUnshift&&u.length===0)&&(f===-1&&(f=u.length),!(this._opts.isUnshift&&f===0)))if(this._opts.isUnshift){f=Math.min(f,r);for(let S=0;S<f;S++)if(u.charCodeAt(S)===9){f=S+1;break}this._addEditOperation(i,new D.Range(d,1,d,f+1),"")}else this._addEditOperation(i,new D.Range(d,1,d,1),a),d===n&&!this._selection.isEmpty()&&(this._selectionStartColumnStaysPut=this._selection.startColumn===1)}}this._selectionId=i.trackSelection(this._selection)}computeCursorState(t,i){if(this._useLastEditRangeForCursorEndPosition){const l=i.getInverseEditOperations()[0];return new I.Selection(l.range.endLineNumber,l.range.endColumn,l.range.endLineNumber,l.range.endColumn)}const n=i.getTrackedSelection(this._selectionId);if(this._selectionStartColumnStaysPut){const l=this._selection.startColumn;return n.startColumn<=l?n:n.getDirection()===0?new I.Selection(n.startLineNumber,l,n.endLineNumber,n.endColumn):new I.Selection(n.endLineNumber,n.endColumn,n.startLineNumber,l)}return n}}e.ShiftCommand=h}),define(te[599],ie([1,0,8,61,11,3,22,32,254]),function(j,e,y,m,D,I,w,b,p){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.LineCommentCommand=void 0;class h{constructor(t,i,n,l,c,r,s){this.languageConfigurationService=t,this._selection=i,this._tabSize=n,this._type=l,this._insertSpace=c,this._selectionId=null,this._deltaColumn=0,this._moveEndPositionDown=!1,this._ignoreEmptyLines=r,this._ignoreFirstLine=s||!1}static _gatherPreflightCommentStrings(t,i,n,l){t.tokenizeIfCheap(i);const c=t.getLanguageIdAtPosition(i,1),r=l.getLanguageConfiguration(c).comments,s=r?r.lineCommentToken:null;if(!s)return null;let o=[];for(let a=0,d=n-i+1;a<d;a++)o[a]={ignore:!1,commentStr:s,commentStrOffset:0,commentStrLength:s.length};return o}static _analyzeLines(t,i,n,l,c,r,s,o){let a=!0,d;t===0?d=!0:t===1?d=!1:d=!0;for(let u=0,f=l.length;u<f;u++){const S=l[u],v=c+u;if(v===c&&s){S.ignore=!0;continue}const C=n.getLineContent(v),_=y.firstNonWhitespaceIndex(C);if(_===-1){S.ignore=r,S.commentStrOffset=C.length;continue}if(a=!1,S.ignore=!1,S.commentStrOffset=_,d&&!p.BlockCommentCommand._haystackHasNeedleAtOffset(C,S.commentStr,_)&&(t===0?d=!1:t===1||(S.ignore=!0)),d&&i){const L=_+S.commentStrLength;L<C.length&&C.charCodeAt(L)===32&&(S.commentStrLength+=1)}}if(t===0&&a){d=!1;for(let u=0,f=l.length;u<f;u++)l[u].ignore=!1}return{supported:!0,shouldRemoveComments:d,lines:l}}static _gatherPreflightData(t,i,n,l,c,r,s,o){const a=h._gatherPreflightCommentStrings(n,l,c,o);return a===null?{supported:!1}:h._analyzeLines(t,i,n,a,l,r,s,o)}_executeLineComments(t,i,n,l){let c;n.shouldRemoveComments?c=h._createRemoveLineCommentsOperations(n.lines,l.startLineNumber):(h._normalizeInsertionPoint(t,n.lines,l.startLineNumber,this._tabSize),c=this._createAddLineCommentsOperations(n.lines,l.startLineNumber));const r=new D.Position(l.positionLineNumber,l.positionColumn);for(let s=0,o=c.length;s<o;s++)i.addEditOperation(c[s].range,c[s].text),I.Range.isEmpty(c[s].range)&&I.Range.getStartPosition(c[s].range).equals(r)&&t.getLineContent(r.lineNumber).length+1===r.column&&(this._deltaColumn=(c[s].text||"").length);this._selectionId=i.trackSelection(l)}_attemptRemoveBlockComment(t,i,n,l){let c=i.startLineNumber,r=i.endLineNumber,s=l.length+Math.max(t.getLineFirstNonWhitespaceColumn(i.startLineNumber),i.startColumn),o=t.getLineContent(c).lastIndexOf(n,s-1),a=t.getLineContent(r).indexOf(l,i.endColumn-1-n.length);return o!==-1&&a===-1&&(a=t.getLineContent(c).indexOf(l,o+n.length),r=c),o===-1&&a!==-1&&(o=t.getLineContent(r).lastIndexOf(n,a),c=r),i.isEmpty()&&(o===-1||a===-1)&&(o=t.getLineContent(c).indexOf(n),o!==-1&&(a=t.getLineContent(c).indexOf(l,o+n.length))),o!==-1&&t.getLineContent(c).charCodeAt(o+n.length)===32&&(n+=" "),a!==-1&&t.getLineContent(r).charCodeAt(a-1)===32&&(l=" "+l,a-=1),o!==-1&&a!==-1?p.BlockCommentCommand._createRemoveBlockCommentOperations(new I.Range(c,o+n.length+1,r,a+1),n,l):null}_executeBlockComment(t,i,n){t.tokenizeIfCheap(n.startLineNumber);let l=t.getLanguageIdAtPosition(n.startLineNumber,1),c=b.LanguageConfigurationRegistry.getComments(l);if(!c||!c.blockCommentStartToken||!c.blockCommentEndToken)return;const r=c.blockCommentStartToken,s=c.blockCommentEndToken;let o=this._attemptRemoveBlockComment(t,n,r,s);if(!o){if(n.isEmpty()){const a=t.getLineContent(n.startLineNumber);let d=y.firstNonWhitespaceIndex(a);d===-1&&(d=a.length),o=p.BlockCommentCommand._createAddBlockCommentOperations(new I.Range(n.startLineNumber,d+1,n.startLineNumber,a.length+1),r,s,this._insertSpace)}else o=p.BlockCommentCommand._createAddBlockCommentOperations(new I.Range(n.startLineNumber,t.getLineFirstNonWhitespaceColumn(n.startLineNumber),n.endLineNumber,t.getLineMaxColumn(n.endLineNumber)),r,s,this._insertSpace);o.length===1&&(this._deltaColumn=r.length+1)}this._selectionId=i.trackSelection(n);for(const a of o)i.addEditOperation(a.range,a.text)}getEditOperations(t,i){let n=this._selection;if(this._moveEndPositionDown=!1,n.startLineNumber===n.endLineNumber&&this._ignoreFirstLine){i.addEditOperation(new I.Range(n.startLineNumber,t.getLineMaxColumn(n.startLineNumber),n.startLineNumber+1,1),n.startLineNumber===t.getLineCount()?"":`
|
||
`),this._selectionId=i.trackSelection(n);return}n.startLineNumber<n.endLineNumber&&n.endColumn===1&&(this._moveEndPositionDown=!0,n=n.setEndPosition(n.endLineNumber-1,t.getLineMaxColumn(n.endLineNumber-1)));const l=h._gatherPreflightData(this._type,this._insertSpace,t,n.startLineNumber,n.endLineNumber,this._ignoreEmptyLines,this._ignoreFirstLine,this.languageConfigurationService);return l.supported?this._executeLineComments(t,i,l,n):this._executeBlockComment(t,i,n)}computeCursorState(t,i){let n=i.getTrackedSelection(this._selectionId);return this._moveEndPositionDown&&(n=n.setEndPosition(n.endLineNumber+1,1)),new w.Selection(n.selectionStartLineNumber,n.selectionStartColumn+this._deltaColumn,n.positionLineNumber,n.positionColumn+this._deltaColumn)}static _createRemoveLineCommentsOperations(t,i){let n=[];for(let l=0,c=t.length;l<c;l++){const r=t[l];r.ignore||n.push(m.EditOperation.delete(new I.Range(i+l,r.commentStrOffset+1,i+l,r.commentStrOffset+r.commentStrLength+1)))}return n}_createAddLineCommentsOperations(t,i){let n=[];const l=this._insertSpace?" ":"";for(let c=0,r=t.length;c<r;c++){const s=t[c];s.ignore||n.push(m.EditOperation.insert(new D.Position(i+c,s.commentStrOffset+1),s.commentStr+l))}return n}static nextVisibleColumn(t,i,n,l){return n?t+(i-t%i):t+l}static _normalizeInsertionPoint(t,i,n,l){let c=1073741824,r,s;for(let o=0,a=i.length;o<a;o++){if(i[o].ignore)continue;const d=t.getLineContent(n+o);let u=0;for(let f=0,S=i[o].commentStrOffset;u<c&&f<S;f++)u=h.nextVisibleColumn(u,l,d.charCodeAt(f)===9,1);u<c&&(c=u)}c=Math.floor(c/l)*l;for(let o=0,a=i.length;o<a;o++){if(i[o].ignore)continue;const d=t.getLineContent(n+o);let u=0;for(r=0,s=i[o].commentStrOffset;u<c&&r<s;r++)u=h.nextVisibleColumn(u,l,d.charCodeAt(r)===9,1);u>c?i[o].commentStrOffset=r-1:i[o].commentStrOffset=r}}}e.LineCommentCommand=h}),define(te[600],ie([1,0,8,197,3,22,119,32,258]),function(j,e,y,m,D,I,w,b,p){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MoveLinesCommand=void 0;class h{constructor(t,i,n){this._selection=t,this._isMovingDown=i,this._autoIndent=n,this._selectionId=null,this._moveEndLineSelectionShrink=!1}getEditOperations(t,i){let n=t.getLineCount();if(this._isMovingDown&&this._selection.endLineNumber===n){this._selectionId=i.trackSelection(this._selection);return}if(!this._isMovingDown&&this._selection.startLineNumber===1){this._selectionId=i.trackSelection(this._selection);return}this._moveEndPositionDown=!1;let l=this._selection;l.startLineNumber<l.endLineNumber&&l.endColumn===1&&(this._moveEndPositionDown=!0,l=l.setEndPosition(l.endLineNumber-1,t.getLineMaxColumn(l.endLineNumber-1)));const{tabSize:c,indentSize:r,insertSpaces:s}=t.getOptions();let o=this.buildIndentConverter(c,r,s),a={getLineTokens:d=>t.getLineTokens(d),getLanguageId:()=>t.getLanguageId(),getLanguageIdAtPosition:(d,u)=>t.getLanguageIdAtPosition(d,u),getLineContent:null};if(l.startLineNumber===l.endLineNumber&&t.getLineMaxColumn(l.startLineNumber)===1){let d=l.startLineNumber,u=this._isMovingDown?d+1:d-1;t.getLineMaxColumn(u)===1?i.addEditOperation(new D.Range(1,1,1,1),null):(i.addEditOperation(new D.Range(d,1,d,1),t.getLineContent(u)),i.addEditOperation(new D.Range(u,1,u,t.getLineMaxColumn(u)),null)),l=new I.Selection(u,1,u,1)}else{let d,u;if(this._isMovingDown){d=l.endLineNumber+1,u=t.getLineContent(d),i.addEditOperation(new D.Range(d-1,t.getLineMaxColumn(d-1),d,t.getLineMaxColumn(d)),null);let f=u;if(this.shouldAutoIndent(t,l)){let S=this.matchEnterRule(t,o,c,d,l.startLineNumber-1);if(S!==null){let C=y.getLeadingWhitespace(t.getLineContent(d)),_=S+p.getSpaceCnt(C,c);f=p.generateIndent(_,c,s)+this.trimLeft(u)}else{a.getLineContent=_=>_===l.startLineNumber?t.getLineContent(d):t.getLineContent(_);let C=b.LanguageConfigurationRegistry.getGoodIndentForLine(this._autoIndent,a,t.getLanguageIdAtPosition(d,1),l.startLineNumber,o);if(C!==null){let _=y.getLeadingWhitespace(t.getLineContent(d)),L=p.getSpaceCnt(C,c),E=p.getSpaceCnt(_,c);L!==E&&(f=p.generateIndent(L,c,s)+this.trimLeft(u))}}i.addEditOperation(new D.Range(l.startLineNumber,1,l.startLineNumber,1),f+`
|
||
`);let v=this.matchEnterRuleMovingDown(t,o,c,l.startLineNumber,d,f);if(v!==null)v!==0&&this.getIndentEditsOfMovingBlock(t,i,l,c,s,v);else{a.getLineContent=_=>_===l.startLineNumber?f:_>=l.startLineNumber+1&&_<=l.endLineNumber+1?t.getLineContent(_-1):t.getLineContent(_);let C=b.LanguageConfigurationRegistry.getGoodIndentForLine(this._autoIndent,a,t.getLanguageIdAtPosition(d,1),l.startLineNumber+1,o);if(C!==null){const _=y.getLeadingWhitespace(t.getLineContent(l.startLineNumber)),L=p.getSpaceCnt(C,c),E=p.getSpaceCnt(_,c);if(L!==E){const N=L-E;this.getIndentEditsOfMovingBlock(t,i,l,c,s,N)}}}}else i.addEditOperation(new D.Range(l.startLineNumber,1,l.startLineNumber,1),f+`
|
||
`)}else if(d=l.startLineNumber-1,u=t.getLineContent(d),i.addEditOperation(new D.Range(d,1,d+1,1),null),i.addEditOperation(new D.Range(l.endLineNumber,t.getLineMaxColumn(l.endLineNumber),l.endLineNumber,t.getLineMaxColumn(l.endLineNumber)),`
|
||
`+u),this.shouldAutoIndent(t,l)){a.getLineContent=S=>S===d?t.getLineContent(l.startLineNumber):t.getLineContent(S);let f=this.matchEnterRule(t,o,c,l.startLineNumber,l.startLineNumber-2);if(f!==null)f!==0&&this.getIndentEditsOfMovingBlock(t,i,l,c,s,f);else{let S=b.LanguageConfigurationRegistry.getGoodIndentForLine(this._autoIndent,a,t.getLanguageIdAtPosition(l.startLineNumber,1),d,o);if(S!==null){let v=y.getLeadingWhitespace(t.getLineContent(l.startLineNumber)),C=p.getSpaceCnt(S,c),_=p.getSpaceCnt(v,c);if(C!==_){let L=C-_;this.getIndentEditsOfMovingBlock(t,i,l,c,s,L)}}}}}this._selectionId=i.trackSelection(l)}buildIndentConverter(t,i,n){return{shiftIndent:l=>m.ShiftCommand.shiftIndent(l,l.length+1,t,i,n),unshiftIndent:l=>m.ShiftCommand.unshiftIndent(l,l.length+1,t,i,n)}}parseEnterResult(t,i,n,l,c){if(c){let r=c.indentation;c.indentAction===w.IndentAction.None||c.indentAction===w.IndentAction.Indent?r=c.indentation+c.appendText:c.indentAction===w.IndentAction.IndentOutdent?r=c.indentation:c.indentAction===w.IndentAction.Outdent&&(r=i.unshiftIndent(c.indentation)+c.appendText);let s=t.getLineContent(l);if(this.trimLeft(s).indexOf(this.trimLeft(r))>=0){let o=y.getLeadingWhitespace(t.getLineContent(l)),a=y.getLeadingWhitespace(r),d=b.LanguageConfigurationRegistry.getIndentMetadata(t,l);d!==null&&d&2&&(a=i.unshiftIndent(a));let u=p.getSpaceCnt(a,n),f=p.getSpaceCnt(o,n);return u-f}}return null}matchEnterRuleMovingDown(t,i,n,l,c,r){if(y.lastNonWhitespaceIndex(r)>=0){let s=t.getLineMaxColumn(c),o=b.LanguageConfigurationRegistry.getEnterAction(this._autoIndent,t,new D.Range(c,s,c,s));return this.parseEnterResult(t,i,n,l,o)}else{let s=l-1;for(;s>=1;){let d=t.getLineContent(s);if(y.lastNonWhitespaceIndex(d)>=0)break;s--}if(s<1||l>t.getLineCount())return null;let o=t.getLineMaxColumn(s),a=b.LanguageConfigurationRegistry.getEnterAction(this._autoIndent,t,new D.Range(s,o,s,o));return this.parseEnterResult(t,i,n,l,a)}}matchEnterRule(t,i,n,l,c,r){let s=c;for(;s>=1;){let d;if(s===c&&r!==void 0?d=r:d=t.getLineContent(s),y.lastNonWhitespaceIndex(d)>=0)break;s--}if(s<1||l>t.getLineCount())return null;let o=t.getLineMaxColumn(s),a=b.LanguageConfigurationRegistry.getEnterAction(this._autoIndent,t,new D.Range(s,o,s,o));return this.parseEnterResult(t,i,n,l,a)}trimLeft(t){return t.replace(/^\s+/,"")}shouldAutoIndent(t,i){if(this._autoIndent<4||!t.isCheapToTokenize(i.startLineNumber))return!1;let n=t.getLanguageIdAtPosition(i.startLineNumber,1),l=t.getLanguageIdAtPosition(i.endLineNumber,1);return!(n!==l||b.LanguageConfigurationRegistry.getIndentRulesSupport(n)===null)}getIndentEditsOfMovingBlock(t,i,n,l,c,r){for(let s=n.startLineNumber;s<=n.endLineNumber;s++){let o=t.getLineContent(s),a=y.getLeadingWhitespace(o),u=p.getSpaceCnt(a,l)+r,f=p.generateIndent(u,l,c);f!==a&&(i.addEditOperation(new D.Range(s,1,s,a.length+1),f),s===n.endLineNumber&&n.endColumn<=a.length+1&&f===""&&(this._moveEndLineSelectionShrink=!0))}}computeCursorState(t,i){let n=i.getTrackedSelection(this._selectionId);return this._moveEndPositionDown&&(n=n.setEndPosition(n.endLineNumber+1,1)),this._moveEndLineSelectionShrink&&n.startLineNumber<n.endLineNumber&&(n=n.setEndPosition(n.endLineNumber,2)),n}}e.MoveLinesCommand=h}),define(te[16],ie([1,0,17,8,9]),function(j,e,y,m,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.implies=e.SET_CONTEXT_COMMAND_ID=e.IContextKeyService=e.RawContextKey=e.ContextKeyNotRegexExpr=e.ContextKeyRegexExpr=e.ContextKeySmallerEqualsExpr=e.ContextKeySmallerExpr=e.ContextKeyGreaterEqualsExpr=e.ContextKeyGreaterExpr=e.ContextKeyNotExpr=e.ContextKeyNotEqualsExpr=e.ContextKeyNotInExpr=e.ContextKeyInExpr=e.ContextKeyEqualsExpr=e.ContextKeyDefinedExpr=e.ContextKeyTrueExpr=e.ContextKeyFalseExpr=e.expressionsAreEqualWithConstantSubstitution=e.ContextKeyExpr=void 0;const I=new Map;I.set("false",!1),I.set("true",!0),I.set("isMac",y.isMacintosh),I.set("isLinux",y.isLinux),I.set("isWindows",y.isWindows),I.set("isWeb",y.isWeb),I.set("isMacNative",y.isMacintosh&&!y.isWeb),I.set("isEdge",y.isEdge),I.set("isFirefox",y.isFirefox),I.set("isChrome",y.isChrome),I.set("isSafari",y.isSafari);const w=Object.prototype.hasOwnProperty;class b{static has(T){return i.create(T)}static equals(T,R){return n.create(T,R)}static regex(T,R){return S.create(T,R)}static not(T){return s.create(T)}static and(...T){return _.create(T,null)}static or(...T){return L.create(T,null,!0)}static deserialize(T,R=!1){if(!!T)return this._deserializeOrExpression(T,R)}static _deserializeOrExpression(T,R){let P=T.split("||");return L.create(P.map(F=>this._deserializeAndExpression(F,R)),null,!0)}static _deserializeAndExpression(T,R){let P=T.split("&&");return _.create(P.map(F=>this._deserializeOne(F,R)),null)}static _deserializeOne(T,R){if(T=T.trim(),T.indexOf("!=")>=0){let P=T.split("!=");return r.create(P[0].trim(),this._deserializeValue(P[1],R))}if(T.indexOf("==")>=0){let P=T.split("==");return n.create(P[0].trim(),this._deserializeValue(P[1],R))}if(T.indexOf("=~")>=0){let P=T.split("=~");return S.create(P[0].trim(),this._deserializeRegexValue(P[1],R))}if(T.indexOf(" in ")>=0){let P=T.split(" in ");return l.create(P[0].trim(),P[1].trim())}if(/^[^<=>]+>=[^<=>]+$/.test(T)){const P=T.split(">=");return d.create(P[0].trim(),P[1].trim())}if(/^[^<=>]+>[^<=>]+$/.test(T)){const P=T.split(">");return a.create(P[0].trim(),P[1].trim())}if(/^[^<=>]+<=[^<=>]+$/.test(T)){const P=T.split("<=");return f.create(P[0].trim(),P[1].trim())}if(/^[^<=>]+<[^<=>]+$/.test(T)){const P=T.split("<");return u.create(P[0].trim(),P[1].trim())}return/^\!\s*/.test(T)?s.create(T.substr(1).trim()):i.create(T)}static _deserializeValue(T,R){if(T=T.trim(),T==="true")return!0;if(T==="false")return!1;let P=/^'([^']*)'$/.exec(T);return P?P[1].trim():T}static _deserializeRegexValue(T,R){if((0,m.isFalsyOrWhitespace)(T)){if(R)throw new Error("missing regexp-value for =~-expression");return console.warn("missing regexp-value for =~-expression"),null}let P=T.indexOf("/"),F=T.lastIndexOf("/");if(P===F||P<0){if(R)throw new Error(`bad regexp-value '${T}', missing /-enclosure`);return console.warn(`bad regexp-value '${T}', missing /-enclosure`),null}let W=T.slice(P+1,F),A=T[F+1]==="i"?"i":"";try{return new RegExp(W,A)}catch(H){if(R)throw new Error(`bad regexp-value '${T}', parse error: ${H}`);return console.warn(`bad regexp-value '${T}', parse error: ${H}`),null}}}e.ContextKeyExpr=b;function p(B,T){const R=B?B.substituteConstants():void 0,P=T?T.substituteConstants():void 0;return!R&&!P?!0:!R||!P?!1:R.equals(P)}e.expressionsAreEqualWithConstantSubstitution=p;function h(B,T){return B.cmp(T)}class g{constructor(){this.type=0}cmp(T){return this.type-T.type}equals(T){return T.type===this.type}substituteConstants(){return this}evaluate(T){return!1}serialize(){return"false"}keys(){return[]}negate(){return t.INSTANCE}}e.ContextKeyFalseExpr=g,g.INSTANCE=new g;class t{constructor(){this.type=1}cmp(T){return this.type-T.type}equals(T){return T.type===this.type}substituteConstants(){return this}evaluate(T){return!0}serialize(){return"true"}keys(){return[]}negate(){return g.INSTANCE}}e.ContextKeyTrueExpr=t,t.INSTANCE=new t;class i{constructor(T,R){this.key=T,this.negated=R,this.type=2}static create(T,R=null){const P=I.get(T);return typeof P=="boolean"?P?t.INSTANCE:g.INSTANCE:new i(T,R)}cmp(T){return T.type!==this.type?this.type-T.type:N(this.key,T.key)}equals(T){return T.type===this.type?this.key===T.key:!1}substituteConstants(){const T=I.get(this.key);return typeof T=="boolean"?T?t.INSTANCE:g.INSTANCE:this}evaluate(T){return!!T.getValue(this.key)}serialize(){return this.key}keys(){return[this.key]}negate(){return this.negated||(this.negated=s.create(this.key,this)),this.negated}}e.ContextKeyDefinedExpr=i;class n{constructor(T,R,P){this.key=T,this.value=R,this.negated=P,this.type=4}static create(T,R,P=null){if(typeof R=="boolean")return R?i.create(T,P):s.create(T,P);const F=I.get(T);return typeof F=="boolean"?R===(F?"true":"false")?t.INSTANCE:g.INSTANCE:new n(T,R,P)}cmp(T){return T.type!==this.type?this.type-T.type:k(this.key,this.value,T.key,T.value)}equals(T){return T.type===this.type?this.key===T.key&&this.value===T.value:!1}substituteConstants(){const T=I.get(this.key);if(typeof T=="boolean"){const R=T?"true":"false";return this.value===R?t.INSTANCE:g.INSTANCE}return this}evaluate(T){return T.getValue(this.key)==this.value}serialize(){return`${this.key} == '${this.value}'`}keys(){return[this.key]}negate(){return this.negated||(this.negated=r.create(this.key,this.value,this)),this.negated}}e.ContextKeyEqualsExpr=n;class l{constructor(T,R){this.key=T,this.valueKey=R,this.type=10,this.negated=null}static create(T,R){return new l(T,R)}cmp(T){return T.type!==this.type?this.type-T.type:k(this.key,this.valueKey,T.key,T.valueKey)}equals(T){return T.type===this.type?this.key===T.key&&this.valueKey===T.valueKey:!1}substituteConstants(){return this}evaluate(T){const R=T.getValue(this.valueKey),P=T.getValue(this.key);return Array.isArray(R)?R.indexOf(P)>=0:typeof P=="string"&&typeof R=="object"&&R!==null?w.call(R,P):!1}serialize(){return`${this.key} in '${this.valueKey}'`}keys(){return[this.key,this.valueKey]}negate(){return this.negated||(this.negated=c.create(this)),this.negated}}e.ContextKeyInExpr=l;class c{constructor(T){this._actual=T,this.type=11}static create(T){return new c(T)}cmp(T){return T.type!==this.type?this.type-T.type:this._actual.cmp(T._actual)}equals(T){return T.type===this.type?this._actual.equals(T._actual):!1}substituteConstants(){return this}evaluate(T){return!this._actual.evaluate(T)}serialize(){throw new Error("Method not implemented.")}keys(){return this._actual.keys()}negate(){return this._actual}}e.ContextKeyNotInExpr=c;class r{constructor(T,R,P){this.key=T,this.value=R,this.negated=P,this.type=5}static create(T,R,P=null){if(typeof R=="boolean")return R?s.create(T,P):i.create(T,P);const F=I.get(T);return typeof F=="boolean"?R===(F?"true":"false")?g.INSTANCE:t.INSTANCE:new r(T,R,P)}cmp(T){return T.type!==this.type?this.type-T.type:k(this.key,this.value,T.key,T.value)}equals(T){return T.type===this.type?this.key===T.key&&this.value===T.value:!1}substituteConstants(){const T=I.get(this.key);if(typeof T=="boolean"){const R=T?"true":"false";return this.value===R?g.INSTANCE:t.INSTANCE}return this}evaluate(T){return T.getValue(this.key)!=this.value}serialize(){return`${this.key} != '${this.value}'`}keys(){return[this.key]}negate(){return this.negated||(this.negated=n.create(this.key,this.value,this)),this.negated}}e.ContextKeyNotEqualsExpr=r;class s{constructor(T,R){this.key=T,this.negated=R,this.type=3}static create(T,R=null){const P=I.get(T);return typeof P=="boolean"?P?g.INSTANCE:t.INSTANCE:new s(T,R)}cmp(T){return T.type!==this.type?this.type-T.type:N(this.key,T.key)}equals(T){return T.type===this.type?this.key===T.key:!1}substituteConstants(){const T=I.get(this.key);return typeof T=="boolean"?T?g.INSTANCE:t.INSTANCE:this}evaluate(T){return!T.getValue(this.key)}serialize(){return`!${this.key}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=i.create(this.key,this)),this.negated}}e.ContextKeyNotExpr=s;function o(B,T){if(typeof B=="string"){const R=parseFloat(B);isNaN(R)||(B=R)}return typeof B=="string"||typeof B=="number"?T(B):g.INSTANCE}class a{constructor(T,R,P){this.key=T,this.value=R,this.negated=P,this.type=12}static create(T,R,P=null){return o(R,F=>new a(T,F,P))}cmp(T){return T.type!==this.type?this.type-T.type:k(this.key,this.value,T.key,T.value)}equals(T){return T.type===this.type?this.key===T.key&&this.value===T.value:!1}substituteConstants(){return this}evaluate(T){return typeof this.value=="string"?!1:parseFloat(T.getValue(this.key))>this.value}serialize(){return`${this.key} > ${this.value}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=f.create(this.key,this.value,this)),this.negated}}e.ContextKeyGreaterExpr=a;class d{constructor(T,R,P){this.key=T,this.value=R,this.negated=P,this.type=13}static create(T,R,P=null){return o(R,F=>new d(T,F,P))}cmp(T){return T.type!==this.type?this.type-T.type:k(this.key,this.value,T.key,T.value)}equals(T){return T.type===this.type?this.key===T.key&&this.value===T.value:!1}substituteConstants(){return this}evaluate(T){return typeof this.value=="string"?!1:parseFloat(T.getValue(this.key))>=this.value}serialize(){return`${this.key} >= ${this.value}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=u.create(this.key,this.value,this)),this.negated}}e.ContextKeyGreaterEqualsExpr=d;class u{constructor(T,R,P){this.key=T,this.value=R,this.negated=P,this.type=14}static create(T,R,P=null){return o(R,F=>new u(T,F,P))}cmp(T){return T.type!==this.type?this.type-T.type:k(this.key,this.value,T.key,T.value)}equals(T){return T.type===this.type?this.key===T.key&&this.value===T.value:!1}substituteConstants(){return this}evaluate(T){return typeof this.value=="string"?!1:parseFloat(T.getValue(this.key))<this.value}serialize(){return`${this.key} < ${this.value}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=d.create(this.key,this.value,this)),this.negated}}e.ContextKeySmallerExpr=u;class f{constructor(T,R,P){this.key=T,this.value=R,this.negated=P,this.type=15}static create(T,R,P=null){return o(R,F=>new f(T,F,P))}cmp(T){return T.type!==this.type?this.type-T.type:k(this.key,this.value,T.key,T.value)}equals(T){return T.type===this.type?this.key===T.key&&this.value===T.value:!1}substituteConstants(){return this}evaluate(T){return typeof this.value=="string"?!1:parseFloat(T.getValue(this.key))<=this.value}serialize(){return`${this.key} <= ${this.value}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=a.create(this.key,this.value,this)),this.negated}}e.ContextKeySmallerEqualsExpr=f;class S{constructor(T,R){this.key=T,this.regexp=R,this.type=7,this.negated=null}static create(T,R){return new S(T,R)}cmp(T){if(T.type!==this.type)return this.type-T.type;if(this.key<T.key)return-1;if(this.key>T.key)return 1;const R=this.regexp?this.regexp.source:"",P=T.regexp?T.regexp.source:"";return R<P?-1:R>P?1:0}equals(T){if(T.type===this.type){const R=this.regexp?this.regexp.source:"",P=T.regexp?T.regexp.source:"";return this.key===T.key&&R===P}return!1}substituteConstants(){return this}evaluate(T){let R=T.getValue(this.key);return this.regexp?this.regexp.test(R):!1}serialize(){const T=this.regexp?`/${this.regexp.source}/${this.regexp.ignoreCase?"i":""}`:"/invalid/";return`${this.key} =~ ${T}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=v.create(this)),this.negated}}e.ContextKeyRegexExpr=S;class v{constructor(T){this._actual=T,this.type=8}static create(T){return new v(T)}cmp(T){return T.type!==this.type?this.type-T.type:this._actual.cmp(T._actual)}equals(T){return T.type===this.type?this._actual.equals(T._actual):!1}substituteConstants(){return this}evaluate(T){return!this._actual.evaluate(T)}serialize(){throw new Error("Method not implemented.")}keys(){return this._actual.keys()}negate(){return this._actual}}e.ContextKeyNotRegexExpr=v;function C(B){let T=null;for(let R=0,P=B.length;R<P;R++){const F=B[R].substituteConstants();if(B[R]!==F&&T===null){T=[];for(let W=0;W<R;W++)T[W]=B[W]}T!==null&&(T[R]=F)}return T===null?B:T}class _{constructor(T,R){this.expr=T,this.negated=R,this.type=6}static create(T,R){return _._normalizeArr(T,R)}cmp(T){if(T.type!==this.type)return this.type-T.type;if(this.expr.length<T.expr.length)return-1;if(this.expr.length>T.expr.length)return 1;for(let R=0,P=this.expr.length;R<P;R++){const F=h(this.expr[R],T.expr[R]);if(F!==0)return F}return 0}equals(T){if(T.type===this.type){if(this.expr.length!==T.expr.length)return!1;for(let R=0,P=this.expr.length;R<P;R++)if(!this.expr[R].equals(T.expr[R]))return!1;return!0}return!1}substituteConstants(){const T=C(this.expr);return T===this.expr?this:_.create(T,this.negated)}evaluate(T){for(let R=0,P=this.expr.length;R<P;R++)if(!this.expr[R].evaluate(T))return!1;return!0}static _normalizeArr(T,R){const P=[];let F=!1;for(const W of T)if(!!W){if(W.type===1){F=!0;continue}if(W.type===0)return g.INSTANCE;if(W.type===6){P.push(...W.expr);continue}P.push(W)}if(P.length===0&&F)return t.INSTANCE;if(P.length!==0){if(P.length===1)return P[0];P.sort(h);for(let W=1;W<P.length;W++)P[W-1].equals(P[W])&&(P.splice(W,1),W--);if(P.length===1)return P[0];for(;P.length>1;){const W=P[P.length-1];if(W.type!==9)break;P.pop();const A=P.pop(),H=P.length===0,q=L.create(W.expr.map(X=>_.create([X,A],null)),null,H);q&&(P.push(q),P.sort(h))}return P.length===1?P[0]:new _(P,R)}}serialize(){return this.expr.map(T=>T.serialize()).join(" && ")}keys(){const T=[];for(let R of this.expr)T.push(...R.keys());return T}negate(){if(!this.negated){const T=[];for(let R of this.expr)T.push(R.negate());this.negated=L.create(T,this,!0)}return this.negated}}class L{constructor(T,R){this.expr=T,this.negated=R,this.type=9}static create(T,R,P){return L._normalizeArr(T,R,P)}cmp(T){if(T.type!==this.type)return this.type-T.type;if(this.expr.length<T.expr.length)return-1;if(this.expr.length>T.expr.length)return 1;for(let R=0,P=this.expr.length;R<P;R++){const F=h(this.expr[R],T.expr[R]);if(F!==0)return F}return 0}equals(T){if(T.type===this.type){if(this.expr.length!==T.expr.length)return!1;for(let R=0,P=this.expr.length;R<P;R++)if(!this.expr[R].equals(T.expr[R]))return!1;return!0}return!1}substituteConstants(){const T=C(this.expr);return T===this.expr?this:L.create(T,this.negated,!1)}evaluate(T){for(let R=0,P=this.expr.length;R<P;R++)if(this.expr[R].evaluate(T))return!0;return!1}static _normalizeArr(T,R,P){let F=[],W=!1;if(T){for(let A=0,H=T.length;A<H;A++){const q=T[A];if(!!q){if(q.type===0){W=!0;continue}if(q.type===1)return t.INSTANCE;if(q.type===9){F=F.concat(q.expr);continue}F.push(q)}}if(F.length===0&&W)return g.INSTANCE;F.sort(h)}if(F.length!==0){if(F.length===1)return F[0];for(let A=1;A<F.length;A++)F[A-1].equals(F[A])&&(F.splice(A,1),A--);if(F.length===1)return F[0];if(P){for(let A=0;A<F.length;A++)for(let H=A+1;H<F.length;H++)M(F[A],F[H])&&(F.splice(H,1),H--);if(F.length===1)return F[0]}return new L(F,R)}}serialize(){return this.expr.map(T=>T.serialize()).join(" || ")}keys(){const T=[];for(let R of this.expr)T.push(...R.keys());return T}negate(){if(!this.negated){let T=[];for(let R of this.expr)T.push(R.negate());for(;T.length>1;){const R=T.shift(),P=T.shift(),F=[];for(const A of O(R))for(const H of O(P))F.push(_.create([A,H],null));const W=T.length===0;T.unshift(L.create(F,null,W))}this.negated=T[0]}return this.negated}}class E extends i{constructor(T,R,P){super(T,null);this._defaultValue=R,typeof P=="object"?E._info.push(Object.assign(Object.assign({},P),{key:T})):P!==!0&&E._info.push({key:T,description:P,type:R!=null?typeof R:void 0})}static all(){return E._info.values()}bindTo(T){return T.createKey(this.key,this._defaultValue)}getValue(T){return T.getContextKeyValue(this.key)}toNegated(){return this.negate()}isEqualTo(T){return n.create(this.key,T)}}e.RawContextKey=E,E._info=[],e.IContextKeyService=(0,D.createDecorator)("contextKeyService"),e.SET_CONTEXT_COMMAND_ID="setContext";function N(B,T){return B<T?-1:B>T?1:0}function k(B,T,R,P){return B<R?-1:B>R?1:T<P?-1:T>P?1:0}function M(B,T){if(T.type===6&&B.type!==9&&B.type!==6){for(const F of T.expr)if(B.equals(F))return!0}const R=B.negate(),P=O(R).concat(O(T));P.sort(h);for(let F=0;F<P.length;F++){const A=P[F].negate();for(let H=F+1;H<P.length;H++){const q=P[H];if(A.equals(q))return!0}}return!1}e.implies=M;function O(B){return B.type===9?B.expr:[B]}}),define(te[24],ie([1,0,512,16]),function(j,e,y,m){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.EditorContextKeys=void 0;var D;(function(I){I.editorSimpleInput=new m.RawContextKey("editorSimpleInput",!1,!0),I.editorTextFocus=new m.RawContextKey("editorTextFocus",!1,y.localize(0,null)),I.focus=new m.RawContextKey("editorFocus",!1,y.localize(1,null)),I.textInputFocus=new m.RawContextKey("textInputFocus",!1,y.localize(2,null)),I.readOnly=new m.RawContextKey("editorReadonly",!1,y.localize(3,null)),I.inDiffEditor=new m.RawContextKey("inDiffEditor",!1,y.localize(4,null)),I.columnSelection=new m.RawContextKey("editorColumnSelection",!1,y.localize(5,null)),I.writable=I.readOnly.toNegated(),I.hasNonEmptySelection=new m.RawContextKey("editorHasSelection",!1,y.localize(6,null)),I.hasOnlyEmptySelection=I.hasNonEmptySelection.toNegated(),I.hasMultipleSelections=new m.RawContextKey("editorHasMultipleSelections",!1,y.localize(7,null)),I.hasSingleSelection=I.hasMultipleSelections.toNegated(),I.tabMovesFocus=new m.RawContextKey("editorTabMovesFocus",!1,y.localize(8,null)),I.tabDoesNotMoveFocus=I.tabMovesFocus.toNegated(),I.isInWalkThroughSnippet=new m.RawContextKey("isInEmbeddedEditor",!1,!0),I.canUndo=new m.RawContextKey("canUndo",!1,!0),I.canRedo=new m.RawContextKey("canRedo",!1,!0),I.hoverVisible=new m.RawContextKey("editorHoverVisible",!1,y.localize(9,null)),I.inCompositeEditor=new m.RawContextKey("inCompositeEditor",void 0,y.localize(10,null)),I.notInCompositeEditor=I.inCompositeEditor.toNegated(),I.languageId=new m.RawContextKey("editorLangId","",y.localize(11,null)),I.hasCompletionItemProvider=new m.RawContextKey("editorHasCompletionItemProvider",!1,y.localize(12,null)),I.hasCodeActionsProvider=new m.RawContextKey("editorHasCodeActionsProvider",!1,y.localize(13,null)),I.hasCodeLensProvider=new m.RawContextKey("editorHasCodeLensProvider",!1,y.localize(14,null)),I.hasDefinitionProvider=new m.RawContextKey("editorHasDefinitionProvider",!1,y.localize(15,null)),I.hasDeclarationProvider=new m.RawContextKey("editorHasDeclarationProvider",!1,y.localize(16,null)),I.hasImplementationProvider=new m.RawContextKey("editorHasImplementationProvider",!1,y.localize(17,null)),I.hasTypeDefinitionProvider=new m.RawContextKey("editorHasTypeDefinitionProvider",!1,y.localize(18,null)),I.hasHoverProvider=new m.RawContextKey("editorHasHoverProvider",!1,y.localize(19,null)),I.hasDocumentHighlightProvider=new m.RawContextKey("editorHasDocumentHighlightProvider",!1,y.localize(20,null)),I.hasDocumentSymbolProvider=new m.RawContextKey("editorHasDocumentSymbolProvider",!1,y.localize(21,null)),I.hasReferenceProvider=new m.RawContextKey("editorHasReferenceProvider",!1,y.localize(22,null)),I.hasRenameProvider=new m.RawContextKey("editorHasRenameProvider",!1,y.localize(23,null)),I.hasSignatureHelpProvider=new m.RawContextKey("editorHasSignatureHelpProvider",!1,y.localize(24,null)),I.hasInlayHintsProvider=new m.RawContextKey("editorHasInlayHintsProvider",!1,y.localize(25,null)),I.hasDocumentFormattingProvider=new m.RawContextKey("editorHasDocumentFormattingProvider",!1,y.localize(26,null)),I.hasDocumentSelectionFormattingProvider=new m.RawContextKey("editorHasDocumentSelectionFormattingProvider",!1,y.localize(27,null)),I.hasMultipleDocumentFormattingProvider=new m.RawContextKey("editorHasMultipleDocumentFormattingProvider",!1,y.localize(28,null)),I.hasMultipleDocumentSelectionFormattingProvider=new m.RawContextKey("editorHasMultipleDocumentSelectionFormattingProvider",!1,y.localize(29,null))})(D=e.EditorContextKeys||(e.EditorContextKeys={}))}),define(te[198],ie([1,0,21,13,20,25,11,18,58,26,16]),function(j,e,y,m,D,I,w,b,p,h,g){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.provideSignatureHelp=e.Context=void 0,e.Context={Visible:new g.RawContextKey("parameterHintsVisible",!1),MultipleSignatures:new g.RawContextKey("parameterHintsMultipleSignatures",!1)};function t(i,n,l,c){return ye(this,void 0,void 0,function*(){const r=b.SignatureHelpProviderRegistry.ordered(i);for(const s of r)try{const o=yield s.provideSignatureHelp(i,n,c,l);if(o)return o}catch(o){(0,m.onUnexpectedExternalError)(o)}})}e.provideSignatureHelp=t,h.CommandsRegistry.registerCommand("_executeSignatureHelpProvider",(i,...n)=>ye(void 0,void 0,void 0,function*(){const[l,c,r]=n;(0,D.assertType)(I.URI.isUri(l)),(0,D.assertType)(w.Position.isIPosition(c)),(0,D.assertType)(typeof r=="string"||!r);const s=yield i.get(p.ITextModelService).createModelReference(l);try{const o=yield t(s.object.textEditorModel,w.Position.lift(c),{triggerKind:b.SignatureHelpTriggerKind.Invoke,isRetrigger:!1,triggerCharacter:r},y.CancellationToken.None);return o?(setTimeout(()=>o.dispose(),0),o.value):void 0}finally{s.dispose()}}))}),define(te[601],ie([1,0,10,13,4,2,97,18,198]),function(j,e,y,m,D,I,w,b,p){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ParameterHintsModel=void 0;var h;(function(i){i.Default={type:0};class n{constructor(r,s){this.request=r,this.previouslyActiveHints=s,this.type=2}}i.Pending=n;class l{constructor(r){this.hints=r,this.type=1}}i.Active=l})(h||(h={}));class g extends I.Disposable{constructor(n,l=g.DEFAULT_DELAY){super();this._onChangedHints=this._register(new D.Emitter),this.onChangedHints=this._onChangedHints.event,this.triggerOnType=!1,this._state=h.Default,this._pendingTriggers=[],this._lastSignatureHelpResult=this._register(new I.MutableDisposable),this.triggerChars=new w.CharacterSet,this.retriggerChars=new w.CharacterSet,this.triggerId=0,this.editor=n,this.throttledDelayer=new y.Delayer(l),this._register(this.editor.onDidBlurEditorWidget(()=>this.cancel())),this._register(this.editor.onDidChangeConfiguration(()=>this.onEditorConfigurationChange())),this._register(this.editor.onDidChangeModel(c=>this.onModelChanged())),this._register(this.editor.onDidChangeModelLanguage(c=>this.onModelChanged())),this._register(this.editor.onDidChangeCursorSelection(c=>this.onCursorChange(c))),this._register(this.editor.onDidChangeModelContent(c=>this.onModelContentChange())),this._register(b.SignatureHelpProviderRegistry.onDidChange(this.onModelChanged,this)),this._register(this.editor.onDidType(c=>this.onDidType(c))),this.onEditorConfigurationChange(),this.onModelChanged()}get state(){return this._state}set state(n){this._state.type===2&&this._state.request.cancel(),this._state=n}cancel(n=!1){this.state=h.Default,this.throttledDelayer.cancel(),n||this._onChangedHints.fire(void 0)}trigger(n,l){const c=this.editor.getModel();if(!c||!b.SignatureHelpProviderRegistry.has(c))return;const r=++this.triggerId;this._pendingTriggers.push(n),this.throttledDelayer.trigger(()=>this.doTrigger(r),l).catch(m.onUnexpectedError)}next(){if(this.state.type!==1)return;const n=this.state.hints.signatures.length,l=this.state.hints.activeSignature,c=l%n==n-1,r=this.editor.getOption(76).cycle;if((n<2||c)&&!r){this.cancel();return}this.updateActiveSignature(c&&r?0:l+1)}previous(){if(this.state.type!==1)return;const n=this.state.hints.signatures.length,l=this.state.hints.activeSignature,c=l===0,r=this.editor.getOption(76).cycle;if((n<2||c)&&!r){this.cancel();return}this.updateActiveSignature(c&&r?n-1:l-1)}updateActiveSignature(n){this.state.type===1&&(this.state=new h.Active(Object.assign(Object.assign({},this.state.hints),{activeSignature:n})),this._onChangedHints.fire(this.state.hints))}doTrigger(n){return ye(this,void 0,void 0,function*(){const l=this.state.type===1||this.state.type===2,c=this.getLastActiveHints();if(this.cancel(!0),this._pendingTriggers.length===0)return!1;const r=this._pendingTriggers.reduce(t);this._pendingTriggers=[];const s={triggerKind:r.triggerKind,triggerCharacter:r.triggerCharacter,isRetrigger:l,activeSignatureHelp:c};if(!this.editor.hasModel())return!1;const o=this.editor.getModel(),a=this.editor.getPosition();this.state=new h.Pending((0,y.createCancelablePromise)(d=>(0,p.provideSignatureHelp)(o,a,s,d)),c);try{const d=yield this.state.request;return n!==this.triggerId?(d==null||d.dispose(),!1):!d||!d.value.signatures||d.value.signatures.length===0?(d==null||d.dispose(),this._lastSignatureHelpResult.clear(),this.cancel(),!1):(this.state=new h.Active(d.value),this._lastSignatureHelpResult.value=d,this._onChangedHints.fire(this.state.hints),!0)}catch(d){return n===this.triggerId&&(this.state=h.Default),(0,m.onUnexpectedError)(d),!1}})}getLastActiveHints(){switch(this.state.type){case 1:return this.state.hints;case 2:return this.state.previouslyActiveHints;default:return}}get isTriggered(){return this.state.type===1||this.state.type===2||this.throttledDelayer.isTriggered()}onModelChanged(){this.cancel(),this.triggerChars=new w.CharacterSet,this.retriggerChars=new w.CharacterSet;const n=this.editor.getModel();if(!!n)for(const l of b.SignatureHelpProviderRegistry.ordered(n)){for(const c of l.signatureHelpTriggerCharacters||[])this.triggerChars.add(c.charCodeAt(0)),this.retriggerChars.add(c.charCodeAt(0));for(const c of l.signatureHelpRetriggerCharacters||[])this.retriggerChars.add(c.charCodeAt(0))}}onDidType(n){if(!this.triggerOnType)return;const l=n.length-1,c=n.charCodeAt(l);(this.triggerChars.has(c)||this.isTriggered&&this.retriggerChars.has(c))&&this.trigger({triggerKind:b.SignatureHelpTriggerKind.TriggerCharacter,triggerCharacter:n.charAt(l)})}onCursorChange(n){n.source==="mouse"?this.cancel():this.isTriggered&&this.trigger({triggerKind:b.SignatureHelpTriggerKind.ContentChange})}onModelContentChange(){this.isTriggered&&this.trigger({triggerKind:b.SignatureHelpTriggerKind.ContentChange})}onEditorConfigurationChange(){this.triggerOnType=this.editor.getOption(76).enabled,this.triggerOnType||this.cancel()}dispose(){this.cancel(!0),super.dispose()}}e.ParameterHintsModel=g,g.DEFAULT_DELAY=120;function t(i,n){switch(n.triggerKind){case b.SignatureHelpTriggerKind.Invoke:return n;case b.SignatureHelpTriggerKind.ContentChange:return i;case b.SignatureHelpTriggerKind.TriggerCharacter:default:return n}}}),define(te[602],ie([1,0,16]),function(j,e,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SuggestAlternatives=void 0;let m=class Ot{constructor(I,w){this._editor=I,this._index=0,this._ckOtherSuggestions=Ot.OtherSuggestions.bindTo(w)}dispose(){this.reset()}reset(){var I;this._ckOtherSuggestions.reset(),(I=this._listener)===null||I===void 0||I.dispose(),this._model=void 0,this._acceptNext=void 0,this._ignore=!1}set({model:I,index:w},b){if(I.items.length===0){this.reset();return}if(Ot._moveIndex(!0,I,w)===w){this.reset();return}this._acceptNext=b,this._model=I,this._index=w,this._listener=this._editor.onDidChangeCursorPosition(()=>{this._ignore||this.reset()}),this._ckOtherSuggestions.set(!0)}static _moveIndex(I,w,b){let p=b;for(;p=(p+w.items.length+(I?1:-1))%w.items.length,!(p===b||!w.items[p].completion.additionalTextEdits););return p}next(){this._move(!0)}prev(){this._move(!1)}_move(I){if(!!this._model)try{this._ignore=!0,this._index=Ot._moveIndex(I,this._model,this._index),this._acceptNext({index:this._index,item:this._model.items[this._index],model:this._model})}finally{this._ignore=!1}}};m.OtherSuggestions=new y.RawContextKey("hasOtherSuggestions",!1),m=Ie([Ce(1,y.IContextKeyService)],m),e.SuggestAlternatives=m}),define(te[603],ie([1,0,16]),function(j,e,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.WordContextKey=void 0;let m=class _i{constructor(I,w){this._editor=I,this._enabled=!1,this._ckAtEnd=_i.AtEnd.bindTo(w),this._configListener=this._editor.onDidChangeConfiguration(b=>b.hasChanged(111)&&this._update()),this._update()}dispose(){var I;this._configListener.dispose(),(I=this._selectionListener)===null||I===void 0||I.dispose(),this._ckAtEnd.reset()}_update(){const I=this._editor.getOption(111)==="on";if(this._enabled!==I)if(this._enabled=I,this._enabled){const w=()=>{if(!this._editor.hasModel()){this._ckAtEnd.set(!1);return}const b=this._editor.getModel(),p=this._editor.getSelection(),h=b.getWordAtPosition(p.getStartPosition());if(!h){this._ckAtEnd.set(!1);return}this._ckAtEnd.set(h.endColumn===p.getStartPosition().column)};this._selectionListener=this._editor.onDidChangeCursorSelection(w),w()}else this._selectionListener&&(this._ckAtEnd.reset(),this._selectionListener.dispose(),this._selectionListener=void 0)}};m.AtEnd=new y.RawContextKey("atEndOfWord",!1),m=Ie([Ce(1,y.IContextKeyService)],m),e.WordContextKey=m}),define(te[63],ie([1,0,16,9]),function(j,e,y,m){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CONTEXT_ACCESSIBILITY_MODE_ENABLED=e.IAccessibilityService=void 0,e.IAccessibilityService=(0,m.createDecorator)("accessibilityService"),e.CONTEXT_ACCESSIBILITY_MODE_ENABLED=new y.RawContextKey("accessibilityModeEnabled",!1)}),define(te[604],ie([1,0,34,19,4,2,39,17,230,266,397,231,31,144,174,63]),function(j,e,y,m,D,I,w,b,p,h,g,t,i,n,l,c){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ComputedEditorOptions=e.EditorConfiguration=void 0;let r=class extends I.Disposable{constructor(v,C,_,L){super();this._accessibilityService=L,this._onDidChange=this._register(new D.Emitter),this.onDidChange=this._onDidChange.event,this._onDidChangeFast=this._register(new D.Emitter),this.onDidChangeFast=this._onDidChangeFast.event,this._isDominatedByLongLines=!1,this._viewLineCount=1,this._lineNumbersDigitCount=1,this._reservedHeight=0,this._computeOptionsMemory=new i.ComputeOptionsMemory,this.isSimpleWidget=v,this._containerObserver=this._register(new p.ElementSizeObserver(_,C.dimension)),this._rawOptions=f(C),this._validatedOptions=u.validateOptions(this._rawOptions),this.options=this._computeOptions(),this.options.get(10)&&this._containerObserver.startObserving(),this._register(n.EditorZoom.onDidChangeZoomLevel(()=>this._recomputeOptions())),this._register(t.TabFocus.onDidChangeTabFocus(()=>this._recomputeOptions())),this._register(this._containerObserver.onDidChange(()=>this._recomputeOptions())),this._register(h.FontMeasurements.onDidChange(()=>this._recomputeOptions())),this._register(y.PixelRatio.onDidChange(()=>this._recomputeOptions())),this._register(this._accessibilityService.onDidChangeScreenReaderOptimized(()=>this._recomputeOptions()))}_recomputeOptions(){const v=this._computeOptions(),C=u.checkEquals(this.options,v);C!==null&&(this.options=v,this._onDidChangeFast.fire(C),this._onDidChange.fire(C))}_computeOptions(){const v=this._readEnvConfiguration(),C=l.BareFontInfo.createFromValidatedSettings(this._validatedOptions,v.pixelRatio,this.isSimpleWidget),_=this._readFontInfo(C),L={memory:this._computeOptionsMemory,outerWidth:v.outerWidth,outerHeight:v.outerHeight-this._reservedHeight,fontInfo:_,extraEditorClassName:v.extraEditorClassName,isDominatedByLongLines:this._isDominatedByLongLines,viewLineCount:this._viewLineCount,lineNumbersDigitCount:this._lineNumbersDigitCount,emptySelectionClipboard:v.emptySelectionClipboard,pixelRatio:v.pixelRatio,tabFocusMode:t.TabFocus.getTabFocusMode(),accessibilitySupport:v.accessibilitySupport};return u.computeOptions(this._validatedOptions,L)}_readEnvConfiguration(){return{extraEditorClassName:o(),outerWidth:this._containerObserver.getWidth(),outerHeight:this._containerObserver.getHeight(),emptySelectionClipboard:y.isWebKit||y.isFirefox,pixelRatio:y.PixelRatio.value,accessibilitySupport:this._accessibilityService.isScreenReaderOptimized()?2:this._accessibilityService.getAccessibilitySupport()}}_readFontInfo(v){return h.FontMeasurements.readFontInfo(v)}getRawOptions(){return this._rawOptions}updateOptions(v){const C=f(v);!u.applyUpdate(this._rawOptions,C)||(this._validatedOptions=u.validateOptions(this._rawOptions),this._recomputeOptions())}observeContainer(v){this._containerObserver.observe(v)}setIsDominatedByLongLines(v){this._isDominatedByLongLines!==v&&(this._isDominatedByLongLines=v,this._recomputeOptions())}setModelLineCount(v){const C=s(v);this._lineNumbersDigitCount!==C&&(this._lineNumbersDigitCount=C,this._recomputeOptions())}setViewLineCount(v){this._viewLineCount!==v&&(this._viewLineCount=v,this._recomputeOptions())}setReservedHeight(v){this._reservedHeight!==v&&(this._reservedHeight=v,this._recomputeOptions())}};r=Ie([Ce(3,c.IAccessibilityService)],r),e.EditorConfiguration=r;function s(S){let v=0;for(;S;)S=Math.floor(S/10),v++;return v||1}function o(){let S="";return!y.isSafari&&!y.isWebkitWebView&&(S+="no-user-select "),y.isSafari&&(S+="no-minimap-shadow "),b.isMacintosh&&(S+="mac "),S}class a{constructor(){this._values=[]}_read(v){return this._values[v]}get(v){return this._values[v]}_write(v,C){this._values[v]=C}}class d{constructor(){this._values=[]}_read(v){if(v>=this._values.length)throw new Error("Cannot read uninitialized value");return this._values[v]}get(v){return this._read(v)}_write(v,C){this._values[v]=C}}e.ComputedEditorOptions=d;class u{static validateOptions(v){const C=new a;for(const _ of i.editorOptionsRegistry){const L=_.name==="_never_"?void 0:v[_.name];C._write(_.id,_.validate(L))}return C}static computeOptions(v,C){const _=new d;for(const L of i.editorOptionsRegistry)_._write(L.id,L.compute(C,_,v._read(L.id)));return _}static _deepEquals(v,C){if(typeof v!="object"||typeof C!="object"||!v||!C)return v===C;if(Array.isArray(v)||Array.isArray(C))return Array.isArray(v)&&Array.isArray(C)?m.equals(v,C):!1;if(Object.keys(v).length!==Object.keys(C).length)return!1;for(const _ in v)if(!u._deepEquals(v[_],C[_]))return!1;return!0}static checkEquals(v,C){const _=[];let L=!1;for(const E of i.editorOptionsRegistry){const N=!u._deepEquals(v._read(E.id),C._read(E.id));_[E.id]=N,N&&(L=!0)}return L?new i.ConfigurationChangedEvent(_):null}static applyUpdate(v,C){let _=!1;for(const L of i.editorOptionsRegistry)if(C.hasOwnProperty(L.name)){const E=L.applyUpdate(v[L.name],C[L.name]);v[L.name]=E.newValue,_=_||E.didChange}return _}}function f(S){const v=w.deepClone(S);return(0,g.migrateOptions)(v),v}}),define(te[605],ie([1,0,4,2,63,40,16]),function(j,e,y,m,D,I,w){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AccessibilityService=void 0;let b=class extends m.Disposable{constructor(h,g){super();this._contextKeyService=h,this._configurationService=g,this._accessibilitySupport=0,this._onDidChangeScreenReaderOptimized=new y.Emitter,this._accessibilityModeEnabledContext=D.CONTEXT_ACCESSIBILITY_MODE_ENABLED.bindTo(this._contextKeyService);const t=()=>this._accessibilityModeEnabledContext.set(this.isScreenReaderOptimized());this._register(this._configurationService.onDidChangeConfiguration(i=>{i.affectsConfiguration("editor.accessibilitySupport")&&(t(),this._onDidChangeScreenReaderOptimized.fire())})),t(),this.onDidChangeScreenReaderOptimized(()=>t())}get onDidChangeScreenReaderOptimized(){return this._onDidChangeScreenReaderOptimized.event}isScreenReaderOptimized(){const h=this._configurationService.getValue("editor.accessibilitySupport");return h==="on"||h==="auto"&&this._accessibilitySupport===2}getAccessibilitySupport(){return this._accessibilitySupport}};b=Ie([Ce(0,w.IContextKeyService),Ce(1,I.IConfigurationService)],b),e.AccessibilityService=b}),define(te[606],ie([1,0,4,54,2,47,583,26,40,16]),function(j,e,y,m,D,I,w,b,p,h){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ContextKeyService=e.AbstractContextKeyService=e.Context=void 0;const g="data-keybinding-context";class t{constructor(S,v){this._id=S,this._parent=v,this._value=Object.create(null),this._value._contextId=S}setValue(S,v){return this._value[S]!==v?(this._value[S]=v,!0):!1}removeValue(S){return S in this._value?(delete this._value[S],!0):!1}getValue(S){const v=this._value[S];return typeof v=="undefined"&&this._parent?this._parent.getValue(S):v}}e.Context=t;class i extends t{constructor(){super(-1,null)}setValue(S,v){return!1}removeValue(S){return!1}getValue(S){}}i.INSTANCE=new i;class n extends t{constructor(S,v,C){super(S,null);this._configurationService=v,this._values=I.TernarySearchTree.forConfigKeys(),this._listener=this._configurationService.onDidChangeConfiguration(_=>{if(_.source===6){const L=Array.from(m.Iterable.map(this._values,([E])=>E));this._values.clear(),C.fire(new r(L))}else{const L=[];for(const E of _.affectedKeys){const N=`config.${E}`,k=this._values.findSuperstr(N);k!==void 0&&(L.push(...m.Iterable.map(k,([M])=>M)),this._values.deleteSuperstr(N)),this._values.has(N)&&(L.push(N),this._values.delete(N))}C.fire(new r(L))}})}dispose(){this._listener.dispose()}getValue(S){if(S.indexOf(n._keyPrefix)!==0)return super.getValue(S);if(this._values.has(S))return this._values.get(S);const v=S.substr(n._keyPrefix.length),C=this._configurationService.getValue(v);let _;switch(typeof C){case"number":case"boolean":case"string":_=C;break;default:Array.isArray(C)?_=JSON.stringify(C):_=C}return this._values.set(S,_),_}setValue(S,v){return super.setValue(S,v)}removeValue(S){return super.removeValue(S)}}n._keyPrefix="config.";class l{constructor(S,v,C){this._service=S,this._key=v,this._defaultValue=C,this.reset()}set(S){this._service.setContext(this._key,S)}reset(){typeof this._defaultValue=="undefined"?this._service.removeContext(this._key):this._service.setContext(this._key,this._defaultValue)}get(){return this._service.getContextKeyValue(this._key)}}class c{constructor(S){this.key=S}affectsSome(S){return S.has(this.key)}}class r{constructor(S){this.keys=S}affectsSome(S){for(const v of this.keys)if(S.has(v))return!0;return!1}}class s{constructor(S){this.events=S}affectsSome(S){for(const v of this.events)if(v.affectsSome(S))return!0;return!1}}class o{constructor(S){this._onDidChangeContext=new y.PauseableEmitter({merge:v=>new s(v)}),this.onDidChangeContext=this._onDidChangeContext.event,this._isDisposed=!1,this._myContextId=S}createKey(S,v){if(this._isDisposed)throw new Error("AbstractContextKeyService has been disposed");return new l(this,S,v)}bufferChangeEvents(S){this._onDidChangeContext.pause();try{S()}finally{this._onDidChangeContext.resume()}}createScoped(S){if(this._isDisposed)throw new Error("AbstractContextKeyService has been disposed");return new d(this,S)}contextMatchesRules(S){if(this._isDisposed)throw new Error("AbstractContextKeyService has been disposed");const v=this.getContextValuesContainer(this._myContextId);return S?S.evaluate(v):!0}getContextKeyValue(S){if(!this._isDisposed)return this.getContextValuesContainer(this._myContextId).getValue(S)}setContext(S,v){if(this._isDisposed)return;const C=this.getContextValuesContainer(this._myContextId);!C||C.setValue(S,v)&&this._onDidChangeContext.fire(new c(S))}removeContext(S){this._isDisposed||this.getContextValuesContainer(this._myContextId).removeValue(S)&&this._onDidChangeContext.fire(new c(S))}getContext(S){return this._isDisposed?i.INSTANCE:this.getContextValuesContainer(u(S))}}e.AbstractContextKeyService=o;let a=class extends o{constructor(S){super(0);this._contexts=new Map,this._toDispose=new D.DisposableStore,this._lastContextId=0;const v=new n(this._myContextId,S,this._onDidChangeContext);this._contexts.set(this._myContextId,v),this._toDispose.add(v)}dispose(){this._onDidChangeContext.dispose(),this._isDisposed=!0,this._toDispose.dispose()}getContextValuesContainer(S){return this._isDisposed?i.INSTANCE:this._contexts.get(S)||i.INSTANCE}createChildContext(S=this._myContextId){if(this._isDisposed)throw new Error("ContextKeyService has been disposed");let v=++this._lastContextId;return this._contexts.set(v,new t(v,this.getContextValuesContainer(S))),v}disposeContext(S){this._isDisposed||this._contexts.delete(S)}};a=Ie([Ce(0,p.IConfigurationService)],a),e.ContextKeyService=a;class d extends o{constructor(S,v){super(S.createChildContext());if(this._parentChangeListener=new D.MutableDisposable,this._parent=S,this._updateParentChangeListener(),this._domNode=v,this._domNode.hasAttribute(g)){let C="";this._domNode.classList&&(C=Array.from(this._domNode.classList.values()).join(", ")),console.error(`Element already has context attribute${C?": "+C:""}`)}this._domNode.setAttribute(g,String(this._myContextId))}_updateParentChangeListener(){this._parentChangeListener.value=this._parent.onDidChangeContext(this._onDidChangeContext.fire,this._onDidChangeContext)}dispose(){this._isDisposed||(this._onDidChangeContext.dispose(),this._parent.disposeContext(this._myContextId),this._parentChangeListener.dispose(),this._domNode.removeAttribute(g),this._isDisposed=!0)}getContextValuesContainer(S){return this._isDisposed?i.INSTANCE:this._parent.getContextValuesContainer(S)}createChildContext(S=this._myContextId){if(this._isDisposed)throw new Error("ScopedContextKeyService has been disposed");return this._parent.createChildContext(S)}disposeContext(S){this._isDisposed||this._parent.disposeContext(S)}}function u(f){for(;f;){if(f.hasAttribute(g)){const S=f.getAttribute(g);return S?parseInt(S,10):NaN}f=f.parentElement}return 0}b.CommandsRegistry.registerCommand(h.SET_CONTEXT_COMMAND_ID,function(f,S,v){f.get(h.IContextKeyService).createKey(String(S),v)}),b.CommandsRegistry.registerCommand({id:"getContextKeyInfo",handler(){return[...h.RawContextKey.all()].sort((f,S)=>f.key.localeCompare(S.key))},description:{description:(0,w.localize)(0,null),args:[]}}),b.CommandsRegistry.registerCommand("_generateContextKeyInfo",function(){const f=[],S=new Set;for(let v of h.RawContextKey.all())S.has(v.key)||(S.add(v.key),f.push(v));f.sort((v,C)=>v.key.localeCompare(C.key)),console.log(JSON.stringify(f,void 0,2))})}),define(te[273],ie([1,0,17,584,16]),function(j,e,y,m,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.InputFocusedContext=e.InputFocusedContextKey=e.IsDevelopmentContext=e.IsIOSContext=e.IsMacNativeContext=e.IsWebContext=e.IsWindowsContext=e.IsLinuxContext=e.IsMacContext=void 0,e.IsMacContext=new D.RawContextKey("isMac",y.isMacintosh,(0,m.localize)(0,null)),e.IsLinuxContext=new D.RawContextKey("isLinux",y.isLinux,(0,m.localize)(1,null)),e.IsWindowsContext=new D.RawContextKey("isWindows",y.isWindows,(0,m.localize)(2,null)),e.IsWebContext=new D.RawContextKey("isWeb",y.isWeb,(0,m.localize)(3,null)),e.IsMacNativeContext=new D.RawContextKey("isMacNative",y.isMacintosh&&!y.isWeb,(0,m.localize)(4,null)),e.IsIOSContext=new D.RawContextKey("isIOS",y.isIOS,(0,m.localize)(5,null)),e.IsDevelopmentContext=new D.RawContextKey("isDevelopment",!1,!0),e.InputFocusedContextKey="inputFocus",e.InputFocusedContext=new D.RawContextKey(e.InputFocusedContextKey,!1,(0,m.localize)(6,null))}),define(te[76],ie([1,0,9]),function(j,e,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IContextMenuService=e.IContextViewService=void 0,e.IContextViewService=(0,y.createDecorator)("contextViewService"),e.IContextMenuService=(0,y.createDecorator)("contextMenuService")}),define(te[127],ie([1,0,9]),function(j,e,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IDialogService=void 0,e.IDialogService=(0,y.createDecorator)("dialogService")}),define(te[154],ie([1,0]),function(j,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ServiceCollection=void 0;class y{constructor(...D){this._entries=new Map;for(let[I,w]of D)this.set(I,w)}set(D,I){const w=this._entries.get(D);return this._entries.set(D,I),w}get(D){return this._entries.get(D)}}e.ServiceCollection=y}),define(te[607],ie([1,0,10,13,194,597,9,154]),function(j,e,y,m,D,I,w,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Trace=e.InstantiationService=void 0;const p=!1;class h extends Error{constructor(n){var l;super("cyclic dependency between services");this.message=(l=n.findCycleSlow())!==null&&l!==void 0?l:`UNABLE to detect cycle, dumping graph:
|
||
${n.toString()}`}}class g{constructor(n=new b.ServiceCollection,l=!1,c){this._activeInstantiations=new Set,this._services=n,this._strict=l,this._parent=c,this._services.set(w.IInstantiationService,this)}createChild(n){return new g(n,this._strict,this)}invokeFunction(n,...l){let c=t.traceInvocation(n),r=!1;try{return n({get:o=>{if(r)throw(0,m.illegalState)("service accessor is only valid during the invocation of its target method");const a=this._getOrCreateServiceInstance(o,c);if(!a)throw new Error(`[invokeFunction] unknown service '${o}'`);return a}},...l)}finally{r=!0,c.stop()}}createInstance(n,...l){let c,r;return n instanceof D.SyncDescriptor?(c=t.traceCreation(n.ctor),r=this._createInstance(n.ctor,n.staticArguments.concat(l),c)):(c=t.traceCreation(n),r=this._createInstance(n,l,c)),c.stop(),r}_createInstance(n,l=[],c){let r=w._util.getServiceDependencies(n).sort((a,d)=>a.index-d.index),s=[];for(const a of r){let d=this._getOrCreateServiceInstance(a.id,c);if(!d&&this._strict&&!a.optional)throw new Error(`[createInstance] ${n.name} depends on UNKNOWN service ${a.id}.`);s.push(d)}let o=r.length>0?r[0].index:l.length;if(l.length!==o){console.warn(`[createInstance] First service dependency of ${n.name} at position ${o+1} conflicts with ${l.length} static arguments`);let a=o-l.length;a>0?l=l.concat(new Array(a)):l=l.slice(0,o)}return new n(...[...l,...s])}_setServiceInstance(n,l){if(this._services.get(n)instanceof D.SyncDescriptor)this._services.set(n,l);else if(this._parent)this._parent._setServiceInstance(n,l);else throw new Error("illegalState - setting UNKNOWN service instance")}_getServiceInstanceOrDescriptor(n){let l=this._services.get(n);return!l&&this._parent?this._parent._getServiceInstanceOrDescriptor(n):l}_getOrCreateServiceInstance(n,l){let c=this._getServiceInstanceOrDescriptor(n);return c instanceof D.SyncDescriptor?this._safeCreateAndCacheServiceInstance(n,c,l.branch(n,!0)):(l.branch(n,!1),c)}_safeCreateAndCacheServiceInstance(n,l,c){if(this._activeInstantiations.has(n))throw new Error(`illegal state - RECURSIVELY instantiating service '${n}'`);this._activeInstantiations.add(n);try{return this._createAndCacheServiceInstance(n,l,c)}finally{this._activeInstantiations.delete(n)}}_createAndCacheServiceInstance(n,l,c){const r=new I.Graph(a=>a.id.toString());let s=0;const o=[{id:n,desc:l,_trace:c}];for(;o.length;){const a=o.pop();if(r.lookupOrInsertNode(a),s++>1e3)throw new h(r);for(let d of w._util.getServiceDependencies(a.desc.ctor)){let u=this._getServiceInstanceOrDescriptor(d.id);if(!u&&!d.optional&&console.warn(`[createInstance] ${n} depends on ${d.id} which is NOT registered.`),u instanceof D.SyncDescriptor){const f={id:d.id,desc:u,_trace:a._trace.branch(d.id,!0)};r.insertEdge(a,f),o.push(f)}}}for(;;){const a=r.roots();if(a.length===0){if(!r.isEmpty())throw new h(r);break}for(const{data:d}of a){if(this._getServiceInstanceOrDescriptor(d.id)instanceof D.SyncDescriptor){const f=this._createServiceInstanceWithOwner(d.id,d.desc.ctor,d.desc.staticArguments,d.desc.supportsDelayedInstantiation,d._trace);this._setServiceInstance(d.id,f)}r.removeNode(d)}}return this._getServiceInstanceOrDescriptor(n)}_createServiceInstanceWithOwner(n,l,c=[],r,s){if(this._services.get(n)instanceof D.SyncDescriptor)return this._createServiceInstance(l,c,r,s);if(this._parent)return this._parent._createServiceInstanceWithOwner(n,l,c,r,s);throw new Error(`illegalState - creating UNKNOWN service instance ${l.name}`)}_createServiceInstance(n,l=[],c,r){if(c){const s=new y.IdleValue(()=>this._createInstance(n,l,r));return new Proxy(Object.create(null),{get(o,a){if(a in o)return o[a];let d=s.value,u=d[a];return typeof u!="function"||(u=u.bind(d),o[a]=u),u},set(o,a,d){return s.value[a]=d,!0}})}else return this._createInstance(n,l,r)}}e.InstantiationService=g;class t{constructor(n,l){this.type=n,this.name=l,this._start=Date.now(),this._dep=[]}static traceInvocation(n){return p?new t(1,n.name||n.toString().substring(0,42).replace(/\n/g,"")):t._None}static traceCreation(n){return p?new t(0,n.name):t._None}branch(n,l){let c=new t(2,n.toString());return this._dep.push([n,l,c]),c}stop(){let n=Date.now()-this._start;t._totals+=n;let l=!1;function c(s,o){let a=[],d=new Array(s+1).join(" ");for(const[u,f,S]of o._dep)if(f&&S){l=!0,a.push(`${d}CREATES -> ${u}`);let v=c(s+1,S);v&&a.push(v)}else a.push(`${d}uses -> ${u}`);return a.join(`
|
||
`)}let r=[`${this.type===0?"CREATE":"CALL"} ${this.name}`,`${c(1,this)}`,`DONE, took ${n.toFixed(2)}ms (grand total ${t._totals.toFixed(2)}ms)`];(n>2||l)&&console.log(r.join(`
|
||
`))}}e.Trace=t,t._None=new class extends t{constructor(){super(-1,null)}stop(){}branch(){return this}},t._totals=0}),define(te[608],ie([1,0,10,4,2,585]),function(j,e,y,m,D,I){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AbstractKeybindingService=void 0;const w=/^(cursor|delete)/;class b extends D.Disposable{constructor(g,t,i,n,l){super();this._contextKeyService=g,this._commandService=t,this._telemetryService=i,this._notificationService=n,this._logService=l,this._onDidUpdateKeybindings=this._register(new m.Emitter),this._currentChord=null,this._currentChordChecker=new y.IntervalTimer,this._currentChordStatusMessage=null,this._ignoreSingleModifiers=p.EMPTY,this._currentSingleModifier=null,this._currentSingleModifierClearTimeout=new y.TimeoutTimer,this._logging=!1}get onDidUpdateKeybindings(){return this._onDidUpdateKeybindings?this._onDidUpdateKeybindings.event:m.Event.None}dispose(){super.dispose()}_log(g){this._logging&&this._logService.info(`[KeybindingService]: ${g}`)}getKeybindings(){return this._getResolver().getKeybindings()}lookupKeybinding(g,t){const i=this._getResolver().lookupPrimaryKeybinding(g,t||this._contextKeyService);if(!!i)return i.resolvedKeybinding}dispatchEvent(g,t){return this._dispatch(g,t)}softDispatch(g,t){const i=this.resolveKeyboardEvent(g);if(i.isChord())return console.warn("Unexpected keyboard event mapped to a chord"),null;const[n]=i.getDispatchParts();if(n===null)return null;const l=this._contextKeyService.getContext(t),c=this._currentChord?this._currentChord.keypress:null;return this._getResolver().resolve(l,c,n)}_enterChordMode(g,t){this._currentChord={keypress:g,label:t},this._currentChordStatusMessage=this._notificationService.status(I.localize(0,null,t));const i=Date.now();this._currentChordChecker.cancelAndSet(()=>{if(!this._documentHasFocus()){this._leaveChordMode();return}Date.now()-i>5e3&&this._leaveChordMode()},500)}_leaveChordMode(){this._currentChordStatusMessage&&(this._currentChordStatusMessage.dispose(),this._currentChordStatusMessage=null),this._currentChordChecker.cancel(),this._currentChord=null}_dispatch(g,t){return this._doDispatch(this.resolveKeyboardEvent(g),t,!1)}_singleModifierDispatch(g,t){const i=this.resolveKeyboardEvent(g),[n]=i.getSingleModifierDispatchParts();if(n)return this._ignoreSingleModifiers.has(n)?(this._log(`+ Ignoring single modifier ${n} due to it being pressed together with other keys.`),this._ignoreSingleModifiers=p.EMPTY,this._currentSingleModifierClearTimeout.cancel(),this._currentSingleModifier=null,!1):(this._ignoreSingleModifiers=p.EMPTY,this._currentSingleModifier===null?(this._log(`+ Storing single modifier for possible chord ${n}.`),this._currentSingleModifier=n,this._currentSingleModifierClearTimeout.cancelAndSet(()=>{this._log("+ Clearing single modifier due to 300ms elapsed."),this._currentSingleModifier=null},300),!1):n===this._currentSingleModifier?(this._log(`/ Dispatching single modifier chord ${n} ${n}`),this._currentSingleModifierClearTimeout.cancel(),this._currentSingleModifier=null,this._doDispatch(i,t,!0)):(this._log(`+ Clearing single modifier due to modifier mismatch: ${this._currentSingleModifier} ${n}`),this._currentSingleModifierClearTimeout.cancel(),this._currentSingleModifier=null,!1));const[l]=i.getParts();return this._ignoreSingleModifiers=new p(l),this._currentSingleModifier!==null&&this._log("+ Clearing single modifier due to other key up."),this._currentSingleModifierClearTimeout.cancel(),this._currentSingleModifier=null,!1}_doDispatch(g,t,i=!1){let n=!1;if(g.isChord())return console.warn("Unexpected keyboard event mapped to a chord"),!1;let l=null,c=null;if(i){const[a]=g.getSingleModifierDispatchParts();l=a,c=a}else[l]=g.getDispatchParts(),c=this._currentChord?this._currentChord.keypress:null;if(l===null)return this._log("\\ Keyboard event cannot be dispatched in keydown phase."),n;const r=this._contextKeyService.getContext(t),s=g.getLabel(),o=this._getResolver().resolve(r,c,l);return this._logService.trace("KeybindingService#dispatch",s,o==null?void 0:o.commandId),o&&o.enterChord?(n=!0,this._enterChordMode(l,s),n):(this._currentChord&&(!o||!o.commandId)&&(this._notificationService.status(I.localize(1,null,this._currentChord.label,s),{hideAfter:10*1e3}),n=!0),this._leaveChordMode(),o&&o.commandId&&(o.bubble||(n=!0),typeof o.commandArgs=="undefined"?this._commandService.executeCommand(o.commandId).then(void 0,a=>this._notificationService.warn(a)):this._commandService.executeCommand(o.commandId,o.commandArgs).then(void 0,a=>this._notificationService.warn(a)),w.test(o.commandId)||this._telemetryService.publicLog2("workbenchActionExecuted",{id:o.commandId,from:"keybinding"})),n)}mightProducePrintableCharacter(g){return g.ctrlKey||g.metaKey?!1:g.keyCode>=31&&g.keyCode<=56||g.keyCode>=21&&g.keyCode<=30}}e.AbstractKeybindingService=b;class p{constructor(g){this._ctrlKey=g?g.ctrlKey:!1,this._shiftKey=g?g.shiftKey:!1,this._altKey=g?g.altKey:!1,this._metaKey=g?g.metaKey:!1}has(g){switch(g){case"ctrl":return this._ctrlKey;case"shift":return this._shiftKey;case"alt":return this._altKey;case"meta":return this._metaKey}}}p.EMPTY=new p(null)}),define(te[609],ie([1,0,13,193,94]),function(j,e,y,m,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BaseResolvedKeybinding=void 0;class I extends D.ResolvedKeybinding{constructor(b,p){super();if(p.length===0)throw(0,y.illegalArgument)("parts");this._os=b,this._parts=p}getLabel(){return m.UILabelProvider.toLabel(this._os,this._parts,b=>this._getLabel(b))}getAriaLabel(){return m.AriaLabelProvider.toLabel(this._os,this._parts,b=>this._getAriaLabel(b))}getElectronAccelerator(){return this._parts.length>1||this._parts[0].isDuplicateModifierCase()?null:m.ElectronAcceleratorLabelProvider.toLabel(this._os,this._parts,b=>this._getElectronAccelerator(b))}isChord(){return this._parts.length>1}getParts(){return this._parts.map(b=>this._getPart(b))}_getPart(b){return new D.ResolvedKeybindingPart(b.ctrlKey,b.shiftKey,b.altKey,b.metaKey,this._getLabel(b),this._getAriaLabel(b))}getDispatchParts(){return this._parts.map(b=>this._getDispatchPart(b))}getSingleModifierDispatchParts(){return this._parts.map(b=>this._getSingleModifierDispatchPart(b))}}e.BaseResolvedKeybinding=I}),define(te[42],ie([1,0,9]),function(j,e,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IKeybindingService=void 0,e.IKeybindingService=(0,y.createDecorator)("keybindingService")}),define(te[610],ie([1,0,16]),function(j,e,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.KeybindingResolver=void 0;class m{constructor(b,p,h){this._log=h,this._defaultKeybindings=b,this._defaultBoundCommands=new Map;for(const g of b){const t=g.command;t&&t.charAt(0)!=="-"&&this._defaultBoundCommands.set(t,!0)}this._map=new Map,this._lookupMap=new Map,this._keybindings=m.handleRemovals([].concat(b).concat(p));for(let g=0,t=this._keybindings.length;g<t;g++){let i=this._keybindings[g];i.keypressParts.length!==0&&(i.when&&i.when.type===0||this._addKeyPress(i.keypressParts[0],i))}}static _isTargetedForRemoval(b,p,h,g){return!(p&&b.keypressParts[0]!==p||h&&b.keypressParts[1]!==h||g&&(!b.when||!(0,y.expressionsAreEqualWithConstantSubstitution)(g,b.when)))}static handleRemovals(b){const p=new Map;for(let g=0,t=b.length;g<t;g++){const i=b[g];if(i.command&&i.command.charAt(0)==="-"){const n=i.command.substring(1);p.has(n)?p.get(n).push(i):p.set(n,[i])}}if(p.size===0)return b;const h=[];for(let g=0,t=b.length;g<t;g++){const i=b[g];if(!i.command||i.command.length===0){h.push(i);continue}if(i.command.charAt(0)==="-")continue;const n=p.get(i.command);if(!n||!i.isDefault){h.push(i);continue}let l=!1;for(const c of n){const r=c.keypressParts[0],s=c.keypressParts[1],o=c.when;if(this._isTargetedForRemoval(i,r,s,o)){l=!0;break}}if(!l){h.push(i);continue}}return h}_addKeyPress(b,p){const h=this._map.get(b);if(typeof h=="undefined"){this._map.set(b,[p]),this._addToLookupMap(p);return}for(let g=h.length-1;g>=0;g--){let t=h[g];if(t.command===p.command)continue;const i=t.keypressParts.length>1,n=p.keypressParts.length>1;i&&n&&t.keypressParts[1]!==p.keypressParts[1]||m.whenIsEntirelyIncluded(t.when,p.when)&&this._removeFromLookupMap(t)}h.push(p),this._addToLookupMap(p)}_addToLookupMap(b){if(!b.command)return;let p=this._lookupMap.get(b.command);typeof p=="undefined"?(p=[b],this._lookupMap.set(b.command,p)):p.push(b)}_removeFromLookupMap(b){if(!b.command)return;let p=this._lookupMap.get(b.command);if(typeof p!="undefined"){for(let h=0,g=p.length;h<g;h++)if(p[h]===b){p.splice(h,1);return}}}static whenIsEntirelyIncluded(b,p){return!p||p.type===1?!0:!b||b.type===1?!1:(0,y.implies)(b,p)}getKeybindings(){return this._keybindings}lookupPrimaryKeybinding(b,p){const h=this._lookupMap.get(b);if(typeof h=="undefined"||h.length===0)return null;if(h.length===1)return h[0];for(let g=h.length-1;g>=0;g--){const t=h[g];if(p.contextMatchesRules(t.when))return t}return h[h.length-1]}resolve(b,p,h){this._log(`| Resolving ${h}${p?` chorded from ${p}`:""}`);let g=null;if(p!==null){const i=this._map.get(p);if(typeof i=="undefined")return this._log("\\ No keybinding entries."),null;g=[];for(let n=0,l=i.length;n<l;n++){let c=i[n];c.keypressParts[1]===h&&g.push(c)}}else{const i=this._map.get(h);if(typeof i=="undefined")return this._log("\\ No keybinding entries."),null;g=i}let t=this._findCommand(b,g);return t?p===null&&t.keypressParts.length>1&&t.keypressParts[1]!==null?(this._log(`\\ From ${g.length} keybinding entries, matched chord, when: ${D(t.when)}, source: ${I(t)}.`),{enterChord:!0,leaveChord:!1,commandId:null,commandArgs:null,bubble:!1}):(this._log(`\\ From ${g.length} keybinding entries, matched ${t.command}, when: ${D(t.when)}, source: ${I(t)}.`),{enterChord:!1,leaveChord:t.keypressParts.length>1,commandId:t.command,commandArgs:t.commandArgs,bubble:t.bubble}):(this._log(`\\ From ${g.length} keybinding entries, no when clauses matched the context.`),null)}_findCommand(b,p){for(let h=p.length-1;h>=0;h--){let g=p[h];if(!!m._contextMatchesRules(b,g.when))return g}return null}static _contextMatchesRules(b,p){return p?p.evaluate(b):!0}}e.KeybindingResolver=m;function D(w){return w?`${w.serialize()}`:"no when condition"}function I(w){return w.extensionId?w.isBuiltinExtension?`built-in extension ${w.extensionId}`:`user extension ${w.extensionId}`:w.isDefault?"built-in":"user"}}),define(te[274],ie([1,0]),function(j,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.removeElementsAfterNulls=e.ResolvedKeybindingItem=void 0;class y{constructor(I,w,b,p,h,g,t){this._resolvedKeybindingItemBrand=void 0,this.resolvedKeybinding=I,this.keypressParts=I?m(I.getDispatchParts()):[],I&&this.keypressParts.length===0&&(this.keypressParts=m(I.getSingleModifierDispatchParts())),this.bubble=w?w.charCodeAt(0)===94:!1,this.command=this.bubble?w.substr(1):w,this.commandArgs=b,this.when=p,this.isDefault=h,this.extensionId=g,this.isBuiltinExtension=t}}e.ResolvedKeybindingItem=y;function m(D){let I=[];for(let w=0,b=D.length;w<b;w++){const p=D[w];if(!p)return I;I.push(p)}return I}e.removeElementsAfterNulls=m}),define(te[611],ie([1,0,55,94,609,274]),function(j,e,y,m,D,I){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.USLayoutResolvedKeybinding=void 0;class w extends D.BaseResolvedKeybinding{constructor(p,h){super(h,p.parts)}_keyCodeToUILabel(p){if(this._os===2)switch(p){case 15:return"\u2190";case 16:return"\u2191";case 17:return"\u2192";case 18:return"\u2193"}return y.KeyCodeUtils.toString(p)}_getLabel(p){return p.isDuplicateModifierCase()?"":this._keyCodeToUILabel(p.keyCode)}_getAriaLabel(p){return p.isDuplicateModifierCase()?"":y.KeyCodeUtils.toString(p.keyCode)}_getElectronAccelerator(p){return y.KeyCodeUtils.toElectronAccelerator(p.keyCode)}_getDispatchPart(p){return w.getDispatchStr(p)}static getDispatchStr(p){if(p.isModifierKey())return null;let h="";return p.ctrlKey&&(h+="ctrl+"),p.shiftKey&&(h+="shift+"),p.altKey&&(h+="alt+"),p.metaKey&&(h+="meta+"),h+=y.KeyCodeUtils.toString(p.keyCode),h}_getSingleModifierDispatchPart(p){return p.keyCode===5&&!p.shiftKey&&!p.altKey&&!p.metaKey?"ctrl":p.keyCode===4&&!p.ctrlKey&&!p.altKey&&!p.metaKey?"shift":p.keyCode===6&&!p.ctrlKey&&!p.shiftKey&&!p.metaKey?"alt":p.keyCode===57&&!p.ctrlKey&&!p.shiftKey&&!p.altKey?"meta":null}static _scanCodeToKeyCode(p){const h=y.IMMUTABLE_CODE_TO_KEY_CODE[p];if(h!==-1)return h;switch(p){case 10:return 31;case 11:return 32;case 12:return 33;case 13:return 34;case 14:return 35;case 15:return 36;case 16:return 37;case 17:return 38;case 18:return 39;case 19:return 40;case 20:return 41;case 21:return 42;case 22:return 43;case 23:return 44;case 24:return 45;case 25:return 46;case 26:return 47;case 27:return 48;case 28:return 49;case 29:return 50;case 30:return 51;case 31:return 52;case 32:return 53;case 33:return 54;case 34:return 55;case 35:return 56;case 36:return 22;case 37:return 23;case 38:return 24;case 39:return 25;case 40:return 26;case 41:return 27;case 42:return 28;case 43:return 29;case 44:return 30;case 45:return 21;case 51:return 83;case 52:return 81;case 53:return 87;case 54:return 89;case 55:return 88;case 56:return 0;case 57:return 80;case 58:return 90;case 59:return 86;case 60:return 82;case 61:return 84;case 62:return 85;case 106:return 92}return 0}static _resolveSimpleUserBinding(p){if(!p)return null;if(p instanceof m.SimpleKeybinding)return p;const h=this._scanCodeToKeyCode(p.scanCode);return h===0?null:new m.SimpleKeybinding(p.ctrlKey,p.shiftKey,p.altKey,p.metaKey,h)}static resolveUserBinding(p,h){const g=(0,I.removeElementsAfterNulls)(p.map(t=>this._resolveSimpleUserBinding(t)));return g.length>0?[new w(new m.ChordKeybinding(g),h)]:[]}}e.USLayoutResolvedKeybinding=w}),define(te[128],ie([1,0,9]),function(j,e,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ILabelService=void 0,e.ILabelService=(0,y.createDecorator)("labelService")}),define(te[129],ie([1,0,9]),function(j,e,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ILayoutService=void 0,e.ILayoutService=(0,y.createDecorator)("layoutService")}),define(te[275],ie([1,0,7,4,129,28,53]),function(j,e,y,m,D,I,w){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.EditorScopedLayoutService=void 0;let b=class{constructor(g){this._codeEditorService=g,this.onDidLayout=m.Event.None}get dimension(){return this._dimension||(this._dimension=y.getClientArea(window.document.body)),this._dimension}get hasContainer(){return!1}get container(){throw new Error("ILayoutService.container is not available in the standalone editor!")}focus(){var g;(g=this._codeEditorService.getFocusedCodeEditor())===null||g===void 0||g.focus()}};b=Ie([Ce(0,I.ICodeEditorService)],b);let p=class extends b{constructor(g,t){super(t);this._container=g}get hasContainer(){return!1}get container(){return this._container}};p=Ie([Ce(1,I.ICodeEditorService)],p),e.EditorScopedLayoutService=p,(0,w.registerSingleton)(D.ILayoutService,b)}),define(te[612],ie([1,0,222,2,129]),function(j,e,y,m,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ContextViewService=void 0;let I=class extends m.Disposable{constructor(b){super();this.layoutService=b,this.currentViewDisposable=m.Disposable.None,this.container=b.hasContainer?b.container:null,this.contextView=this._register(new y.ContextView(this.container,1)),this.layout(),this._register(b.onDidLayout(()=>this.layout()))}setContainer(b,p){this.contextView.setContainer(b,p||1)}showContextView(b,p,h){p?p!==this.container&&(this.container=p,this.setContainer(p,h?3:2)):this.layoutService.hasContainer&&this.container!==this.layoutService.container&&(this.container=this.layoutService.container,this.setContainer(this.container,1)),this.contextView.show(b);const g=(0,m.toDisposable)(()=>{this.currentViewDisposable===g&&this.hideContextView()});return this.currentViewDisposable=g,g}getContextViewElement(){return this.contextView.getViewElement()}layout(){this.contextView.layout()}hideContextView(b){this.contextView.hide(b)}};I=Ie([Ce(0,D.ILayoutService)],I),e.ContextViewService=I}),define(te[64],ie([1,0,4,2,9]),function(j,e,y,m,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.LogService=e.ConsoleLogger=e.AbstractLogger=e.DEFAULT_LOG_LEVEL=e.LogLevel=e.ILogService=void 0,e.ILogService=(0,D.createDecorator)("logService");var I;(function(h){h[h.Trace=0]="Trace",h[h.Debug=1]="Debug",h[h.Info=2]="Info",h[h.Warning=3]="Warning",h[h.Error=4]="Error",h[h.Critical=5]="Critical",h[h.Off=6]="Off"})(I=e.LogLevel||(e.LogLevel={})),e.DEFAULT_LOG_LEVEL=I.Info;class w extends m.Disposable{constructor(){super(...arguments);this.level=e.DEFAULT_LOG_LEVEL,this._onDidChangeLogLevel=this._register(new y.Emitter)}setLevel(g){this.level!==g&&(this.level=g,this._onDidChangeLogLevel.fire(this.level))}getLevel(){return this.level}}e.AbstractLogger=w;class b extends w{constructor(g=e.DEFAULT_LOG_LEVEL){super();this.setLevel(g)}trace(g,...t){this.getLevel()<=I.Trace&&console.log("%cTRACE","color: #888",g,...t)}debug(g,...t){this.getLevel()<=I.Debug&&console.log("%cDEBUG","background: #eee; color: #888",g,...t)}info(g,...t){this.getLevel()<=I.Info&&console.log("%c INFO","color: #33f",g,...t)}error(g,...t){this.getLevel()<=I.Error&&console.log("%c ERR","color: #f33",g,...t)}dispose(){}}e.ConsoleLogger=b;class p extends m.Disposable{constructor(g){super();this.logger=g,this._register(g)}getLevel(){return this.logger.getLevel()}trace(g,...t){this.logger.trace(g,...t)}debug(g,...t){this.logger.debug(g,...t)}info(g,...t){this.logger.info(g,...t)}error(g,...t){this.logger.error(g,...t)}}e.LogService=p}),define(te[276],ie([1,0,10,2,219,326,3,18,32,429,45,153,8,19,64,65,13]),function(j,e,y,m,D,I,w,b,p,h,g,t,i,n,l,c,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.EditorWorkerClient=e.EditorWorkerHost=e.EditorWorkerService=void 0;const s=60*1e3,o=5*60*1e3;function a(L,E){const N=L.getModel(E);return!(!N||N.isTooLargeForSyncing())}let d=class extends m.Disposable{constructor(E,N,k,M){super();this._modelService=E,this._workerManager=this._register(new f(this._modelService,M)),this._logService=k,this._register(b.LinkProviderRegistry.register({language:"*",hasAccessToAllModels:!0},{provideLinks:(O,B)=>a(this._modelService,O.uri)?this._workerManager.withWorker().then(T=>T.computeLinks(O.uri)).then(T=>T&&{links:T}):Promise.resolve({links:[]})})),this._register(b.CompletionProviderRegistry.register("*",new u(this._workerManager,N,this._modelService,M)))}dispose(){super.dispose()}canComputeUnicodeHighlights(E){return a(this._modelService,E)}computedUnicodeHighlights(E,N,k){return this._workerManager.withWorker().then(M=>M.computedUnicodeHighlights(E,N,k))}computeDiff(E,N,k,M){return this._workerManager.withWorker().then(O=>O.computeDiff(E,N,k,M))}computeMoreMinimalEdits(E,N){if((0,n.isNonEmptyArray)(N)){if(!a(this._modelService,E))return Promise.resolve(N);const k=c.StopWatch.create(!0),M=this._workerManager.withWorker().then(O=>O.computeMoreMinimalEdits(E,N));return M.finally(()=>this._logService.trace("FORMAT#computeMoreMinimalEdits",E.toString(!0),k.elapsed())),Promise.race([M,(0,y.timeout)(1e3).then(()=>N)])}else return Promise.resolve(void 0)}canNavigateValueSet(E){return a(this._modelService,E)}navigateValueSet(E,N,k){return this._workerManager.withWorker().then(M=>M.navigateValueSet(E,N,k))}canComputeWordRanges(E){return a(this._modelService,E)}computeWordRanges(E,N){return this._workerManager.withWorker().then(k=>k.computeWordRanges(E,N))}};d=Ie([Ce(0,g.IModelService),Ce(1,t.ITextResourceConfigurationService),Ce(2,l.ILogService),Ce(3,p.ILanguageConfigurationService)],d),e.EditorWorkerService=d;class u{constructor(E,N,k,M){this.languageConfigurationService=M,this._debugDisplayName="wordbasedCompletions",this._workerManager=E,this._configurationService=N,this._modelService=k}provideCompletionItems(E,N){return ye(this,void 0,void 0,function*(){const k=this._configurationService.getValue(E.uri,N,"editor");if(!k.wordBasedSuggestions)return;const M=[];if(k.wordBasedSuggestionsMode==="currentDocument")a(this._modelService,E.uri)&&M.push(E.uri);else for(const W of this._modelService.getModels())!a(this._modelService,W.uri)||(W===E?M.unshift(W.uri):(k.wordBasedSuggestionsMode==="allDocuments"||W.getLanguageId()===E.getLanguageId())&&M.push(W.uri));if(M.length===0)return;const O=this.languageConfigurationService.getLanguageConfiguration(E.getLanguageId()).getWordDefinition(),B=E.getWordAtPosition(N),T=B?new w.Range(N.lineNumber,B.startColumn,N.lineNumber,B.endColumn):w.Range.fromPositions(N),R=T.setEndPosition(N.lineNumber,N.column),F=yield(yield this._workerManager.withWorker()).textualSuggest(M,B==null?void 0:B.word,O);if(!!F)return{duration:F.duration,suggestions:F.words.map(W=>({kind:18,label:W,insertText:W,range:{insert:R,replace:T}}))}})}}class f extends m.Disposable{constructor(E,N){super();this.languageConfigurationService=N,this._modelService=E,this._editorWorkerClient=null,this._lastWorkerUsedTime=new Date().getTime(),this._register(new y.IntervalTimer).cancelAndSet(()=>this._checkStopIdleWorker(),Math.round(o/2)),this._register(this._modelService.onModelRemoved(M=>this._checkStopEmptyWorker()))}dispose(){this._editorWorkerClient&&(this._editorWorkerClient.dispose(),this._editorWorkerClient=null),super.dispose()}_checkStopEmptyWorker(){if(!this._editorWorkerClient)return;this._modelService.getModels().length===0&&(this._editorWorkerClient.dispose(),this._editorWorkerClient=null)}_checkStopIdleWorker(){if(!this._editorWorkerClient)return;new Date().getTime()-this._lastWorkerUsedTime>o&&(this._editorWorkerClient.dispose(),this._editorWorkerClient=null)}withWorker(){return this._lastWorkerUsedTime=new Date().getTime(),this._editorWorkerClient||(this._editorWorkerClient=new _(this._modelService,!1,"editorWorkerService",this.languageConfigurationService)),Promise.resolve(this._editorWorkerClient)}}class S extends m.Disposable{constructor(E,N,k){super();if(this._syncedModels=Object.create(null),this._syncedModelsLastUsedTime=Object.create(null),this._proxy=E,this._modelService=N,!k){const M=new y.IntervalTimer;M.cancelAndSet(()=>this._checkStopModelSync(),Math.round(s/2)),this._register(M)}}dispose(){for(let E in this._syncedModels)(0,m.dispose)(this._syncedModels[E]);this._syncedModels=Object.create(null),this._syncedModelsLastUsedTime=Object.create(null),super.dispose()}ensureSyncedResources(E,N){for(const k of E){const M=k.toString();this._syncedModels[M]||this._beginModelSync(k,N),this._syncedModels[M]&&(this._syncedModelsLastUsedTime[M]=new Date().getTime())}}_checkStopModelSync(){const E=new Date().getTime(),N=[];for(let k in this._syncedModelsLastUsedTime)E-this._syncedModelsLastUsedTime[k]>s&&N.push(k);for(const k of N)this._stopModelSync(k)}_beginModelSync(E,N){const k=this._modelService.getModel(E);if(!k||!N&&k.isTooLargeForSyncing())return;const M=E.toString();this._proxy.acceptNewModel({url:k.uri.toString(),lines:k.getLinesContent(),EOL:k.getEOL(),versionId:k.getVersionId()});const O=new m.DisposableStore;O.add(k.onDidChangeContent(B=>{this._proxy.acceptModelChanged(M.toString(),B)})),O.add(k.onWillDispose(()=>{this._stopModelSync(M)})),O.add((0,m.toDisposable)(()=>{this._proxy.acceptRemovedModel(M)})),this._syncedModels[M]=O}_stopModelSync(E){const N=this._syncedModels[E];delete this._syncedModels[E],delete this._syncedModelsLastUsedTime[E],(0,m.dispose)(N)}}class v{constructor(E){this._instance=E,this._proxyObj=Promise.resolve(this._instance)}dispose(){this._instance.dispose()}getProxyObject(){return this._proxyObj}}class C{constructor(E){this._workerClient=E}fhr(E,N){return this._workerClient.fhr(E,N)}}e.EditorWorkerHost=C;class _ extends m.Disposable{constructor(E,N,k,M){super();this.languageConfigurationService=M,this._disposed=!1,this._modelService=E,this._keepIdleModels=N,this._workerFactory=new I.DefaultWorkerFactory(k),this._worker=null,this._modelManager=null}fhr(E,N){throw new Error("Not implemented!")}_getOrCreateWorker(){if(!this._worker)try{this._worker=this._register(new D.SimpleWorkerClient(this._workerFactory,"vs/editor/common/services/editorSimpleWorker",new C(this)))}catch(E){(0,D.logOnceWebWorkerWarning)(E),this._worker=new v(new h.EditorSimpleWorker(new C(this),null))}return this._worker}_getProxy(){return this._getOrCreateWorker().getProxyObject().then(void 0,E=>((0,D.logOnceWebWorkerWarning)(E),this._worker=new v(new h.EditorSimpleWorker(new C(this),null)),this._getOrCreateWorker().getProxyObject()))}_getOrCreateModelManager(E){return this._modelManager||(this._modelManager=this._register(new S(E,this._modelService,this._keepIdleModels))),this._modelManager}_withSyncedResources(E,N=!1){return ye(this,void 0,void 0,function*(){return this._disposed?Promise.reject((0,r.canceled)()):this._getProxy().then(k=>(this._getOrCreateModelManager(k).ensureSyncedResources(E,N),k))})}computedUnicodeHighlights(E,N,k){return this._withSyncedResources([E]).then(M=>M.computeUnicodeHighlights(E.toString(),N,k))}computeDiff(E,N,k,M){return this._withSyncedResources([E,N],!0).then(O=>O.computeDiff(E.toString(),N.toString(),k,M))}computeMoreMinimalEdits(E,N){return this._withSyncedResources([E]).then(k=>k.computeMoreMinimalEdits(E.toString(),N))}computeLinks(E){return this._withSyncedResources([E]).then(N=>N.computeLinks(E.toString()))}textualSuggest(E,N,k){return ye(this,void 0,void 0,function*(){const M=yield this._withSyncedResources(E),O=k.source,B=(0,i.regExpFlags)(k);return M.textualSuggest(E.map(T=>T.toString()),N,O,B)})}computeWordRanges(E,N){return this._withSyncedResources([E]).then(k=>{const M=this._modelService.getModel(E);if(!M)return Promise.resolve(null);const O=this.languageConfigurationService.getLanguageConfiguration(M.getLanguageId()).getWordDefinition(),B=O.source,T=(0,i.regExpFlags)(O);return k.computeWordRanges(E.toString(),N,B,T)})}navigateValueSet(E,N,k){return this._withSyncedResources([E]).then(M=>{const O=this._modelService.getModel(E);if(!O)return null;const B=this.languageConfigurationService.getLanguageConfiguration(O.getLanguageId()).getWordDefinition(),T=B.source,R=(0,i.regExpFlags)(B);return M.navigateValueSet(E.toString(),N,k,T,R)})}dispose(){super.dispose(),this._disposed=!0}}e.EditorWorkerClient=_}),define(te[613],ie([1,0,276,20]),function(j,e,y,m){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.createWebWorker=void 0;function D(w,b,p){return new I(w,b,p)}e.createWebWorker=D;class I extends y.EditorWorkerClient{constructor(b,p,h){super(b,h.keepIdleModels||!1,h.label,p);this._foreignModuleId=h.moduleId,this._foreignModuleCreateData=h.createData||null,this._foreignModuleHost=h.host||null,this._foreignProxy=null}fhr(b,p){if(!this._foreignModuleHost||typeof this._foreignModuleHost[b]!="function")return Promise.reject(new Error("Missing method "+b+" or missing main thread foreign host."));try{return Promise.resolve(this._foreignModuleHost[b].apply(this._foreignModuleHost,p))}catch(h){return Promise.reject(h)}}_getForeignProxy(){return this._foreignProxy||(this._foreignProxy=this._getProxy().then(b=>{const p=this._foreignModuleHost?m.getAllMethodNames(this._foreignModuleHost):[];return b.loadForeignModule(this._foreignModuleId,this._foreignModuleCreateData,p).then(h=>{this._foreignModuleCreateData=null;const g=(n,l)=>b.fmr(n,l),t=(n,l)=>function(){const c=Array.prototype.slice.call(arguments,0);return l(n,c)},i={};for(const n of h)i[n]=t(n,g);return i})})),this._foreignProxy}getProxy(){return this._getForeignProxy()}withSyncedResources(b){return this._withSyncedResources(b).then(p=>this.getProxy())}}}),define(te[92],ie([1,0,112,47,111,53,9,64]),function(j,e,y,m,D,I,w,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.LanguageFeatureDebounceService=e.ILanguageFeatureDebounceService=void 0,e.ILanguageFeatureDebounceService=(0,w.createDecorator)("ILanguageFeatureDebounceService");var p;(function(t){const i=new WeakMap;let n=0;function l(c){let r=i.get(c);return r===void 0&&(r=++n,i.set(c,r)),r}t.of=l})(p||(p={}));class h{constructor(i,n,l,c,r,s){this._logService=i,this._name=n,this._registry=l,this._default=c,this._min=r,this._max=s,this._cache=new m.LRUCache(50,.7)}_key(i){return i.id+this._registry.all(i).reduce((n,l)=>(0,y.doHash)(p.of(l),n),0)}get(i){const n=this._key(i),l=this._cache.get(n);return l?(0,D.clamp)(l.value,this._min,this._max):this.default()}update(i,n){const l=this._key(i);let c=this._cache.get(l);c||(c=new D.SlidingWindowAverage(6),this._cache.set(l,c));const r=(0,D.clamp)(c.update(n),this._min,this._max);return this._logService.trace(`[DEBOUNCE: ${this._name}] for ${i.uri.toString()} is ${r}ms`),r}_overall(){const i=new D.MovingAverage;for(const[,n]of this._cache)i.update(n.value);return i.value}default(){const i=this._overall()|0||this._default;return(0,D.clamp)(i,this._min,this._max)}}let g=class{constructor(i){this._logService=i,this._data=new Map}for(i,n,l){var c,r,s;const o=(c=l==null?void 0:l.min)!==null&&c!==void 0?c:50,a=(r=l==null?void 0:l.max)!==null&&r!==void 0?r:Math.pow(o,2),d=(s=l==null?void 0:l.key)!==null&&s!==void 0?s:void 0,u=`${p.of(i)},${o}${d?","+d:""}`;let f=this._data.get(u);return f||(f=new h(this._logService,n,i,this._overallAverage()|0||o*1.5,o,a),this._data.set(u,f)),f}_overallAverage(){let i=new D.MovingAverage;for(let n of this._data.values())i.update(n.default());return i.value}};g=Ie([Ce(0,b.ILogService)],g),e.LanguageFeatureDebounceService=g,(0,I.registerSingleton)(e.ILanguageFeatureDebounceService,g,!0)}),define(te[199],ie([1,0,19,21,13,54,47,11,3,18,92,9,53,45,2]),function(j,e,y,m,D,I,w,b,p,h,g,t,i,n,l){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.OutlineModelService=e.IOutlineModelService=e.OutlineModel=e.OutlineGroup=e.OutlineElement=e.TreeElement=void 0;class c{remove(){this.parent&&this.parent.children.delete(this.id)}static findId(u,f){let S;typeof u=="string"?S=`${f.id}/${u}`:(S=`${f.id}/${u.name}`,f.children.get(S)!==void 0&&(S=`${f.id}/${u.name}_${u.range.startLineNumber}_${u.range.startColumn}`));let v=S;for(let C=0;f.children.get(v)!==void 0;C++)v=`${S}_${C}`;return v}static empty(u){return u.children.size===0}}e.TreeElement=c;class r extends c{constructor(u,f,S){super();this.id=u,this.parent=f,this.symbol=S,this.children=new Map}}e.OutlineElement=r;class s extends c{constructor(u,f,S,v){super();this.id=u,this.parent=f,this.label=S,this.order=v,this.children=new Map}}e.OutlineGroup=s;class o extends c{constructor(u){super();this.uri=u,this.id="root",this.parent=void 0,this._groups=new Map,this.children=new Map,this.id="root",this.parent=void 0}static create(u,f){const S=new m.CancellationTokenSource(f),v=new o(u.uri),C=h.DocumentSymbolProviderRegistry.ordered(u),_=C.map((E,N)=>{var k;let M=c.findId(`provider_${N}`,v),O=new s(M,v,(k=E.displayName)!==null&&k!==void 0?k:"Unknown Outline Provider",N);return Promise.resolve(E.provideDocumentSymbols(u,S.token)).then(B=>{for(const T of B||[])o._makeOutlineElement(T,O);return O},B=>((0,D.onUnexpectedExternalError)(B),O)).then(B=>{c.empty(B)?B.remove():v._groups.set(M,B)})}),L=h.DocumentSymbolProviderRegistry.onDidChange(()=>{const E=h.DocumentSymbolProviderRegistry.ordered(u);(0,y.equals)(E,C)||S.cancel()});return Promise.all(_).then(()=>S.token.isCancellationRequested&&!f.isCancellationRequested?o.create(u,f):v._compact()).finally(()=>{L.dispose()})}static _makeOutlineElement(u,f){let S=c.findId(u,f),v=new r(S,f,u);if(u.children)for(const C of u.children)o._makeOutlineElement(C,v);f.children.set(v.id,v)}_compact(){let u=0;for(const[f,S]of this._groups)S.children.size===0?this._groups.delete(f):u+=1;if(u!==1)this.children=this._groups;else{let f=I.Iterable.first(this._groups.values());for(let[,S]of f.children)S.parent=this,this.children.set(S.id,S)}return this}getTopLevelSymbols(){const u=[];for(const f of this.children.values())f instanceof r?u.push(f.symbol):u.push(...I.Iterable.map(f.children.values(),S=>S.symbol));return u.sort((f,S)=>p.Range.compareRangesUsingStarts(f.range,S.range))}asListOfDocumentSymbols(){const u=this.getTopLevelSymbols(),f=[];return o._flattenDocumentSymbols(f,u,""),f.sort((S,v)=>b.Position.compare(p.Range.getStartPosition(S.range),p.Range.getStartPosition(v.range))||b.Position.compare(p.Range.getEndPosition(v.range),p.Range.getEndPosition(S.range)))}static _flattenDocumentSymbols(u,f,S){for(const v of f)u.push({kind:v.kind,tags:v.tags,name:v.name,detail:v.detail,containerName:v.containerName||S,range:v.range,selectionRange:v.selectionRange,children:void 0}),v.children&&o._flattenDocumentSymbols(u,v.children,v.name)}}e.OutlineModel=o,e.IOutlineModelService=(0,t.createDecorator)("IOutlineModelService");let a=class{constructor(u,f){this._disposables=new l.DisposableStore,this._cache=new w.LRUCache(10,.7),this._debounceInformation=u.for(h.DocumentSymbolProviderRegistry,"DocumentSymbols",{min:350}),this._disposables.add(f.onModelRemoved(S=>{this._cache.delete(S.id)}))}dispose(){this._disposables.dispose()}getOrCreate(u,f){return ye(this,void 0,void 0,function*(){const S=h.DocumentSymbolProviderRegistry.ordered(u);let v=this._cache.get(u.id);if(!v||v.versionId!==u.getVersionId()||!(0,y.equals)(v.provider,S)){let _=new m.CancellationTokenSource;v={versionId:u.getVersionId(),provider:S,promiseCnt:0,source:_,promise:o.create(u,_.token),model:void 0},this._cache.set(u.id,v);const L=Date.now();v.promise.then(E=>{v.model=E,this._debounceInformation.update(u,Date.now()-L)}).catch(E=>{this._cache.delete(u.id)})}if(v.model)return v.model;v.promiseCnt+=1;const C=f.onCancellationRequested(()=>{--v.promiseCnt==0&&(v.source.cancel(),this._cache.delete(u.id))});try{return yield v.promise}finally{C.dispose()}})}};a=Ie([Ce(0,g.ILanguageFeatureDebounceService),Ce(1,n.IModelService)],a),e.OutlineModelService=a,(0,i.registerSingleton)(e.IOutlineModelService,a,!0)}),define(te[614],ie([1,0,21,20,25,58,199,26]),function(j,e,y,m,D,I,w,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),b.CommandsRegistry.registerCommand("_executeDocumentSymbolProvider",function(p,...h){return ye(this,void 0,void 0,function*(){const[g]=h;(0,m.assertType)(D.URI.isUri(g));const t=p.get(w.IOutlineModelService),n=yield p.get(I.ITextModelService).createModelReference(g);try{return(yield t.getOrCreate(n.object.textEditorModel,y.CancellationToken.None)).getTopLevelSymbols()}finally{n.dispose()}})})}),define(te[615],ie([1,0,34,7,10,2,129,64]),function(j,e,y,m,D,I,w,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BrowserClipboardService=void 0;let p=class extends I.Disposable{constructor(g,t){super();this.layoutService=g,this.logService=t,this.mapTextToType=new Map,this.findText="",(y.isSafari||y.isWebkitWebView)&&this.installWebKitWriteTextWorkaround()}installWebKitWriteTextWorkaround(){const g=()=>{const t=new D.DeferredPromise;this.webKitPendingClipboardWritePromise&&!this.webKitPendingClipboardWritePromise.isSettled&&this.webKitPendingClipboardWritePromise.cancel(),this.webKitPendingClipboardWritePromise=t,navigator.clipboard.write([new ClipboardItem({"text/plain":t.p})]).catch(i=>ye(this,void 0,void 0,function*(){(!(i instanceof Error)||i.name!=="NotAllowedError"||!t.isRejected)&&this.logService.error(i)}))};this.layoutService.hasContainer&&(this._register((0,m.addDisposableListener)(this.layoutService.container,"click",g)),this._register((0,m.addDisposableListener)(this.layoutService.container,"keydown",g)))}writeText(g,t){return ye(this,void 0,void 0,function*(){if(t){this.mapTextToType.set(t,g);return}if(this.webKitPendingClipboardWritePromise)return this.webKitPendingClipboardWritePromise.complete(g);try{return yield navigator.clipboard.writeText(g)}catch(l){console.error(l)}const i=document.activeElement,n=document.body.appendChild((0,m.$)("textarea",{"aria-hidden":!0}));n.style.height="1px",n.style.width="1px",n.style.position="absolute",n.value=g,n.focus(),n.select(),document.execCommand("copy"),i instanceof HTMLElement&&i.focus(),document.body.removeChild(n)})}readText(g){return ye(this,void 0,void 0,function*(){if(g)return this.mapTextToType.get(g)||"";try{return yield navigator.clipboard.readText()}catch(t){return console.error(t),""}})}readFindText(){return ye(this,void 0,void 0,function*(){return this.findText})}writeFindText(g){return ye(this,void 0,void 0,function*(){this.findText=g})}};p=Ie([Ce(0,w.ILayoutService),Ce(1,b.ILogService)],p),e.BrowserClipboardService=p}),define(te[77],ie([1,0,74,587,9]),function(j,e,y,m,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IMarkerService=e.IMarkerData=e.MarkerSeverity=void 0;var I;(function(b){b[b.Hint=1]="Hint",b[b.Info=2]="Info",b[b.Warning=4]="Warning",b[b.Error=8]="Error"})(I=e.MarkerSeverity||(e.MarkerSeverity={})),function(b){function p(n,l){return l-n}b.compare=p;const h=Object.create(null);h[b.Error]=(0,m.localize)(0,null),h[b.Warning]=(0,m.localize)(1,null),h[b.Info]=(0,m.localize)(2,null);function g(n){return h[n]||""}b.toString=g;function t(n){switch(n){case y.default.Error:return b.Error;case y.default.Warning:return b.Warning;case y.default.Info:return b.Info;case y.default.Ignore:return b.Hint}}b.fromSeverity=t;function i(n){switch(n){case b.Error:return y.default.Error;case b.Warning:return y.default.Warning;case b.Info:return y.default.Info;case b.Hint:return y.default.Ignore}}b.toSeverity=i}(I=e.MarkerSeverity||(e.MarkerSeverity={}));var w;(function(b){const p="";function h(t){return g(t,!0)}b.makeKey=h;function g(t,i){let n=[p];return t.source?n.push(t.source.replace("\xA6","\\\xA6")):n.push(p),t.code?typeof t.code=="string"?n.push(t.code.replace("\xA6","\\\xA6")):n.push(t.code.value.replace("\xA6","\\\xA6")):n.push(p),t.severity!==void 0&&t.severity!==null?n.push(I.toString(t.severity)):n.push(p),t.message&&i?n.push(t.message.replace("\xA6","\\\xA6")):n.push(p),t.startLineNumber!==void 0&&t.startLineNumber!==null?n.push(t.startLineNumber.toString()):n.push(p),t.startColumn!==void 0&&t.startColumn!==null?n.push(t.startColumn.toString()):n.push(p),t.endLineNumber!==void 0&&t.endLineNumber!==null?n.push(t.endLineNumber.toString()):n.push(p),t.endColumn!==void 0&&t.endColumn!==null?n.push(t.endColumn.toString()):n.push(p),n.push(p),n.join("\xA6")}b.makeKeyOptionalMessage=g})(w=e.IMarkerData||(e.IMarkerData={})),e.IMarkerService=(0,D.createDecorator)("markerService")}),define(te[616],ie([1,0,19,4,2,81,8,25,3,53,9,77,40]),function(j,e,y,m,D,I,w,b,p,h,g,t,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IMarkerNavigationService=e.MarkerList=e.MarkerCoordinate=void 0;class n{constructor(s,o,a){this.marker=s,this.index=o,this.total=a}}e.MarkerCoordinate=n;let l=class{constructor(s,o,a){this._markerService=o,this._configService=a,this._onDidChange=new m.Emitter,this.onDidChange=this._onDidChange.event,this._dispoables=new D.DisposableStore,this._markers=[],this._nextIdx=-1,b.URI.isUri(s)?this._resourceFilter=S=>S.toString()===s.toString():s&&(this._resourceFilter=s);const d=this._configService.getValue("problems.sortOrder"),u=(S,v)=>{let C=(0,w.compare)(S.resource.toString(),v.resource.toString());return d==="position"?C=p.Range.compareRangesUsingStarts(S,v)||t.MarkerSeverity.compare(S.severity,v.severity):C=t.MarkerSeverity.compare(S.severity,v.severity)||p.Range.compareRangesUsingStarts(S,v),C},f=()=>{this._markers=this._markerService.read({resource:b.URI.isUri(s)?s:void 0,severities:t.MarkerSeverity.Error|t.MarkerSeverity.Warning|t.MarkerSeverity.Info}),typeof s=="function"&&(this._markers=this._markers.filter(S=>this._resourceFilter(S.resource))),this._markers.sort(u)};f(),this._dispoables.add(o.onMarkerChanged(S=>{(!this._resourceFilter||S.some(v=>this._resourceFilter(v)))&&(f(),this._nextIdx=-1,this._onDidChange.fire())}))}dispose(){this._dispoables.dispose(),this._onDidChange.dispose()}matches(s){return!this._resourceFilter&&!s?!0:!this._resourceFilter||!s?!1:this._resourceFilter(s)}get selected(){const s=this._markers[this._nextIdx];return s&&new n(s,this._nextIdx+1,this._markers.length)}_initIdx(s,o,a){let d=!1,u=this._markers.findIndex(f=>f.resource.toString()===s.uri.toString());u<0&&(u=(0,y.binarySearch)(this._markers,{resource:s.uri},(f,S)=>(0,w.compare)(f.resource.toString(),S.resource.toString())),u<0&&(u=~u));for(let f=u;f<this._markers.length;f++){let S=p.Range.lift(this._markers[f]);if(S.isEmpty()){const v=s.getWordAtPosition(S.getStartPosition());v&&(S=new p.Range(S.startLineNumber,v.startColumn,S.startLineNumber,v.endColumn))}if(o&&(S.containsPosition(o)||o.isBeforeOrEqual(S.getStartPosition()))){this._nextIdx=f,d=!0;break}if(this._markers[f].resource.toString()!==s.uri.toString())break}d||(this._nextIdx=a?0:this._markers.length-1),this._nextIdx<0&&(this._nextIdx=this._markers.length-1)}resetIndex(){this._nextIdx=-1}move(s,o,a){if(this._markers.length===0)return!1;let d=this._nextIdx;return this._nextIdx===-1?this._initIdx(o,a,s):s?this._nextIdx=(this._nextIdx+1)%this._markers.length:s||(this._nextIdx=(this._nextIdx-1+this._markers.length)%this._markers.length),d!==this._nextIdx}find(s,o){let a=this._markers.findIndex(d=>d.resource.toString()===s.toString());if(!(a<0)){for(;a<this._markers.length;a++)if(p.Range.containsPosition(this._markers[a],o))return new n(this._markers[a],a+1,this._markers.length)}}};l=Ie([Ce(1,t.IMarkerService),Ce(2,i.IConfigurationService)],l),e.MarkerList=l,e.IMarkerNavigationService=(0,g.createDecorator)("IMarkerNavigationService");let c=class{constructor(s,o){this._markerService=s,this._configService=o,this._provider=new I.LinkedList}getMarkerList(s){for(let o of this._provider){const a=o.getMarkerList(s);if(a)return a}return new l(s,this._markerService,this._configService)}};c=Ie([Ce(0,t.IMarkerService),Ce(1,i.IConfigurationService)],c),(0,h.registerSingleton)(e.IMarkerNavigationService,c,!0)}),define(te[617],ie([1,0,19,4,54,47,48,25,77]),function(j,e,y,m,D,I,w,b,p){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MarkerService=void 0;class h{constructor(){this._byResource=new I.ResourceMap,this._byOwner=new Map}set(n,l,c){let r=this._byResource.get(n);r||(r=new Map,this._byResource.set(n,r)),r.set(l,c);let s=this._byOwner.get(l);s||(s=new I.ResourceMap,this._byOwner.set(l,s)),s.set(n,c)}get(n,l){let c=this._byResource.get(n);return c==null?void 0:c.get(l)}delete(n,l){let c=!1,r=!1,s=this._byResource.get(n);s&&(c=s.delete(l));let o=this._byOwner.get(l);if(o&&(r=o.delete(n)),c!==r)throw new Error("illegal state");return c&&r}values(n){var l,c,r,s;return typeof n=="string"?(c=(l=this._byOwner.get(n))===null||l===void 0?void 0:l.values())!==null&&c!==void 0?c:D.Iterable.empty():b.URI.isUri(n)?(s=(r=this._byResource.get(n))===null||r===void 0?void 0:r.values())!==null&&s!==void 0?s:D.Iterable.empty():D.Iterable.map(D.Iterable.concat(...this._byOwner.values()),o=>o[1])}}class g{constructor(n){this.errors=0,this.infos=0,this.warnings=0,this.unknowns=0,this._data=new I.ResourceMap,this._service=n,this._subscription=n.onMarkerChanged(this._update,this)}dispose(){this._subscription.dispose()}_update(n){for(const l of n){const c=this._data.get(l);c&&this._substract(c);const r=this._resourceStats(l);this._add(r),this._data.set(l,r)}}_resourceStats(n){const l={errors:0,warnings:0,infos:0,unknowns:0};if(n.scheme===w.Schemas.inMemory||n.scheme===w.Schemas.walkThrough||n.scheme===w.Schemas.walkThroughSnippet)return l;for(const{severity:c}of this._service.read({resource:n}))c===p.MarkerSeverity.Error?l.errors+=1:c===p.MarkerSeverity.Warning?l.warnings+=1:c===p.MarkerSeverity.Info?l.infos+=1:l.unknowns+=1;return l}_substract(n){this.errors-=n.errors,this.warnings-=n.warnings,this.infos-=n.infos,this.unknowns-=n.unknowns}_add(n){this.errors+=n.errors,this.warnings+=n.warnings,this.infos+=n.infos,this.unknowns+=n.unknowns}}class t{constructor(){this._onMarkerChanged=new m.DebounceEmitter({delay:0,merge:t._merge}),this.onMarkerChanged=this._onMarkerChanged.event,this._data=new h,this._stats=new g(this)}dispose(){this._stats.dispose(),this._onMarkerChanged.dispose()}remove(n,l){for(const c of l||[])this.changeOne(n,c,[])}changeOne(n,l,c){if((0,y.isFalsyOrEmpty)(c))this._data.delete(l,n)&&this._onMarkerChanged.fire([l]);else{const r=[];for(const s of c){const o=t._toMarker(n,l,s);o&&r.push(o)}this._data.set(l,n,r),this._onMarkerChanged.fire([l])}}static _toMarker(n,l,c){let{code:r,severity:s,message:o,source:a,startLineNumber:d,startColumn:u,endLineNumber:f,endColumn:S,relatedInformation:v,tags:C}=c;if(!!o)return d=d>0?d:1,u=u>0?u:1,f=f>=d?f:d,S=S>0?S:u,{resource:l,owner:n,code:r,severity:s,message:o,source:a,startLineNumber:d,startColumn:u,endLineNumber:f,endColumn:S,relatedInformation:v,tags:C}}read(n=Object.create(null)){let{owner:l,resource:c,severities:r,take:s}=n;if((!s||s<0)&&(s=-1),l&&c){const o=this._data.get(c,l);if(o){const a=[];for(const d of o)if(t._accept(d,r)){const u=a.push(d);if(s>0&&u===s)break}return a}else return[]}else if(!l&&!c){const o=[];for(let a of this._data.values())for(let d of a)if(t._accept(d,r)){const u=o.push(d);if(s>0&&u===s)return o}return o}else{const o=this._data.values(c??l),a=[];for(const d of o)for(const u of d)if(t._accept(u,r)){const f=a.push(u);if(s>0&&f===s)return a}return a}}static _accept(n,l){return l===void 0||(l&n.severity)===n.severity}static _merge(n){const l=new I.ResourceMap;for(let c of n)for(let r of c)l.set(r,!0);return Array.from(l.keys())}}e.MarkerService=t}),define(te[38],ie([1,0,74,9]),function(j,e,y,m){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.NoOpNotification=e.INotificationService=e.Severity=void 0,e.Severity=y.default,e.INotificationService=(0,m.createDecorator)("notificationService");class D{}e.NoOpNotification=D}),define(te[51],ie([1,0,2,8,25,9]),function(j,e,y,m,D,I){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.selectionFragment=e.matchesSomeScheme=e.matchesScheme=e.NullOpenerService=e.IOpenerService=void 0,e.IOpenerService=(0,I.createDecorator)("openerService"),e.NullOpenerService=Object.freeze({_serviceBrand:void 0,registerOpener(){return y.Disposable.None},registerValidator(){return y.Disposable.None},registerExternalUriResolver(){return y.Disposable.None},setDefaultExternalOpener(){},registerExternalOpener(){return y.Disposable.None},open(){return ye(this,void 0,void 0,function*(){return!1})},resolveExternalUri(h){return ye(this,void 0,void 0,function*(){return{resolved:h,dispose(){}}})}});function w(h,g){return D.URI.isUri(h)?(0,m.equalsIgnoreCase)(h.scheme,g):(0,m.startsWithIgnoreCase)(h,g+":")}e.matchesScheme=w;function b(h,...g){return g.some(t=>w(h,t))}e.matchesSomeScheme=b;function p(h){let g;const t=/^L?(\d+)(?:,(\d+))?/.exec(h.fragment);return t&&(g={startLineNumber:parseInt(t[1]),startColumn:t[2]?parseInt(t[2]):1}),g}e.selectionFragment=p}),define(te[618],ie([1,0,7,21,81,47,216,48,41,25,28,26,594,51]),function(j,e,y,m,D,I,w,b,p,h,g,t,i,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.OpenerService=void 0;let l=class{constructor(o){this._commandService=o}open(o,a){return ye(this,void 0,void 0,function*(){if(!(0,n.matchesScheme)(o,b.Schemas.command))return!1;if(!(a==null?void 0:a.allowCommands))return!0;typeof o=="string"&&(o=h.URI.parse(o));let d=[];try{d=(0,w.parse)(decodeURIComponent(o.query))}catch{try{d=(0,w.parse)(o.query)}catch{}}return Array.isArray(d)||(d=[d]),yield this._commandService.executeCommand(o.path,...d),!0})}};l=Ie([Ce(0,t.ICommandService)],l);let c=class{constructor(o){this._editorService=o}open(o,a){return ye(this,void 0,void 0,function*(){typeof o=="string"&&(o=h.URI.parse(o));const d=(0,n.selectionFragment)(o);return d&&(o=o.with({fragment:""})),o.scheme===b.Schemas.file&&(o=(0,p.normalizePath)(o)),yield this._editorService.openCodeEditor({resource:o,options:Object.assign({selection:d,context:(a==null?void 0:a.fromUserGesture)?i.EditorOpenContext.USER:i.EditorOpenContext.API},a==null?void 0:a.editorOptions)},this._editorService.getFocusedCodeEditor(),a==null?void 0:a.openToSide),!0})}};c=Ie([Ce(0,g.ICodeEditorService)],c);let r=class{constructor(o,a){this._openers=new D.LinkedList,this._validators=new D.LinkedList,this._resolvers=new D.LinkedList,this._resolvedUriTargets=new I.ResourceMap(d=>d.with({path:null,fragment:null,query:null}).toString()),this._externalOpeners=new D.LinkedList,this._defaultExternalOpener={openExternal:d=>ye(this,void 0,void 0,function*(){return(0,n.matchesSomeScheme)(d,b.Schemas.http,b.Schemas.https)?y.windowOpenNoOpener(d):window.location.href=d,!0})},this._openers.push({open:(d,u)=>ye(this,void 0,void 0,function*(){return(u==null?void 0:u.openExternal)||(0,n.matchesSomeScheme)(d,b.Schemas.mailto,b.Schemas.http,b.Schemas.https,b.Schemas.vsls)?(yield this._doOpenExternal(d,u),!0):!1})}),this._openers.push(new l(a)),this._openers.push(new c(o))}registerOpener(o){return{dispose:this._openers.unshift(o)}}registerValidator(o){return{dispose:this._validators.push(o)}}registerExternalUriResolver(o){return{dispose:this._resolvers.push(o)}}setDefaultExternalOpener(o){this._defaultExternalOpener=o}registerExternalOpener(o){return{dispose:this._externalOpeners.push(o)}}open(o,a){var d;return ye(this,void 0,void 0,function*(){const u=typeof o=="string"?h.URI.parse(o):o,f=(d=this._resolvedUriTargets.get(u))!==null&&d!==void 0?d:o;for(const S of this._validators)if(!(yield S.shouldOpen(f)))return!1;for(const S of this._openers)if(yield S.open(o,a))return!0;return!1})}resolveExternalUri(o,a){return ye(this,void 0,void 0,function*(){for(const d of this._resolvers)try{const u=yield d.resolveExternalUri(o,a);if(u)return this._resolvedUriTargets.has(u.resolved)||this._resolvedUriTargets.set(u.resolved,o),u}catch{}throw new Error("Could not resolve external URI: "+o.toString())})}_doOpenExternal(o,a){return ye(this,void 0,void 0,function*(){const d=typeof o=="string"?h.URI.parse(o):o;let u;try{u=(yield this.resolveExternalUri(d,a)).resolved}catch{u=d}let f;if(typeof o=="string"&&d.toString()===u.toString()?f=o:f=encodeURI(u.toString(!0)),a==null?void 0:a.allowContributedOpeners){const S=typeof(a==null?void 0:a.allowContributedOpeners)=="string"?a==null?void 0:a.allowContributedOpeners:void 0;for(const v of this._externalOpeners)if(yield v.openExternal(f,{sourceUri:d,preferredOpenerId:S},m.CancellationToken.None))return!0}return this._defaultExternalOpener.openExternal(f,{sourceUri:d},m.CancellationToken.None)})}dispose(){this._validators.clear()}};r=Ie([Ce(0,g.ICodeEditorService),Ce(1,t.ICommandService)],r),e.OpenerService=r}),define(te[71],ie([1,0,9]),function(j,e,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IEditorProgressService=e.Progress=e.emptyProgressRunner=void 0,e.emptyProgressRunner=Object.freeze({total(){},worked(){},done(){}});class m{constructor(I){this.callback=I}report(I){this._value=I,this.callback(this._value)}}e.Progress=m,m.None=Object.freeze({report(){}}),e.IEditorProgressService=(0,y.createDecorator)("editorProgressService")}),define(te[619],ie([1,0,10,21,2]),function(j,e,y,m,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.PickerQuickAccessProvider=e.TriggerAction=void 0;var I;(function(h){h[h.NO_ACTION=0]="NO_ACTION",h[h.CLOSE_PICKER=1]="CLOSE_PICKER",h[h.REFRESH_PICKER=2]="REFRESH_PICKER",h[h.REMOVE_ITEM=3]="REMOVE_ITEM"})(I=e.TriggerAction||(e.TriggerAction={}));function w(h){const g=h;return Array.isArray(g.items)}function b(h){const g=h;return!!g.picks&&g.additionalPicks instanceof Promise}class p extends D.Disposable{constructor(g,t){super();this.prefix=g,this.options=t}provide(g,t){var i;const n=new D.DisposableStore;g.canAcceptInBackground=!!((i=this.options)===null||i===void 0?void 0:i.canAcceptInBackground),g.matchOnLabel=g.matchOnDescription=g.matchOnDetail=g.sortByLabel=!1;let l;const c=n.add(new D.MutableDisposable),r=()=>ye(this,void 0,void 0,function*(){const s=c.value=new D.DisposableStore;l==null||l.dispose(!0),g.busy=!1,l=new m.CancellationTokenSource(t);const o=l.token,a=g.value.substr(this.prefix.length).trim(),d=this._getPicks(a,s,o),u=(f,S)=>{var v;let C,_;if(w(f)?(C=f.items,_=f.active):C=f,C.length===0){if(S)return!1;a.length>0&&((v=this.options)===null||v===void 0?void 0:v.noResultsPick)&&(C=[this.options.noResultsPick])}return g.items=C,_&&(g.activeItems=[_]),!0};if(d!==null)if(b(d)){let f=!1,S=!1;yield Promise.all([(()=>ye(this,void 0,void 0,function*(){yield(0,y.timeout)(p.FAST_PICKS_RACE_DELAY),!o.isCancellationRequested&&(S||(f=u(d.picks,!0)))}))(),(()=>ye(this,void 0,void 0,function*(){g.busy=!0;try{const v=yield d.additionalPicks;if(o.isCancellationRequested)return;let C,_;w(d.picks)?(C=d.picks.items,_=d.picks.active):C=d.picks;let L,E;if(w(v)?(L=v.items,E=v.active):L=v,L.length>0||!f){let N;if(!_&&!E){const k=g.activeItems[0];k&&C.indexOf(k)!==-1&&(N=k)}u({items:[...C,...L],active:_||E||N})}}finally{o.isCancellationRequested||(g.busy=!1),S=!0}}))()])}else if(!(d instanceof Promise))u(d);else{g.busy=!0;try{const f=yield d;if(o.isCancellationRequested)return;u(f)}finally{o.isCancellationRequested||(g.busy=!1)}}});return n.add(g.onDidChangeValue(()=>r())),r(),n.add(g.onDidAccept(s=>{const[o]=g.selectedItems;typeof(o==null?void 0:o.accept)=="function"&&(s.inBackground||g.hide(),o.accept(g.keyMods,s))})),n.add(g.onDidTriggerItemButton(({button:s,item:o})=>ye(this,void 0,void 0,function*(){var a,d;if(typeof o.trigger=="function"){const u=(d=(a=o.buttons)===null||a===void 0?void 0:a.indexOf(s))!==null&&d!==void 0?d:-1;if(u>=0){const f=o.trigger(u,g.keyMods),S=typeof f=="number"?f:yield f;if(t.isCancellationRequested)return;switch(S){case I.NO_ACTION:break;case I.CLOSE_PICKER:g.hide();break;case I.REFRESH_PICKER:r();break;case I.REMOVE_ITEM:{const v=g.items.indexOf(o);if(v!==-1){const C=g.items.slice(),_=C.splice(v,1),L=g.activeItems.filter(N=>N!==_[0]),E=g.keepScrollPosition;g.keepScrollPosition=!0,g.items=C,L&&(g.activeItems=L),g.keepScrollPosition=E}break}}}}}))),n}}e.PickerQuickAccessProvider=p,p.FAST_PICKS_RACE_DELAY=200});var Gt=this&&this.__createBinding||(Object.create?function(j,e,y,m){m===void 0&&(m=y),Object.defineProperty(j,m,{enumerable:!0,get:function(){return e[y]}})}:function(j,e,y,m){m===void 0&&(m=y),j[m]=e[y]}),Zt=this&&this.__exportStar||function(j,e){for(var y in j)y!=="default"&&!Object.prototype.hasOwnProperty.call(e,y)&&Gt(e,j,y)};define(te[78],ie([1,0,9,220]),function(j,e,y,m){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IQuickInputService=void 0,Zt(m,e),e.IQuickInputService=(0,y.createDecorator)("quickInputService")}),define(te[36],ie([1,0,213,20]),function(j,e,y,m){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Registry=void 0;class D{constructor(){this.data=new Map}add(w,b){y.ok(m.isString(w)),y.ok(m.isObject(b)),y.ok(!this.data.has(w),"There is already an extension with this id"),this.data.set(w,b)}as(w){return this.data.get(w)||null}}e.Registry=new D}),define(te[200],ie([1,0,4,36]),function(j,e,y,m){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Extensions=void 0,e.Extensions={JSONContribution:"base.contributions.json"};function D(b){return b.length>0&&b.charAt(b.length-1)==="#"?b.substring(0,b.length-1):b}class I{constructor(){this._onDidChangeSchema=new y.Emitter,this.schemasById={}}registerSchema(p,h){this.schemasById[D(p)]=h,this._onDidChangeSchema.fire(p)}notifySchemaChanged(p){this._onDidChangeSchema.fire(p)}}const w=new I;m.Registry.add(e.Extensions.JSONContribution,w)}),define(te[103],ie([1,0,19,4,20,582,200,36]),function(j,e,y,m,D,I,w,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.validateProperty=e.getDefaultValue=e.overrideIdentifiersFromKey=e.OVERRIDE_PROPERTY_REGEX=e.OVERRIDE_PROPERTY_PATTERN=e.resourceLanguageSettingsSchemaId=e.resourceSettings=e.windowSettings=e.machineOverridableSettings=e.machineSettings=e.applicationSettings=e.allSettings=e.Extensions=void 0,e.Extensions={Configuration:"base.contributions.configuration"},e.allSettings={properties:{},patternProperties:{}},e.applicationSettings={properties:{},patternProperties:{}},e.machineSettings={properties:{},patternProperties:{}},e.machineOverridableSettings={properties:{},patternProperties:{}},e.windowSettings={properties:{},patternProperties:{}},e.resourceSettings={properties:{},patternProperties:{}},e.resourceLanguageSettingsSchemaId="vscode://schemas/settings/resourceLanguage";const p=b.Registry.as(w.Extensions.JSONContribution);class h{constructor(){this.overrideIdentifiers=new Set,this._onDidSchemaChange=new m.Emitter,this._onDidUpdateConfiguration=new m.Emitter,this.configurationDefaultsOverrides=new Map,this.defaultLanguageConfigurationOverridesNode={id:"defaultOverrides",title:I.localize(0,null),properties:{}},this.configurationContributors=[this.defaultLanguageConfigurationOverridesNode],this.resourceLanguageSettingsSchema={properties:{},patternProperties:{},additionalProperties:!1,errorMessage:"Unknown editor configuration setting",allowTrailingCommas:!0,allowComments:!0},this.configurationProperties={},this.excludedConfigurationProperties={},p.registerSchema(e.resourceLanguageSettingsSchemaId,this.resourceLanguageSettingsSchema),this.registerOverridePropertyPatternKey()}registerConfiguration(s,o=!0){this.registerConfigurations([s],o)}registerConfigurations(s,o=!0){const a=this.doRegisterConfigurations(s,o);p.registerSchema(e.resourceLanguageSettingsSchemaId,this.resourceLanguageSettingsSchema),this._onDidSchemaChange.fire(),this._onDidUpdateConfiguration.fire({properties:a})}registerDefaultConfigurations(s){var o;const a=[],d=[];for(const{overrides:u,source:f}of s)for(const S in u)if(a.push(S),e.OVERRIDE_PROPERTY_REGEX.test(S)){const v=Object.assign(Object.assign({},((o=this.configurationDefaultsOverrides.get(S))===null||o===void 0?void 0:o.value)||{}),u[S]);this.configurationDefaultsOverrides.set(S,{source:f,value:v});const C={type:"object",default:v,description:I.localize(1,null,S),$ref:e.resourceLanguageSettingsSchemaId,defaultDefaultValue:v,source:D.isString(f)?void 0:f};d.push(...i(S)),this.configurationProperties[S]=C,this.defaultLanguageConfigurationOverridesNode.properties[S]=C}else{this.configurationDefaultsOverrides.set(S,{value:u[S],source:f});const v=this.configurationProperties[S];v&&(this.updatePropertyDefaultValue(S,v),this.updateSchema(S,v))}this.registerOverrideIdentifiers(d),this._onDidSchemaChange.fire(),this._onDidUpdateConfiguration.fire({properties:a,defaultsOverrides:!0})}registerOverrideIdentifiers(s){for(const o of s)this.overrideIdentifiers.add(o);this.updateOverridePropertyPatternKey()}doRegisterConfigurations(s,o){const a=[];return s.forEach(d=>{a.push(...this.validateAndRegisterProperties(d,o,d.extensionInfo,d.restrictedProperties)),this.configurationContributors.push(d),this.registerJSONConfiguration(d)}),a}validateAndRegisterProperties(s,o=!0,a,d,u=3){u=D.isUndefinedOrNull(s.scope)?u:s.scope;let f=[],S=s.properties;if(S)for(let C in S){if(o&&c(C)){delete S[C];continue}const _=S[C];if(_.source=a,_.defaultDefaultValue=S[C].default,this.updatePropertyDefaultValue(C,_),e.OVERRIDE_PROPERTY_REGEX.test(C)?_.scope=void 0:(_.scope=D.isUndefinedOrNull(_.scope)?u:_.scope,_.restricted=D.isUndefinedOrNull(_.restricted)?!!(d==null?void 0:d.includes(C)):_.restricted),S[C].hasOwnProperty("included")&&!S[C].included){this.excludedConfigurationProperties[C]=S[C],delete S[C];continue}else this.configurationProperties[C]=S[C];!S[C].deprecationMessage&&S[C].markdownDeprecationMessage&&(S[C].deprecationMessage=S[C].markdownDeprecationMessage),f.push(C)}let v=s.allOf;if(v)for(let C of v)f.push(...this.validateAndRegisterProperties(C,o,a,d,u));return f}getConfigurationProperties(){return this.configurationProperties}registerJSONConfiguration(s){const o=a=>{let d=a.properties;if(d)for(const f in d)this.updateSchema(f,d[f]);let u=a.allOf;u&&u.forEach(o)};o(s)}updateSchema(s,o){switch(e.allSettings.properties[s]=o,o.scope){case 1:e.applicationSettings.properties[s]=o;break;case 2:e.machineSettings.properties[s]=o;break;case 6:e.machineOverridableSettings.properties[s]=o;break;case 3:e.windowSettings.properties[s]=o;break;case 4:e.resourceSettings.properties[s]=o;break;case 5:e.resourceSettings.properties[s]=o,this.resourceLanguageSettingsSchema.properties[s]=o;break}}updateOverridePropertyPatternKey(){for(const s of this.overrideIdentifiers.values()){const o=`[${s}]`,a={type:"object",description:I.localize(2,null),errorMessage:I.localize(3,null),$ref:e.resourceLanguageSettingsSchemaId};this.updatePropertyDefaultValue(o,a),e.allSettings.properties[o]=a,e.applicationSettings.properties[o]=a,e.machineSettings.properties[o]=a,e.machineOverridableSettings.properties[o]=a,e.windowSettings.properties[o]=a,e.resourceSettings.properties[o]=a}this._onDidSchemaChange.fire()}registerOverridePropertyPatternKey(){const s={type:"object",description:I.localize(4,null),errorMessage:I.localize(5,null),$ref:e.resourceLanguageSettingsSchemaId};e.allSettings.patternProperties[e.OVERRIDE_PROPERTY_PATTERN]=s,e.applicationSettings.patternProperties[e.OVERRIDE_PROPERTY_PATTERN]=s,e.machineSettings.patternProperties[e.OVERRIDE_PROPERTY_PATTERN]=s,e.machineOverridableSettings.patternProperties[e.OVERRIDE_PROPERTY_PATTERN]=s,e.windowSettings.patternProperties[e.OVERRIDE_PROPERTY_PATTERN]=s,e.resourceSettings.patternProperties[e.OVERRIDE_PROPERTY_PATTERN]=s,this._onDidSchemaChange.fire()}updatePropertyDefaultValue(s,o){const a=this.configurationDefaultsOverrides.get(s);let d=a==null?void 0:a.value,u=a==null?void 0:a.source;D.isUndefined(d)&&(d=o.defaultDefaultValue,u=void 0),D.isUndefined(d)&&(d=n(o.type)),o.default=d,o.defaultValueSource=u}}const g="\\[([^\\]]+)\\]",t=new RegExp(g,"g");e.OVERRIDE_PROPERTY_PATTERN=`^(${g})+$`,e.OVERRIDE_PROPERTY_REGEX=new RegExp(e.OVERRIDE_PROPERTY_PATTERN);function i(r){const s=[];if(e.OVERRIDE_PROPERTY_REGEX.test(r)){let o=t.exec(r);for(;o==null?void 0:o.length;){const a=o[1].trim();a&&s.push(a),o=t.exec(r)}}return(0,y.distinct)(s)}e.overrideIdentifiersFromKey=i;function n(r){switch(Array.isArray(r)?r[0]:r){case"boolean":return!1;case"integer":case"number":return 0;case"string":return"";case"array":return[];case"object":return{};default:return null}}e.getDefaultValue=n;const l=new h;b.Registry.add(e.Extensions.Configuration,l);function c(r){return r.trim()?e.OVERRIDE_PROPERTY_REGEX.test(r)?I.localize(7,null,r):l.getConfigurationProperties()[r]!==void 0?I.localize(8,null,r):null:I.localize(6,null)}e.validateProperty=c}),define(te[620],ie([1,0,31,145,505,103,36]),function(j,e,y,m,D,I,w){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.isDiffEditorConfigurationKey=e.isEditorConfigurationKey=e.editorConfigurationBaseNode=void 0,e.editorConfigurationBaseNode=Object.freeze({id:"editor",order:5,type:"object",title:D.localize(0,null),scope:5});const b=Object.assign(Object.assign({},e.editorConfigurationBaseNode),{properties:{"editor.tabSize":{type:"number",default:m.EDITOR_MODEL_DEFAULTS.tabSize,minimum:1,markdownDescription:D.localize(1,null)},"editor.insertSpaces":{type:"boolean",default:m.EDITOR_MODEL_DEFAULTS.insertSpaces,markdownDescription:D.localize(2,null)},"editor.detectIndentation":{type:"boolean",default:m.EDITOR_MODEL_DEFAULTS.detectIndentation,markdownDescription:D.localize(3,null)},"editor.trimAutoWhitespace":{type:"boolean",default:m.EDITOR_MODEL_DEFAULTS.trimAutoWhitespace,description:D.localize(4,null)},"editor.largeFileOptimizations":{type:"boolean",default:m.EDITOR_MODEL_DEFAULTS.largeFileOptimizations,description:D.localize(5,null)},"editor.wordBasedSuggestions":{type:"boolean",default:!0,description:D.localize(6,null)},"editor.wordBasedSuggestionsMode":{enum:["currentDocument","matchingDocuments","allDocuments"],default:"matchingDocuments",enumDescriptions:[D.localize(7,null),D.localize(8,null),D.localize(9,null)],description:D.localize(10,null)},"editor.semanticHighlighting.enabled":{enum:[!0,!1,"configuredByTheme"],enumDescriptions:[D.localize(11,null),D.localize(12,null),D.localize(13,null)],default:"configuredByTheme",description:D.localize(14,null)},"editor.stablePeek":{type:"boolean",default:!1,markdownDescription:D.localize(15,null)},"editor.maxTokenizationLineLength":{type:"integer",default:2e4,description:D.localize(16,null)},"editor.language.brackets":{type:"array",default:!1,description:D.localize(17,null),items:{type:"array",items:[{type:"string",description:D.localize(18,null)},{type:"string",description:D.localize(19,null)}]}},"editor.language.colorizedBracketPairs":{type:"array",default:!1,description:D.localize(20,null),items:{type:"array",items:[{type:"string",description:D.localize(21,null)},{type:"string",description:D.localize(22,null)}]}},"diffEditor.maxComputationTime":{type:"number",default:5e3,description:D.localize(23,null)},"diffEditor.maxFileSize":{type:"number",default:50,description:D.localize(24,null)},"diffEditor.renderSideBySide":{type:"boolean",default:!0,description:D.localize(25,null)},"diffEditor.ignoreTrimWhitespace":{type:"boolean",default:!0,description:D.localize(26,null)},"diffEditor.renderIndicators":{type:"boolean",default:!0,description:D.localize(27,null)},"diffEditor.codeLens":{type:"boolean",default:!1,description:D.localize(28,null)},"diffEditor.wordWrap":{type:"string",enum:["off","on","inherit"],default:"inherit",markdownEnumDescriptions:[D.localize(29,null),D.localize(30,null),D.localize(31,null)]}}});function p(l){return typeof l.type!="undefined"||typeof l.anyOf!="undefined"}for(const l of y.editorOptionsRegistry){const c=l.schema;if(typeof c!="undefined")if(p(c))b.properties[`editor.${l.name}`]=c;else for(const r in c)Object.hasOwnProperty.call(c,r)&&(b.properties[r]=c[r])}let h=null;function g(){return h===null&&(h=Object.create(null),Object.keys(b.properties).forEach(l=>{h[l]=!0})),h}function t(l){return g()[`editor.${l}`]||!1}e.isEditorConfigurationKey=t;function i(l){return g()[`diffEditor.${l}`]||!1}e.isDiffEditorConfigurationKey=i,w.Registry.as(I.Extensions.Configuration).registerConfiguration(b)}),define(te[79],ie([1,0,513,4,32,36,135,103]),function(j,e,y,m,D,I,w,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.PLAINTEXT_EXTENSION=e.PLAINTEXT_LANGUAGE_ID=e.ModesRegistry=e.EditorModesRegistry=e.Extensions=void 0,e.Extensions={ModesRegistry:"editor.modesRegistry"};class p{constructor(){this._onDidChangeLanguages=new m.Emitter,this.onDidChangeLanguages=this._onDidChangeLanguages.event,this._languages=[]}registerLanguage(g){return this._languages.push(g),this._onDidChangeLanguages.fire(void 0),{dispose:()=>{for(let t=0,i=this._languages.length;t<i;t++)if(this._languages[t]===g){this._languages.splice(t,1);return}}}}getLanguages(){return this._languages}}e.EditorModesRegistry=p,e.ModesRegistry=new p,I.Registry.add(e.Extensions.ModesRegistry,e.ModesRegistry),e.PLAINTEXT_LANGUAGE_ID="plaintext",e.PLAINTEXT_EXTENSION=".txt",e.ModesRegistry.registerLanguage({id:e.PLAINTEXT_LANGUAGE_ID,extensions:[e.PLAINTEXT_EXTENSION],aliases:[y.localize(0,null),"text"],mimetypes:[w.Mimes.text]}),D.LanguageConfigurationRegistry.register(e.PLAINTEXT_LANGUAGE_ID,{brackets:[["(",")"],["[","]"],["{","}"]],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:"<",close:">"},{open:'"',close:'"'},{open:"'",close:"'"},{open:"`",close:"`"}],colorizedBracketPairs:[],folding:{offSide:!0}},0),I.Registry.as(b.Extensions.Configuration).registerDefaultConfigurations([{overrides:{"[plaintext]":{"editor.unicodeHighlight.ambiguousCharacters":!1,"editor.unicodeHighlight.invisibleCharacters":!1}}}])}),define(te[621],ie([1,0,48,41,79,269]),function(j,e,y,m,D,I){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.cssEscape=e.getIconClasses=void 0;function w(h,g,t,i){const n=i===I.FileKind.ROOT_FOLDER?["rootfolder-icon"]:i===I.FileKind.FOLDER?["folder-icon"]:["file-icon"];if(t){let l;if(t.scheme===y.Schemas.data?l=m.DataUri.parseMetaData(t).get(m.DataUri.META_DATA_LABEL):l=p((0,m.basenameOrAuthority)(t).toLowerCase()),i===I.FileKind.FOLDER)n.push(`${l}-name-folder-icon`);else{if(l){if(n.push(`${l}-name-file-icon`),l.length<=255){const r=l.split(".");for(let s=1;s<r.length;s++)n.push(`${r.slice(s).join(".")}-ext-file-icon`)}n.push("ext-file-icon")}const c=b(h,g,t);c&&n.push(`${p(c)}-lang-file-icon`)}}return n}e.getIconClasses=w;function b(h,g,t){if(!t)return null;let i=null;if(t.scheme===y.Schemas.data){const l=m.DataUri.parseMetaData(t).get(m.DataUri.META_DATA_MIME);l&&(i=g.getLanguageIdByMimeType(l))}else{const n=h.getModel(t);n&&(i=n.getLanguageId())}return i&&i!==D.PLAINTEXT_LANGUAGE_ID?i:g.guessLanguageIdByFilepathOrFirstLine(t)}function p(h){return h.replace(/[\11\12\14\15\40]/g,"/")}e.cssEscape=p}),define(te[622],ie([1,0,19,13,4,2,8,422,79,103,36]),function(j,e,y,m,D,I,w,b,p,h,g){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.LanguagesRegistry=e.LanguageIdCodec=void 0;const t=Object.prototype.hasOwnProperty,i="vs.editor.nullLanguage";class n{constructor(){this._languageIdToLanguage=[],this._languageToLanguageId=new Map,this._register(i,0),this._register(p.PLAINTEXT_LANGUAGE_ID,1),this._nextLanguageId=2}_register(r,s){this._languageIdToLanguage[s]=r,this._languageToLanguageId.set(r,s)}register(r){if(this._languageToLanguageId.has(r))return;const s=this._nextLanguageId++;this._register(r,s)}encodeLanguageId(r){return this._languageToLanguageId.get(r)||0}decodeLanguageId(r){return this._languageIdToLanguage[r]||i}}e.LanguageIdCodec=n;class l extends I.Disposable{constructor(r=!0,s=!1){super();this._onDidChange=this._register(new D.Emitter),this.onDidChange=this._onDidChange.event,l.instanceCount++,this._warnOnOverwrite=s,this.languageIdCodec=new n,this._dynamicLanguages=[],this._languages={},this._mimeTypesMap={},this._nameMap={},this._lowercaseNameMap={},r&&(this._initializeFromRegistry(),this._register(p.ModesRegistry.onDidChangeLanguages(o=>{this._initializeFromRegistry()})))}dispose(){l.instanceCount--,super.dispose()}_initializeFromRegistry(){this._languages={},this._mimeTypesMap={},this._nameMap={},this._lowercaseNameMap={},(0,b.clearLanguageAssociations)();const r=[].concat(p.ModesRegistry.getLanguages()).concat(this._dynamicLanguages);this._registerLanguages(r)}_registerLanguages(r){for(const s of r)this._registerLanguage(s);this._mimeTypesMap={},this._nameMap={},this._lowercaseNameMap={},Object.keys(this._languages).forEach(s=>{const o=this._languages[s];o.name&&(this._nameMap[o.name]=o.identifier),o.aliases.forEach(a=>{this._lowercaseNameMap[a.toLowerCase()]=o.identifier}),o.mimetypes.forEach(a=>{this._mimeTypesMap[a]=o.identifier})}),g.Registry.as(h.Extensions.Configuration).registerOverrideIdentifiers(this.getRegisteredLanguageIds()),this._onDidChange.fire()}_registerLanguage(r){const s=r.id;let o;t.call(this._languages,s)?o=this._languages[s]:(this.languageIdCodec.register(s),o={identifier:s,name:null,mimetypes:[],aliases:[],extensions:[],filenames:[],configurationFiles:[],icons:[]},this._languages[s]=o),this._mergeLanguage(o,r)}_mergeLanguage(r,s){const o=s.id;let a=null;if(Array.isArray(s.mimetypes)&&s.mimetypes.length>0&&(r.mimetypes.push(...s.mimetypes),a=s.mimetypes[0]),a||(a=`text/x-${o}`,r.mimetypes.push(a)),Array.isArray(s.extensions)){s.configuration?r.extensions=s.extensions.concat(r.extensions):r.extensions=r.extensions.concat(s.extensions);for(let f of s.extensions)(0,b.registerLanguageAssociation)({id:o,mime:a,extension:f},this._warnOnOverwrite)}if(Array.isArray(s.filenames))for(let f of s.filenames)(0,b.registerLanguageAssociation)({id:o,mime:a,filename:f},this._warnOnOverwrite),r.filenames.push(f);if(Array.isArray(s.filenamePatterns))for(let f of s.filenamePatterns)(0,b.registerLanguageAssociation)({id:o,mime:a,filepattern:f},this._warnOnOverwrite);if(typeof s.firstLine=="string"&&s.firstLine.length>0){let f=s.firstLine;f.charAt(0)!=="^"&&(f="^"+f);try{const S=new RegExp(f);(0,w.regExpLeadsToEndlessLoop)(S)||(0,b.registerLanguageAssociation)({id:o,mime:a,firstline:S},this._warnOnOverwrite)}catch(S){(0,m.onUnexpectedError)(S)}}r.aliases.push(o);let d=null;if(typeof s.aliases!="undefined"&&Array.isArray(s.aliases)&&(s.aliases.length===0?d=[null]:d=s.aliases),d!==null)for(const f of d)!f||f.length===0||r.aliases.push(f);const u=d!==null&&d.length>0;if(!(u&&d[0]===null)){const f=(u?d[0]:null)||o;(u||!r.name)&&(r.name=f)}s.configuration&&r.configurationFiles.push(s.configuration),s.icon&&r.icons.push(s.icon)}isRegisteredLanguageId(r){return r?t.call(this._languages,r):!1}getRegisteredLanguageIds(){return Object.keys(this._languages)}getLanguageIdByLanguageName(r){const s=r.toLowerCase();return t.call(this._lowercaseNameMap,s)?this._lowercaseNameMap[s]:null}getLanguageIdByMimeType(r){return r&&t.call(this._mimeTypesMap,r)?this._mimeTypesMap[r]:null}guessLanguageIdByFilepathOrFirstLine(r,s){if(!r&&!s)return[];const o=(0,b.getMimeTypes)(r,s);return(0,y.coalesce)(o.map(a=>this.getLanguageIdByMimeType(a)))}}e.LanguagesRegistry=l,l.instanceCount=0}),define(te[623],ie([1,0,4,2,622,19,18,79]),function(j,e,y,m,D,I,w,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.LanguageService=void 0;class p extends m.Disposable{constructor(t=!1){super();this._onDidEncounterLanguage=this._register(new y.Emitter),this.onDidEncounterLanguage=this._onDidEncounterLanguage.event,this._onDidChange=this._register(new y.Emitter({leakWarningThreshold:200})),this.onDidChange=this._onDidChange.event,p.instanceCount++,this._encounteredLanguages=new Set,this._registry=this._register(new D.LanguagesRegistry(!0,t)),this.languageIdCodec=this._registry.languageIdCodec,this._register(this._registry.onDidChange(()=>this._onDidChange.fire()))}dispose(){p.instanceCount--,super.dispose()}isRegisteredLanguageId(t){return this._registry.isRegisteredLanguageId(t)}getLanguageIdByLanguageName(t){return this._registry.getLanguageIdByLanguageName(t)}getLanguageIdByMimeType(t){return this._registry.getLanguageIdByMimeType(t)}guessLanguageIdByFilepathOrFirstLine(t,i){const n=this._registry.guessLanguageIdByFilepathOrFirstLine(t,i);return(0,I.firstOrDefault)(n,null)}createById(t){return new h(this.onDidChange,()=>this._createAndGetLanguageIdentifier(t))}createByFilepathOrFirstLine(t,i){return new h(this.onDidChange,()=>{const n=this.guessLanguageIdByFilepathOrFirstLine(t,i);return this._createAndGetLanguageIdentifier(n)})}_createAndGetLanguageIdentifier(t){return(!t||!this.isRegisteredLanguageId(t))&&(t=b.PLAINTEXT_LANGUAGE_ID),this._encounteredLanguages.has(t)||(this._encounteredLanguages.add(t),w.TokenizationRegistry.getOrCreate(t),this._onDidEncounterLanguage.fire(t)),t}}e.LanguageService=p,p.instanceCount=0;class h{constructor(t,i){this._onDidChangeLanguages=t,this._selector=i,this._listener=null,this._emitter=null,this.languageId=this._selector()}_dispose(){this._listener&&(this._listener.dispose(),this._listener=null),this._emitter&&(this._emitter.dispose(),this._emitter=null)}get onDidChange(){return this._listener||(this._listener=this._onDidChangeLanguages(()=>this._evaluate())),this._emitter||(this._emitter=new y.Emitter({onLastListenerRemove:()=>{this._dispose()}})),this._emitter.event}_evaluate(){const t=this._selector();t!==this.languageId&&(this.languageId=t,this._emitter&&this._emitter.fire(this.languageId))}}}),define(te[104],ie([1,0,324,51,35,13,249,4,2,62,79]),function(j,e,y,m,D,I,w,b,p,h,g){"use strict";var t;Object.defineProperty(e,"__esModule",{value:!0}),e.MarkdownRenderer=void 0;let i=class Si{constructor(l,c,r){this._options=l,this._languageService=c,this._openerService=r,this._onDidRenderAsync=new b.Emitter,this.onDidRenderAsync=this._onDidRenderAsync.event}dispose(){this._onDidRenderAsync.dispose()}render(l,c,r){if(!l)return{element:document.createElement("span"),dispose:()=>{}};const s=new p.DisposableStore;return{element:s.add((0,y.renderMarkdown)(l,Object.assign(Object.assign({},this._getRenderOptions(l,s)),c),r)).element,dispose:()=>s.dispose()}}_getRenderOptions(l,c){return{baseUrl:this._options.baseUrl,codeBlockRenderer:(r,s)=>ye(this,void 0,void 0,function*(){var o,a,d;let u;r?u=this._languageService.getLanguageIdByLanguageName(r):this._options.editor&&(u=(o=this._options.editor.getModel())===null||o===void 0?void 0:o.getLanguageId()),u||(u=g.PLAINTEXT_LANGUAGE_ID);const f=yield(0,w.tokenizeToString)(this._languageService,s,u),S=document.createElement("span");if(S.innerHTML=(d=(a=Si._ttpTokenizer)===null||a===void 0?void 0:a.createHTML(f))!==null&&d!==void 0?d:f,this._options.editor){const v=this._options.editor.getOption(44);(0,h.applyFontInfo)(S,v)}else this._options.codeBlockFontFamily&&(S.style.fontFamily=this._options.codeBlockFontFamily);return S}),asyncRenderCallback:()=>this._onDidRenderAsync.fire(),actionHandler:{callback:r=>this._openerService.open(r,{fromUserGesture:!0,allowContributedOpeners:!0,allowCommands:l.isTrusted}).catch(I.onUnexpectedError),disposables:c}}}};i._ttpTokenizer=(t=window.trustedTypes)===null||t===void 0?void 0:t.createPolicy("tokenizeToString",{createHTML(n){return n}}),i=Ie([Ce(1,D.ILanguageService),Ce(2,m.IOpenerService)],i),e.MarkdownRenderer=i}),define(te[624],ie([1,0,7,19,66,2,104,257,51,227]),function(j,e,y,m,D,I,w,b,p,h){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MarginHoverWidget=void 0;const g=y.$;class t extends I.Disposable{constructor(l,c,r=p.NullOpenerService){super();this._renderDisposeables=this._register(new I.DisposableStore),this._editor=l,this._isVisible=!1,this._messages=[],this._hover=this._register(new h.HoverWidget),this._hover.containerDomNode.classList.toggle("hidden",!this._isVisible),this._markdownRenderer=this._register(new w.MarkdownRenderer({editor:this._editor},c,r)),this._computer=new i(this._editor),this._hoverOperation=this._register(new b.HoverOperation(this._editor,this._computer)),this._register(this._hoverOperation.onResult(s=>{this._withResult(s.value)})),this._register(this._editor.onDidChangeModelDecorations(()=>this._onModelDecorationsChanged())),this._register(this._editor.onDidChangeConfiguration(s=>{s.hasChanged(44)&&this._updateFont()})),this._editor.addOverlayWidget(this)}dispose(){this._editor.removeOverlayWidget(this),super.dispose()}getId(){return t.ID}getDomNode(){return this._hover.containerDomNode}getPosition(){return null}_updateFont(){Array.prototype.slice.call(this._hover.contentsDomNode.getElementsByClassName("code")).forEach(c=>this._editor.applyFontInfo(c))}_onModelDecorationsChanged(){this._isVisible&&(this._hoverOperation.cancel(),this._hoverOperation.start(0))}startShowingAt(l){this._computer.lineNumber!==l&&(this._hoverOperation.cancel(),this.hide(),this._computer.lineNumber=l,this._hoverOperation.start(0))}hide(){this._computer.lineNumber=-1,this._hoverOperation.cancel(),!!this._isVisible&&(this._isVisible=!1,this._hover.containerDomNode.classList.toggle("hidden",!this._isVisible))}_withResult(l){this._messages=l,this._messages.length>0?this._renderMessages(this._computer.lineNumber,this._messages):this.hide()}_renderMessages(l,c){this._renderDisposeables.clear();const r=document.createDocumentFragment();for(const s of c){const o=g("div.hover-row.markdown-hover"),a=y.append(o,g("div.hover-contents")),d=this._renderDisposeables.add(this._markdownRenderer.render(s.value));a.appendChild(d.element),r.appendChild(o)}this._updateContents(r),this._showAt(l)}_updateContents(l){this._hover.contentsDomNode.textContent="",this._hover.contentsDomNode.appendChild(l),this._updateFont()}_showAt(l){this._isVisible||(this._isVisible=!0,this._hover.containerDomNode.classList.toggle("hidden",!this._isVisible));const c=this._editor.getLayoutInfo(),r=this._editor.getTopForLineNumber(l),s=this._editor.getScrollTop(),o=this._editor.getOption(59),a=this._hover.containerDomNode.clientHeight,d=r-s-(a-o)/2;this._hover.containerDomNode.style.left=`${c.glyphMarginLeft+c.glyphMarginWidth}px`,this._hover.containerDomNode.style.top=`${Math.max(Math.round(d),0)}px`}}e.MarginHoverWidget=t,t.ID="editor.contrib.modesGlyphHoverWidget";class i{constructor(l){this._editor=l,this._lineNumber=-1}get lineNumber(){return this._lineNumber}set lineNumber(l){this._lineNumber=l}computeSync(){const l=s=>({value:s}),c=this._editor.getLineDecorations(this._lineNumber),r=[];if(!c)return r;for(const s of c){if(!s.options.glyphMarginClassName)continue;const o=s.options.glyphMarginHoverMessage;!o||(0,D.isEmptyMarkdownString)(o)||r.push(...(0,m.asArray)(o).map(l))}return r}}}),define(te[277],ie([1,0,34,7,67,27,4,66,2,104,31,261,571,9]),function(j,e,y,m,D,I,w,b,p,h,g,t,i,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SuggestDetailsOverlay=e.SuggestDetailsWidget=e.canExpandCompletionItem=void 0;function l(s){return!!s&&Boolean(s.completion.documentation||s.completion.detail&&s.completion.detail!==s.completion.label)}e.canExpandCompletionItem=l;let c=class{constructor(o,a){this._editor=o,this._onDidClose=new w.Emitter,this.onDidClose=this._onDidClose.event,this._onDidChangeContents=new w.Emitter,this.onDidChangeContents=this._onDidChangeContents.event,this._disposables=new p.DisposableStore,this._renderDisposeable=new p.DisposableStore,this._borderWidth=1,this._size=new m.Dimension(330,0),this.domNode=m.$(".suggest-details"),this.domNode.classList.add("no-docs"),this._markdownRenderer=a.createInstance(h.MarkdownRenderer,{editor:o}),this._body=m.$(".body"),this._scrollbar=new D.DomScrollableElement(this._body,{}),m.append(this.domNode,this._scrollbar.getDomNode()),this._disposables.add(this._scrollbar),this._header=m.append(this._body,m.$(".header")),this._close=m.append(this._header,m.$("span"+I.Codicon.close.cssSelector)),this._close.title=i.localize(0,null),this._type=m.append(this._header,m.$("p.type")),this._docs=m.append(this._body,m.$("p.docs")),this._configureFont(),this._disposables.add(this._editor.onDidChangeConfiguration(d=>{d.hasChanged(44)&&this._configureFont()}))}dispose(){this._disposables.dispose(),this._renderDisposeable.dispose()}_configureFont(){const o=this._editor.getOptions(),a=o.get(44),d=a.getMassagedFontFamily(y.isSafari?g.EDITOR_FONT_DEFAULTS.fontFamily:null),u=o.get(107)||a.fontSize,f=o.get(108)||a.lineHeight,S=a.fontWeight,v=`${u}px`,C=`${f}px`;this.domNode.style.fontSize=v,this.domNode.style.lineHeight=`${f/u}`,this.domNode.style.fontWeight=S,this.domNode.style.fontFeatureSettings=a.fontFeatureSettings,this._type.style.fontFamily=d,this._close.style.height=C,this._close.style.width=C}getLayoutInfo(){const o=this._editor.getOption(108)||this._editor.getOption(44).lineHeight,a=this._borderWidth,d=a*2;return{lineHeight:o,borderWidth:a,borderHeight:d,verticalPadding:22,horizontalPadding:14}}renderLoading(){this._type.textContent=i.localize(1,null),this._docs.textContent="",this.domNode.classList.remove("no-docs","no-type"),this.layout(this.size.width,this.getLayoutInfo().lineHeight*2),this._onDidChangeContents.fire(this)}renderItem(o,a){var d,u;this._renderDisposeable.clear();let{detail:f,documentation:S}=o.completion;if(a){let v="";v+=`score: ${o.score[0]}
|
||
`,v+=`prefix: ${(d=o.word)!==null&&d!==void 0?d:"(no prefix)"}
|
||
`,v+=`word: ${o.completion.filterText?o.completion.filterText+" (filterText)":o.textLabel}
|
||
`,v+=`distance: ${o.distance} (localityBonus-setting)
|
||
`,v+=`index: ${o.idx}, based on ${o.completion.sortText&&`sortText: "${o.completion.sortText}"`||"label"}
|
||
`,v+=`commit_chars: ${(u=o.completion.commitCharacters)===null||u===void 0?void 0:u.join("")}
|
||
`,S=new b.MarkdownString().appendCodeblock("empty",v),f=`Provider: ${o.provider._debugDisplayName}`}if(!a&&!l(o)){this.clearContents();return}if(this.domNode.classList.remove("no-docs","no-type"),f){const v=f.length>1e5?`${f.substr(0,1e5)}\u2026`:f;this._type.textContent=v,this._type.title=v,m.show(this._type),this._type.classList.toggle("auto-wrap",!/\r?\n^\s+/gmi.test(v))}else m.clearNode(this._type),this._type.title="",m.hide(this._type),this.domNode.classList.add("no-type");if(m.clearNode(this._docs),typeof S=="string")this._docs.classList.remove("markdown-docs"),this._docs.textContent=S;else if(S){this._docs.classList.add("markdown-docs"),m.clearNode(this._docs);const v=this._markdownRenderer.render(S);this._docs.appendChild(v.element),this._renderDisposeable.add(v),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=v=>{v.preventDefault(),v.stopPropagation()},this._close.onclick=v=>{v.preventDefault(),v.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 size(){return this._size}layout(o,a){const d=new m.Dimension(o,a);m.Dimension.equals(d,this._size)||(this._size=d,m.size(this.domNode,o,a)),this._scrollbar.scanDomNode()}scrollDown(o=8){this._body.scrollTop+=o}scrollUp(o=8){this._body.scrollTop-=o}scrollTop(){this._body.scrollTop=0}scrollBottom(){this._body.scrollTop=this._body.scrollHeight}pageDown(){this.scrollDown(80)}pageUp(){this.scrollUp(80)}set borderWidth(o){this._borderWidth=o}get borderWidth(){return this._borderWidth}};c=Ie([Ce(1,n.IInstantiationService)],c),e.SuggestDetailsWidget=c;class r{constructor(o,a){this.widget=o,this._editor=a,this._disposables=new p.DisposableStore,this._added=!1,this._preferAlignAtTop=!0,this._resizable=new t.ResizableHTMLElement,this._resizable.domNode.classList.add("suggest-details-container"),this._resizable.domNode.appendChild(o.domNode),this._resizable.enableSashes(!1,!0,!0,!1);let d,u,f=0,S=0;this._disposables.add(this._resizable.onDidWillResize(()=>{d=this._topLeft,u=this._resizable.size})),this._disposables.add(this._resizable.onDidResize(v=>{if(d&&u){this.widget.layout(v.dimension.width,v.dimension.height);let C=!1;v.west&&(S=u.width-v.dimension.width,C=!0),v.north&&(f=u.height-v.dimension.height,C=!0),C&&this._applyTopLeft({top:d.top+f,left:d.left+S})}v.done&&(d=void 0,u=void 0,f=0,S=0,this._userSize=v.dimension)})),this._disposables.add(this.widget.onDidChangeContents(()=>{var v;this._anchorBox&&this._placeAtAnchor(this._anchorBox,(v=this._userSize)!==null&&v!==void 0?v: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 null}show(){this._added||(this._editor.addOverlayWidget(this),this.getDomNode().style.position="fixed",this._added=!0)}hide(o=!1){this._resizable.clearSashHoverState(),this._added&&(this._editor.removeOverlayWidget(this),this._added=!1,this._anchorBox=void 0,this._topLeft=void 0),o&&(this._userSize=void 0,this.widget.clearContents())}placeAtAnchor(o,a){var d;const u=o.getBoundingClientRect();this._anchorBox=u,this._preferAlignAtTop=a,this._placeAtAnchor(this._anchorBox,(d=this._userSize)!==null&&d!==void 0?d:this.widget.size,a)}_placeAtAnchor(o,a,d){var u;const f=m.getClientArea(document.body),S=this.widget.getLayoutInfo(),v=new m.Dimension(220,2*S.lineHeight),C=o.top,_=function(){const P=f.width-(o.left+o.width+S.borderWidth+S.horizontalPadding),F=-S.borderWidth+o.left+o.width,W=new m.Dimension(P,f.height-o.top-S.borderHeight-S.verticalPadding),A=W.with(void 0,o.top+o.height-S.borderHeight-S.verticalPadding);return{top:C,left:F,fit:P-a.width,maxSizeTop:W,maxSizeBottom:A,minSize:v.with(Math.min(P,v.width))}}(),L=function(){const P=o.left-S.borderWidth-S.horizontalPadding,F=Math.max(S.horizontalPadding,o.left-a.width-S.borderWidth),W=new m.Dimension(P,f.height-o.top-S.borderHeight-S.verticalPadding),A=W.with(void 0,o.top+o.height-S.borderHeight-S.verticalPadding);return{top:C,left:F,fit:P-a.width,maxSizeTop:W,maxSizeBottom:A,minSize:v.with(Math.min(P,v.width))}}(),E=function(){const P=o.left,F=-S.borderWidth+o.top+o.height,W=new m.Dimension(o.width-S.borderHeight,f.height-o.top-o.height-S.verticalPadding);return{top:F,left:P,fit:W.height-a.height,maxSizeBottom:W,maxSizeTop:W,minSize:v.with(W.width)}}(),N=[_,L,E],k=(u=N.find(P=>P.fit>=0))!==null&&u!==void 0?u:N.sort((P,F)=>F.fit-P.fit)[0],M=o.top+o.height-S.borderHeight;let O,B=a.height;const T=Math.max(k.maxSizeTop.height,k.maxSizeBottom.height);B>T&&(B=T);let R;d?B<=k.maxSizeTop.height?(O=!0,R=k.maxSizeTop):(O=!1,R=k.maxSizeBottom):B<=k.maxSizeBottom.height?(O=!1,R=k.maxSizeBottom):(O=!0,R=k.maxSizeTop),this._applyTopLeft({left:k.left,top:O?k.top:M-B}),this.getDomNode().style.position="fixed",this._resizable.enableSashes(!O,k===_,O,k!==_),this._resizable.minSize=k.minSize,this._resizable.maxSize=R,this._resizable.layout(B,Math.min(R.width,a.width)),this.widget.layout(this._resizable.size.width,this._resizable.size.height)}_applyTopLeft(o){this._topLeft=o,this.getDomNode().style.left=`${this._topLeft.left}px`,this.getDomNode().style.top=`${this._topLeft.top}px`}}e.SuggestDetailsOverlay=r}),define(te[625],ie([1,0,19,47,39,20,25,40,103,36]),function(j,e,y,m,D,I,w,b,p,h){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ConfigurationChangeEvent=e.Configuration=e.DefaultConfigurationModel=e.ConfigurationModel=void 0;class g{constructor(c={},r=[],s=[]){this._contents=c,this._keys=r,this._overrides=s,this.isFrozen=!1,this.overrideConfigurations=new Map}get contents(){return this.checkAndFreeze(this._contents)}get overrides(){return this.checkAndFreeze(this._overrides)}get keys(){return this.checkAndFreeze(this._keys)}isEmpty(){return this._keys.length===0&&Object.keys(this._contents).length===0&&this._overrides.length===0}getValue(c){return c?(0,b.getConfigurationValue)(this.contents,c):this.contents}getOverrideValue(c,r){const s=this.getContentsForOverrideIdentifer(r);return s?c?(0,b.getConfigurationValue)(s,c):s:void 0}override(c){let r=this.overrideConfigurations.get(c);return r||(r=this.createOverrideConfigurationModel(c),this.overrideConfigurations.set(c,r)),r}merge(...c){const r=D.deepClone(this.contents),s=D.deepClone(this.overrides),o=[...this.keys];for(const a of c){this.mergeContents(r,a.contents);for(const d of a.overrides){const[u]=s.filter(f=>y.equals(f.identifiers,d.identifiers));u?(this.mergeContents(u.contents,d.contents),u.keys.push(...d.keys),u.keys=y.distinct(u.keys)):s.push(D.deepClone(d))}for(const d of a.keys)o.indexOf(d)===-1&&o.push(d)}return new g(r,o,s)}freeze(){return this.isFrozen=!0,this}createOverrideConfigurationModel(c){const r=this.getContentsForOverrideIdentifer(c);if(!r||typeof r!="object"||!Object.keys(r).length)return this;let s={};for(const o of y.distinct([...Object.keys(this.contents),...Object.keys(r)])){let a=this.contents[o],d=r[o];d&&(typeof a=="object"&&typeof d=="object"?(a=D.deepClone(a),this.mergeContents(a,d)):a=d),s[o]=a}return new g(s,this.keys,this.overrides)}mergeContents(c,r){for(const s of Object.keys(r)){if(s in c&&I.isObject(c[s])&&I.isObject(r[s])){this.mergeContents(c[s],r[s]);continue}c[s]=D.deepClone(r[s])}}checkAndFreeze(c){return this.isFrozen&&!Object.isFrozen(c)?D.deepFreeze(c):c}getContentsForOverrideIdentifer(c){let r=null,s=null;const o=a=>{a&&(s?this.mergeContents(s,a):s=D.deepClone(a))};for(const a of this.overrides)y.equals(a.identifiers,[c])?r=a.contents:a.identifiers.includes(c)&&o(a.contents);return o(r),s}toJSON(){return{contents:this.contents,overrides:this.overrides,keys:this.keys}}setValue(c,r){this.addKey(c),(0,b.addToValueTree)(this.contents,c,r,s=>{throw new Error(s)})}removeValue(c){this.removeKey(c)&&(0,b.removeFromValueTree)(this.contents,c)}addKey(c){let r=this.keys.length;for(let s=0;s<r;s++)c.indexOf(this.keys[s])===0&&(r=s);this.keys.splice(r,1,c)}removeKey(c){let r=this.keys.indexOf(c);return r!==-1?(this.keys.splice(r,1),!0):!1}}e.ConfigurationModel=g;class t extends g{constructor(c={}){const r=h.Registry.as(p.Extensions.Configuration).getConfigurationProperties(),s=Object.keys(r),o=Object.create(null),a=[];for(const d in r){const u=c[d],f=u!==void 0?u:r[d].default;(0,b.addToValueTree)(o,d,f,S=>console.error(`Conflict in default settings: ${S}`))}for(const d of Object.keys(o))p.OVERRIDE_PROPERTY_REGEX.test(d)&&a.push({identifiers:(0,p.overrideIdentifiersFromKey)(d),keys:Object.keys(o[d]),contents:(0,b.toValuesTree)(o[d],u=>console.error(`Conflict in default settings file: ${u}`))});super(o,s,a)}}e.DefaultConfigurationModel=t;class i{constructor(c,r,s=new g,o=new g,a=new m.ResourceMap,d=new g,u=new m.ResourceMap,f=!0){this._defaultConfiguration=c,this._localUserConfiguration=r,this._remoteUserConfiguration=s,this._workspaceConfiguration=o,this._folderConfigurations=a,this._memoryConfiguration=d,this._memoryConfigurationByResource=u,this._freeze=f,this._workspaceConsolidatedConfiguration=null,this._foldersConsolidatedConfigurations=new m.ResourceMap,this._userConfiguration=null}getValue(c,r,s){return this.getConsolidateConfigurationModel(r,s).getValue(c)}updateValue(c,r,s={}){let o;s.resource?(o=this._memoryConfigurationByResource.get(s.resource),o||(o=new g,this._memoryConfigurationByResource.set(s.resource,o))):o=this._memoryConfiguration,r===void 0?o.removeValue(c):o.setValue(c,r),s.resource||(this._workspaceConsolidatedConfiguration=null)}inspect(c,r,s){const o=this.getConsolidateConfigurationModel(r,s),a=this.getFolderConfigurationModelForResource(r.resource,s),d=r.resource?this._memoryConfigurationByResource.get(r.resource)||this._memoryConfiguration:this._memoryConfiguration,u=r.overrideIdentifier?this._defaultConfiguration.freeze().override(r.overrideIdentifier).getValue(c):this._defaultConfiguration.freeze().getValue(c),f=r.overrideIdentifier?this.userConfiguration.freeze().override(r.overrideIdentifier).getValue(c):this.userConfiguration.freeze().getValue(c),S=r.overrideIdentifier?this.localUserConfiguration.freeze().override(r.overrideIdentifier).getValue(c):this.localUserConfiguration.freeze().getValue(c),v=r.overrideIdentifier?this.remoteUserConfiguration.freeze().override(r.overrideIdentifier).getValue(c):this.remoteUserConfiguration.freeze().getValue(c),C=s?r.overrideIdentifier?this._workspaceConfiguration.freeze().override(r.overrideIdentifier).getValue(c):this._workspaceConfiguration.freeze().getValue(c):void 0,_=a?r.overrideIdentifier?a.freeze().override(r.overrideIdentifier).getValue(c):a.freeze().getValue(c):void 0,L=r.overrideIdentifier?d.override(r.overrideIdentifier).getValue(c):d.getValue(c),E=o.getValue(c),N=y.distinct(y.flatten(o.overrides.map(k=>k.identifiers))).filter(k=>o.getOverrideValue(c,k)!==void 0);return{defaultValue:u,userValue:f,userLocalValue:S,userRemoteValue:v,workspaceValue:C,workspaceFolderValue:_,memoryValue:L,value:E,default:u!==void 0?{value:this._defaultConfiguration.freeze().getValue(c),override:r.overrideIdentifier?this._defaultConfiguration.freeze().getOverrideValue(c,r.overrideIdentifier):void 0}:void 0,user:f!==void 0?{value:this.userConfiguration.freeze().getValue(c),override:r.overrideIdentifier?this.userConfiguration.freeze().getOverrideValue(c,r.overrideIdentifier):void 0}:void 0,userLocal:S!==void 0?{value:this.localUserConfiguration.freeze().getValue(c),override:r.overrideIdentifier?this.localUserConfiguration.freeze().getOverrideValue(c,r.overrideIdentifier):void 0}:void 0,userRemote:v!==void 0?{value:this.remoteUserConfiguration.freeze().getValue(c),override:r.overrideIdentifier?this.remoteUserConfiguration.freeze().getOverrideValue(c,r.overrideIdentifier):void 0}:void 0,workspace:C!==void 0?{value:this._workspaceConfiguration.freeze().getValue(c),override:r.overrideIdentifier?this._workspaceConfiguration.freeze().getOverrideValue(c,r.overrideIdentifier):void 0}:void 0,workspaceFolder:_!==void 0?{value:a==null?void 0:a.freeze().getValue(c),override:r.overrideIdentifier?a==null?void 0:a.freeze().getOverrideValue(c,r.overrideIdentifier):void 0}:void 0,memory:L!==void 0?{value:d.getValue(c),override:r.overrideIdentifier?d.getOverrideValue(c,r.overrideIdentifier):void 0}:void 0,overrideIdentifiers:N.length?N:void 0}}get userConfiguration(){return this._userConfiguration||(this._userConfiguration=this._remoteUserConfiguration.isEmpty()?this._localUserConfiguration:this._localUserConfiguration.merge(this._remoteUserConfiguration),this._freeze&&this._userConfiguration.freeze()),this._userConfiguration}get localUserConfiguration(){return this._localUserConfiguration}get remoteUserConfiguration(){return this._remoteUserConfiguration}getConsolidateConfigurationModel(c,r){let s=this.getConsolidatedConfigurationModelForResource(c,r);return c.overrideIdentifier?s.override(c.overrideIdentifier):s}getConsolidatedConfigurationModelForResource({resource:c},r){let s=this.getWorkspaceConsolidatedConfiguration();if(r&&c){const o=r.getFolder(c);o&&(s=this.getFolderConsolidatedConfiguration(o.uri)||s);const a=this._memoryConfigurationByResource.get(c);a&&(s=s.merge(a))}return s}getWorkspaceConsolidatedConfiguration(){return this._workspaceConsolidatedConfiguration||(this._workspaceConsolidatedConfiguration=this._defaultConfiguration.merge(this.userConfiguration,this._workspaceConfiguration,this._memoryConfiguration),this._freeze&&(this._workspaceConfiguration=this._workspaceConfiguration.freeze())),this._workspaceConsolidatedConfiguration}getFolderConsolidatedConfiguration(c){let r=this._foldersConsolidatedConfigurations.get(c);if(!r){const s=this.getWorkspaceConsolidatedConfiguration(),o=this._folderConfigurations.get(c);o?(r=s.merge(o),this._freeze&&(r=r.freeze()),this._foldersConsolidatedConfigurations.set(c,r)):r=s}return r}getFolderConfigurationModelForResource(c,r){if(r&&c){const s=r.getFolder(c);if(s)return this._folderConfigurations.get(s.uri)}}toData(){return{defaults:{contents:this._defaultConfiguration.contents,overrides:this._defaultConfiguration.overrides,keys:this._defaultConfiguration.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((c,r)=>{const{contents:s,overrides:o,keys:a}=this._folderConfigurations.get(r);return c.push([r,{contents:s,overrides:o,keys:a}]),c},[])}}static parse(c){const r=this.parseConfigurationModel(c.defaults),s=this.parseConfigurationModel(c.user),o=this.parseConfigurationModel(c.workspace),a=c.folders.reduce((d,u)=>(d.set(w.URI.revive(u[0]),this.parseConfigurationModel(u[1])),d),new m.ResourceMap);return new i(r,s,new g,o,a,new g,new m.ResourceMap,!1)}static parseConfigurationModel(c){return new g(c.contents,c.keys,c.overrides).freeze()}}e.Configuration=i;class n{constructor(c,r,s,o){this.change=c,this.previous=r,this.currentConfiguraiton=s,this.currentWorkspace=o,this._previousConfiguration=void 0;const a=new Set;c.keys.forEach(u=>a.add(u)),c.overrides.forEach(([,u])=>u.forEach(f=>a.add(f))),this.affectedKeys=[...a.values()];const d=new g;this.affectedKeys.forEach(u=>d.setValue(u,{})),this.affectedKeysTree=d.contents}get previousConfiguration(){return!this._previousConfiguration&&this.previous&&(this._previousConfiguration=i.parse(this.previous.data)),this._previousConfiguration}affectsConfiguration(c,r){var s;if(this.doesAffectedKeysTreeContains(this.affectedKeysTree,c)){if(r){const o=this.previousConfiguration?this.previousConfiguration.getValue(c,r,(s=this.previous)===null||s===void 0?void 0:s.workspace):void 0,a=this.currentConfiguraiton.getValue(c,r,this.currentWorkspace);return!D.equals(o,a)}return!0}return!1}doesAffectedKeysTreeContains(c,r){let s=(0,b.toValuesTree)({[r]:!0},()=>{}),o;for(;typeof s=="object"&&(o=Object.keys(s)[0]);){if(c=c[o],!c)return!1;s=s[o]}return!0}}e.ConfigurationChangeEvent=n}),define(te[86],ie([1,0,94,17,26,36]),function(j,e,y,m,D,I){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Extensions=e.KeybindingsRegistry=void 0;class w{constructor(){this._coreKeybindings=[],this._extensionKeybindings=[],this._cachedMergedKeybindings=null}static bindToCurrentPlatform(h){if(m.OS===1){if(h&&h.win)return h.win}else if(m.OS===2){if(h&&h.mac)return h.mac}else if(h&&h.linux)return h.linux;return h}registerKeybindingRule(h){const g=w.bindToCurrentPlatform(h);if(g&&g.primary){const t=(0,y.createKeybinding)(g.primary,m.OS);t&&this._registerDefaultKeybinding(t,h.id,h.args,h.weight,0,h.when)}if(g&&Array.isArray(g.secondary))for(let t=0,i=g.secondary.length;t<i;t++){const n=g.secondary[t],l=(0,y.createKeybinding)(n,m.OS);l&&this._registerDefaultKeybinding(l,h.id,h.args,h.weight,-t-1,h.when)}}registerCommandAndKeybindingRule(h){this.registerKeybindingRule(h),D.CommandsRegistry.registerCommand(h)}static _mightProduceChar(h){return h>=21&&h<=30||h>=31&&h<=56?!0:h===80||h===81||h===82||h===83||h===84||h===85||h===86||h===110||h===111||h===87||h===88||h===89||h===90||h===91||h===92}_assertNoCtrlAlt(h,g){h.ctrlKey&&h.altKey&&!h.metaKey&&w._mightProduceChar(h.keyCode)&&console.warn("Ctrl+Alt+ keybindings should not be used by default under Windows. Offender: ",h," for ",g)}_registerDefaultKeybinding(h,g,t,i,n,l){m.OS===1&&this._assertNoCtrlAlt(h.parts[0],g),this._coreKeybindings.push({keybinding:h.parts,command:g,commandArgs:t,when:l,weight1:i,weight2:n,extensionId:null,isBuiltinExtension:!1}),this._cachedMergedKeybindings=null}getDefaultKeybindings(){return this._cachedMergedKeybindings||(this._cachedMergedKeybindings=[].concat(this._coreKeybindings).concat(this._extensionKeybindings),this._cachedMergedKeybindings.sort(b)),this._cachedMergedKeybindings.slice(0)}}e.KeybindingsRegistry=new w,e.Extensions={EditorModes:"platform.keybindingsRegistry"},I.Registry.add(e.Extensions.EditorModes,e.KeybindingsRegistry);function b(p,h){return p.weight1!==h.weight1?p.weight1-h.weight1:p.command<h.command?-1:p.command>h.command?1:p.weight2-h.weight2}}),define(te[626],ie([1,0,485,486,16,86]),function(j,e,y,m,D,I){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ContextScopedReplaceInput=e.ContextScopedFindInput=e.createAndBindHistoryNavigationWidgetScopedContextKeyService=e.HistoryNavigationWidgetContext=void 0;const w="suggestWidgetVisible";e.HistoryNavigationWidgetContext="historyNavigationWidget";const b="historyNavigationForwardsEnabled",p="historyNavigationBackwardsEnabled";function h(c,r,s){new D.RawContextKey(s,r).bindTo(c)}function g(c,r){return c.createScoped(r.target)}function t(c,r){return c.getContext(document.activeElement).getValue(r)}function i(c,r){const s=g(c,r);h(s,r,e.HistoryNavigationWidgetContext);const o=new D.RawContextKey(b,!0).bindTo(s),a=new D.RawContextKey(p,!0).bindTo(s);return{scopedContextKeyService:s,historyNavigationForwardsEnablement:o,historyNavigationBackwardsEnablement:a}}e.createAndBindHistoryNavigationWidgetScopedContextKeyService=i;let n=class extends y.FindInput{constructor(r,s,o,a,d=!1){super(r,s,d,o);this._register(i(a,{target:this.inputBox.element,historyNavigator:this.inputBox}).scopedContextKeyService)}};n=Ie([Ce(3,D.IContextKeyService)],n),e.ContextScopedFindInput=n;let l=class extends m.ReplaceInput{constructor(r,s,o,a,d=!1){super(r,s,d,o);this._register(i(a,{target:this.inputBox.element,historyNavigator:this.inputBox}).scopedContextKeyService)}};l=Ie([Ce(3,D.IContextKeyService)],l),e.ContextScopedReplaceInput=l,I.KeybindingsRegistry.registerCommandAndKeybindingRule({id:"history.showPrevious",weight:200,when:D.ContextKeyExpr.and(D.ContextKeyExpr.has(e.HistoryNavigationWidgetContext),D.ContextKeyExpr.equals(p,!0),D.ContextKeyExpr.equals(w,!1)),primary:16,secondary:[512|16],handler:c=>{const r=t(c.get(D.IContextKeyService),e.HistoryNavigationWidgetContext);r&&r.historyNavigator.showPreviousValue()}}),I.KeybindingsRegistry.registerCommandAndKeybindingRule({id:"history.showNext",weight:200,when:D.ContextKeyExpr.and(D.ContextKeyExpr.has(e.HistoryNavigationWidgetContext),D.ContextKeyExpr.equals(b,!0),D.ContextKeyExpr.equals(w,!1)),primary:18,secondary:[512|18],handler:c=>{const r=t(c.get(D.IContextKeyService),e.HistoryNavigationWidgetContext);r&&r.historyNavigator.showNextValue()}})}),define(te[105],ie([1,0,19,2,36]),function(j,e,y,m,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.QuickAccessRegistry=e.Extensions=e.DefaultQuickAccessFilterValue=void 0;var I;(function(b){b[b.PRESERVE=0]="PRESERVE",b[b.LAST=1]="LAST"})(I=e.DefaultQuickAccessFilterValue||(e.DefaultQuickAccessFilterValue={})),e.Extensions={Quickaccess:"workbench.contributions.quickaccess"};class w{constructor(){this.providers=[],this.defaultProvider=void 0}registerQuickAccessProvider(p){return p.prefix.length===0?this.defaultProvider=p:this.providers.push(p),this.providers.sort((h,g)=>g.prefix.length-h.prefix.length),(0,m.toDisposable)(()=>{this.providers.splice(this.providers.indexOf(p),1),this.defaultProvider===p&&(this.defaultProvider=void 0)})}getQuickAccessProviders(){return(0,y.coalesce)([this.defaultProvider,...this.providers])}getQuickAccessProvider(p){return p&&this.providers.find(g=>p.startsWith(g.prefix))||void 0||this.defaultProvider}}e.QuickAccessRegistry=w,D.Registry.add(e.Extensions.Quickaccess,new w)}),define(te[627],ie([1,0,2,589,105,78,36]),function(j,e,y,m,D,I,w){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.HelpQuickAccessProvider=void 0;let b=class Ft{constructor(h){this.quickInputService=h,this.registry=w.Registry.as(D.Extensions.Quickaccess)}provide(h){const g=new y.DisposableStore;g.add(h.onDidAccept(()=>{const[n]=h.selectedItems;n&&this.quickInputService.quickAccess.show(n.prefix,{preserveValue:!0})})),g.add(h.onDidChangeValue(n=>{const l=this.registry.getQuickAccessProvider(n.substr(Ft.PREFIX.length));l&&l.prefix&&l.prefix!==Ft.PREFIX&&this.quickInputService.quickAccess.show(l.prefix,{preserveValue:!0})}));const{editorProviders:t,globalProviders:i}=this.getQuickAccessProviders();return h.items=t.length===0||i.length===0?[...t.length===0?i:t]:[{label:(0,m.localize)(0,null),type:"separator"},...i,{label:(0,m.localize)(1,null),type:"separator"},...t],g}getQuickAccessProviders(){const h=[],g=[];for(const t of this.registry.getQuickAccessProviders().sort((i,n)=>i.prefix.localeCompare(n.prefix)))if(t.prefix!==Ft.PREFIX)for(const i of t.helpEntries){const n=i.prefix||t.prefix,l=n||"\u2026";(i.needsEditor?g:h).push({prefix:n,label:l,ariaLabel:(0,m.localize)(2,null,l,i.description),description:i.description})}return{editorProviders:g,globalProviders:h}}};b.PREFIX="?",b=Ie([Ce(0,I.IQuickInputService)],b),e.HelpQuickAccessProvider=b}),define(te[628],ie([1,0,36,105,70,627]),function(j,e,y,m,D,I){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),y.Registry.as(m.Extensions.Quickaccess).registerQuickAccessProvider({ctor:I.HelpQuickAccessProvider,prefix:"",helpEntries:[{description:D.QuickHelpNLS.helpQuickAccessActionLabel,needsEditor:!0}]})}),define(te[629],ie([1,0,10,21,88,2,9,105,78,36]),function(j,e,y,m,D,I,w,b,p,h){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.QuickAccessController=void 0;let g=class extends I.Disposable{constructor(i,n){super();this.quickInputService=i,this.instantiationService=n,this.registry=h.Registry.as(b.Extensions.Quickaccess),this.mapProviderToDescriptor=new Map,this.lastAcceptedPickerValues=new Map,this.visibleQuickAccess=void 0}show(i="",n){this.doShowOrPick(i,!1,n)}doShowOrPick(i,n,l){var c;const[r,s]=this.getOrInstantiateProvider(i),o=this.visibleQuickAccess,a=o==null?void 0:o.descriptor;if(o&&s&&a===s){i!==s.prefix&&!(l==null?void 0:l.preserveValue)&&(o.picker.value=i),this.adjustValueSelection(o.picker,s,l);return}if(s&&!(l==null?void 0:l.preserveValue)){let v;if(o&&a&&a!==s){const C=o.value.substr(a.prefix.length);C&&(v=`${s.prefix}${C}`)}if(!v){const C=r==null?void 0:r.defaultFilterValue;C===b.DefaultQuickAccessFilterValue.LAST?v=this.lastAcceptedPickerValues.get(s):typeof C=="string"&&(v=`${s.prefix}${C}`)}typeof v=="string"&&(i=v)}const d=new I.DisposableStore,u=d.add(this.quickInputService.createQuickPick());u.value=i,this.adjustValueSelection(u,s,l),u.placeholder=s==null?void 0:s.placeholder,u.quickNavigate=l==null?void 0:l.quickNavigateConfiguration,u.hideInput=!!u.quickNavigate&&!o,(typeof(l==null?void 0:l.itemActivation)=="number"||(l==null?void 0:l.quickNavigateConfiguration))&&(u.itemActivation=(c=l==null?void 0:l.itemActivation)!==null&&c!==void 0?c:p.ItemActivation.SECOND),u.contextKey=s==null?void 0:s.contextKey,u.filterValue=v=>v.substring(s?s.prefix.length:0),(s==null?void 0:s.placeholder)&&(u.ariaLabel=s==null?void 0:s.placeholder);let f;n&&(f=new y.DeferredPromise,d.add((0,D.once)(u.onWillAccept)(v=>{v.veto(),u.hide()}))),d.add(this.registerPickerListeners(u,r,s,i));const S=d.add(new m.CancellationTokenSource);if(r&&d.add(r.provide(u,S.token)),(0,D.once)(u.onDidHide)(()=>{u.selectedItems.length===0&&S.cancel(),d.dispose(),f==null||f.complete(u.selectedItems.slice(0))}),u.show(),n)return f==null?void 0:f.p}adjustValueSelection(i,n,l){var c;let r;(l==null?void 0:l.preserveValue)?r=[i.value.length,i.value.length]:r=[(c=n==null?void 0:n.prefix.length)!==null&&c!==void 0?c:0,i.value.length],i.valueSelection=r}registerPickerListeners(i,n,l,c){const r=new I.DisposableStore,s=this.visibleQuickAccess={picker:i,descriptor:l,value:c};return r.add((0,I.toDisposable)(()=>{s===this.visibleQuickAccess&&(this.visibleQuickAccess=void 0)})),r.add(i.onDidChangeValue(o=>{const[a]=this.getOrInstantiateProvider(o);a!==n?this.show(o,{preserveValue:!0}):s.value=o})),l&&r.add(i.onDidAccept(()=>{this.lastAcceptedPickerValues.set(l,i.value)})),r}getOrInstantiateProvider(i){const n=this.registry.getQuickAccessProvider(i);if(!n)return[void 0,void 0];let l=this.mapProviderToDescriptor.get(n);return l||(l=this.instantiationService.createInstance(n.ctor),this.mapProviderToDescriptor.set(n,l)),[l,n]}};g=Ie([Ce(0,p.IQuickInputService),Ce(1,w.IInstantiationService)],g),e.QuickAccessController=g}),define(te[80],ie([1,0,4,2,20,327,9]),function(j,e,y,m,D,I,w){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.InMemoryStorageService=e.AbstractStorageService=e.WillSaveStateReason=e.IStorageService=void 0;const b="__$__targetStorageMarker";e.IStorageService=(0,w.createDecorator)("storageService");var p;(function(t){t[t.NONE=0]="NONE",t[t.SHUTDOWN=1]="SHUTDOWN"})(p=e.WillSaveStateReason||(e.WillSaveStateReason={}));class h extends m.Disposable{constructor(i={flushInterval:h.DEFAULT_FLUSH_INTERVAL}){super();this.options=i,this._onDidChangeValue=this._register(new y.PauseableEmitter),this._onDidChangeTarget=this._register(new y.PauseableEmitter),this._onWillSaveState=this._register(new y.Emitter),this.onWillSaveState=this._onWillSaveState.event,this._workspaceKeyTargets=void 0,this._globalKeyTargets=void 0}emitDidChangeValue(i,n){n===b?(i===0?this._globalKeyTargets=void 0:i===1&&(this._workspaceKeyTargets=void 0),this._onDidChangeTarget.fire({scope:i})):this._onDidChangeValue.fire({scope:i,key:n,target:this.getKeyTargets(i)[n]})}get(i,n,l){var c;return(c=this.getStorage(n))===null||c===void 0?void 0:c.get(i,l)}getBoolean(i,n,l){var c;return(c=this.getStorage(n))===null||c===void 0?void 0:c.getBoolean(i,l)}getNumber(i,n,l){var c;return(c=this.getStorage(n))===null||c===void 0?void 0:c.getNumber(i,l)}store(i,n,l,c){if((0,D.isUndefinedOrNull)(n)){this.remove(i,l);return}this.withPausedEmitters(()=>{var r;this.updateKeyTarget(i,l,c),(r=this.getStorage(l))===null||r===void 0||r.set(i,n)})}remove(i,n){this.withPausedEmitters(()=>{var l;this.updateKeyTarget(i,n,void 0),(l=this.getStorage(n))===null||l===void 0||l.delete(i)})}withPausedEmitters(i){this._onDidChangeValue.pause(),this._onDidChangeTarget.pause();try{i()}finally{this._onDidChangeValue.resume(),this._onDidChangeTarget.resume()}}updateKeyTarget(i,n,l){var c,r;const s=this.getKeyTargets(n);typeof l=="number"?s[i]!==l&&(s[i]=l,(c=this.getStorage(n))===null||c===void 0||c.set(b,JSON.stringify(s))):typeof s[i]=="number"&&(delete s[i],(r=this.getStorage(n))===null||r===void 0||r.set(b,JSON.stringify(s)))}get workspaceKeyTargets(){return this._workspaceKeyTargets||(this._workspaceKeyTargets=this.loadKeyTargets(1)),this._workspaceKeyTargets}get globalKeyTargets(){return this._globalKeyTargets||(this._globalKeyTargets=this.loadKeyTargets(0)),this._globalKeyTargets}getKeyTargets(i){return i===0?this.globalKeyTargets:this.workspaceKeyTargets}loadKeyTargets(i){const n=this.get(b,i);if(n)try{return JSON.parse(n)}catch{}return Object.create(null)}}e.AbstractStorageService=h,h.DEFAULT_FLUSH_INTERVAL=60*1e3;class g extends h{constructor(){super();this.globalStorage=this._register(new I.Storage(new I.InMemoryStorageDatabase)),this.workspaceStorage=this._register(new I.Storage(new I.InMemoryStorageDatabase)),this._register(this.workspaceStorage.onDidChangeStorage(i=>this.emitDidChangeValue(1,i))),this._register(this.globalStorage.onDidChangeStorage(i=>this.emitDidChangeValue(0,i)))}getStorage(i){return i===0?this.globalStorage:this.workspaceStorage}}e.InMemoryStorageService=g}),define(te[630],ie([1,0,10,88,47,3,271,53,9,80]),function(j,e,y,m,D,I,w,b,p,h){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CodeLensCache=e.ICodeLensCache=void 0,e.ICodeLensCache=(0,p.createDecorator)("ICodeLensCache");class g{constructor(n,l){this.lineCount=n,this.data=l}}let t=class{constructor(n){this._fakeProvider=new class{provideCodeLenses(){throw new Error("not supported")}},this._cache=new D.LRUCache(20,.75);const l="codelens/cache";(0,y.runWhenIdle)(()=>n.remove(l,1));const c="codelens/cache2",r=n.get(c,1,"{}");this._deserialize(r),(0,m.once)(n.onWillSaveState)(s=>{s.reason===h.WillSaveStateReason.SHUTDOWN&&n.store(c,this._serialize(),1,1)})}put(n,l){const c=l.lenses.map(o=>{var a;return{range:o.symbol.range,command:o.symbol.command&&{id:"",title:(a=o.symbol.command)===null||a===void 0?void 0:a.title}}}),r=new w.CodeLensModel;r.add({lenses:c,dispose:()=>{}},this._fakeProvider);const s=new g(n.getLineCount(),r);this._cache.set(n.uri.toString(),s)}get(n){const l=this._cache.get(n.uri.toString());return l&&l.lineCount===n.getLineCount()?l.data:void 0}delete(n){this._cache.delete(n.uri.toString())}_serialize(){const n=Object.create(null);for(const[l,c]of this._cache){const r=new Set;for(const s of c.data.lenses)r.add(s.symbol.range.startLineNumber);n[l]={lineCount:c.lineCount,lines:[...r.values()]}}return JSON.stringify(n)}_deserialize(n){try{const l=JSON.parse(n);for(const c in l){const r=l[c],s=[];for(const a of r.lines)s.push({range:new I.Range(a,1,a,11)});const o=new w.CodeLensModel;o.add({lenses:s,dispose(){}},this._fakeProvider),this._cache.set(c,new g(r.lineCount,o))}}catch{}}};t=Ie([Ce(0,h.IStorageService)],t),e.CodeLensCache=t,(0,b.registerSingleton)(e.ICodeLensCache,t)}),define(te[631],ie([1,0,10,2,47,18,40,53,9,80]),function(j,e,y,m,D,I,w,b,p,h){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ISuggestMemoryService=e.SuggestMemoryService=e.PrefixMemory=e.LRUMemory=e.NoMemory=e.Memory=void 0;class g{constructor(r){this.name=r}select(r,s,o){if(o.length===0)return 0;let a=o[0].score[0];for(let d=0;d<o.length;d++){const{score:u,completion:f}=o[d];if(u[0]!==a)break;if(f.preselect)return d}return 0}}e.Memory=g;class t extends g{constructor(){super("first")}memorize(r,s,o){}toJSON(){}fromJSON(){}}e.NoMemory=t;class i extends g{constructor(){super("recentlyUsed");this._cache=new D.LRUCache(300,.66),this._seq=0}memorize(r,s,o){const a=`${r.getLanguageId()}/${o.textLabel}`;this._cache.set(a,{touch:this._seq++,type:o.completion.kind,insertText:o.completion.insertText})}select(r,s,o){if(o.length===0)return 0;const a=r.getLineContent(s.lineNumber).substr(s.column-10,s.column-1);if(/\s$/.test(a))return super.select(r,s,o);let d=o[0].score[0],u=-1,f=-1,S=-1;for(let v=0;v<o.length&&o[v].score[0]===d;v++){const C=`${r.getLanguageId()}/${o[v].textLabel}`,_=this._cache.peek(C);if(_&&_.touch>S&&_.type===o[v].completion.kind&&_.insertText===o[v].completion.insertText&&(S=_.touch,f=v),o[v].completion.preselect&&u===-1)return u=v}return f!==-1?f:u!==-1?u:0}toJSON(){return this._cache.toJSON()}fromJSON(r){this._cache.clear();let s=0;for(const[o,a]of r)a.touch=s,a.type=typeof a.type=="number"?a.type:I.CompletionItemKinds.fromString(a.type),this._cache.set(o,a);this._seq=this._cache.size}}e.LRUMemory=i;class n extends g{constructor(){super("recentlyUsedByPrefix");this._trie=D.TernarySearchTree.forStrings(),this._seq=0}memorize(r,s,o){const{word:a}=r.getWordUntilPosition(s),d=`${r.getLanguageId()}/${a}`;this._trie.set(d,{type:o.completion.kind,insertText:o.completion.insertText,touch:this._seq++})}select(r,s,o){let{word:a}=r.getWordUntilPosition(s);if(!a)return super.select(r,s,o);let d=`${r.getLanguageId()}/${a}`,u=this._trie.get(d);if(u||(u=this._trie.findSubstr(d)),u)for(let f=0;f<o.length;f++){let{kind:S,insertText:v}=o[f].completion;if(S===u.type&&v===u.insertText)return f}return super.select(r,s,o)}toJSON(){let r=[];return this._trie.forEach((s,o)=>r.push([o,s])),r.sort((s,o)=>-(s[1].touch-o[1].touch)).forEach((s,o)=>s[1].touch=o),r.slice(0,200)}fromJSON(r){if(this._trie.clear(),r.length>0){this._seq=r[0][1].touch+1;for(const[s,o]of r)o.type=typeof o.type=="number"?o.type:I.CompletionItemKinds.fromString(o.type),this._trie.set(s,o)}}}e.PrefixMemory=n;let l=class Bt{constructor(r,s){this._storageService=r,this._configService=s,this._disposables=new m.DisposableStore,this._persistSoon=new y.RunOnceScheduler(()=>this._saveState(),500),this._disposables.add(r.onWillSaveState(o=>{o.reason===h.WillSaveStateReason.SHUTDOWN&&this._saveState()}))}dispose(){this._disposables.dispose(),this._persistSoon.dispose()}memorize(r,s,o){this._withStrategy(r,s).memorize(r,s,o),this._persistSoon.schedule()}select(r,s,o){return this._withStrategy(r,s).select(r,s,o)}_withStrategy(r,s){var o;const a=this._configService.getValue("editor.suggestSelection",{overrideIdentifier:r.getLanguageIdAtPosition(s.lineNumber,s.column),resource:r.uri});if(((o=this._strategy)===null||o===void 0?void 0:o.name)!==a){this._saveState();const d=Bt._strategyCtors.get(a)||t;this._strategy=new d;try{const f=this._configService.getValue("editor.suggest.shareSuggestSelections")?0:1,S=this._storageService.get(`${Bt._storagePrefix}/${a}`,f);S&&this._strategy.fromJSON(JSON.parse(S))}catch{}}return this._strategy}_saveState(){if(this._strategy){const s=this._configService.getValue("editor.suggest.shareSuggestSelections")?0:1,o=JSON.stringify(this._strategy);this._storageService.store(`${Bt._storagePrefix}/${this._strategy.name}`,o,s,1)}}};l._strategyCtors=new Map([["recentlyUsedByPrefix",n],["recentlyUsed",i],["first",t]]),l._storagePrefix="suggest/memories",l=Ie([Ce(0,h.IStorageService),Ce(1,w.IConfigurationService)],l),e.SuggestMemoryService=l,e.ISuggestMemoryService=(0,p.createDecorator)("ISuggestMemories"),(0,b.registerSingleton)(e.ISuggestMemoryService,l,!0)}),define(te[87],ie([1,0,9]),function(j,e,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ITelemetryService=void 0,e.ITelemetryService=(0,y.createDecorator)("telemetryService")}),define(te[632],ie([1,0,490,13,73,2,47,74,20,588,26,40,127,9,42,619,80,87]),function(j,e,y,m,D,I,w,b,p,h,g,t,i,n,l,c,r,s){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CommandsHistory=e.AbstractCommandsQuickAccessProvider=void 0;let o=class Wt extends c.PickerQuickAccessProvider{constructor(u,f,S,v,C,_){super(Wt.PREFIX,u);this.instantiationService=f,this.keybindingService=S,this.commandService=v,this.telemetryService=C,this.dialogService=_,this.commandsHistory=this._register(this.instantiationService.createInstance(a)),this.options=u}_getPicks(u,f,S){return ye(this,void 0,void 0,function*(){const v=yield this.getCommandPicks(f,S);if(S.isCancellationRequested)return[];const C=[];for(const N of v){const k=(0,p.withNullAsUndefined)(Wt.WORD_FILTER(u,N.label)),M=N.commandAlias?(0,p.withNullAsUndefined)(Wt.WORD_FILTER(u,N.commandAlias)):void 0;k||M?(N.highlights={label:k,detail:this.options.showAlias?M:void 0},C.push(N)):u===N.commandId&&C.push(N)}const _=new Map;for(const N of C){const k=_.get(N.label);k?(N.description=N.commandId,k.description=k.commandId):_.set(N.label,N)}C.sort((N,k)=>{const M=this.commandsHistory.peek(N.commandId),O=this.commandsHistory.peek(k.commandId);return M&&O?M>O?-1:1:M?-1:O?1:N.label.localeCompare(k.label)});const L=[];let E=!1;for(let N=0;N<C.length;N++){const k=C[N],M=this.keybindingService.lookupKeybinding(k.commandId),O=M?(0,h.localize)(0,null,k.label,M.getAriaLabel()):k.label;N===0&&this.commandsHistory.peek(k.commandId)&&(L.push({type:"separator",label:(0,h.localize)(1,null)}),E=!0),N!==0&&E&&!this.commandsHistory.peek(k.commandId)&&(L.push({type:"separator",label:(0,h.localize)(2,null)}),E=!1),L.push(Object.assign(Object.assign({},k),{ariaLabel:O,detail:this.options.showAlias&&k.commandAlias!==k.label?k.commandAlias:void 0,keybinding:M,accept:()=>ye(this,void 0,void 0,function*(){this.commandsHistory.push(k.commandId),this.telemetryService.publicLog2("workbenchActionExecuted",{id:k.commandId,from:"quick open"});try{yield this.commandService.executeCommand(k.commandId)}catch(B){(0,m.isCancellationError)(B)||this.dialogService.show(b.default.Error,(0,h.localize)(3,null,k.label,(0,y.toErrorMessage)(B)))}})}))}return L})}};o.PREFIX=">",o.WORD_FILTER=(0,D.or)(D.matchesPrefix,D.matchesWords,D.matchesContiguousSubString),o=Ie([Ce(1,n.IInstantiationService),Ce(2,l.IKeybindingService),Ce(3,g.ICommandService),Ce(4,s.ITelemetryService),Ce(5,i.IDialogService)],o),e.AbstractCommandsQuickAccessProvider=o;let a=class st extends I.Disposable{constructor(u,f){super();this.storageService=u,this.configurationService=f,this.configuredCommandsHistoryLength=0,this.updateConfiguration(),this.load(),this.registerListeners()}registerListeners(){this._register(this.configurationService.onDidChangeConfiguration(()=>this.updateConfiguration()))}updateConfiguration(){this.configuredCommandsHistoryLength=st.getConfiguredCommandHistoryLength(this.configurationService),st.cache&&st.cache.limit!==this.configuredCommandsHistoryLength&&(st.cache.limit=this.configuredCommandsHistoryLength,st.saveState(this.storageService))}load(){const u=this.storageService.get(st.PREF_KEY_CACHE,0);let f;if(u)try{f=JSON.parse(u)}catch{}const S=st.cache=new w.LRUCache(this.configuredCommandsHistoryLength,1);if(f){let v;f.usesLRU?v=f.entries:v=f.entries.sort((C,_)=>C.value-_.value),v.forEach(C=>S.set(C.key,C.value))}st.counter=this.storageService.getNumber(st.PREF_KEY_COUNTER,0,st.counter)}push(u){!st.cache||(st.cache.set(u,st.counter++),st.saveState(this.storageService))}peek(u){var f;return(f=st.cache)===null||f===void 0?void 0:f.peek(u)}static saveState(u){if(!st.cache)return;const f={usesLRU:!0,entries:[]};st.cache.forEach((S,v)=>f.entries.push({key:v,value:S})),u.store(st.PREF_KEY_CACHE,JSON.stringify(f),0,0),u.store(st.PREF_KEY_COUNTER,st.counter,0,0)}static getConfiguredCommandHistoryLength(u){var f,S;const C=(S=(f=u.getValue().workbench)===null||f===void 0?void 0:f.commandPalette)===null||S===void 0?void 0:S.history;return typeof C=="number"?C:st.DEFAULT_COMMANDS_HISTORY_LENGTH}};a.DEFAULT_COMMANDS_HISTORY_LENGTH=50,a.PREF_KEY_CACHE="commandPalette.mru.cache",a.PREF_KEY_COUNTER="commandPalette.mru.counter",a.counter=1,a=Ie([Ce(0,r.IStorageService),Ce(1,t.IConfigurationService)],a),e.CommandsHistory=a}),define(te[633],ie([1,0,95,632]),function(j,e,y,m){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AbstractEditorCommandsQuickAccessProvider=void 0;class D extends m.AbstractCommandsQuickAccessProvider{constructor(w,b,p,h,g,t){super(w,b,p,h,g,t)}getCodeEditorCommandPicks(){const w=this.activeTextEditorControl;if(!w)return[];const b=[];for(const p of w.getSupportedActions())b.push({commandId:p.id,commandAlias:p.alias,label:(0,y.stripIcons)(p.label)||p.id});return b}}e.AbstractEditorCommandsQuickAccessProvider=D}),define(te[23],ie([1,0,10,29,4,20,590,200,36]),function(j,e,y,m,D,I,w,b,p){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.workbenchColorsSchemaId=e.resolveColorValue=e.ifDefinedThenElse=e.oneOf=e.transparent=e.lighten=e.darken=e.executeTransform=e.chartsPurple=e.chartsGreen=e.chartsOrange=e.chartsYellow=e.chartsBlue=e.chartsRed=e.chartsLines=e.chartsForeground=e.problemsInfoIconForeground=e.problemsWarningIconForeground=e.problemsErrorIconForeground=e.minimapSliderActiveBackground=e.minimapSliderHoverBackground=e.minimapSliderBackground=e.minimapForegroundOpacity=e.minimapBackground=e.minimapWarning=e.minimapError=e.minimapSelection=e.minimapSelectionOccurrenceHighlight=e.minimapFindMatch=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.snippetFinalTabstopHighlightBorder=e.snippetFinalTabstopHighlightBackground=e.snippetTabstopHighlightBorder=e.snippetTabstopHighlightBackground=e.toolbarActiveBackground=e.toolbarHoverOutline=e.toolbarHoverBackground=e.menuSeparatorBackground=e.menuSelectionBorder=e.menuSelectionBackground=e.menuSelectionForeground=e.menuBackground=e.menuForeground=e.menuBorder=e.quickInputListFocusBackground=e.quickInputListFocusIconForeground=e.quickInputListFocusForeground=e._deprecatedQuickInputListFocusBackground=e.listDeemphasizedForeground=e.tableOddRowsBackgroundColor=e.tableColumnsBorder=e.treeIndentGuidesStroke=e.listFilterMatchHighlightBorder=e.listFilterMatchHighlight=e.listFilterWidgetNoMatchesOutline=e.listFilterWidgetOutline=e.listFilterWidgetBackground=e.listWarningForeground=e.listErrorForeground=e.listInvalidItemForeground=e.listFocusHighlightForeground=e.listHighlightForeground=e.listDropBackground=e.listHoverForeground=e.listHoverBackground=e.listInactiveFocusOutline=e.listInactiveFocusBackground=e.listInactiveSelectionIconForeground=e.listInactiveSelectionForeground=e.listInactiveSelectionBackground=e.listActiveSelectionIconForeground=e.listActiveSelectionForeground=e.listActiveSelectionBackground=e.listFocusOutline=e.listFocusForeground=e.listFocusBackground=e.diffDiagonalFill=e.diffBorder=e.diffRemovedOutline=e.diffInsertedOutline=e.diffRemoved=e.diffInserted=e.defaultRemoveColor=e.defaultInsertColor=e.editorLightBulbAutoFixForeground=e.editorLightBulbForeground=e.editorInlayHintParameterBackground=e.editorInlayHintParameterForeground=e.editorInlayHintTypeBackground=e.editorInlayHintTypeForeground=e.editorInlayHintBackground=e.editorInlayHintForeground=e.editorActiveLinkForeground=e.editorHoverStatusBarBackground=e.editorHoverBorder=e.editorHoverForeground=e.editorHoverBackground=e.editorHoverHighlight=e.searchEditorFindMatchBorder=e.searchEditorFindMatch=e.editorFindRangeHighlightBorder=e.editorFindMatchHighlightBorder=e.editorFindMatchBorder=e.editorFindRangeHighlight=e.editorFindMatchHighlight=e.editorFindMatch=e.editorSelectionHighlightBorder=e.editorSelectionHighlight=e.editorInactiveSelection=e.editorSelectionForeground=e.editorSelectionBackground=e.keybindingLabelBottomBorder=e.keybindingLabelBorder=e.keybindingLabelForeground=e.keybindingLabelBackground=e.pickerGroupBorder=e.pickerGroupForeground=e.quickInputTitleBackground=e.quickInputForeground=e.quickInputBackground=e.editorWidgetResizeBorder=e.editorWidgetBorder=e.editorWidgetForeground=e.editorWidgetBackground=e.editorForeground=e.editorBackground=e.sashHoverBorder=e.editorHintBorder=e.editorHintForeground=e.editorInfoBorder=e.editorInfoForeground=e.editorInfoBackground=e.editorWarningBorder=e.editorWarningForeground=e.editorWarningBackground=e.editorErrorBorder=e.editorErrorForeground=e.editorErrorBackground=e.progressBarBackground=e.scrollbarSliderActiveBackground=e.scrollbarSliderHoverBackground=e.scrollbarSliderBackground=e.scrollbarShadow=e.badgeForeground=e.badgeBackground=e.buttonSecondaryHoverBackground=e.buttonSecondaryBackground=e.buttonSecondaryForeground=e.buttonBorder=e.buttonHoverBackground=e.buttonBackground=e.buttonForeground=e.simpleCheckboxBorder=e.simpleCheckboxForeground=e.simpleCheckboxBackground=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=e.widgetShadow=e.textCodeBlockBackground=e.textBlockQuoteBorder=e.textBlockQuoteBackground=e.textPreformatForeground=e.textLinkActiveForeground=e.textLinkForeground=e.textSeparatorForeground=e.selectionBackground=e.activeContrastBorder=e.contrastBorder=e.focusBorder=e.iconForeground=e.descriptionForeground=e.errorForeground=e.foreground=e.registerColor=e.Extensions=e.asCssVariableName=void 0;function h(N){return`--vscode-${N.replace(".","-")}`}e.asCssVariableName=h,e.Extensions={ColorContribution:"base.contributions.colors"};class g{constructor(){this._onDidChangeSchema=new D.Emitter,this.onDidChangeSchema=this._onDidChangeSchema.event,this.colorSchema={type:"object",properties:{}},this.colorReferenceSchema={type:"string",enum:[],enumDescriptions:[]},this.colorsById={}}registerColor(k,M,O,B=!1,T){let R={id:k,description:O,defaults:M,needsTransparency:B,deprecationMessage:T};this.colorsById[k]=R;let P={type:"string",description:O,format:"color-hex",defaultSnippets:[{body:"${1:#ff0000}"}]};return T&&(P.deprecationMessage=T),this.colorSchema.properties[k]=P,this.colorReferenceSchema.enum.push(k),this.colorReferenceSchema.enumDescriptions.push(O),this._onDidChangeSchema.fire(),k}getColors(){return Object.keys(this.colorsById).map(k=>this.colorsById[k])}resolveDefaultColor(k,M){const O=this.colorsById[k];if(O&&O.defaults){const B=O.defaults[M.type];return _(B,M)}}getColorSchema(){return this.colorSchema}toString(){let k=(M,O)=>{let B=M.indexOf(".")===-1?0:1,T=O.indexOf(".")===-1?0:1;return B!==T?B-T:M.localeCompare(O)};return Object.keys(this.colorsById).sort(k).map(M=>`- \`${M}\`: ${this.colorsById[M].description}`).join(`
|
||
`)}}const t=new g;p.Registry.add(e.Extensions.ColorContribution,t);function i(N,k,M,O,B){return t.registerColor(N,k,M,O,B)}e.registerColor=i,e.foreground=i("foreground",{dark:"#CCCCCC",light:"#616161",hc:"#FFFFFF"},w.localize(0,null)),e.errorForeground=i("errorForeground",{dark:"#F48771",light:"#A1260D",hc:"#F48771"},w.localize(1,null)),e.descriptionForeground=i("descriptionForeground",{light:"#717171",dark:f(e.foreground,.7),hc:f(e.foreground,.7)},w.localize(2,null)),e.iconForeground=i("icon.foreground",{dark:"#C5C5C5",light:"#424242",hc:"#FFFFFF"},w.localize(3,null)),e.focusBorder=i("focusBorder",{dark:"#007FD4",light:"#0090F1",hc:"#F38518"},w.localize(4,null)),e.contrastBorder=i("contrastBorder",{light:null,dark:null,hc:"#6FC3DF"},w.localize(5,null)),e.activeContrastBorder=i("contrastActiveBorder",{light:null,dark:null,hc:e.focusBorder},w.localize(6,null)),e.selectionBackground=i("selection.background",{light:null,dark:null,hc:null},w.localize(7,null)),e.textSeparatorForeground=i("textSeparator.foreground",{light:"#0000002e",dark:"#ffffff2e",hc:m.Color.black},w.localize(8,null)),e.textLinkForeground=i("textLink.foreground",{light:"#006AB1",dark:"#3794FF",hc:"#3794FF"},w.localize(9,null)),e.textLinkActiveForeground=i("textLink.activeForeground",{light:"#006AB1",dark:"#3794FF",hc:"#3794FF"},w.localize(10,null)),e.textPreformatForeground=i("textPreformat.foreground",{light:"#A31515",dark:"#D7BA7D",hc:"#D7BA7D"},w.localize(11,null)),e.textBlockQuoteBackground=i("textBlockQuote.background",{light:"#7f7f7f1a",dark:"#7f7f7f1a",hc:null},w.localize(12,null)),e.textBlockQuoteBorder=i("textBlockQuote.border",{light:"#007acc80",dark:"#007acc80",hc:m.Color.white},w.localize(13,null)),e.textCodeBlockBackground=i("textCodeBlock.background",{light:"#dcdcdc66",dark:"#0a0a0a66",hc:m.Color.black},w.localize(14,null)),e.widgetShadow=i("widget.shadow",{dark:f(m.Color.black,.36),light:f(m.Color.black,.16),hc:null},w.localize(15,null)),e.inputBackground=i("input.background",{dark:"#3C3C3C",light:m.Color.white,hc:m.Color.black},w.localize(16,null)),e.inputForeground=i("input.foreground",{dark:e.foreground,light:e.foreground,hc:e.foreground},w.localize(17,null)),e.inputBorder=i("input.border",{dark:null,light:null,hc:e.contrastBorder},w.localize(18,null)),e.inputActiveOptionBorder=i("inputOption.activeBorder",{dark:"#007ACC00",light:"#007ACC00",hc:e.contrastBorder},w.localize(19,null)),e.inputActiveOptionHoverBackground=i("inputOption.hoverBackground",{dark:"#5a5d5e80",light:"#b8b8b850",hc:null},w.localize(20,null)),e.inputActiveOptionBackground=i("inputOption.activeBackground",{dark:f(e.focusBorder,.4),light:f(e.focusBorder,.2),hc:m.Color.transparent},w.localize(21,null)),e.inputActiveOptionForeground=i("inputOption.activeForeground",{dark:m.Color.white,light:m.Color.black,hc:null},w.localize(22,null)),e.inputPlaceholderForeground=i("input.placeholderForeground",{light:f(e.foreground,.5),dark:f(e.foreground,.5),hc:f(e.foreground,.7)},w.localize(23,null)),e.inputValidationInfoBackground=i("inputValidation.infoBackground",{dark:"#063B49",light:"#D6ECF2",hc:m.Color.black},w.localize(24,null)),e.inputValidationInfoForeground=i("inputValidation.infoForeground",{dark:null,light:null,hc:null},w.localize(25,null)),e.inputValidationInfoBorder=i("inputValidation.infoBorder",{dark:"#007acc",light:"#007acc",hc:e.contrastBorder},w.localize(26,null)),e.inputValidationWarningBackground=i("inputValidation.warningBackground",{dark:"#352A05",light:"#F6F5D2",hc:m.Color.black},w.localize(27,null)),e.inputValidationWarningForeground=i("inputValidation.warningForeground",{dark:null,light:null,hc:null},w.localize(28,null)),e.inputValidationWarningBorder=i("inputValidation.warningBorder",{dark:"#B89500",light:"#B89500",hc:e.contrastBorder},w.localize(29,null)),e.inputValidationErrorBackground=i("inputValidation.errorBackground",{dark:"#5A1D1D",light:"#F2DEDE",hc:m.Color.black},w.localize(30,null)),e.inputValidationErrorForeground=i("inputValidation.errorForeground",{dark:null,light:null,hc:null},w.localize(31,null)),e.inputValidationErrorBorder=i("inputValidation.errorBorder",{dark:"#BE1100",light:"#BE1100",hc:e.contrastBorder},w.localize(32,null)),e.selectBackground=i("dropdown.background",{dark:"#3C3C3C",light:m.Color.white,hc:m.Color.black},w.localize(33,null)),e.selectListBackground=i("dropdown.listBackground",{dark:null,light:null,hc:m.Color.black},w.localize(34,null)),e.selectForeground=i("dropdown.foreground",{dark:"#F0F0F0",light:null,hc:m.Color.white},w.localize(35,null)),e.selectBorder=i("dropdown.border",{dark:e.selectBackground,light:"#CECECE",hc:e.contrastBorder},w.localize(36,null)),e.simpleCheckboxBackground=i("checkbox.background",{dark:e.selectBackground,light:e.selectBackground,hc:e.selectBackground},w.localize(37,null)),e.simpleCheckboxForeground=i("checkbox.foreground",{dark:e.selectForeground,light:e.selectForeground,hc:e.selectForeground},w.localize(38,null)),e.simpleCheckboxBorder=i("checkbox.border",{dark:e.selectBorder,light:e.selectBorder,hc:e.selectBorder},w.localize(39,null)),e.buttonForeground=i("button.foreground",{dark:m.Color.white,light:m.Color.white,hc:m.Color.white},w.localize(40,null)),e.buttonBackground=i("button.background",{dark:"#0E639C",light:"#007ACC",hc:null},w.localize(41,null)),e.buttonHoverBackground=i("button.hoverBackground",{dark:u(e.buttonBackground,.2),light:d(e.buttonBackground,.2),hc:null},w.localize(42,null)),e.buttonBorder=i("button.border",{dark:e.contrastBorder,light:e.contrastBorder,hc:e.contrastBorder},w.localize(43,null)),e.buttonSecondaryForeground=i("button.secondaryForeground",{dark:m.Color.white,light:m.Color.white,hc:m.Color.white},w.localize(44,null)),e.buttonSecondaryBackground=i("button.secondaryBackground",{dark:"#3A3D41",light:"#5F6A79",hc:null},w.localize(45,null)),e.buttonSecondaryHoverBackground=i("button.secondaryHoverBackground",{dark:u(e.buttonSecondaryBackground,.2),light:d(e.buttonSecondaryBackground,.2),hc:null},w.localize(46,null)),e.badgeBackground=i("badge.background",{dark:"#4D4D4D",light:"#C4C4C4",hc:m.Color.black},w.localize(47,null)),e.badgeForeground=i("badge.foreground",{dark:m.Color.white,light:"#333",hc:m.Color.white},w.localize(48,null)),e.scrollbarShadow=i("scrollbar.shadow",{dark:"#000000",light:"#DDDDDD",hc:null},w.localize(49,null)),e.scrollbarSliderBackground=i("scrollbarSlider.background",{dark:m.Color.fromHex("#797979").transparent(.4),light:m.Color.fromHex("#646464").transparent(.4),hc:f(e.contrastBorder,.6)},w.localize(50,null)),e.scrollbarSliderHoverBackground=i("scrollbarSlider.hoverBackground",{dark:m.Color.fromHex("#646464").transparent(.7),light:m.Color.fromHex("#646464").transparent(.7),hc:f(e.contrastBorder,.8)},w.localize(51,null)),e.scrollbarSliderActiveBackground=i("scrollbarSlider.activeBackground",{dark:m.Color.fromHex("#BFBFBF").transparent(.4),light:m.Color.fromHex("#000000").transparent(.6),hc:e.contrastBorder},w.localize(52,null)),e.progressBarBackground=i("progressBar.background",{dark:m.Color.fromHex("#0E70C0"),light:m.Color.fromHex("#0E70C0"),hc:e.contrastBorder},w.localize(53,null)),e.editorErrorBackground=i("editorError.background",{dark:null,light:null,hc:null},w.localize(54,null),!0),e.editorErrorForeground=i("editorError.foreground",{dark:"#F14C4C",light:"#E51400",hc:null},w.localize(55,null)),e.editorErrorBorder=i("editorError.border",{dark:null,light:null,hc:m.Color.fromHex("#E47777").transparent(.8)},w.localize(56,null)),e.editorWarningBackground=i("editorWarning.background",{dark:null,light:null,hc:null},w.localize(57,null),!0),e.editorWarningForeground=i("editorWarning.foreground",{dark:"#CCA700",light:"#BF8803",hc:null},w.localize(58,null)),e.editorWarningBorder=i("editorWarning.border",{dark:null,light:null,hc:m.Color.fromHex("#FFCC00").transparent(.8)},w.localize(59,null)),e.editorInfoBackground=i("editorInfo.background",{dark:null,light:null,hc:null},w.localize(60,null),!0),e.editorInfoForeground=i("editorInfo.foreground",{dark:"#3794FF",light:"#1a85ff",hc:"#3794FF"},w.localize(61,null)),e.editorInfoBorder=i("editorInfo.border",{dark:null,light:null,hc:m.Color.fromHex("#3794FF").transparent(.8)},w.localize(62,null)),e.editorHintForeground=i("editorHint.foreground",{dark:m.Color.fromHex("#eeeeee").transparent(.7),light:"#6c6c6c",hc:null},w.localize(63,null)),e.editorHintBorder=i("editorHint.border",{dark:null,light:null,hc:m.Color.fromHex("#eeeeee").transparent(.8)},w.localize(64,null)),e.sashHoverBorder=i("sash.hoverBorder",{dark:e.focusBorder,light:e.focusBorder,hc:e.focusBorder},w.localize(65,null)),e.editorBackground=i("editor.background",{light:"#fffffe",dark:"#1E1E1E",hc:m.Color.black},w.localize(66,null)),e.editorForeground=i("editor.foreground",{light:"#333333",dark:"#BBBBBB",hc:m.Color.white},w.localize(67,null)),e.editorWidgetBackground=i("editorWidget.background",{dark:"#252526",light:"#F3F3F3",hc:"#0C141F"},w.localize(68,null)),e.editorWidgetForeground=i("editorWidget.foreground",{dark:e.foreground,light:e.foreground,hc:e.foreground},w.localize(69,null)),e.editorWidgetBorder=i("editorWidget.border",{dark:"#454545",light:"#C8C8C8",hc:e.contrastBorder},w.localize(70,null)),e.editorWidgetResizeBorder=i("editorWidget.resizeBorder",{light:null,dark:null,hc:null},w.localize(71,null)),e.quickInputBackground=i("quickInput.background",{dark:e.editorWidgetBackground,light:e.editorWidgetBackground,hc:e.editorWidgetBackground},w.localize(72,null)),e.quickInputForeground=i("quickInput.foreground",{dark:e.editorWidgetForeground,light:e.editorWidgetForeground,hc:e.editorWidgetForeground},w.localize(73,null)),e.quickInputTitleBackground=i("quickInputTitle.background",{dark:new m.Color(new m.RGBA(255,255,255,.105)),light:new m.Color(new m.RGBA(0,0,0,.06)),hc:"#000000"},w.localize(74,null)),e.pickerGroupForeground=i("pickerGroup.foreground",{dark:"#3794FF",light:"#0066BF",hc:m.Color.white},w.localize(75,null)),e.pickerGroupBorder=i("pickerGroup.border",{dark:"#3F3F46",light:"#CCCEDB",hc:m.Color.white},w.localize(76,null)),e.keybindingLabelBackground=i("keybindingLabel.background",{dark:new m.Color(new m.RGBA(128,128,128,.17)),light:new m.Color(new m.RGBA(221,221,221,.4)),hc:m.Color.transparent},w.localize(77,null)),e.keybindingLabelForeground=i("keybindingLabel.foreground",{dark:m.Color.fromHex("#CCCCCC"),light:m.Color.fromHex("#555555"),hc:m.Color.white},w.localize(78,null)),e.keybindingLabelBorder=i("keybindingLabel.border",{dark:new m.Color(new m.RGBA(51,51,51,.6)),light:new m.Color(new m.RGBA(204,204,204,.4)),hc:new m.Color(new m.RGBA(111,195,223))},w.localize(79,null)),e.keybindingLabelBottomBorder=i("keybindingLabel.bottomBorder",{dark:new m.Color(new m.RGBA(68,68,68,.6)),light:new m.Color(new m.RGBA(187,187,187,.4)),hc:new m.Color(new m.RGBA(111,195,223))},w.localize(80,null)),e.editorSelectionBackground=i("editor.selectionBackground",{light:"#ADD6FF",dark:"#264F78",hc:"#f3f518"},w.localize(81,null)),e.editorSelectionForeground=i("editor.selectionForeground",{light:null,dark:null,hc:"#000000"},w.localize(82,null)),e.editorInactiveSelection=i("editor.inactiveSelectionBackground",{light:f(e.editorSelectionBackground,.5),dark:f(e.editorSelectionBackground,.5),hc:f(e.editorSelectionBackground,.5)},w.localize(83,null),!0),e.editorSelectionHighlight=i("editor.selectionHighlightBackground",{light:C(e.editorSelectionBackground,e.editorBackground,.3,.6),dark:C(e.editorSelectionBackground,e.editorBackground,.3,.6),hc:null},w.localize(84,null),!0),e.editorSelectionHighlightBorder=i("editor.selectionHighlightBorder",{light:null,dark:null,hc:e.activeContrastBorder},w.localize(85,null)),e.editorFindMatch=i("editor.findMatchBackground",{light:"#A8AC94",dark:"#515C6A",hc:null},w.localize(86,null)),e.editorFindMatchHighlight=i("editor.findMatchHighlightBackground",{light:"#EA5C0055",dark:"#EA5C0055",hc:null},w.localize(87,null),!0),e.editorFindRangeHighlight=i("editor.findRangeHighlightBackground",{dark:"#3a3d4166",light:"#b4b4b44d",hc:null},w.localize(88,null),!0),e.editorFindMatchBorder=i("editor.findMatchBorder",{light:null,dark:null,hc:e.activeContrastBorder},w.localize(89,null)),e.editorFindMatchHighlightBorder=i("editor.findMatchHighlightBorder",{light:null,dark:null,hc:e.activeContrastBorder},w.localize(90,null)),e.editorFindRangeHighlightBorder=i("editor.findRangeHighlightBorder",{dark:null,light:null,hc:f(e.activeContrastBorder,.4)},w.localize(91,null),!0),e.searchEditorFindMatch=i("searchEditor.findMatchBackground",{light:f(e.editorFindMatchHighlight,.66),dark:f(e.editorFindMatchHighlight,.66),hc:e.editorFindMatchHighlight},w.localize(92,null)),e.searchEditorFindMatchBorder=i("searchEditor.findMatchBorder",{light:f(e.editorFindMatchHighlightBorder,.66),dark:f(e.editorFindMatchHighlightBorder,.66),hc:e.editorFindMatchHighlightBorder},w.localize(93,null)),e.editorHoverHighlight=i("editor.hoverHighlightBackground",{light:"#ADD6FF26",dark:"#264f7840",hc:"#ADD6FF26"},w.localize(94,null),!0),e.editorHoverBackground=i("editorHoverWidget.background",{light:e.editorWidgetBackground,dark:e.editorWidgetBackground,hc:e.editorWidgetBackground},w.localize(95,null)),e.editorHoverForeground=i("editorHoverWidget.foreground",{light:e.editorWidgetForeground,dark:e.editorWidgetForeground,hc:e.editorWidgetForeground},w.localize(96,null)),e.editorHoverBorder=i("editorHoverWidget.border",{light:e.editorWidgetBorder,dark:e.editorWidgetBorder,hc:e.editorWidgetBorder},w.localize(97,null)),e.editorHoverStatusBarBackground=i("editorHoverWidget.statusBarBackground",{dark:u(e.editorHoverBackground,.2),light:d(e.editorHoverBackground,.05),hc:e.editorWidgetBackground},w.localize(98,null)),e.editorActiveLinkForeground=i("editorLink.activeForeground",{dark:"#4E94CE",light:m.Color.blue,hc:m.Color.cyan},w.localize(99,null)),e.editorInlayHintForeground=i("editorInlayHint.foreground",{dark:f(e.badgeForeground,.8),light:f(e.badgeForeground,.8),hc:e.badgeForeground},w.localize(100,null)),e.editorInlayHintBackground=i("editorInlayHint.background",{dark:f(e.badgeBackground,.6),light:f(e.badgeBackground,.3),hc:e.badgeBackground},w.localize(101,null)),e.editorInlayHintTypeForeground=i("editorInlayHint.typeForeground",{dark:e.editorInlayHintForeground,light:e.editorInlayHintForeground,hc:e.editorInlayHintForeground},w.localize(102,null)),e.editorInlayHintTypeBackground=i("editorInlayHint.typeBackground",{dark:e.editorInlayHintBackground,light:e.editorInlayHintBackground,hc:e.editorInlayHintBackground},w.localize(103,null)),e.editorInlayHintParameterForeground=i("editorInlayHint.parameterForeground",{dark:e.editorInlayHintForeground,light:e.editorInlayHintForeground,hc:e.editorInlayHintForeground},w.localize(104,null)),e.editorInlayHintParameterBackground=i("editorInlayHint.parameterBackground",{dark:e.editorInlayHintBackground,light:e.editorInlayHintBackground,hc:e.editorInlayHintBackground},w.localize(105,null)),e.editorLightBulbForeground=i("editorLightBulb.foreground",{dark:"#FFCC00",light:"#DDB100",hc:"#FFCC00"},w.localize(106,null)),e.editorLightBulbAutoFixForeground=i("editorLightBulbAutoFix.foreground",{dark:"#75BEFF",light:"#007ACC",hc:"#75BEFF"},w.localize(107,null)),e.defaultInsertColor=new m.Color(new m.RGBA(155,185,85,.2)),e.defaultRemoveColor=new m.Color(new m.RGBA(255,0,0,.2)),e.diffInserted=i("diffEditor.insertedTextBackground",{dark:e.defaultInsertColor,light:e.defaultInsertColor,hc:null},w.localize(108,null),!0),e.diffRemoved=i("diffEditor.removedTextBackground",{dark:e.defaultRemoveColor,light:e.defaultRemoveColor,hc:null},w.localize(109,null),!0),e.diffInsertedOutline=i("diffEditor.insertedTextBorder",{dark:null,light:null,hc:"#33ff2eff"},w.localize(110,null)),e.diffRemovedOutline=i("diffEditor.removedTextBorder",{dark:null,light:null,hc:"#FF008F"},w.localize(111,null)),e.diffBorder=i("diffEditor.border",{dark:null,light:null,hc:e.contrastBorder},w.localize(112,null)),e.diffDiagonalFill=i("diffEditor.diagonalFill",{dark:"#cccccc33",light:"#22222233",hc:null},w.localize(113,null)),e.listFocusBackground=i("list.focusBackground",{dark:null,light:null,hc:null},w.localize(114,null)),e.listFocusForeground=i("list.focusForeground",{dark:null,light:null,hc:null},w.localize(115,null)),e.listFocusOutline=i("list.focusOutline",{dark:e.focusBorder,light:e.focusBorder,hc:e.activeContrastBorder},w.localize(116,null)),e.listActiveSelectionBackground=i("list.activeSelectionBackground",{dark:"#094771",light:"#0060C0",hc:null},w.localize(117,null)),e.listActiveSelectionForeground=i("list.activeSelectionForeground",{dark:m.Color.white,light:m.Color.white,hc:null},w.localize(118,null)),e.listActiveSelectionIconForeground=i("list.activeSelectionIconForeground",{dark:null,light:null,hc:null},w.localize(119,null)),e.listInactiveSelectionBackground=i("list.inactiveSelectionBackground",{dark:"#37373D",light:"#E4E6F1",hc:null},w.localize(120,null)),e.listInactiveSelectionForeground=i("list.inactiveSelectionForeground",{dark:null,light:null,hc:null},w.localize(121,null)),e.listInactiveSelectionIconForeground=i("list.inactiveSelectionIconForeground",{dark:null,light:null,hc:null},w.localize(122,null)),e.listInactiveFocusBackground=i("list.inactiveFocusBackground",{dark:null,light:null,hc:null},w.localize(123,null)),e.listInactiveFocusOutline=i("list.inactiveFocusOutline",{dark:null,light:null,hc:null},w.localize(124,null)),e.listHoverBackground=i("list.hoverBackground",{dark:"#2A2D2E",light:"#F0F0F0",hc:null},w.localize(125,null)),e.listHoverForeground=i("list.hoverForeground",{dark:null,light:null,hc:null},w.localize(126,null)),e.listDropBackground=i("list.dropBackground",{dark:"#062F4A",light:"#D6EBFF",hc:null},w.localize(127,null)),e.listHighlightForeground=i("list.highlightForeground",{dark:"#18A3FF",light:"#0066BF",hc:e.focusBorder},w.localize(128,null)),e.listFocusHighlightForeground=i("list.focusHighlightForeground",{dark:e.listHighlightForeground,light:v(e.listActiveSelectionBackground,e.listHighlightForeground,"#9DDDFF"),hc:e.listHighlightForeground},w.localize(129,null)),e.listInvalidItemForeground=i("list.invalidItemForeground",{dark:"#B89500",light:"#B89500",hc:"#B89500"},w.localize(130,null)),e.listErrorForeground=i("list.errorForeground",{dark:"#F88070",light:"#B01011",hc:null},w.localize(131,null)),e.listWarningForeground=i("list.warningForeground",{dark:"#CCA700",light:"#855F00",hc:null},w.localize(132,null)),e.listFilterWidgetBackground=i("listFilterWidget.background",{light:"#efc1ad",dark:"#653723",hc:m.Color.black},w.localize(133,null)),e.listFilterWidgetOutline=i("listFilterWidget.outline",{dark:m.Color.transparent,light:m.Color.transparent,hc:"#f38518"},w.localize(134,null)),e.listFilterWidgetNoMatchesOutline=i("listFilterWidget.noMatchesOutline",{dark:"#BE1100",light:"#BE1100",hc:e.contrastBorder},w.localize(135,null)),e.listFilterMatchHighlight=i("list.filterMatchBackground",{dark:e.editorFindMatchHighlight,light:e.editorFindMatchHighlight,hc:null},w.localize(136,null)),e.listFilterMatchHighlightBorder=i("list.filterMatchBorder",{dark:e.editorFindMatchHighlightBorder,light:e.editorFindMatchHighlightBorder,hc:e.contrastBorder},w.localize(137,null)),e.treeIndentGuidesStroke=i("tree.indentGuidesStroke",{dark:"#585858",light:"#a9a9a9",hc:"#a9a9a9"},w.localize(138,null)),e.tableColumnsBorder=i("tree.tableColumnsBorder",{dark:"#CCCCCC20",light:"#61616120",hc:null},w.localize(139,null)),e.tableOddRowsBackgroundColor=i("tree.tableOddRowsBackground",{dark:f(e.foreground,.04),light:f(e.foreground,.04),hc:null},w.localize(140,null)),e.listDeemphasizedForeground=i("list.deemphasizedForeground",{dark:"#8C8C8C",light:"#8E8E90",hc:"#A7A8A9"},w.localize(141,null)),e._deprecatedQuickInputListFocusBackground=i("quickInput.list.focusBackground",{dark:null,light:null,hc:null},"",void 0,w.localize(142,null)),e.quickInputListFocusForeground=i("quickInputList.focusForeground",{dark:e.listActiveSelectionForeground,light:e.listActiveSelectionForeground,hc:e.listActiveSelectionForeground},w.localize(143,null)),e.quickInputListFocusIconForeground=i("quickInputList.focusIconForeground",{dark:e.listActiveSelectionIconForeground,light:e.listActiveSelectionIconForeground,hc:e.listActiveSelectionIconForeground},w.localize(144,null)),e.quickInputListFocusBackground=i("quickInputList.focusBackground",{dark:S(e._deprecatedQuickInputListFocusBackground,e.listActiveSelectionBackground),light:S(e._deprecatedQuickInputListFocusBackground,e.listActiveSelectionBackground),hc:null},w.localize(145,null)),e.menuBorder=i("menu.border",{dark:null,light:null,hc:e.contrastBorder},w.localize(146,null)),e.menuForeground=i("menu.foreground",{dark:e.selectForeground,light:e.foreground,hc:e.selectForeground},w.localize(147,null)),e.menuBackground=i("menu.background",{dark:e.selectBackground,light:e.selectBackground,hc:e.selectBackground},w.localize(148,null)),e.menuSelectionForeground=i("menu.selectionForeground",{dark:e.listActiveSelectionForeground,light:e.listActiveSelectionForeground,hc:e.listActiveSelectionForeground},w.localize(149,null)),e.menuSelectionBackground=i("menu.selectionBackground",{dark:e.listActiveSelectionBackground,light:e.listActiveSelectionBackground,hc:e.listActiveSelectionBackground},w.localize(150,null)),e.menuSelectionBorder=i("menu.selectionBorder",{dark:null,light:null,hc:e.activeContrastBorder},w.localize(151,null)),e.menuSeparatorBackground=i("menu.separatorBackground",{dark:"#BBBBBB",light:"#888888",hc:e.contrastBorder},w.localize(152,null)),e.toolbarHoverBackground=i("toolbar.hoverBackground",{dark:"#5a5d5e50",light:"#b8b8b850",hc:null},w.localize(153,null)),e.toolbarHoverOutline=i("toolbar.hoverOutline",{dark:null,light:null,hc:e.activeContrastBorder},w.localize(154,null)),e.toolbarActiveBackground=i("toolbar.activeBackground",{dark:u(e.toolbarHoverBackground,.1),light:d(e.toolbarHoverBackground,.1),hc:null},w.localize(155,null)),e.snippetTabstopHighlightBackground=i("editor.snippetTabstopHighlightBackground",{dark:new m.Color(new m.RGBA(124,124,124,.3)),light:new m.Color(new m.RGBA(10,50,100,.2)),hc:new m.Color(new m.RGBA(124,124,124,.3))},w.localize(156,null)),e.snippetTabstopHighlightBorder=i("editor.snippetTabstopHighlightBorder",{dark:null,light:null,hc:null},w.localize(157,null)),e.snippetFinalTabstopHighlightBackground=i("editor.snippetFinalTabstopHighlightBackground",{dark:null,light:null,hc:null},w.localize(158,null)),e.snippetFinalTabstopHighlightBorder=i("editor.snippetFinalTabstopHighlightBorder",{dark:"#525252",light:new m.Color(new m.RGBA(10,50,100,.5)),hc:"#525252"},w.localize(159,null)),e.breadcrumbsForeground=i("breadcrumb.foreground",{light:f(e.foreground,.8),dark:f(e.foreground,.8),hc:f(e.foreground,.8)},w.localize(160,null)),e.breadcrumbsBackground=i("breadcrumb.background",{light:e.editorBackground,dark:e.editorBackground,hc:e.editorBackground},w.localize(161,null)),e.breadcrumbsFocusForeground=i("breadcrumb.focusForeground",{light:d(e.foreground,.2),dark:u(e.foreground,.1),hc:u(e.foreground,.1)},w.localize(162,null)),e.breadcrumbsActiveSelectionForeground=i("breadcrumb.activeSelectionForeground",{light:d(e.foreground,.2),dark:u(e.foreground,.1),hc:u(e.foreground,.1)},w.localize(163,null)),e.breadcrumbsPickerBackground=i("breadcrumbPicker.background",{light:e.editorWidgetBackground,dark:e.editorWidgetBackground,hc:e.editorWidgetBackground},w.localize(164,null));const n=.5,l=m.Color.fromHex("#40C8AE").transparent(n),c=m.Color.fromHex("#40A6FF").transparent(n),r=m.Color.fromHex("#606060").transparent(.4),s=.4,o=1;e.mergeCurrentHeaderBackground=i("merge.currentHeaderBackground",{dark:l,light:l,hc:null},w.localize(165,null),!0),e.mergeCurrentContentBackground=i("merge.currentContentBackground",{dark:f(e.mergeCurrentHeaderBackground,s),light:f(e.mergeCurrentHeaderBackground,s),hc:f(e.mergeCurrentHeaderBackground,s)},w.localize(166,null),!0),e.mergeIncomingHeaderBackground=i("merge.incomingHeaderBackground",{dark:c,light:c,hc:null},w.localize(167,null),!0),e.mergeIncomingContentBackground=i("merge.incomingContentBackground",{dark:f(e.mergeIncomingHeaderBackground,s),light:f(e.mergeIncomingHeaderBackground,s),hc:f(e.mergeIncomingHeaderBackground,s)},w.localize(168,null),!0),e.mergeCommonHeaderBackground=i("merge.commonHeaderBackground",{dark:r,light:r,hc:null},w.localize(169,null),!0),e.mergeCommonContentBackground=i("merge.commonContentBackground",{dark:f(e.mergeCommonHeaderBackground,s),light:f(e.mergeCommonHeaderBackground,s),hc:f(e.mergeCommonHeaderBackground,s)},w.localize(170,null),!0),e.mergeBorder=i("merge.border",{dark:null,light:null,hc:"#C3DF6F"},w.localize(171,null)),e.overviewRulerCurrentContentForeground=i("editorOverviewRuler.currentContentForeground",{dark:f(e.mergeCurrentHeaderBackground,o),light:f(e.mergeCurrentHeaderBackground,o),hc:e.mergeBorder},w.localize(172,null)),e.overviewRulerIncomingContentForeground=i("editorOverviewRuler.incomingContentForeground",{dark:f(e.mergeIncomingHeaderBackground,o),light:f(e.mergeIncomingHeaderBackground,o),hc:e.mergeBorder},w.localize(173,null)),e.overviewRulerCommonContentForeground=i("editorOverviewRuler.commonContentForeground",{dark:f(e.mergeCommonHeaderBackground,o),light:f(e.mergeCommonHeaderBackground,o),hc:e.mergeBorder},w.localize(174,null)),e.overviewRulerFindMatchForeground=i("editorOverviewRuler.findMatchForeground",{dark:"#d186167e",light:"#d186167e",hc:"#AB5A00"},w.localize(175,null),!0),e.overviewRulerSelectionHighlightForeground=i("editorOverviewRuler.selectionHighlightForeground",{dark:"#A0A0A0CC",light:"#A0A0A0CC",hc:"#A0A0A0CC"},w.localize(176,null),!0),e.minimapFindMatch=i("minimap.findMatchHighlight",{light:"#d18616",dark:"#d18616",hc:"#AB5A00"},w.localize(177,null),!0),e.minimapSelectionOccurrenceHighlight=i("minimap.selectionOccurrenceHighlight",{light:"#c9c9c9",dark:"#676767",hc:"#ffffff"},w.localize(178,null),!0),e.minimapSelection=i("minimap.selectionHighlight",{light:"#ADD6FF",dark:"#264F78",hc:"#ffffff"},w.localize(179,null),!0),e.minimapError=i("minimap.errorHighlight",{dark:new m.Color(new m.RGBA(255,18,18,.7)),light:new m.Color(new m.RGBA(255,18,18,.7)),hc:new m.Color(new m.RGBA(255,50,50,1))},w.localize(180,null)),e.minimapWarning=i("minimap.warningHighlight",{dark:e.editorWarningForeground,light:e.editorWarningForeground,hc:e.editorWarningBorder},w.localize(181,null)),e.minimapBackground=i("minimap.background",{dark:null,light:null,hc:null},w.localize(182,null)),e.minimapForegroundOpacity=i("minimap.foregroundOpacity",{dark:m.Color.fromHex("#000f"),light:m.Color.fromHex("#000f"),hc:m.Color.fromHex("#000f")},w.localize(183,null)),e.minimapSliderBackground=i("minimapSlider.background",{light:f(e.scrollbarSliderBackground,.5),dark:f(e.scrollbarSliderBackground,.5),hc:f(e.scrollbarSliderBackground,.5)},w.localize(184,null)),e.minimapSliderHoverBackground=i("minimapSlider.hoverBackground",{light:f(e.scrollbarSliderHoverBackground,.5),dark:f(e.scrollbarSliderHoverBackground,.5),hc:f(e.scrollbarSliderHoverBackground,.5)},w.localize(185,null)),e.minimapSliderActiveBackground=i("minimapSlider.activeBackground",{light:f(e.scrollbarSliderActiveBackground,.5),dark:f(e.scrollbarSliderActiveBackground,.5),hc:f(e.scrollbarSliderActiveBackground,.5)},w.localize(186,null)),e.problemsErrorIconForeground=i("problemsErrorIcon.foreground",{dark:e.editorErrorForeground,light:e.editorErrorForeground,hc:e.editorErrorForeground},w.localize(187,null)),e.problemsWarningIconForeground=i("problemsWarningIcon.foreground",{dark:e.editorWarningForeground,light:e.editorWarningForeground,hc:e.editorWarningForeground},w.localize(188,null)),e.problemsInfoIconForeground=i("problemsInfoIcon.foreground",{dark:e.editorInfoForeground,light:e.editorInfoForeground,hc:e.editorInfoForeground},w.localize(189,null)),e.chartsForeground=i("charts.foreground",{dark:e.foreground,light:e.foreground,hc:e.foreground},w.localize(190,null)),e.chartsLines=i("charts.lines",{dark:f(e.foreground,.5),light:f(e.foreground,.5),hc:f(e.foreground,.5)},w.localize(191,null)),e.chartsRed=i("charts.red",{dark:e.editorErrorForeground,light:e.editorErrorForeground,hc:e.editorErrorForeground},w.localize(192,null)),e.chartsBlue=i("charts.blue",{dark:e.editorInfoForeground,light:e.editorInfoForeground,hc:e.editorInfoForeground},w.localize(193,null)),e.chartsYellow=i("charts.yellow",{dark:e.editorWarningForeground,light:e.editorWarningForeground,hc:e.editorWarningForeground},w.localize(194,null)),e.chartsOrange=i("charts.orange",{dark:e.minimapFindMatch,light:e.minimapFindMatch,hc:e.minimapFindMatch},w.localize(195,null)),e.chartsGreen=i("charts.green",{dark:"#89D185",light:"#388A34",hc:"#89D185"},w.localize(196,null)),e.chartsPurple=i("charts.purple",{dark:"#B180D7",light:"#652D90",hc:"#B180D7"},w.localize(197,null));function a(N,k){var M,O,B;switch(N.op){case 0:return(M=_(N.value,k))===null||M===void 0?void 0:M.darken(N.factor);case 1:return(O=_(N.value,k))===null||O===void 0?void 0:O.lighten(N.factor);case 2:return(B=_(N.value,k))===null||B===void 0?void 0:B.transparent(N.factor);case 3:for(const T of N.values){const R=_(T,k);if(R)return R}return;case 5:return _(k.defines(N.if)?N.then:N.else,k);case 4:{const T=_(N.value,k);if(!T)return;const R=_(N.background,k);return R?T.isDarkerThan(R)?m.Color.getLighterColor(T,R,N.factor).transparent(N.transparency):m.Color.getDarkerColor(T,R,N.factor).transparent(N.transparency):T.transparent(N.factor*N.transparency)}default:throw(0,I.assertNever)(N)}}e.executeTransform=a;function d(N,k){return{op:0,value:N,factor:k}}e.darken=d;function u(N,k){return{op:1,value:N,factor:k}}e.lighten=u;function f(N,k){return{op:2,value:N,factor:k}}e.transparent=f;function S(...N){return{op:3,values:N}}e.oneOf=S;function v(N,k,M){return{op:5,if:N,then:k,else:M}}e.ifDefinedThenElse=v;function C(N,k,M,O){return{op:4,value:N,background:k,factor:M,transparency:O}}function _(N,k){if(N!==null){if(typeof N=="string")return N[0]==="#"?m.Color.fromHex(N):k.getColor(N);if(N instanceof m.Color)return N;if(typeof N=="object")return a(N,k)}}e.resolveColorValue=_,e.workbenchColorsSchemaId="vscode://schemas/workbench-colors";let L=p.Registry.as(b.Extensions.JSONContribution);L.registerSchema(e.workbenchColorsSchemaId,t.getColorSchema());const E=new y.RunOnceScheduler(()=>L.notifySchemaChanged(e.workbenchColorsSchemaId),200);t.onDidChangeSchema(()=>{E.isScheduled()||E.schedule()})}),define(te[130],ie([1,0,7,96,56,10,2,23]),function(j,e,y,m,D,I,w,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DynamicCssRules=e.GlobalEditorMouseMoveMonitor=e.EditorPointerEventFactory=e.EditorMouseEventFactory=e.EditorMouseEvent=e.createCoordinatesRelativeToEditor=e.createEditorPagePosition=e.CoordinatesRelativeToEditor=e.EditorPagePosition=e.ClientCoordinates=e.PageCoordinates=void 0;class p{constructor(f,S){this.x=f,this.y=S,this._pageCoordinatesBrand=void 0}toClientCoordinates(){return new h(this.x-y.StandardWindow.scrollX,this.y-y.StandardWindow.scrollY)}}e.PageCoordinates=p;class h{constructor(f,S){this.clientX=f,this.clientY=S,this._clientCoordinatesBrand=void 0}toPageCoordinates(){return new p(this.clientX+y.StandardWindow.scrollX,this.clientY+y.StandardWindow.scrollY)}}e.ClientCoordinates=h;class g{constructor(f,S,v,C){this.x=f,this.y=S,this.width=v,this.height=C,this._editorPagePositionBrand=void 0}}e.EditorPagePosition=g;class t{constructor(f,S){this.x=f,this.y=S,this._positionRelativeToEditorBrand=void 0}}e.CoordinatesRelativeToEditor=t;function i(u){const f=y.getDomNodePagePosition(u);return new g(f.left,f.top,f.width,f.height)}e.createEditorPagePosition=i;function n(u,f,S){const v=f.width/u.offsetWidth,C=f.height/u.offsetHeight,_=(S.x-f.x)/v,L=(S.y-f.y)/C;return new t(_,L)}e.createCoordinatesRelativeToEditor=n;class l extends D.StandardMouseEvent{constructor(f,S){super(f);this._editorMouseEventBrand=void 0,this.pos=new p(this.posx,this.posy),this.editorPos=i(S),this.relativePos=n(S,this.editorPos,this.pos)}}e.EditorMouseEvent=l;class c{constructor(f){this._editorViewDomNode=f}_create(f){return new l(f,this._editorViewDomNode)}onContextMenu(f,S){return y.addDisposableListener(f,"contextmenu",v=>{S(this._create(v))})}onMouseUp(f,S){return y.addDisposableListener(f,"mouseup",v=>{S(this._create(v))})}onMouseDown(f,S){return y.addDisposableListener(f,"mousedown",v=>{S(this._create(v))})}onMouseLeave(f,S){return y.addDisposableNonBubblingMouseOutListener(f,v=>{S(this._create(v))})}onMouseMoveThrottled(f,S,v,C){const _=(L,E)=>v(L,this._create(E));return y.addDisposableThrottledListener(f,"mousemove",S,_,C)}}e.EditorMouseEventFactory=c;class r{constructor(f){this._editorViewDomNode=f}_create(f){return new l(f,this._editorViewDomNode)}onPointerUp(f,S){return y.addDisposableListener(f,"pointerup",v=>{S(this._create(v))})}onPointerDown(f,S){return y.addDisposableListener(f,"pointerdown",v=>{S(this._create(v))})}onPointerLeave(f,S){return y.addDisposableNonBubblingPointerOutListener(f,v=>{S(this._create(v))})}onPointerMoveThrottled(f,S,v,C){const _=(L,E)=>v(L,this._create(E));return y.addDisposableThrottledListener(f,"pointermove",S,_,C)}}e.EditorPointerEventFactory=r;class s extends w.Disposable{constructor(f){super();this._editorViewDomNode=f,this._globalMouseMoveMonitor=this._register(new m.GlobalMouseMoveMonitor),this._keydownListener=null}startMonitoring(f,S,v,C,_){this._keydownListener=y.addStandardDisposableListener(document,"keydown",E=>{E.toKeybinding().isModifierKey()||this._globalMouseMoveMonitor.stopMonitoring(!0,E.browserEvent)},!0);const L=(E,N)=>v(E,new l(N,this._editorViewDomNode));this._globalMouseMoveMonitor.startMonitoring(f,S,L,C,E=>{this._keydownListener.dispose(),_(E)})}stopMonitoring(){this._globalMouseMoveMonitor.stopMonitoring(!0)}}e.GlobalEditorMouseMoveMonitor=s;class o{constructor(f){this._editor=f,this._instanceId=++o._idPool,this._counter=0,this._rules=new Map,this._garbageCollectionScheduler=new I.RunOnceScheduler(()=>this.garbageCollect(),1e3)}createClassNameRef(f){const S=this.getOrCreateRule(f);return S.increaseRefCount(),{className:S.className,dispose:()=>{S.decreaseRefCount(),this._garbageCollectionScheduler.schedule()}}}getOrCreateRule(f){const S=this.computeUniqueKey(f);let v=this._rules.get(S);if(!v){const C=this._counter++;v=new a(S,`dyn-rule-${this._instanceId}-${C}`,y.isInShadowDOM(this._editor.getContainerDomNode())?this._editor.getContainerDomNode():void 0,f),this._rules.set(S,v)}return v}computeUniqueKey(f){return JSON.stringify(f)}garbageCollect(){for(const f of this._rules.values())f.hasReferences()||(this._rules.delete(f.key),f.dispose())}}e.DynamicCssRules=o,o._idPool=0;class a{constructor(f,S,v,C){this.key=f,this.className=S,this.properties=C,this._referenceCount=0,this._styleElement=y.createStyleSheet(v),this._styleElement.textContent=this.getCssText(this.className,this.properties)}getCssText(f,S){let v=`.${f} {`;for(const C in S){const _=S[C];let L;typeof _=="object"?L=`var(${(0,b.asCssVariableName)(_.id)})`:L=_,v+=`
|
||
${d(C)}: ${L};`}return v+=`
|
||
}`,v}dispose(){this._styleElement.remove()}increaseRefCount(){this._referenceCount++}decreaseRefCount(){this._referenceCount--}hasReferences(){return this._referenceCount>0}}function d(u){return u.replace(/(^[A-Z])/,([f])=>f.toLowerCase()).replace(/([A-Z])/g,([f])=>`-${f.toLowerCase()}`)}}),define(te[131],ie([1,0,23]),function(j,e,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.attachMenuStyler=e.defaultMenuStyles=e.defaultListStyles=e.attachListStyler=e.attachBadgeStyler=e.attachStyler=e.computeStyles=void 0;function m(p,h){const g=Object.create(null);for(let t in h){const i=h[t];i&&(g[t]=(0,y.resolveColorValue)(i,p))}return g}e.computeStyles=m;function D(p,h,g){function t(){const i=m(p.getColorTheme(),h);typeof g=="function"?g(i):g.style(i)}return t(),p.onDidColorThemeChange(t)}e.attachStyler=D;function I(p,h,g){return D(h,{badgeBackground:(g==null?void 0:g.badgeBackground)||y.badgeBackground,badgeForeground:(g==null?void 0:g.badgeForeground)||y.badgeForeground,badgeBorder:y.contrastBorder},p)}e.attachBadgeStyler=I;function w(p,h,g){return D(h,Object.assign(Object.assign({},e.defaultListStyles),g||{}),p)}e.attachListStyler=w,e.defaultListStyles={listFocusBackground:y.listFocusBackground,listFocusForeground:y.listFocusForeground,listFocusOutline:y.listFocusOutline,listActiveSelectionBackground:y.listActiveSelectionBackground,listActiveSelectionForeground:y.listActiveSelectionForeground,listActiveSelectionIconForeground:y.listActiveSelectionIconForeground,listFocusAndSelectionBackground:y.listActiveSelectionBackground,listFocusAndSelectionForeground:y.listActiveSelectionForeground,listInactiveSelectionBackground:y.listInactiveSelectionBackground,listInactiveSelectionIconForeground:y.listInactiveSelectionIconForeground,listInactiveSelectionForeground:y.listInactiveSelectionForeground,listInactiveFocusBackground:y.listInactiveFocusBackground,listInactiveFocusOutline:y.listInactiveFocusOutline,listHoverBackground:y.listHoverBackground,listHoverForeground:y.listHoverForeground,listDropBackground:y.listDropBackground,listSelectionOutline:y.activeContrastBorder,listHoverOutline:y.activeContrastBorder,listFilterWidgetBackground:y.listFilterWidgetBackground,listFilterWidgetOutline:y.listFilterWidgetOutline,listFilterWidgetNoMatchesOutline:y.listFilterWidgetNoMatchesOutline,listMatchesShadow:y.widgetShadow,treeIndentGuidesStroke:y.treeIndentGuidesStroke,tableColumnsBorder:y.tableColumnsBorder,tableOddRowsBackgroundColor:y.tableOddRowsBackgroundColor},e.defaultMenuStyles={shadowColor:y.widgetShadow,borderColor:y.menuBorder,foregroundColor:y.menuForeground,backgroundColor:y.menuBackground,selectionForegroundColor:y.menuSelectionForeground,selectionBackgroundColor:y.menuSelectionBackground,selectionBorderColor:y.menuSelectionBorder,separatorColor:y.menuSeparatorBackground,scrollbarShadow:y.scrollbarShadow,scrollbarSliderBackground:y.scrollbarSliderBackground,scrollbarSliderHoverBackground:y.scrollbarSliderHoverBackground,scrollbarSliderActiveBackground:y.scrollbarSliderActiveBackground};function b(p,h,g){return D(h,Object.assign(Object.assign({},e.defaultMenuStyles),g),p)}e.attachMenuStyler=b}),define(te[634],ie([1,0,7,56,487,44,13,2,131,396]),function(j,e,y,m,D,I,w,b,p){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ContextMenuHandler=void 0;class h{constructor(t,i,n,l,c){this.contextViewService=t,this.telemetryService=i,this.notificationService=n,this.keybindingService=l,this.themeService=c,this.focusToReturn=null,this.block=null,this.options={blockMouse:!0}}configure(t){this.options=t}showContextMenu(t){const i=t.getActions();if(!i.length)return;this.focusToReturn=document.activeElement;let n,l=(0,y.isHTMLElement)(t.domForShadowRoot)?t.domForShadowRoot:void 0;this.contextViewService.showContextView({getAnchor:()=>t.getAnchor(),canRelayout:!1,anchorAlignment:t.anchorAlignment,anchorAxisAlignment:t.anchorAxisAlignment,render:c=>{let r=t.getMenuClassName?t.getMenuClassName():"";r&&(c.className+=" "+r),this.options.blockMouse&&(this.block=c.appendChild((0,y.$)(".context-view-block")),this.block.style.position="fixed",this.block.style.cursor="initial",this.block.style.left="0",this.block.style.top="0",this.block.style.width="100%",this.block.style.height="100%",this.block.style.zIndex="-1",(0,y.addDisposableListener)(this.block,y.EventType.MOUSE_DOWN,a=>a.stopPropagation()));const s=new b.DisposableStore,o=t.actionRunner||new I.ActionRunner;return o.onBeforeRun(this.onActionRun,this,s),o.onDidRun(this.onDidActionRun,this,s),n=new D.Menu(c,i,{actionViewItemProvider:t.getActionViewItem,context:t.getActionsContext?t.getActionsContext():null,actionRunner:o,getKeyBinding:t.getKeyBinding?t.getKeyBinding:a=>this.keybindingService.lookupKeybinding(a.id)}),s.add((0,p.attachMenuStyler)(n,this.themeService)),n.onDidCancel(()=>this.contextViewService.hideContextView(!0),null,s),n.onDidBlur(()=>this.contextViewService.hideContextView(!0),null,s),s.add((0,y.addDisposableListener)(window,y.EventType.BLUR,()=>this.contextViewService.hideContextView(!0))),s.add((0,y.addDisposableListener)(window,y.EventType.MOUSE_DOWN,a=>{if(a.defaultPrevented)return;let d=new m.StandardMouseEvent(a),u=d.target;if(!d.rightButton){for(;u;){if(u===c)return;u=u.parentElement}this.contextViewService.hideContextView(!0)}})),(0,b.combinedDisposable)(s,n)},focus:()=>{n&&n.focus(!!t.autoSelectFirstItem)},onHide:c=>{t.onHide&&t.onHide(!!c),this.block&&(this.block.remove(),this.block=null),this.focusToReturn&&this.focusToReturn.focus()}},l,!!l)}onActionRun(t){this.telemetryService.publicLog2("workbenchActionExecuted",{id:t.action.id,from:"contextMenu"}),this.contextViewService.hideContextView(!1),this.focusToReturn&&this.focusToReturn.focus()}onDidActionRun(t){t.error&&!(0,w.isCancellationError)(t.error)&&this.notificationService.error(t.error)}}e.ContextMenuHandler=h}),define(te[132],ie([1,0]),function(j,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ColorScheme=void 0;var y;(function(m){m.DARK="dark",m.LIGHT="light",m.HIGH_CONTRAST="hc"})(y=e.ColorScheme||(e.ColorScheme={}))}),define(te[278],ie([1,0,34,30,17,398,116,151,122,132,31]),function(j,e,y,m,D,I,w,b,p,h,g){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ViewLine=e.ViewLineOptions=e.DomReadingContext=void 0;const t=function(){return D.isNative?!0:!(D.isLinux||y.isFirefox||y.isSafari)}();let i=!0;class n{constructor(S,v){this._domNode=S,this._clientRectDeltaLeft=0,this._clientRectScale=1,this._clientRectRead=!1,this.endNode=v}readClientRect(){if(!this._clientRectRead){this._clientRectRead=!0;const S=this._domNode.getBoundingClientRect();this._clientRectDeltaLeft=S.left,this._clientRectScale=S.width/this._domNode.offsetWidth}}get clientRectDeltaLeft(){return this._clientRectRead||this.readClientRect(),this._clientRectDeltaLeft}get clientRectScale(){return this._clientRectRead||this.readClientRect(),this._clientRectScale}}e.DomReadingContext=n;class l{constructor(S,v){this.themeType=v;const C=S.options,_=C.get(44);this.renderWhitespace=C.get(88),this.renderControlCharacters=C.get(83),this.spaceWidth=_.spaceWidth,this.middotWidth=_.middotWidth,this.wsmiddotWidth=_.wsmiddotWidth,this.useMonospaceOptimizations=_.isMonospace&&!C.get(29),this.canUseHalfwidthRightwardsArrow=_.canUseHalfwidthRightwardsArrow,this.lineHeight=C.get(59),this.stopRenderingLineAfter=C.get(105),this.fontLigatures=C.get(45)}equals(S){return this.themeType===S.themeType&&this.renderWhitespace===S.renderWhitespace&&this.renderControlCharacters===S.renderControlCharacters&&this.spaceWidth===S.spaceWidth&&this.middotWidth===S.middotWidth&&this.wsmiddotWidth===S.wsmiddotWidth&&this.useMonospaceOptimizations===S.useMonospaceOptimizations&&this.canUseHalfwidthRightwardsArrow===S.canUseHalfwidthRightwardsArrow&&this.lineHeight===S.lineHeight&&this.stopRenderingLineAfter===S.stopRenderingLineAfter&&this.fontLigatures===S.fontLigatures}}e.ViewLineOptions=l;class c{constructor(S){this._options=S,this._isMaybeInvalid=!0,this._renderedViewLine=null}getDomNode(){return this._renderedViewLine&&this._renderedViewLine.domNode?this._renderedViewLine.domNode.domNode:null}setDomNode(S){if(this._renderedViewLine)this._renderedViewLine.domNode=(0,m.createFastDomNode)(S);else throw new Error("I have no rendered view line to set the dom node to...")}onContentChanged(){this._isMaybeInvalid=!0}onTokensChanged(){this._isMaybeInvalid=!0}onDecorationsChanged(){this._isMaybeInvalid=!0}onOptionsChanged(S){this._isMaybeInvalid=!0,this._options=S}onSelectionChanged(){return this._options.themeType===h.ColorScheme.HIGH_CONTRAST||this._options.renderWhitespace==="selection"?(this._isMaybeInvalid=!0,!0):!1}renderLine(S,v,C,_){if(this._isMaybeInvalid===!1)return!1;this._isMaybeInvalid=!1;const L=C.getViewLineRenderingData(S),E=this._options,N=b.LineDecoration.filter(L.inlineDecorations,S,L.minColumn,L.maxColumn);let k=null;if(E.themeType===h.ColorScheme.HIGH_CONTRAST||this._options.renderWhitespace==="selection"){const T=C.selections;for(const R of T){if(R.endLineNumber<S||R.startLineNumber>S)continue;const P=R.startLineNumber===S?R.startColumn:L.minColumn,F=R.endLineNumber===S?R.endColumn:L.maxColumn;P<F&&(E.themeType===h.ColorScheme.HIGH_CONTRAST||this._options.renderWhitespace!=="selection"?N.push(new b.LineDecoration(P,F,"inline-selected-text",0)):(k||(k=[]),k.push(new p.LineRange(P-1,F-1))))}}const M=new p.RenderLineInput(E.useMonospaceOptimizations,E.canUseHalfwidthRightwardsArrow,L.content,L.continuesWithWrappedLine,L.isBasicASCII,L.containsRTL,L.minColumn-1,L.tokens,N,L.tabSize,L.startVisibleColumn,E.spaceWidth,E.middotWidth,E.wsmiddotWidth,E.stopRenderingLineAfter,E.renderWhitespace,E.renderControlCharacters,E.fontLigatures!==g.EditorFontLigatures.OFF,k);if(this._renderedViewLine&&this._renderedViewLine.input.equals(M))return!1;_.appendASCIIString('<div style="top:'),_.appendASCIIString(String(v)),_.appendASCIIString("px;height:"),_.appendASCIIString(String(this._options.lineHeight)),_.appendASCIIString('px;" class="'),_.appendASCIIString(c.CLASS_NAME),_.appendASCIIString('">');const O=(0,p.renderViewLine)(M,_);_.appendASCIIString("</div>");let B=null;return i&&t&&L.isBasicASCII&&E.useMonospaceOptimizations&&O.containsForeignElements===0&&L.content.length<300&&M.lineTokens.getCount()<100&&(B=new r(this._renderedViewLine?this._renderedViewLine.domNode:null,M,O.characterMapping)),B||(B=a(this._renderedViewLine?this._renderedViewLine.domNode:null,M,O.characterMapping,O.containsRTL,O.containsForeignElements)),this._renderedViewLine=B,!0}layoutLine(S,v){this._renderedViewLine&&this._renderedViewLine.domNode&&(this._renderedViewLine.domNode.setTop(v),this._renderedViewLine.domNode.setHeight(this._options.lineHeight))}getWidth(){return this._renderedViewLine?this._renderedViewLine.getWidth():0}getWidthIsFast(){return this._renderedViewLine?this._renderedViewLine.getWidthIsFast():!0}needsMonospaceFontCheck(){return this._renderedViewLine?this._renderedViewLine instanceof r:!1}monospaceAssumptionsAreValid(){return this._renderedViewLine&&this._renderedViewLine instanceof r?this._renderedViewLine.monospaceAssumptionsAreValid():i}onMonospaceAssumptionsInvalidated(){this._renderedViewLine&&this._renderedViewLine instanceof r&&(this._renderedViewLine=this._renderedViewLine.toSlowRenderedLine())}getVisibleRangesForRange(S,v,C,_){if(!this._renderedViewLine)return null;v=Math.min(this._renderedViewLine.input.lineContent.length+1,Math.max(1,v)),C=Math.min(this._renderedViewLine.input.lineContent.length+1,Math.max(1,C));const L=this._renderedViewLine.input.stopRenderingLineAfter;let E=!1;L!==-1&&v>L+1&&C>L+1&&(E=!0),L!==-1&&v>L+1&&(v=L+1),L!==-1&&C>L+1&&(C=L+1);const N=this._renderedViewLine.getVisibleRangesForRange(S,v,C,_);return N&&N.length>0?new w.VisibleRanges(E,N):null}getColumnOfNodeOffset(S,v,C){return this._renderedViewLine?this._renderedViewLine.getColumnOfNodeOffset(S,v,C):1}}e.ViewLine=c,c.CLASS_NAME="view-line";class r{constructor(S,v,C){this.domNode=S,this.input=v,this._characterMapping=C,this._charWidth=v.spaceWidth}getWidth(){return Math.round(this._getCharPosition(this._characterMapping.length))}getWidthIsFast(){return!0}monospaceAssumptionsAreValid(){if(!this.domNode)return i;const S=this.getWidth(),v=this.domNode.domNode.firstChild.offsetWidth;return Math.abs(S-v)>=2&&(console.warn("monospace assumptions have been violated, therefore disabling monospace optimizations!"),i=!1),i}toSlowRenderedLine(){return a(this.domNode,this.input,this._characterMapping,!1,0)}getVisibleRangesForRange(S,v,C,_){const L=this._getCharPosition(v),E=this._getCharPosition(C);return[new w.FloatHorizontalRange(L,E-L)]}_getCharPosition(S){const v=this._characterMapping.getAbsoluteOffset(S);return this._charWidth*v}getColumnOfNodeOffset(S,v,C){const _=v.textContent.length;let L=-1;for(;v;)v=v.previousSibling,L++;return this._characterMapping.getColumn(new p.DomPosition(L,C),_)}}class s{constructor(S,v,C,_,L){if(this.domNode=S,this.input=v,this._characterMapping=C,this._isWhitespaceOnly=/^\s*$/.test(v.lineContent),this._containsForeignElements=L,this._cachedWidth=-1,this._pixelOffsetCache=null,!_||this._characterMapping.length===0){this._pixelOffsetCache=new Float32Array(Math.max(2,this._characterMapping.length+1));for(let E=0,N=this._characterMapping.length;E<=N;E++)this._pixelOffsetCache[E]=-1}}_getReadingTarget(S){return S.domNode.firstChild}getWidth(){return this.domNode?(this._cachedWidth===-1&&(this._cachedWidth=this._getReadingTarget(this.domNode).offsetWidth),this._cachedWidth):0}getWidthIsFast(){return this._cachedWidth!==-1}getVisibleRangesForRange(S,v,C,_){if(!this.domNode)return null;if(this._pixelOffsetCache!==null){const L=this._readPixelOffset(this.domNode,S,v,_);if(L===-1)return null;const E=this._readPixelOffset(this.domNode,S,C,_);return E===-1?null:[new w.FloatHorizontalRange(L,E-L)]}return this._readVisibleRangesForRange(this.domNode,S,v,C,_)}_readVisibleRangesForRange(S,v,C,_,L){if(C===_){const E=this._readPixelOffset(S,v,C,L);return E===-1?null:[new w.FloatHorizontalRange(E,0)]}else return this._readRawVisibleRangesForRange(S,C,_,L)}_readPixelOffset(S,v,C,_){if(this._characterMapping.length===0){if(this._containsForeignElements===0||this._containsForeignElements===2)return 0;if(this._containsForeignElements===1)return this.getWidth();const L=this._getReadingTarget(S);return L.firstChild?L.firstChild.offsetWidth:0}if(this._pixelOffsetCache!==null){const L=this._pixelOffsetCache[C];if(L!==-1)return L;const E=this._actualReadPixelOffset(S,v,C,_);return this._pixelOffsetCache[C]=E,E}return this._actualReadPixelOffset(S,v,C,_)}_actualReadPixelOffset(S,v,C,_){if(this._characterMapping.length===0){const k=I.RangeUtil.readHorizontalRanges(this._getReadingTarget(S),0,0,0,0,_.clientRectDeltaLeft,_.clientRectScale,_.endNode);return!k||k.length===0?-1:k[0].left}if(C===this._characterMapping.length&&this._isWhitespaceOnly&&this._containsForeignElements===0)return this.getWidth();const L=this._characterMapping.getDomPosition(C),E=I.RangeUtil.readHorizontalRanges(this._getReadingTarget(S),L.partIndex,L.charIndex,L.partIndex,L.charIndex,_.clientRectDeltaLeft,_.clientRectScale,_.endNode);if(!E||E.length===0)return-1;const N=E[0].left;if(this.input.isBasicASCII){const k=this._characterMapping.getAbsoluteOffset(C),M=Math.round(this.input.spaceWidth*k);if(Math.abs(M-N)<=1)return M}return N}_readRawVisibleRangesForRange(S,v,C,_){if(v===1&&C===this._characterMapping.length)return[new w.FloatHorizontalRange(0,this.getWidth())];const L=this._characterMapping.getDomPosition(v),E=this._characterMapping.getDomPosition(C);return I.RangeUtil.readHorizontalRanges(this._getReadingTarget(S),L.partIndex,L.charIndex,E.partIndex,E.charIndex,_.clientRectDeltaLeft,_.clientRectScale,_.endNode)}getColumnOfNodeOffset(S,v,C){const _=v.textContent.length;let L=-1;for(;v;)v=v.previousSibling,L++;return this._characterMapping.getColumn(new p.DomPosition(L,C),_)}}class o extends s{_readVisibleRangesForRange(S,v,C,_,L){const E=super._readVisibleRangesForRange(S,v,C,_,L);if(!E||E.length===0||C===_||C===1&&_===this._characterMapping.length)return E;if(!this.input.containsRTL){const N=this._readPixelOffset(S,v,_,L);if(N!==-1){const k=E[E.length-1];k.left<N&&(k.width=N-k.left)}}return E}}const a=function(){return y.isWebKit?d:u}();function d(f,S,v,C,_){return new o(f,S,v,C,_)}function u(f,S,v,C,_){return new s(f,S,v,C,_)}}),define(te[279],ie([1,0,130,50,278,11,3,68,7,238]),function(j,e,y,m,D,I,w,b,p,h){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.shadowCaretRangeFromPoint=e.MouseTargetFactory=e.HitTestContext=e.MouseTarget=e.PointerHandlerLastRenderData=void 0;class g{constructor(C=null){this.hitTarget=C,this.type=0}}class t{constructor(C,_,L){this.position=C,this.spanNode=_,this.injectedText=L,this.type=1}}var i;(function(v){function C(_,L,E){const N=_.getPositionFromDOMInfo(L,E);return N?new t(N,L,null):new g(L)}v.createFromDOMInfo=C})(i||(i={}));class n{constructor(C,_){this.lastViewCursorsRenderData=C,this.lastTextareaPosition=_}}e.PointerHandlerLastRenderData=n;class l{static _deduceRage(C,_=null){return!_&&C?new w.Range(C.lineNumber,C.column,C.lineNumber,C.column):_??null}static createUnknown(C,_,L){return{type:0,element:C,mouseColumn:_,position:L,range:this._deduceRage(L)}}static createTextarea(C,_){return{type:1,element:C,mouseColumn:_,position:null,range:null}}static createMargin(C,_,L,E,N,k){return{type:C,element:_,mouseColumn:L,position:E,range:N,detail:k}}static createViewZone(C,_,L,E,N){return{type:C,element:_,mouseColumn:L,position:E,range:this._deduceRage(E),detail:N}}static createContentText(C,_,L,E,N){return{type:6,element:C,mouseColumn:_,position:L,range:this._deduceRage(L,E),detail:N}}static createContentEmpty(C,_,L,E){return{type:7,element:C,mouseColumn:_,position:L,range:this._deduceRage(L),detail:E}}static createContentWidget(C,_,L){return{type:9,element:C,mouseColumn:_,position:null,range:null,detail:L}}static createScrollbar(C,_,L){return{type:11,element:C,mouseColumn:_,position:L,range:this._deduceRage(L)}}static createOverlayWidget(C,_,L){return{type:12,element:C,mouseColumn:_,position:null,range:null,detail:L}}static createOutsideEditor(C,_){return{type:13,element:null,mouseColumn:C,position:_,range:this._deduceRage(_)}}static _typeToString(C){return C===1?"TEXTAREA":C===2?"GUTTER_GLYPH_MARGIN":C===3?"GUTTER_LINE_NUMBERS":C===4?"GUTTER_LINE_DECORATIONS":C===5?"GUTTER_VIEW_ZONE":C===6?"CONTENT_TEXT":C===7?"CONTENT_EMPTY":C===8?"CONTENT_VIEW_ZONE":C===9?"CONTENT_WIDGET":C===10?"OVERVIEW_RULER":C===11?"SCROLLBAR":C===12?"OVERLAY_WIDGET":"UNKNOWN"}static toString(C){return this._typeToString(C.type)+": "+C.position+" - "+C.range+" - "+JSON.stringify(C.detail)}}e.MouseTarget=l;class c{static isTextArea(C){return C.length===2&&C[0]===3&&C[1]===6}static isChildOfViewLines(C){return C.length>=4&&C[0]===3&&C[3]===7}static isStrictChildOfViewLines(C){return C.length>4&&C[0]===3&&C[3]===7}static isChildOfScrollableElement(C){return C.length>=2&&C[0]===3&&C[1]===5}static isChildOfMinimap(C){return C.length>=2&&C[0]===3&&C[1]===8}static isChildOfContentWidgets(C){return C.length>=4&&C[0]===3&&C[3]===1}static isChildOfOverflowingContentWidgets(C){return C.length>=1&&C[0]===2}static isChildOfOverlayWidgets(C){return C.length>=2&&C[0]===3&&C[1]===4}}class r{constructor(C,_,L){this.model=C.model;const E=C.configuration.options;this.layoutInfo=E.get(131),this.viewDomNode=_.viewDomNode,this.lineHeight=E.get(59),this.stickyTabStops=E.get(104),this.typicalHalfwidthCharacterWidth=E.get(44).typicalHalfwidthCharacterWidth,this.lastRenderData=L,this._context=C,this._viewHelper=_}getZoneAtCoord(C){return r.getZoneAtCoord(this._context,C)}static getZoneAtCoord(C,_){const L=C.viewLayout.getWhitespaceAtVerticalOffset(_);if(L){const E=L.verticalOffset+L.height/2,N=C.model.getLineCount();let k=null,M,O=null;return L.afterLineNumber!==N&&(O=new I.Position(L.afterLineNumber+1,1)),L.afterLineNumber>0&&(k=new I.Position(L.afterLineNumber,C.model.getLineMaxColumn(L.afterLineNumber))),O===null?M=k:k===null?M=O:_<E?M=k:M=O,{viewZoneId:L.id,afterLineNumber:L.afterLineNumber,positionBefore:k,positionAfter:O,position:M}}return null}getFullLineRangeAtCoord(C){if(this._context.viewLayout.isAfterLines(C)){const E=this._context.model.getLineCount(),N=this._context.model.getLineMaxColumn(E);return{range:new w.Range(E,N,E,N),isAfterLines:!0}}const _=this._context.viewLayout.getLineNumberAtVerticalOffset(C),L=this._context.model.getLineMaxColumn(_);return{range:new w.Range(_,1,_,L),isAfterLines:!1}}getLineNumberAtVerticalOffset(C){return this._context.viewLayout.getLineNumberAtVerticalOffset(C)}isAfterLines(C){return this._context.viewLayout.isAfterLines(C)}isInTopPadding(C){return this._context.viewLayout.isInTopPadding(C)}isInBottomPadding(C){return this._context.viewLayout.isInBottomPadding(C)}getVerticalOffsetForLineNumber(C){return this._context.viewLayout.getVerticalOffsetForLineNumber(C)}findAttribute(C,_){return r._findAttribute(C,_,this._viewHelper.viewDomNode)}static _findAttribute(C,_,L){for(;C&&C!==document.body;){if(C.hasAttribute&&C.hasAttribute(_))return C.getAttribute(_);if(C===L)return null;C=C.parentNode}return null}getLineWidth(C){return this._viewHelper.getLineWidth(C)}visibleRangeForPosition(C,_){return this._viewHelper.visibleRangeForPosition(C,_)}getPositionFromDOMInfo(C,_){return this._viewHelper.getPositionFromDOMInfo(C,_)}getCurrentScrollTop(){return this._context.viewLayout.getCurrentScrollTop()}getCurrentScrollLeft(){return this._context.viewLayout.getCurrentScrollLeft()}}e.HitTestContext=r;class s{constructor(C,_,L,E){this.editorPos=_,this.pos=L,this.relativePos=E,this.mouseVerticalOffset=Math.max(0,C.getCurrentScrollTop()+this.relativePos.y),this.mouseContentHorizontalOffset=C.getCurrentScrollLeft()+this.relativePos.x-C.layoutInfo.contentLeft,this.isInMarginArea=this.relativePos.x<C.layoutInfo.contentLeft&&this.relativePos.x>=C.layoutInfo.glyphMarginLeft,this.isInContentArea=!this.isInMarginArea,this.mouseColumn=Math.max(0,u._getMouseColumn(this.mouseContentHorizontalOffset,C.typicalHalfwidthCharacterWidth))}}class o extends s{constructor(C,_,L,E,N){super(C,_,L,E);this._ctx=C,N?(this.target=N,this.targetPath=m.PartFingerprints.collect(N,C.viewDomNode)):(this.target=null,this.targetPath=new Uint8Array(0))}toString(){return`pos(${this.pos.x},${this.pos.y}), editorPos(${this.editorPos.x},${this.editorPos.y}), relativePos(${this.relativePos.x},${this.relativePos.y}), mouseVerticalOffset: ${this.mouseVerticalOffset}, mouseContentHorizontalOffset: ${this.mouseContentHorizontalOffset}
|
||
target: ${this.target?this.target.outerHTML:null}`}_getMouseColumn(C=null){return C&&C.column<this._ctx.model.getLineMaxColumn(C.lineNumber)?b.CursorColumns.visibleColumnFromColumn(this._ctx.model.getLineContent(C.lineNumber),C.column,this._ctx.model.getTextModelOptions().tabSize)+1:this.mouseColumn}fulfillUnknown(C=null){return l.createUnknown(this.target,this._getMouseColumn(C),C)}fulfillTextarea(){return l.createTextarea(this.target,this._getMouseColumn())}fulfillMargin(C,_,L,E){return l.createMargin(C,this.target,this._getMouseColumn(_),_,L,E)}fulfillViewZone(C,_,L){return l.createViewZone(C,this.target,this._getMouseColumn(_),_,L)}fulfillContentText(C,_,L){return l.createContentText(this.target,this._getMouseColumn(C),C,_,L)}fulfillContentEmpty(C,_){return l.createContentEmpty(this.target,this._getMouseColumn(C),C,_)}fulfillContentWidget(C){return l.createContentWidget(this.target,this._getMouseColumn(),C)}fulfillScrollbar(C){return l.createScrollbar(this.target,this._getMouseColumn(C),C)}fulfillOverlayWidget(C){return l.createOverlayWidget(this.target,this._getMouseColumn(),C)}withTarget(C){return new o(this._ctx,this.editorPos,this.pos,this.relativePos,C)}}const a={isAfterLines:!0};function d(v){return{isAfterLines:!1,horizontalDistanceToText:v}}class u{constructor(C,_){this._context=C,this._viewHelper=_}mouseTargetIsWidget(C){const _=C.target,L=m.PartFingerprints.collect(_,this._viewHelper.viewDomNode);return!!(c.isChildOfContentWidgets(L)||c.isChildOfOverflowingContentWidgets(L)||c.isChildOfOverlayWidgets(L))}createMouseTarget(C,_,L,E,N){const k=new r(this._context,this._viewHelper,C),M=new o(k,_,L,E,N);try{return u._createMouseTarget(k,M,!1)}catch{return M.fulfillUnknown()}}static _createMouseTarget(C,_,L){if(_.target===null){if(L)return _.fulfillUnknown();const k=u._doHitTest(C,_);return k.type===1?u.createMouseTargetFromHitTestPosition(C,_,k.spanNode,k.position,k.injectedText):this._createMouseTarget(C,_.withTarget(k.hitTarget),!0)}const E=_;let N=null;return N=N||u._hitTestContentWidget(C,E),N=N||u._hitTestOverlayWidget(C,E),N=N||u._hitTestMinimap(C,E),N=N||u._hitTestScrollbarSlider(C,E),N=N||u._hitTestViewZone(C,E),N=N||u._hitTestMargin(C,E),N=N||u._hitTestViewCursor(C,E),N=N||u._hitTestTextArea(C,E),N=N||u._hitTestViewLines(C,E,L),N=N||u._hitTestScrollbar(C,E),N||_.fulfillUnknown()}static _hitTestContentWidget(C,_){if(c.isChildOfContentWidgets(_.targetPath)||c.isChildOfOverflowingContentWidgets(_.targetPath)){const L=C.findAttribute(_.target,"widgetId");return L?_.fulfillContentWidget(L):_.fulfillUnknown()}return null}static _hitTestOverlayWidget(C,_){if(c.isChildOfOverlayWidgets(_.targetPath)){const L=C.findAttribute(_.target,"widgetId");return L?_.fulfillOverlayWidget(L):_.fulfillUnknown()}return null}static _hitTestViewCursor(C,_){if(_.target){const L=C.lastRenderData.lastViewCursorsRenderData;for(const E of L)if(_.target===E.domNode)return _.fulfillContentText(E.position,null,{mightBeForeignElement:!1,injectedText:null})}if(_.isInContentArea){const L=C.lastRenderData.lastViewCursorsRenderData,E=_.mouseContentHorizontalOffset,N=_.mouseVerticalOffset;for(const k of L){if(E<k.contentLeft||E>k.contentLeft+k.width)continue;const M=C.getVerticalOffsetForLineNumber(k.position.lineNumber);if(M<=N&&N<=M+k.height)return _.fulfillContentText(k.position,null,{mightBeForeignElement:!1,injectedText:null})}}return null}static _hitTestViewZone(C,_){const L=C.getZoneAtCoord(_.mouseVerticalOffset);if(L){const E=_.isInContentArea?8:5;return _.fulfillViewZone(E,L.position,L)}return null}static _hitTestTextArea(C,_){return c.isTextArea(_.targetPath)?C.lastRenderData.lastTextareaPosition?_.fulfillContentText(C.lastRenderData.lastTextareaPosition,null,{mightBeForeignElement:!1,injectedText:null}):_.fulfillTextarea():null}static _hitTestMargin(C,_){if(_.isInMarginArea){const L=C.getFullLineRangeAtCoord(_.mouseVerticalOffset),E=L.range.getStartPosition();let N=Math.abs(_.relativePos.x);const k={isAfterLines:L.isAfterLines,glyphMarginLeft:C.layoutInfo.glyphMarginLeft,glyphMarginWidth:C.layoutInfo.glyphMarginWidth,lineNumbersWidth:C.layoutInfo.lineNumbersWidth,offsetX:N};return N-=C.layoutInfo.glyphMarginLeft,N<=C.layoutInfo.glyphMarginWidth?_.fulfillMargin(2,E,L.range,k):(N-=C.layoutInfo.glyphMarginWidth,N<=C.layoutInfo.lineNumbersWidth?_.fulfillMargin(3,E,L.range,k):(N-=C.layoutInfo.lineNumbersWidth,_.fulfillMargin(4,E,L.range,k)))}return null}static _hitTestViewLines(C,_,L){if(!c.isChildOfViewLines(_.targetPath))return null;if(C.isInTopPadding(_.mouseVerticalOffset))return _.fulfillContentEmpty(new I.Position(1,1),a);if(C.isAfterLines(_.mouseVerticalOffset)||C.isInBottomPadding(_.mouseVerticalOffset)){const N=C.model.getLineCount(),k=C.model.getLineMaxColumn(N);return _.fulfillContentEmpty(new I.Position(N,k),a)}if(L){if(c.isStrictChildOfViewLines(_.targetPath)){const N=C.getLineNumberAtVerticalOffset(_.mouseVerticalOffset);if(C.model.getLineLength(N)===0){const M=C.getLineWidth(N),O=d(_.mouseContentHorizontalOffset-M);return _.fulfillContentEmpty(new I.Position(N,1),O)}const k=C.getLineWidth(N);if(_.mouseContentHorizontalOffset>=k){const M=d(_.mouseContentHorizontalOffset-k),O=new I.Position(N,C.model.getLineMaxColumn(N));return _.fulfillContentEmpty(O,M)}}return _.fulfillUnknown()}const E=u._doHitTest(C,_);return E.type===1?u.createMouseTargetFromHitTestPosition(C,_,E.spanNode,E.position,E.injectedText):this._createMouseTarget(C,_.withTarget(E.hitTarget),!0)}static _hitTestMinimap(C,_){if(c.isChildOfMinimap(_.targetPath)){const L=C.getLineNumberAtVerticalOffset(_.mouseVerticalOffset),E=C.model.getLineMaxColumn(L);return _.fulfillScrollbar(new I.Position(L,E))}return null}static _hitTestScrollbarSlider(C,_){if(c.isChildOfScrollableElement(_.targetPath)&&_.target&&_.target.nodeType===1){const L=_.target.className;if(L&&/\b(slider|scrollbar)\b/.test(L)){const E=C.getLineNumberAtVerticalOffset(_.mouseVerticalOffset),N=C.model.getLineMaxColumn(E);return _.fulfillScrollbar(new I.Position(E,N))}}return null}static _hitTestScrollbar(C,_){if(c.isChildOfScrollableElement(_.targetPath)){const L=C.getLineNumberAtVerticalOffset(_.mouseVerticalOffset),E=C.model.getLineMaxColumn(L);return _.fulfillScrollbar(new I.Position(L,E))}return null}getMouseColumn(C){const _=this._context.configuration.options,L=_.get(131),E=this._context.viewLayout.getCurrentScrollLeft()+C.x-L.contentLeft;return u._getMouseColumn(E,_.get(44).typicalHalfwidthCharacterWidth)}static _getMouseColumn(C,_){return C<0?1:Math.round(C/_)+1}static createMouseTargetFromHitTestPosition(C,_,L,E,N){const k=E.lineNumber,M=E.column,O=C.getLineWidth(k);if(_.mouseContentHorizontalOffset>O){const H=d(_.mouseContentHorizontalOffset-O);return _.fulfillContentEmpty(E,H)}const B=C.visibleRangeForPosition(k,M);if(!B)return _.fulfillUnknown(E);const T=B.left;if(_.mouseContentHorizontalOffset===T)return _.fulfillContentText(E,null,{mightBeForeignElement:!!N,injectedText:N});const R=[];if(R.push({offset:B.left,column:M}),M>1){const H=C.visibleRangeForPosition(k,M-1);H&&R.push({offset:H.left,column:M-1})}const P=C.model.getLineMaxColumn(k);if(M<P){const H=C.visibleRangeForPosition(k,M+1);H&&R.push({offset:H.left,column:M+1})}R.sort((H,q)=>H.offset-q.offset);const F=_.pos.toClientCoordinates(),W=L.getBoundingClientRect(),A=W.left<=F.clientX&&F.clientX<=W.right;for(let H=1;H<R.length;H++){const q=R[H-1],X=R[H];if(q.offset<=_.mouseContentHorizontalOffset&&_.mouseContentHorizontalOffset<=X.offset){const G=new w.Range(k,q.column,k,X.column);return _.fulfillContentText(E,G,{mightBeForeignElement:!A||!!N,injectedText:N})}}return _.fulfillContentText(E,null,{mightBeForeignElement:!A||!!N,injectedText:N})}static _doHitTestWithCaretRangeFromPoint(C,_){const L=C.getLineNumberAtVerticalOffset(_.mouseVerticalOffset),N=C.getVerticalOffsetForLineNumber(L)+Math.floor(C.lineHeight/2);let k=_.pos.y+(N-_.mouseVerticalOffset);k<=_.editorPos.y&&(k=_.editorPos.y+1),k>=_.editorPos.y+_.editorPos.height&&(k=_.editorPos.y+_.editorPos.height-1);const M=new y.PageCoordinates(_.pos.x,k),O=this._actualDoHitTestWithCaretRangeFromPoint(C,M.toClientCoordinates());return O.type===1?O:this._actualDoHitTestWithCaretRangeFromPoint(C,_.pos.toClientCoordinates())}static _actualDoHitTestWithCaretRangeFromPoint(C,_){const L=p.getShadowRoot(C.viewDomNode);let E;if(L?typeof L.caretRangeFromPoint=="undefined"?E=f(L,_.clientX,_.clientY):E=L.caretRangeFromPoint(_.clientX,_.clientY):E=document.caretRangeFromPoint(_.clientX,_.clientY),!E||!E.startContainer)return new g;const N=E.startContainer;if(N.nodeType===N.TEXT_NODE){const k=N.parentNode,M=k?k.parentNode:null,O=M?M.parentNode:null;return(O&&O.nodeType===O.ELEMENT_NODE?O.className:null)===D.ViewLine.CLASS_NAME?i.createFromDOMInfo(C,k,E.startOffset):new g(N.parentNode)}else if(N.nodeType===N.ELEMENT_NODE){const k=N.parentNode,M=k?k.parentNode:null;return(M&&M.nodeType===M.ELEMENT_NODE?M.className:null)===D.ViewLine.CLASS_NAME?i.createFromDOMInfo(C,N,N.textContent.length):new g(N)}return new g}static _doHitTestWithCaretPositionFromPoint(C,_){const L=document.caretPositionFromPoint(_.clientX,_.clientY);if(L.offsetNode.nodeType===L.offsetNode.TEXT_NODE){const E=L.offsetNode.parentNode,N=E?E.parentNode:null,k=N?N.parentNode:null;return(k&&k.nodeType===k.ELEMENT_NODE?k.className:null)===D.ViewLine.CLASS_NAME?i.createFromDOMInfo(C,L.offsetNode.parentNode,L.offset):new g(L.offsetNode.parentNode)}if(L.offsetNode.nodeType===L.offsetNode.ELEMENT_NODE){const E=L.offsetNode.parentNode,N=E&&E.nodeType===E.ELEMENT_NODE?E.className:null,k=E?E.parentNode:null,M=k&&k.nodeType===k.ELEMENT_NODE?k.className:null;if(N===D.ViewLine.CLASS_NAME){const O=L.offsetNode.childNodes[Math.min(L.offset,L.offsetNode.childNodes.length-1)];if(O)return i.createFromDOMInfo(C,O,0)}else if(M===D.ViewLine.CLASS_NAME)return i.createFromDOMInfo(C,L.offsetNode,0)}return new g(L.offsetNode)}static _snapToSoftTabBoundary(C,_){const L=_.getLineContent(C.lineNumber),{tabSize:E}=_.getTextModelOptions(),N=h.AtomicTabMoveOperations.atomicPosition(L,C.column-1,E,2);return N!==-1?new I.Position(C.lineNumber,N+1):C}static _doHitTest(C,_){let L=new g;if(typeof document.caretRangeFromPoint=="function"?L=this._doHitTestWithCaretRangeFromPoint(C,_):document.caretPositionFromPoint&&(L=this._doHitTestWithCaretPositionFromPoint(C,_.pos.toClientCoordinates())),L.type===1){const E=C.model.getInjectedTextAt(L.position),N=C.model.normalizePosition(L.position,2);(E||!N.equals(L.position))&&(L=new t(N,L.spanNode,E))}return L.type===1&&C.stickyTabStops&&(L=new t(this._snapToSoftTabBoundary(L.position,C.model),L.spanNode,L.injectedText)),L}}e.MouseTargetFactory=u;function f(v,C,_){const L=document.createRange();let E=v.elementFromPoint(C,_);if(E!==null){for(;E&&E.firstChild&&E.firstChild.nodeType!==E.firstChild.TEXT_NODE&&E.lastChild&&E.lastChild.firstChild;)E=E.lastChild;const N=E.getBoundingClientRect(),k=window.getComputedStyle(E,null).getPropertyValue("font"),M=E.innerText;let O=N.left,B=0,T;if(C>N.left+N.width)B=M.length;else{const R=S.getInstance();for(let P=0;P<M.length+1;P++){if(T=R.getCharWidth(M.charAt(P),k)/2,O+=T,C<O){B=P;break}O+=T}}L.setStart(E.firstChild,B),L.setEnd(E.firstChild,B)}return L}e.shadowCaretRangeFromPoint=f;class S{constructor(){this._cache={},this._canvas=document.createElement("canvas")}static getInstance(){return S._INSTANCE||(S._INSTANCE=new S),S._INSTANCE}getCharWidth(C,_){const L=C+_;if(this._cache[L])return this._cache[L];const E=this._canvas.getContext("2d");E.font=_;const k=E.measureText(C).width;return this._cache[L]=k,k}}S._INSTANCE=null}),define(te[635],ie([1,0,7,56,10,2,17,279,130,144,11,22,123]),function(j,e,y,m,D,I,w,b,p,h,g,t,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MouseHandler=e.createMouseMoveEventMerger=void 0;function n(s){return function(o,a){let d=!1;return s&&(d=s.mouseTargetIsWidget(a)),d||a.preventDefault(),a}}e.createMouseMoveEventMerger=n;class l extends i.ViewEventHandler{constructor(o,a,d){super();this._context=o,this.viewController=a,this.viewHelper=d,this.mouseTargetFactory=new b.MouseTargetFactory(this._context,d),this._mouseDownOperation=this._register(new c(this._context,this.viewController,this.viewHelper,(S,v)=>this._createMouseTarget(S,v),S=>this._getMouseColumn(S))),this.lastMouseLeaveTime=-1,this._height=this._context.configuration.options.get(131).height;const u=new p.EditorMouseEventFactory(this.viewHelper.viewDomNode);this._register(u.onContextMenu(this.viewHelper.viewDomNode,S=>this._onContextMenu(S,!0))),this._register(u.onMouseMoveThrottled(this.viewHelper.viewDomNode,S=>this._onMouseMove(S),n(this.mouseTargetFactory),l.MOUSE_MOVE_MINIMUM_TIME)),this._register(u.onMouseUp(this.viewHelper.viewDomNode,S=>this._onMouseUp(S))),this._register(u.onMouseLeave(this.viewHelper.viewDomNode,S=>this._onMouseLeave(S))),this._register(u.onMouseDown(this.viewHelper.viewDomNode,S=>this._onMouseDown(S)));const f=S=>{if(this.viewController.emitMouseWheel(S),!this._context.configuration.options.get(68))return;const v=new m.StandardWheelEvent(S);if(w.isMacintosh?(S.metaKey||S.ctrlKey)&&!S.shiftKey&&!S.altKey:S.ctrlKey&&!S.metaKey&&!S.shiftKey&&!S.altKey){const _=h.EditorZoom.getZoomLevel(),L=v.deltaY>0?1:-1;h.EditorZoom.setZoomLevel(_+L),v.preventDefault(),v.stopPropagation()}};this._register(y.addDisposableListener(this.viewHelper.viewDomNode,y.EventType.MOUSE_WHEEL,f,{capture:!0,passive:!1})),this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),super.dispose()}onConfigurationChanged(o){if(o.hasChanged(131)){const a=this._context.configuration.options.get(131).height;this._height!==a&&(this._height=a,this._mouseDownOperation.onHeightChanged())}return!1}onCursorStateChanged(o){return this._mouseDownOperation.onCursorStateChanged(o),!1}onFocusChanged(o){return!1}onScrollChanged(o){return this._mouseDownOperation.onScrollChanged(),!1}getTargetAtClientPoint(o,a){const u=new p.ClientCoordinates(o,a).toPageCoordinates(),f=(0,p.createEditorPagePosition)(this.viewHelper.viewDomNode);if(u.y<f.y||u.y>f.y+f.height||u.x<f.x||u.x>f.x+f.width)return null;const S=(0,p.createCoordinatesRelativeToEditor)(this.viewHelper.viewDomNode,f,u);return this.mouseTargetFactory.createMouseTarget(this.viewHelper.getLastRenderData(),f,u,S,null)}_createMouseTarget(o,a){let d=o.target;if(!this.viewHelper.viewDomNode.contains(d)){const u=y.getShadowRoot(this.viewHelper.viewDomNode);u&&(d=u.elementsFromPoint(o.posx,o.posy).find(f=>this.viewHelper.viewDomNode.contains(f)))}return this.mouseTargetFactory.createMouseTarget(this.viewHelper.getLastRenderData(),o.editorPos,o.pos,o.relativePos,a?d:null)}_getMouseColumn(o){return this.mouseTargetFactory.getMouseColumn(o.relativePos)}_onContextMenu(o,a){this.viewController.emitContextMenu({event:o,target:this._createMouseTarget(o,a)})}_onMouseMove(o){this._mouseDownOperation.isActive()||o.timestamp<this.lastMouseLeaveTime||this.viewController.emitMouseMove({event:o,target:this._createMouseTarget(o,!0)})}_onMouseLeave(o){this.lastMouseLeaveTime=new Date().getTime(),this.viewController.emitMouseLeave({event:o,target:null})}_onMouseUp(o){this.viewController.emitMouseUp({event:o,target:this._createMouseTarget(o,!0)})}_onMouseDown(o){const a=this._createMouseTarget(o,!0),d=a.type===6||a.type===7,u=a.type===2||a.type===3||a.type===4,f=a.type===3,S=this._context.configuration.options.get(98),v=a.type===8||a.type===5,C=a.type===9;let _=o.leftButton||o.middleButton;w.isMacintosh&&o.leftButton&&o.ctrlKey&&(_=!1);const L=()=>{o.preventDefault(),this.viewHelper.focusTextArea()};if(_&&(d||f&&S))L(),this._mouseDownOperation.start(a.type,o);else if(u)o.preventDefault();else if(v){const E=a.detail;this.viewHelper.shouldSuppressMouseDownOnViewZone(E.viewZoneId)&&(L(),this._mouseDownOperation.start(a.type,o),o.preventDefault())}else C&&this.viewHelper.shouldSuppressMouseDownOnWidget(a.detail)&&(L(),o.preventDefault());this.viewController.emitMouseDown({event:o,target:a})}}e.MouseHandler=l,l.MOUSE_MOVE_MINIMUM_TIME=100;class c extends I.Disposable{constructor(o,a,d,u,f){super();this._context=o,this._viewController=a,this._viewHelper=d,this._createMouseTarget=u,this._getMouseColumn=f,this._mouseMoveMonitor=this._register(new p.GlobalEditorMouseMoveMonitor(this._viewHelper.viewDomNode)),this._onScrollTimeout=this._register(new D.TimeoutTimer),this._mouseState=new r,this._currentSelection=new t.Selection(1,1,1,1),this._isActive=!1,this._lastMouseEvent=null}dispose(){super.dispose()}isActive(){return this._isActive}_onMouseDownThenMove(o){this._lastMouseEvent=o,this._mouseState.setModifiers(o);const a=this._findMousePosition(o,!0);!a||(this._mouseState.isDragAndDrop?this._viewController.emitMouseDrag({event:o,target:a}):this._dispatchMouse(a,!0))}start(o,a){this._lastMouseEvent=a,this._mouseState.setStartedOnLineNumbers(o===3),this._mouseState.setStartButtons(a),this._mouseState.setModifiers(a);const d=this._findMousePosition(a,!0);if(!d||!d.position)return;this._mouseState.trySetCount(a.detail,d.position),a.detail=this._mouseState.count;const u=this._context.configuration.options;if(!u.get(81)&&u.get(31)&&!u.get(18)&&!this._mouseState.altKey&&a.detail<2&&!this._isActive&&!this._currentSelection.isEmpty()&&d.type===6&&d.position&&this._currentSelection.containsPosition(d.position)){this._mouseState.isDragAndDrop=!0,this._isActive=!0,this._mouseMoveMonitor.startMonitoring(a.target,a.buttons,n(null),f=>this._onMouseDownThenMove(f),f=>{const S=this._findMousePosition(this._lastMouseEvent,!0);f&&f instanceof KeyboardEvent?this._viewController.emitMouseDropCanceled():this._viewController.emitMouseDrop({event:this._lastMouseEvent,target:S?this._createMouseTarget(this._lastMouseEvent,!0):null}),this._stop()});return}this._mouseState.isDragAndDrop=!1,this._dispatchMouse(d,a.shiftKey),this._isActive||(this._isActive=!0,this._mouseMoveMonitor.startMonitoring(a.target,a.buttons,n(null),f=>this._onMouseDownThenMove(f),()=>this._stop()))}_stop(){this._isActive=!1,this._onScrollTimeout.cancel()}onHeightChanged(){this._mouseMoveMonitor.stopMonitoring()}onScrollChanged(){!this._isActive||this._onScrollTimeout.setIfNotSet(()=>{if(!this._lastMouseEvent)return;const o=this._findMousePosition(this._lastMouseEvent,!1);!o||this._mouseState.isDragAndDrop||this._dispatchMouse(o,!0)},10)}onCursorStateChanged(o){this._currentSelection=o.selections[0]}_getPositionOutsideEditor(o){const a=o.editorPos,d=this._context.model,u=this._context.viewLayout,f=this._getMouseColumn(o);if(o.posy<a.y){const v=Math.max(u.getCurrentScrollTop()-(a.y-o.posy),0),C=b.HitTestContext.getZoneAtCoord(this._context,v);if(C){const L=this._helpPositionJumpOverViewZone(C);if(L)return b.MouseTarget.createOutsideEditor(f,L)}const _=u.getLineNumberAtVerticalOffset(v);return b.MouseTarget.createOutsideEditor(f,new g.Position(_,1))}if(o.posy>a.y+a.height){const v=u.getCurrentScrollTop()+o.relativePos.y,C=b.HitTestContext.getZoneAtCoord(this._context,v);if(C){const L=this._helpPositionJumpOverViewZone(C);if(L)return b.MouseTarget.createOutsideEditor(f,L)}const _=u.getLineNumberAtVerticalOffset(v);return b.MouseTarget.createOutsideEditor(f,new g.Position(_,d.getLineMaxColumn(_)))}const S=u.getLineNumberAtVerticalOffset(u.getCurrentScrollTop()+o.relativePos.y);return o.posx<a.x?b.MouseTarget.createOutsideEditor(f,new g.Position(S,1)):o.posx>a.x+a.width?b.MouseTarget.createOutsideEditor(f,new g.Position(S,d.getLineMaxColumn(S))):null}_findMousePosition(o,a){const d=this._getPositionOutsideEditor(o);if(d)return d;const u=this._createMouseTarget(o,a);if(!u.position)return null;if(u.type===8||u.type===5){const S=this._helpPositionJumpOverViewZone(u.detail);if(S)return b.MouseTarget.createViewZone(u.type,u.element,u.mouseColumn,S,u.detail)}return u}_helpPositionJumpOverViewZone(o){const a=new g.Position(this._currentSelection.selectionStartLineNumber,this._currentSelection.selectionStartColumn),d=o.positionBefore,u=o.positionAfter;return d&&u?d.isBefore(a)?d:u:null}_dispatchMouse(o,a){!o.position||this._viewController.dispatchMouse({position:o.position,mouseColumn:o.mouseColumn,startedOnLineNumbers:this._mouseState.startedOnLineNumbers,inSelectionMode:a,mouseDownCount:this._mouseState.count,altKey:this._mouseState.altKey,ctrlKey:this._mouseState.ctrlKey,metaKey:this._mouseState.metaKey,shiftKey:this._mouseState.shiftKey,leftButton:this._mouseState.leftButton,middleButton:this._mouseState.middleButton})}}class r{constructor(){this._altKey=!1,this._ctrlKey=!1,this._metaKey=!1,this._shiftKey=!1,this._leftButton=!1,this._middleButton=!1,this._startedOnLineNumbers=!1,this._lastMouseDownPosition=null,this._lastMouseDownPositionEqualCount=0,this._lastMouseDownCount=0,this._lastSetMouseDownCountTime=0,this.isDragAndDrop=!1}get altKey(){return this._altKey}get ctrlKey(){return this._ctrlKey}get metaKey(){return this._metaKey}get shiftKey(){return this._shiftKey}get leftButton(){return this._leftButton}get middleButton(){return this._middleButton}get startedOnLineNumbers(){return this._startedOnLineNumbers}get count(){return this._lastMouseDownCount}setModifiers(o){this._altKey=o.altKey,this._ctrlKey=o.ctrlKey,this._metaKey=o.metaKey,this._shiftKey=o.shiftKey}setStartButtons(o){this._leftButton=o.leftButton,this._middleButton=o.middleButton}setStartedOnLineNumbers(o){this._startedOnLineNumbers=o}trySetCount(o,a){const d=new Date().getTime();d-this._lastSetMouseDownCountTime>r.CLEAR_MOUSE_DOWN_COUNT_TIME&&(o=1),this._lastSetMouseDownCountTime=d,o>this._lastMouseDownCount+1&&(o=this._lastMouseDownCount+1),this._lastMouseDownPosition&&this._lastMouseDownPosition.equals(a)?this._lastMouseDownPositionEqualCount++:this._lastMouseDownPositionEqualCount=1,this._lastMouseDownPosition=a,this._lastMouseDownCount=Math.min(o,this._lastMouseDownPositionEqualCount)}}r.CLEAR_MOUSE_DOWN_COUNT_TIME=400}),define(te[636],ie([1,0,7,17,57,2,635,130,165,175]),function(j,e,y,m,D,I,w,b,p,h){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.PointerHandler=e.PointerEventHandler=void 0;class g extends w.MouseHandler{constructor(l,c,r){super(l,c,r);this._register(D.Gesture.addTarget(this.viewHelper.linesContentDomNode)),this._register(y.addDisposableListener(this.viewHelper.linesContentDomNode,D.EventType.Tap,o=>this.onTap(o))),this._register(y.addDisposableListener(this.viewHelper.linesContentDomNode,D.EventType.Change,o=>this.onChange(o))),this._register(y.addDisposableListener(this.viewHelper.linesContentDomNode,D.EventType.Contextmenu,o=>this._onContextMenu(new b.EditorMouseEvent(o,this.viewHelper.viewDomNode),!1))),this._lastPointerType="mouse",this._register(y.addDisposableListener(this.viewHelper.linesContentDomNode,"pointerdown",o=>{const a=o.pointerType;if(a==="mouse"){this._lastPointerType="mouse";return}else a==="touch"?this._lastPointerType="touch":this._lastPointerType="pen"}));const s=new b.EditorPointerEventFactory(this.viewHelper.viewDomNode);this._register(s.onPointerMoveThrottled(this.viewHelper.viewDomNode,o=>this._onMouseMove(o),(0,w.createMouseMoveEventMerger)(this.mouseTargetFactory),w.MouseHandler.MOUSE_MOVE_MINIMUM_TIME)),this._register(s.onPointerUp(this.viewHelper.viewDomNode,o=>this._onMouseUp(o))),this._register(s.onPointerLeave(this.viewHelper.viewDomNode,o=>this._onMouseLeave(o))),this._register(s.onPointerDown(this.viewHelper.viewDomNode,o=>this._onMouseDown(o)))}onTap(l){if(!l.initialTarget||!this.viewHelper.linesContentDomNode.contains(l.initialTarget))return;l.preventDefault(),this.viewHelper.focusTextArea();const c=this._createMouseTarget(new b.EditorMouseEvent(l,this.viewHelper.viewDomNode),!1);c.position&&this.viewController.dispatchMouse({position:c.position,mouseColumn:c.position.column,startedOnLineNumbers:!1,mouseDownCount:l.tapCount,inSelectionMode:!1,altKey:!1,ctrlKey:!1,metaKey:!1,shiftKey:!1,leftButton:!1,middleButton:!1})}onChange(l){this._lastPointerType==="touch"&&this._context.model.deltaScrollNow(-l.translationX,-l.translationY)}_onMouseDown(l){l.browserEvent.pointerType!=="touch"&&super._onMouseDown(l)}}e.PointerEventHandler=g;class t extends w.MouseHandler{constructor(l,c,r){super(l,c,r);this._register(D.Gesture.addTarget(this.viewHelper.linesContentDomNode)),this._register(y.addDisposableListener(this.viewHelper.linesContentDomNode,D.EventType.Tap,s=>this.onTap(s))),this._register(y.addDisposableListener(this.viewHelper.linesContentDomNode,D.EventType.Change,s=>this.onChange(s))),this._register(y.addDisposableListener(this.viewHelper.linesContentDomNode,D.EventType.Contextmenu,s=>this._onContextMenu(new b.EditorMouseEvent(s,this.viewHelper.viewDomNode),!1)))}onTap(l){l.preventDefault(),this.viewHelper.focusTextArea();const c=this._createMouseTarget(new b.EditorMouseEvent(l,this.viewHelper.viewDomNode),!1);if(c.position){const r=document.createEvent("CustomEvent");r.initEvent(h.TextAreaSyntethicEvents.Tap,!1,!0),this.viewHelper.dispatchTextAreaEvent(r),this.viewController.moveTo(c.position)}}onChange(l){this._context.model.deltaScrollNow(-l.translationX,-l.translationY)}}class i extends I.Disposable{constructor(l,c,r){super();m.isIOS&&p.BrowserFeatures.pointerEvents?this.handler=this._register(new g(l,c,r)):window.TouchEvent?this.handler=this._register(new t(l,c,r)):this.handler=this._register(new w.MouseHandler(l,c,r))}getTargetAtClientPoint(l,c){return this.handler.getTargetAtClientPoint(l,c)}}e.PointerHandler=i}),define(te[637],ie([1,0,17,10,62,176,50,278,11,3,116,141,356]),function(j,e,y,m,D,I,w,b,p,h,g,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ViewLines=void 0;class i{constructor(){this._currentVisibleRange=new h.Range(1,1,1,1)}getCurrentVisibleRange(){return this._currentVisibleRange}setCurrentVisibleRange(s){this._currentVisibleRange=s}}class n{constructor(s,o,a,d,u,f,S){this.minimalReveal=s,this.lineNumber=o,this.startColumn=a,this.endColumn=d,this.startScrollTop=u,this.stopScrollTop=f,this.scrollType=S,this.type="range",this.minLineNumber=o,this.maxLineNumber=o}}class l{constructor(s,o,a,d,u){this.minimalReveal=s,this.selections=o,this.startScrollTop=a,this.stopScrollTop=d,this.scrollType=u,this.type="selections";let f=o[0].startLineNumber,S=o[0].endLineNumber;for(let v=1,C=o.length;v<C;v++){const _=o[v];f=Math.min(f,_.startLineNumber),S=Math.max(S,_.endLineNumber)}this.minLineNumber=f,this.maxLineNumber=S}}class c extends w.ViewPart{constructor(s,o){super(s);this._linesContent=o,this._textRangeRestingSpot=document.createElement("div"),this._visibleLines=new I.VisibleLinesCollection(this),this.domNode=this._visibleLines.domNode;const a=this._context.configuration,d=this._context.configuration.options,u=d.get(44),f=d.get(132),S=d.get(131);this._lineHeight=d.get(59),this._typicalHalfwidthCharacterWidth=u.typicalHalfwidthCharacterWidth,this._isViewportWrapping=f.isViewportWrapping,this._revealHorizontalRightPadding=d.get(89),this._horizontalScrollbarHeight=S.horizontalScrollbarHeight,this._cursorSurroundingLines=d.get(25),this._cursorSurroundingLinesStyle=d.get(26),this._canUseLayerHinting=!d.get(28),this._viewLineOptions=new b.ViewLineOptions(a,this._context.theme.type),w.PartFingerprints.write(this.domNode,7),this.domNode.setClassName(`view-lines ${t.MOUSE_CURSOR_TEXT_CSS_CLASS_NAME}`),(0,D.applyFontInfo)(this.domNode,u),this._maxLineWidth=0,this._asyncUpdateLineWidths=new m.RunOnceScheduler(()=>{this._updateLineWidthsSlow()},200),this._asyncCheckMonospaceFontAssumptions=new m.RunOnceScheduler(()=>{this._checkMonospaceFontAssumptions()},2e3),this._lastRenderedData=new i,this._horizontalRevealRequest=null}dispose(){this._asyncUpdateLineWidths.dispose(),this._asyncCheckMonospaceFontAssumptions.dispose(),super.dispose()}getDomNode(){return this.domNode}createVisibleLine(){return new b.ViewLine(this._viewLineOptions)}onConfigurationChanged(s){this._visibleLines.onConfigurationChanged(s),s.hasChanged(132)&&(this._maxLineWidth=0);const o=this._context.configuration.options,a=o.get(44),d=o.get(132),u=o.get(131);return this._lineHeight=o.get(59),this._typicalHalfwidthCharacterWidth=a.typicalHalfwidthCharacterWidth,this._isViewportWrapping=d.isViewportWrapping,this._revealHorizontalRightPadding=o.get(89),this._horizontalScrollbarHeight=u.horizontalScrollbarHeight,this._cursorSurroundingLines=o.get(25),this._cursorSurroundingLinesStyle=o.get(26),this._canUseLayerHinting=!o.get(28),(0,D.applyFontInfo)(this.domNode,a),this._onOptionsMaybeChanged(),s.hasChanged(131)&&(this._maxLineWidth=0),!0}_onOptionsMaybeChanged(){const s=this._context.configuration,o=new b.ViewLineOptions(s,this._context.theme.type);if(!this._viewLineOptions.equals(o)){this._viewLineOptions=o;const a=this._visibleLines.getStartLineNumber(),d=this._visibleLines.getEndLineNumber();for(let u=a;u<=d;u++)this._visibleLines.getVisibleLine(u).onOptionsChanged(this._viewLineOptions);return!0}return!1}onCursorStateChanged(s){const o=this._visibleLines.getStartLineNumber(),a=this._visibleLines.getEndLineNumber();let d=!1;for(let u=o;u<=a;u++)d=this._visibleLines.getVisibleLine(u).onSelectionChanged()||d;return d}onDecorationsChanged(s){{const o=this._visibleLines.getStartLineNumber(),a=this._visibleLines.getEndLineNumber();for(let d=o;d<=a;d++)this._visibleLines.getVisibleLine(d).onDecorationsChanged()}return!0}onFlushed(s){const o=this._visibleLines.onFlushed(s);return this._maxLineWidth=0,o}onLinesChanged(s){return this._visibleLines.onLinesChanged(s)}onLinesDeleted(s){return this._visibleLines.onLinesDeleted(s)}onLinesInserted(s){return this._visibleLines.onLinesInserted(s)}onRevealRangeRequest(s){const o=this._computeScrollTopToRevealRange(this._context.viewLayout.getFutureViewport(),s.source,s.minimalReveal,s.range,s.selections,s.verticalType);if(o===-1)return!1;let a=this._context.viewLayout.validateScrollPosition({scrollTop:o});s.revealHorizontal?s.range&&s.range.startLineNumber!==s.range.endLineNumber?a={scrollTop:a.scrollTop,scrollLeft:0}:s.range?this._horizontalRevealRequest=new n(s.minimalReveal,s.range.startLineNumber,s.range.startColumn,s.range.endColumn,this._context.viewLayout.getCurrentScrollTop(),a.scrollTop,s.scrollType):s.selections&&s.selections.length>0&&(this._horizontalRevealRequest=new l(s.minimalReveal,s.selections,this._context.viewLayout.getCurrentScrollTop(),a.scrollTop,s.scrollType)):this._horizontalRevealRequest=null;const u=Math.abs(this._context.viewLayout.getCurrentScrollTop()-a.scrollTop)<=this._lineHeight?1:s.scrollType;return this._context.model.setScrollPosition(a,u),!0}onScrollChanged(s){if(this._horizontalRevealRequest&&s.scrollLeftChanged&&(this._horizontalRevealRequest=null),this._horizontalRevealRequest&&s.scrollTopChanged){const o=Math.min(this._horizontalRevealRequest.startScrollTop,this._horizontalRevealRequest.stopScrollTop),a=Math.max(this._horizontalRevealRequest.startScrollTop,this._horizontalRevealRequest.stopScrollTop);(s.scrollTop<o||s.scrollTop>a)&&(this._horizontalRevealRequest=null)}return this.domNode.setWidth(s.scrollWidth),this._visibleLines.onScrollChanged(s)||!0}onTokensChanged(s){return this._visibleLines.onTokensChanged(s)}onZonesChanged(s){return this._context.model.setMaxLineWidth(this._maxLineWidth),this._visibleLines.onZonesChanged(s)}onThemeChanged(s){return this._onOptionsMaybeChanged()}getPositionFromDOMInfo(s,o){const a=this._getViewLineDomNode(s);if(a===null)return null;const d=this._getLineNumberFor(a);if(d===-1||d<1||d>this._context.model.getLineCount())return null;if(this._context.model.getLineMaxColumn(d)===1)return new p.Position(d,1);const u=this._visibleLines.getStartLineNumber(),f=this._visibleLines.getEndLineNumber();if(d<u||d>f)return null;let S=this._visibleLines.getVisibleLine(d).getColumnOfNodeOffset(d,s,o);const v=this._context.model.getLineMinColumn(d);return S<v&&(S=v),new p.Position(d,S)}_getViewLineDomNode(s){for(;s&&s.nodeType===1;){if(s.className===b.ViewLine.CLASS_NAME)return s;s=s.parentElement}return null}_getLineNumberFor(s){const o=this._visibleLines.getStartLineNumber(),a=this._visibleLines.getEndLineNumber();for(let d=o;d<=a;d++){const u=this._visibleLines.getVisibleLine(d);if(s===u.getDomNode())return d}return-1}getLineWidth(s){const o=this._visibleLines.getStartLineNumber(),a=this._visibleLines.getEndLineNumber();return s<o||s>a?-1:this._visibleLines.getVisibleLine(s).getWidth()}linesVisibleRangesForRange(s,o){if(this.shouldRender())return null;const a=s.endLineNumber,d=h.Range.intersectRanges(s,this._lastRenderedData.getCurrentVisibleRange());if(!d)return null;let u=[],f=0;const S=new b.DomReadingContext(this.domNode.domNode,this._textRangeRestingSpot);let v=0;o&&(v=this._context.model.coordinatesConverter.convertViewPositionToModelPosition(new p.Position(d.startLineNumber,1)).lineNumber);const C=this._visibleLines.getStartLineNumber(),_=this._visibleLines.getEndLineNumber();for(let L=d.startLineNumber;L<=d.endLineNumber;L++){if(L<C||L>_)continue;const E=L===d.startLineNumber?d.startColumn:1,N=L===d.endLineNumber?d.endColumn:this._context.model.getLineMaxColumn(L),k=this._visibleLines.getVisibleLine(L).getVisibleRangesForRange(L,E,N,S);if(!!k){if(o&&L<a){const M=v;v=this._context.model.coordinatesConverter.convertViewPositionToModelPosition(new p.Position(L+1,1)).lineNumber,M!==v&&(k.ranges[k.ranges.length-1].width+=this._typicalHalfwidthCharacterWidth)}u[f++]=new g.LineVisibleRanges(k.outsideRenderedLine,L,g.HorizontalRange.from(k.ranges))}}return f===0?null:u}_visibleRangesForLineRange(s,o,a){return this.shouldRender()||s<this._visibleLines.getStartLineNumber()||s>this._visibleLines.getEndLineNumber()?null:this._visibleLines.getVisibleLine(s).getVisibleRangesForRange(s,o,a,new b.DomReadingContext(this.domNode.domNode,this._textRangeRestingSpot))}visibleRangeForPosition(s){const o=this._visibleRangesForLineRange(s.lineNumber,s.column,s.column);return o?new g.HorizontalPosition(o.outsideRenderedLine,o.ranges[0].left):null}updateLineWidths(){this._updateLineWidths(!1)}_updateLineWidthsFast(){return this._updateLineWidths(!0)}_updateLineWidthsSlow(){this._updateLineWidths(!1)}_updateLineWidths(s){const o=this._visibleLines.getStartLineNumber(),a=this._visibleLines.getEndLineNumber();let d=1,u=!0;for(let f=o;f<=a;f++){const S=this._visibleLines.getVisibleLine(f);if(s&&!S.getWidthIsFast()){u=!1;continue}d=Math.max(d,S.getWidth())}return u&&o===1&&a===this._context.model.getLineCount()&&(this._maxLineWidth=0),this._ensureMaxLineWidth(d),u}_checkMonospaceFontAssumptions(){let s=-1,o=-1;const a=this._visibleLines.getStartLineNumber(),d=this._visibleLines.getEndLineNumber();for(let u=a;u<=d;u++){const f=this._visibleLines.getVisibleLine(u);if(f.needsMonospaceFontCheck()){const S=f.getWidth();S>o&&(o=S,s=u)}}if(s!==-1&&!this._visibleLines.getVisibleLine(s).monospaceAssumptionsAreValid())for(let u=a;u<=d;u++)this._visibleLines.getVisibleLine(u).onMonospaceAssumptionsInvalidated()}prepareRender(){throw new Error("Not supported")}render(){throw new Error("Not supported")}renderText(s){if(this._visibleLines.renderLines(s),this._lastRenderedData.setCurrentVisibleRange(s.visibleRange),this.domNode.setWidth(this._context.viewLayout.getScrollWidth()),this.domNode.setHeight(Math.min(this._context.viewLayout.getScrollHeight(),1e6)),this._horizontalRevealRequest){const a=this._horizontalRevealRequest;if(s.startLineNumber<=a.minLineNumber&&a.maxLineNumber<=s.endLineNumber){this._horizontalRevealRequest=null,this.onDidRender();const d=this._computeScrollLeftToReveal(a);d&&(this._isViewportWrapping||this._ensureMaxLineWidth(d.maxHorizontalOffset),this._context.model.setScrollPosition({scrollLeft:d.scrollLeft},a.scrollType))}}if(this._updateLineWidthsFast()||this._asyncUpdateLineWidths.schedule(),y.isLinux&&!this._asyncCheckMonospaceFontAssumptions.isScheduled()){const a=this._visibleLines.getStartLineNumber(),d=this._visibleLines.getEndLineNumber();for(let u=a;u<=d;u++)if(this._visibleLines.getVisibleLine(u).needsMonospaceFontCheck()){this._asyncCheckMonospaceFontAssumptions.schedule();break}}this._linesContent.setLayerHinting(this._canUseLayerHinting),this._linesContent.setContain("strict");const o=this._context.viewLayout.getCurrentScrollTop()-s.bigNumbersDelta;this._linesContent.setTop(-o),this._linesContent.setLeft(-this._context.viewLayout.getCurrentScrollLeft())}_ensureMaxLineWidth(s){const o=Math.ceil(s);this._maxLineWidth<o&&(this._maxLineWidth=o,this._context.model.setMaxLineWidth(this._maxLineWidth))}_computeScrollTopToRevealRange(s,o,a,d,u,f){const S=s.top,v=s.height,C=S+v;let _,L,E;if(u&&u.length>0){let M=u[0].startLineNumber,O=u[0].endLineNumber;for(let B=1,T=u.length;B<T;B++){const R=u[B];M=Math.min(M,R.startLineNumber),O=Math.max(O,R.endLineNumber)}_=!1,L=this._context.viewLayout.getVerticalOffsetForLineNumber(M),E=this._context.viewLayout.getVerticalOffsetForLineNumber(O)+this._lineHeight}else if(d)_=!0,L=this._context.viewLayout.getVerticalOffsetForLineNumber(d.startLineNumber),E=this._context.viewLayout.getVerticalOffsetForLineNumber(d.endLineNumber)+this._lineHeight;else return-1;if((o==="mouse"||a)&&this._cursorSurroundingLinesStyle==="default")a||(L-=this._lineHeight);else{const M=Math.min(v/this._lineHeight/2,this._cursorSurroundingLines);L-=M*this._lineHeight,E+=Math.max(0,M-1)*this._lineHeight}(f===0||f===4)&&(E+=a?this._horizontalScrollbarHeight:this._lineHeight);let k;if(E-L>v){if(!_)return-1;k=L}else if(f===5||f===6)if(f===6&&S<=L&&E<=C)k=S;else{const M=Math.max(5*this._lineHeight,v*.2),O=L-M,B=E-v;k=Math.max(B,O)}else if(f===1||f===2)if(f===2&&S<=L&&E<=C)k=S;else{const M=(L+E)/2;k=Math.max(0,M-v/2)}else k=this._computeMinimumScrolling(S,C,L,E,f===3,f===4);return k}_computeScrollLeftToReveal(s){const o=this._context.viewLayout.getCurrentViewport(),a=o.left,d=a+o.width;let u=1073741824,f=0;if(s.type==="range"){const v=this._visibleRangesForLineRange(s.lineNumber,s.startColumn,s.endColumn);if(!v)return null;for(const C of v.ranges)u=Math.min(u,Math.round(C.left)),f=Math.max(f,Math.round(C.left+C.width))}else for(const v of s.selections){if(v.startLineNumber!==v.endLineNumber)return null;const C=this._visibleRangesForLineRange(v.startLineNumber,v.startColumn,v.endColumn);if(!C)return null;for(const _ of C.ranges)u=Math.min(u,Math.round(_.left)),f=Math.max(f,Math.round(_.left+_.width))}return s.minimalReveal||(u=Math.max(0,u-c.HORIZONTAL_EXTRA_PX),f+=this._revealHorizontalRightPadding),s.type==="selections"&&f-u>o.width?null:{scrollLeft:this._computeMinimumScrolling(a,d,u,f),maxHorizontalOffset:f}}_computeMinimumScrolling(s,o,a,d,u,f){s=s|0,o=o|0,a=a|0,d=d|0,u=!!u,f=!!f;const S=o-s;if(d-a<S){if(u)return a;if(f)return Math.max(0,d-S);if(a<s)return a;if(d>o)return Math.max(0,d-S)}else return a;return s}}e.ViewLines=c,c.HORIZONTAL_EXTRA_PX=30}),define(te[14],ie([1,0,27,4,2,9,36,132]),function(j,e,y,m,D,I,w,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Themable=e.registerThemingParticipant=e.Extensions=e.getThemeTypeSelector=e.ThemeIcon=e.themeColorFromId=e.ThemeColor=e.IThemeService=void 0,e.IThemeService=(0,I.createDecorator)("themeService");var p;(function(r){function s(o){return o&&typeof o=="object"&&typeof o.id=="string"}r.isThemeColor=s})(p=e.ThemeColor||(e.ThemeColor={}));function h(r){return{id:r}}e.themeColorFromId=h;var g;(function(r){function s(C){return C&&typeof C=="object"&&typeof C.id=="string"&&(typeof C.color=="undefined"||p.isThemeColor(C.color))}r.isThemeIcon=s;const o=new RegExp(`^\\$\\((${y.CSSIcon.iconNameExpression}(?:${y.CSSIcon.iconModifierExpression})?)\\)$`);function a(C){const _=o.exec(C);if(!_)return;let[,L]=_;return{id:L}}r.fromString=a;function d(C){return{id:C}}r.fromId=d;function u(C,_){let L=C.id;const E=L.lastIndexOf("~");return E!==-1&&(L=L.substring(0,E)),_&&(L=`${L}~${_}`),{id:L}}r.modify=u;function f(C){const _=C.id.lastIndexOf("~");if(_!==-1)return C.id.substring(_+1)}r.getModifier=f;function S(C,_){var L,E;return C.id===_.id&&((L=C.color)===null||L===void 0?void 0:L.id)===((E=_.color)===null||E===void 0?void 0:E.id)}r.isEqual=S;function v(C,_){return{id:C.id,color:_?h(_):void 0}}r.asThemeIcon=v,r.asClassNameArray=y.CSSIcon.asClassNameArray,r.asClassName=y.CSSIcon.asClassName,r.asCSSSelector=y.CSSIcon.asCSSSelector})(g=e.ThemeIcon||(e.ThemeIcon={}));function t(r){switch(r){case b.ColorScheme.DARK:return"vs-dark";case b.ColorScheme.HIGH_CONTRAST:return"hc-black";default:return"vs"}}e.getThemeTypeSelector=t,e.Extensions={ThemingContribution:"base.contributions.theming"};class i{constructor(){this.themingParticipants=[],this.themingParticipants=[],this.onThemingParticipantAddedEmitter=new m.Emitter}onColorThemeChange(s){return this.themingParticipants.push(s),this.onThemingParticipantAddedEmitter.fire(s),(0,D.toDisposable)(()=>{const o=this.themingParticipants.indexOf(s);this.themingParticipants.splice(o,1)})}getThemingParticipants(){return this.themingParticipants}}let n=new i;w.Registry.add(e.Extensions.ThemingContribution,n);function l(r){return n.onColorThemeChange(r)}e.registerThemingParticipant=l;class c extends D.Disposable{constructor(s){super();this.themeService=s,this.theme=s.getColorTheme(),this._register(this.themeService.onDidColorThemeChange(o=>this.onThemeChange(o)))}onThemeChange(s){this.theme=s,this.updateStyles()}updateStyles(){}}e.Themable=c}),define(te[638],ie([1,0,4,2,14]),function(j,e,y,m,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.GlobalStyleSheet=e.AbstractCodeEditorService=void 0;let I=class extends m.Disposable{constructor(p){super();this._themeService=p,this._onCodeEditorAdd=this._register(new y.Emitter),this.onCodeEditorAdd=this._onCodeEditorAdd.event,this._onCodeEditorRemove=this._register(new y.Emitter),this.onCodeEditorRemove=this._onCodeEditorRemove.event,this._onDiffEditorAdd=this._register(new y.Emitter),this.onDiffEditorAdd=this._onDiffEditorAdd.event,this._onDiffEditorRemove=this._register(new y.Emitter),this.onDiffEditorRemove=this._onDiffEditorRemove.event,this._decorationOptionProviders=new Map,this._modelProperties=new Map,this._codeEditors=Object.create(null),this._diffEditors=Object.create(null),this._globalStyleSheet=null}addCodeEditor(p){this._codeEditors[p.getId()]=p,this._onCodeEditorAdd.fire(p)}removeCodeEditor(p){delete this._codeEditors[p.getId()]&&this._onCodeEditorRemove.fire(p)}listCodeEditors(){return Object.keys(this._codeEditors).map(p=>this._codeEditors[p])}addDiffEditor(p){this._diffEditors[p.getId()]=p,this._onDiffEditorAdd.fire(p)}removeDiffEditor(p){delete this._diffEditors[p.getId()]&&this._onDiffEditorRemove.fire(p)}listDiffEditors(){return Object.keys(this._diffEditors).map(p=>this._diffEditors[p])}getFocusedCodeEditor(){let p=null;const h=this.listCodeEditors();for(const g of h){if(g.hasTextFocus())return g;g.hasWidgetFocus()&&(p=g)}return p}removeDecorationType(p){const h=this._decorationOptionProviders.get(p);h&&(h.refCount--,h.refCount<=0&&(this._decorationOptionProviders.delete(p),h.dispose(),this.listCodeEditors().forEach(g=>g.removeDecorations(p))))}setModelProperty(p,h,g){const t=p.toString();let i;this._modelProperties.has(t)?i=this._modelProperties.get(t):(i=new Map,this._modelProperties.set(t,i)),i.set(h,g)}getModelProperty(p,h){const g=p.toString();if(this._modelProperties.has(g))return this._modelProperties.get(g).get(h)}};I=Ie([Ce(0,D.IThemeService)],I),e.AbstractCodeEditorService=I;class w{constructor(p){this._styleSheet=p}}e.GlobalStyleSheet=w}),define(te[639],ie([1,0,7,30,67,50,14,23]),function(j,e,y,m,D,I,w,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.EditorScrollbar=void 0;class p extends I.ViewPart{constructor(g,t,i,n){super(g);const l=this._context.configuration.options,c=l.get(92),r=l.get(67),s=l.get(34),o=l.get(95),a={listenOnDomNode:i.domNode,className:"editor-scrollable "+(0,w.getThemeTypeSelector)(g.theme.type),useShadows:!1,lazyRender:!0,vertical:c.vertical,horizontal:c.horizontal,verticalHasArrows:c.verticalHasArrows,horizontalHasArrows:c.horizontalHasArrows,verticalScrollbarSize:c.verticalScrollbarSize,verticalSliderSize:c.verticalSliderSize,horizontalScrollbarSize:c.horizontalScrollbarSize,horizontalSliderSize:c.horizontalSliderSize,handleMouseWheel:c.handleMouseWheel,alwaysConsumeMouseWheel:c.alwaysConsumeMouseWheel,arrowSize:c.arrowSize,mouseWheelScrollSensitivity:r,fastScrollSensitivity:s,scrollPredominantAxis:o,scrollByPage:c.scrollByPage};this.scrollbar=this._register(new D.SmoothScrollableElement(t.domNode,a,this._context.viewLayout.getScrollable())),I.PartFingerprints.write(this.scrollbar.getDomNode(),5),this.scrollbarDomNode=(0,m.createFastDomNode)(this.scrollbar.getDomNode()),this.scrollbarDomNode.setPosition("absolute"),this._setLayout();const d=(u,f,S)=>{const v={};if(f){const C=u.scrollTop;C&&(v.scrollTop=this._context.viewLayout.getCurrentScrollTop()+C,u.scrollTop=0)}if(S){const C=u.scrollLeft;C&&(v.scrollLeft=this._context.viewLayout.getCurrentScrollLeft()+C,u.scrollLeft=0)}this._context.model.setScrollPosition(v,1)};this._register(y.addDisposableListener(i.domNode,"scroll",u=>d(i.domNode,!0,!0))),this._register(y.addDisposableListener(t.domNode,"scroll",u=>d(t.domNode,!0,!1))),this._register(y.addDisposableListener(n.domNode,"scroll",u=>d(n.domNode,!0,!1))),this._register(y.addDisposableListener(this.scrollbarDomNode.domNode,"scroll",u=>d(this.scrollbarDomNode.domNode,!0,!1)))}dispose(){super.dispose()}_setLayout(){const g=this._context.configuration.options,t=g.get(131);this.scrollbarDomNode.setLeft(t.contentLeft),g.get(65).side==="right"?this.scrollbarDomNode.setWidth(t.contentWidth+t.minimap.minimapWidth):this.scrollbarDomNode.setWidth(t.contentWidth),this.scrollbarDomNode.setHeight(t.height)}getOverviewRulerLayoutInfo(){return this.scrollbar.getOverviewRulerLayoutInfo()}getDomNode(){return this.scrollbarDomNode}delegateVerticalScrollbarMouseDown(g){this.scrollbar.delegateVerticalScrollbarMouseDown(g)}onConfigurationChanged(g){if(g.hasChanged(92)||g.hasChanged(67)||g.hasChanged(34)){const t=this._context.configuration.options,i=t.get(92),n=t.get(67),l=t.get(34),c=t.get(95),r={vertical:i.vertical,horizontal:i.horizontal,verticalScrollbarSize:i.verticalScrollbarSize,horizontalScrollbarSize:i.horizontalScrollbarSize,scrollByPage:i.scrollByPage,handleMouseWheel:i.handleMouseWheel,mouseWheelScrollSensitivity:n,fastScrollSensitivity:l,scrollPredominantAxis:c};this.scrollbar.updateOptions(r)}return g.hasChanged(131)&&this._setLayout(),!0}onScrollChanged(g){return!0}onThemeChanged(g){return this.scrollbar.updateClassName("editor-scrollable "+(0,w.getThemeTypeSelector)(this._context.theme.type)),!0}prepareRender(g){}render(g){this.scrollbar.renderNow()}}e.EditorScrollbar=p,(0,w.registerThemingParticipant)((h,g)=>{const t=h.getColor(b.scrollbarShadow);t&&g.addRule(`
|
||
.monaco-scrollable-element > .shadow.top {
|
||
box-shadow: ${t} 0 6px 6px -6px inset;
|
||
}
|
||
|
||
.monaco-scrollable-element > .shadow.left {
|
||
box-shadow: ${t} 6px 0 6px -6px inset;
|
||
}
|
||
|
||
.monaco-scrollable-element > .shadow.top.left {
|
||
box-shadow: ${t} 6px 6px 6px -6px inset;
|
||
}
|
||
`);const i=h.getColor(b.scrollbarSliderBackground);i&&g.addRule(`
|
||
.monaco-scrollable-element > .scrollbar > .slider {
|
||
background: ${i};
|
||
}
|
||
`);const n=h.getColor(b.scrollbarSliderHoverBackground);n&&g.addRule(`
|
||
.monaco-scrollable-element > .scrollbar > .slider:hover {
|
||
background: ${n};
|
||
}
|
||
`);const l=h.getColor(b.scrollbarSliderActiveBackground);l&&g.addRule(`
|
||
.monaco-scrollable-element > .scrollbar > .slider.active {
|
||
background: ${l};
|
||
}
|
||
`)})}),define(te[640],ie([1,0,7,30,96,2,17,8,176,50,31,3,236,250,69,23,14,22,57,401,49,88,359]),function(j,e,y,m,D,I,w,b,p,h,g,t,i,n,l,c,r,s,o,a,d,u){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Minimap=void 0;const f=140,S=2;class v{constructor(T,R,P){const F=T.options,W=F.get(129),A=F.get(131),H=A.minimap,q=F.get(44),X=F.get(65);this.renderMinimap=H.renderMinimap,this.size=X.size,this.minimapHeightIsEditorHeight=H.minimapHeightIsEditorHeight,this.scrollBeyondLastLine=F.get(94),this.showSlider=X.showSlider,this.pixelRatio=W,this.typicalHalfwidthCharacterWidth=q.typicalHalfwidthCharacterWidth,this.lineHeight=F.get(59),this.minimapLeft=H.minimapLeft,this.minimapWidth=H.minimapWidth,this.minimapHeight=A.height,this.canvasInnerWidth=H.minimapCanvasInnerWidth,this.canvasInnerHeight=H.minimapCanvasInnerHeight,this.canvasOuterWidth=H.minimapCanvasOuterWidth,this.canvasOuterHeight=H.minimapCanvasOuterHeight,this.isSampling=H.minimapIsSampling,this.editorHeight=A.height,this.fontScale=H.minimapScale,this.minimapLineHeight=H.minimapLineHeight,this.minimapCharWidth=1*this.fontScale,this.charRenderer=(0,u.once)(()=>a.MinimapCharRendererFactory.create(this.fontScale,q.fontFamily)),this.defaultBackgroundColor=P.getColor(2),this.backgroundColor=v._getMinimapBackground(R,this.defaultBackgroundColor),this.foregroundAlpha=v._getMinimapForegroundOpacity(R)}static _getMinimapBackground(T,R){const P=T.getColor(c.minimapBackground);return P?new i.RGBA8(P.rgba.r,P.rgba.g,P.rgba.b,Math.round(255*P.rgba.a)):R}static _getMinimapForegroundOpacity(T){const R=T.getColor(c.minimapForegroundOpacity);return R?i.RGBA8._clamp(Math.round(255*R.rgba.a)):255}equals(T){return this.renderMinimap===T.renderMinimap&&this.size===T.size&&this.minimapHeightIsEditorHeight===T.minimapHeightIsEditorHeight&&this.scrollBeyondLastLine===T.scrollBeyondLastLine&&this.showSlider===T.showSlider&&this.pixelRatio===T.pixelRatio&&this.typicalHalfwidthCharacterWidth===T.typicalHalfwidthCharacterWidth&&this.lineHeight===T.lineHeight&&this.minimapLeft===T.minimapLeft&&this.minimapWidth===T.minimapWidth&&this.minimapHeight===T.minimapHeight&&this.canvasInnerWidth===T.canvasInnerWidth&&this.canvasInnerHeight===T.canvasInnerHeight&&this.canvasOuterWidth===T.canvasOuterWidth&&this.canvasOuterHeight===T.canvasOuterHeight&&this.isSampling===T.isSampling&&this.editorHeight===T.editorHeight&&this.fontScale===T.fontScale&&this.minimapLineHeight===T.minimapLineHeight&&this.minimapCharWidth===T.minimapCharWidth&&this.defaultBackgroundColor&&this.defaultBackgroundColor.equals(T.defaultBackgroundColor)&&this.backgroundColor&&this.backgroundColor.equals(T.backgroundColor)&&this.foregroundAlpha===T.foregroundAlpha}}class C{constructor(T,R,P,F,W,A,H,q){this.scrollTop=T,this.scrollHeight=R,this.sliderNeeded=P,this._computedSliderRatio=F,this.sliderTop=W,this.sliderHeight=A,this.startLineNumber=H,this.endLineNumber=q}getDesiredScrollTopFromDelta(T){return Math.round(this.scrollTop+T/this._computedSliderRatio)}getDesiredScrollTopFromTouchLocation(T){return Math.round((T-this.sliderHeight/2)/this._computedSliderRatio)}static create(T,R,P,F,W,A,H,q,X,G,re){const ae=T.pixelRatio,oe=T.minimapLineHeight,Z=Math.floor(T.canvasInnerHeight/oe),x=T.lineHeight;if(T.minimapHeightIsEditorHeight){const ue=q*T.lineHeight+(T.scrollBeyondLastLine?W-T.lineHeight:0),z=Math.max(1,Math.floor(W*W/ue)),V=Math.max(0,T.minimapHeight-z),$=V/(G-W),K=X*$,J=V>0,Y=Math.floor(T.canvasInnerHeight/T.minimapLineHeight);return new C(X,G,J,$,K,z,1,Math.min(H,Y))}let U;if(A&&P!==H){const ue=P-R+1;U=Math.floor(ue*oe/ae)}else{const ue=W/x;U=Math.floor(ue*oe/ae)}let Q;T.scrollBeyondLastLine?Q=(H-1)*oe/ae:Q=Math.max(0,H*oe/ae-U),Q=Math.min(T.minimapHeight-U,Q);const ne=Q/(G-W),ce=X*ne;let ee=0;if(T.scrollBeyondLastLine&&(ee=W/x-1),Z>=H+ee){const ue=1,z=H,V=Q>0;return new C(X,G,V,ne,ce,U,ue,z)}else{let ue=Math.max(1,Math.floor(R-ce*ae/oe));re&&re.scrollHeight===G&&(re.scrollTop>X&&(ue=Math.min(ue,re.startLineNumber)),re.scrollTop<X&&(ue=Math.max(ue,re.startLineNumber)));const z=Math.min(H,ue+Z-1),V=(X-F)/x,$=(R-ue+V)*oe/ae;return new C(X,G,!0,ne,$,U,ue,z)}}}class _{constructor(T){this.dy=T}onContentChanged(){this.dy=-1}onTokensChanged(){this.dy=-1}}_.INVALID=new _(-1);class L{constructor(T,R,P){this.renderedLayout=T,this._imageData=R,this._renderedLines=new p.RenderedLinesCollection(()=>_.INVALID),this._renderedLines._set(T.startLineNumber,P)}linesEquals(T){if(!this.scrollEquals(T))return!1;const P=this._renderedLines._get().lines;for(let F=0,W=P.length;F<W;F++)if(P[F].dy===-1)return!1;return!0}scrollEquals(T){return this.renderedLayout.startLineNumber===T.startLineNumber&&this.renderedLayout.endLineNumber===T.endLineNumber}_get(){const T=this._renderedLines._get();return{imageData:this._imageData,rendLineNumberStart:T.rendLineNumberStart,lines:T.lines}}onLinesChanged(T,R){return this._renderedLines.onLinesChanged(T,R)}onLinesDeleted(T,R){this._renderedLines.onLinesDeleted(T,R)}onLinesInserted(T,R){this._renderedLines.onLinesInserted(T,R)}onTokensChanged(T){return this._renderedLines.onTokensChanged(T)}}class E{constructor(T,R,P,F){this._backgroundFillData=E._createBackgroundFillData(R,P,F),this._buffers=[T.createImageData(R,P),T.createImageData(R,P)],this._lastUsedBuffer=0}getBuffer(){this._lastUsedBuffer=1-this._lastUsedBuffer;const T=this._buffers[this._lastUsedBuffer];return T.data.set(this._backgroundFillData),T}static _createBackgroundFillData(T,R,P){const F=P.r,W=P.g,A=P.b,H=P.a,q=new Uint8ClampedArray(T*R*4);let X=0;for(let G=0;G<R;G++)for(let re=0;re<T;re++)q[X]=F,q[X+1]=W,q[X+2]=A,q[X+3]=H,X+=4;return q}}class N{constructor(T,R){this.samplingRatio=T,this.minimapLines=R}static compute(T,R,P){if(T.renderMinimap===0||!T.isSampling)return[null,[]];const F=T.pixelRatio,W=T.lineHeight,A=T.scrollBeyondLastLine,{minimapLineCount:H}=g.EditorLayoutInfoComputer.computeContainedMinimapLineCount({viewLineCount:R,scrollBeyondLastLine:A,height:T.editorHeight,lineHeight:W,pixelRatio:F}),q=R/H,X=q/2;if(!P||P.minimapLines.length===0){const ce=[];if(ce[0]=1,H>1){for(let ee=0,ue=H-1;ee<ue;ee++)ce[ee]=Math.round(ee*q+X);ce[H-1]=R}return[new N(q,ce),[]]}const G=P.minimapLines,re=G.length,ae=[];let oe=0,Z=0,x=1;const U=10;let Q=[],ne=null;for(let ce=0;ce<H;ce++){const ee=Math.max(x,Math.round(ce*q)),ue=Math.max(ee,Math.round((ce+1)*q));for(;oe<re&&G[oe]<ee;){if(Q.length<U){const V=oe+1+Z;ne&&ne.type==="deleted"&&ne._oldIndex===oe-1?ne.deleteToLineNumber++:(ne={type:"deleted",_oldIndex:oe,deleteFromLineNumber:V,deleteToLineNumber:V},Q.push(ne)),Z--}oe++}let z;if(oe<re&&G[oe]<=ue)z=G[oe],oe++;else if(ce===0?z=1:ce+1===H?z=R:z=Math.round(ce*q+X),Q.length<U){const V=oe+1+Z;ne&&ne.type==="inserted"&&ne._i===ce-1?ne.insertToLineNumber++:(ne={type:"inserted",_i:ce,insertFromLineNumber:V,insertToLineNumber:V},Q.push(ne)),Z++}ae[ce]=z,x=z}if(Q.length<U)for(;oe<re;){const ce=oe+1+Z;ne&&ne.type==="deleted"&&ne._oldIndex===oe-1?ne.deleteToLineNumber++:(ne={type:"deleted",_oldIndex:oe,deleteFromLineNumber:ce,deleteToLineNumber:ce},Q.push(ne)),Z--,oe++}else Q=[{type:"flush"}];return[new N(q,ae),Q]}modelLineToMinimapLine(T){return Math.min(this.minimapLines.length,Math.max(1,Math.round(T/this.samplingRatio)))}modelLineRangeToMinimapLineRange(T,R){let P=this.modelLineToMinimapLine(T)-1;for(;P>0&&this.minimapLines[P-1]>=T;)P--;let F=this.modelLineToMinimapLine(R)-1;for(;F+1<this.minimapLines.length&&this.minimapLines[F+1]<=R;)F++;if(P===F){const W=this.minimapLines[P];if(W<T||W>R)return null}return[P+1,F+1]}decorationLineRangeToMinimapLineRange(T,R){let P=this.modelLineToMinimapLine(T),F=this.modelLineToMinimapLine(R);return T!==R&&F===P&&(F===this.minimapLines.length?P>1&&P--:F++),[P,F]}onLinesDeleted(T){const R=T.toLineNumber-T.fromLineNumber+1;let P=this.minimapLines.length,F=0;for(let W=this.minimapLines.length-1;W>=0&&!(this.minimapLines[W]<T.fromLineNumber);W--)this.minimapLines[W]<=T.toLineNumber?(this.minimapLines[W]=Math.max(1,T.fromLineNumber-1),P=Math.min(P,W),F=Math.max(F,W)):this.minimapLines[W]-=R;return[P,F]}onLinesInserted(T){const R=T.toLineNumber-T.fromLineNumber+1;for(let P=this.minimapLines.length-1;P>=0&&!(this.minimapLines[P]<T.fromLineNumber);P--)this.minimapLines[P]+=R}}class k extends h.ViewPart{constructor(T){super(T);this.tokensColorTracker=n.MinimapTokensColorTracker.getInstance(),this._selections=[],this._minimapSelections=null,this.options=new v(this._context.configuration,this._context.theme,this.tokensColorTracker);const[R]=N.compute(this.options,this._context.model.getLineCount(),null);this._samplingState=R,this._shouldCheckSampling=!1,this._actual=new M(T.theme,this)}dispose(){this._actual.dispose(),super.dispose()}getDomNode(){return this._actual.getDomNode()}_onOptionsMaybeChanged(){const T=new v(this._context.configuration,this._context.theme,this.tokensColorTracker);return this.options.equals(T)?!1:(this.options=T,this._recreateLineSampling(),this._actual.onDidChangeOptions(),!0)}onConfigurationChanged(T){return this._onOptionsMaybeChanged()}onCursorStateChanged(T){return this._selections=T.selections,this._minimapSelections=null,this._actual.onSelectionChanged()}onDecorationsChanged(T){return T.affectsMinimap?this._actual.onDecorationsChanged():!1}onFlushed(T){return this._samplingState&&(this._shouldCheckSampling=!0),this._actual.onFlushed()}onLinesChanged(T){if(this._samplingState){const R=this._samplingState.modelLineRangeToMinimapLineRange(T.fromLineNumber,T.toLineNumber);return R?this._actual.onLinesChanged(R[0],R[1]):!1}else return this._actual.onLinesChanged(T.fromLineNumber,T.toLineNumber)}onLinesDeleted(T){if(this._samplingState){const[R,P]=this._samplingState.onLinesDeleted(T);return R<=P&&this._actual.onLinesChanged(R+1,P+1),this._shouldCheckSampling=!0,!0}else return this._actual.onLinesDeleted(T.fromLineNumber,T.toLineNumber)}onLinesInserted(T){return this._samplingState?(this._samplingState.onLinesInserted(T),this._shouldCheckSampling=!0,!0):this._actual.onLinesInserted(T.fromLineNumber,T.toLineNumber)}onScrollChanged(T){return this._actual.onScrollChanged()}onThemeChanged(T){return this._context.model.invalidateMinimapColorCache(),this._actual.onThemeChanged(),this._onOptionsMaybeChanged(),!0}onTokensChanged(T){if(this._samplingState){const R=[];for(const P of T.ranges){const F=this._samplingState.modelLineRangeToMinimapLineRange(P.fromLineNumber,P.toLineNumber);F&&R.push({fromLineNumber:F[0],toLineNumber:F[1]})}return R.length?this._actual.onTokensChanged(R):!1}else return this._actual.onTokensChanged(T.ranges)}onTokensColorsChanged(T){return this._onOptionsMaybeChanged(),this._actual.onTokensColorsChanged()}onZonesChanged(T){return this._actual.onZonesChanged()}prepareRender(T){this._shouldCheckSampling&&(this._shouldCheckSampling=!1,this._recreateLineSampling())}render(T){let R=T.visibleRange.startLineNumber,P=T.visibleRange.endLineNumber;this._samplingState&&(R=this._samplingState.modelLineToMinimapLine(R),P=this._samplingState.modelLineToMinimapLine(P));const F={viewportContainsWhitespaceGaps:T.viewportData.whitespaceViewportData.length>0,scrollWidth:T.scrollWidth,scrollHeight:T.scrollHeight,viewportStartLineNumber:R,viewportEndLineNumber:P,viewportStartLineNumberVerticalOffset:T.getVerticalOffsetForLineNumber(R),scrollTop:T.scrollTop,scrollLeft:T.scrollLeft,viewportWidth:T.viewportWidth,viewportHeight:T.viewportHeight};this._actual.render(F)}_recreateLineSampling(){this._minimapSelections=null;const T=Boolean(this._samplingState),[R,P]=N.compute(this.options,this._context.model.getLineCount(),this._samplingState);if(this._samplingState=R,T&&this._samplingState)for(const F of P)switch(F.type){case"deleted":this._actual.onLinesDeleted(F.deleteFromLineNumber,F.deleteToLineNumber);break;case"inserted":this._actual.onLinesInserted(F.insertFromLineNumber,F.insertToLineNumber);break;case"flush":this._actual.onFlushed();break}}getLineCount(){return this._samplingState?this._samplingState.minimapLines.length:this._context.model.getLineCount()}getRealLineCount(){return this._context.model.getLineCount()}getLineContent(T){return this._samplingState?this._context.model.getLineContent(this._samplingState.minimapLines[T-1]):this._context.model.getLineContent(T)}getLineMaxColumn(T){return this._samplingState?this._context.model.getLineMaxColumn(this._samplingState.minimapLines[T-1]):this._context.model.getLineMaxColumn(T)}getMinimapLinesRenderingData(T,R,P){if(this._samplingState){const F=[];for(let W=0,A=R-T+1;W<A;W++)P[W]?F[W]=this._context.model.getViewLineData(this._samplingState.minimapLines[T+W-1]):F[W]=null;return F}return this._context.model.getMinimapLinesRenderingData(T,R,P).data}getSelections(){if(this._minimapSelections===null)if(this._samplingState){this._minimapSelections=[];for(const T of this._selections){const[R,P]=this._samplingState.decorationLineRangeToMinimapLineRange(T.startLineNumber,T.endLineNumber);this._minimapSelections.push(new s.Selection(R,T.startColumn,P,T.endColumn))}}else this._minimapSelections=this._selections;return this._minimapSelections}getMinimapDecorationsInViewport(T,R){let P;if(this._samplingState){const W=this._samplingState.minimapLines[T-1],A=this._samplingState.minimapLines[R-1];P=new t.Range(W,1,A,this._context.model.getLineMaxColumn(A))}else P=new t.Range(T,1,R,this._context.model.getLineMaxColumn(R));const F=this._context.model.getDecorationsInViewport(P);if(this._samplingState){const W=[];for(const A of F){if(!A.options.minimap)continue;const H=A.range,q=this._samplingState.modelLineToMinimapLine(H.startLineNumber),X=this._samplingState.modelLineToMinimapLine(H.endLineNumber);W.push(new l.ViewModelDecoration(new t.Range(q,H.startColumn,X,H.endColumn),A.options))}return W}return F}getOptions(){return this._context.model.getTextModelOptions()}revealLineNumber(T){this._samplingState&&(T=this._samplingState.minimapLines[T-1]),this._context.model.revealRange("mouse",!1,new t.Range(T,1,T,1),1,0)}setScrollTop(T){this._context.model.setScrollPosition({scrollTop:T},1)}}e.Minimap=k;class M extends I.Disposable{constructor(T,R){super();this._renderDecorations=!1,this._gestureInProgress=!1,this._theme=T,this._model=R,this._lastRenderData=null,this._buffers=null,this._selectionColor=this._theme.getColor(c.minimapSelection),this._domNode=(0,m.createFastDomNode)(document.createElement("div")),h.PartFingerprints.write(this._domNode,8),this._domNode.setClassName(this._getMinimapDomNodeClassName()),this._domNode.setPosition("absolute"),this._domNode.setAttribute("role","presentation"),this._domNode.setAttribute("aria-hidden","true"),this._shadow=(0,m.createFastDomNode)(document.createElement("div")),this._shadow.setClassName("minimap-shadow-hidden"),this._domNode.appendChild(this._shadow),this._canvas=(0,m.createFastDomNode)(document.createElement("canvas")),this._canvas.setPosition("absolute"),this._canvas.setLeft(0),this._domNode.appendChild(this._canvas),this._decorationsCanvas=(0,m.createFastDomNode)(document.createElement("canvas")),this._decorationsCanvas.setPosition("absolute"),this._decorationsCanvas.setClassName("minimap-decorations-layer"),this._decorationsCanvas.setLeft(0),this._domNode.appendChild(this._decorationsCanvas),this._slider=(0,m.createFastDomNode)(document.createElement("div")),this._slider.setPosition("absolute"),this._slider.setClassName("minimap-slider"),this._slider.setLayerHinting(!0),this._slider.setContain("strict"),this._domNode.appendChild(this._slider),this._sliderHorizontal=(0,m.createFastDomNode)(document.createElement("div")),this._sliderHorizontal.setPosition("absolute"),this._sliderHorizontal.setClassName("minimap-slider-horizontal"),this._slider.appendChild(this._sliderHorizontal),this._applyLayout(),this._mouseDownListener=y.addStandardDisposableListener(this._domNode.domNode,"mousedown",P=>{if(P.preventDefault(),this._model.options.renderMinimap===0||!this._lastRenderData)return;if(this._model.options.size!=="proportional"){if(P.leftButton&&this._lastRenderData){const X=y.getDomNodePagePosition(this._slider.domNode),G=X.top+X.height/2;this._startSliderDragging(P.buttons,P.posx,G,P.posy,this._lastRenderData.renderedLayout)}return}const W=this._model.options.minimapLineHeight,A=this._model.options.canvasInnerHeight/this._model.options.canvasOuterHeight*P.browserEvent.offsetY;let q=Math.floor(A/W)+this._lastRenderData.renderedLayout.startLineNumber;q=Math.min(q,this._model.getLineCount()),this._model.revealLineNumber(q)}),this._sliderMouseMoveMonitor=new D.GlobalMouseMoveMonitor,this._sliderMouseDownListener=y.addStandardDisposableListener(this._slider.domNode,"mousedown",P=>{P.preventDefault(),P.stopPropagation(),P.leftButton&&this._lastRenderData&&this._startSliderDragging(P.buttons,P.posx,P.posy,P.posy,this._lastRenderData.renderedLayout)}),this._gestureDisposable=o.Gesture.addTarget(this._domNode.domNode),this._sliderTouchStartListener=y.addDisposableListener(this._domNode.domNode,o.EventType.Start,P=>{P.preventDefault(),P.stopPropagation(),this._lastRenderData&&(this._slider.toggleClassName("active",!0),this._gestureInProgress=!0,this.scrollDueToTouchEvent(P))},{passive:!1}),this._sliderTouchMoveListener=y.addDisposableListener(this._domNode.domNode,o.EventType.Change,P=>{P.preventDefault(),P.stopPropagation(),this._lastRenderData&&this._gestureInProgress&&this.scrollDueToTouchEvent(P)},{passive:!1}),this._sliderTouchEndListener=y.addStandardDisposableListener(this._domNode.domNode,o.EventType.End,P=>{P.preventDefault(),P.stopPropagation(),this._gestureInProgress=!1,this._slider.toggleClassName("active",!1)})}_startSliderDragging(T,R,P,F,W){this._slider.toggleClassName("active",!0);const A=(H,q)=>{const X=Math.abs(q-R);if(w.isWindows&&X>f){this._model.setScrollTop(W.scrollTop);return}const G=H-P;this._model.setScrollTop(W.getDesiredScrollTopFromDelta(G))};F!==P&&A(F,R),this._sliderMouseMoveMonitor.startMonitoring(this._slider.domNode,T,D.standardMouseMoveMerger,H=>A(H.posy,H.posx),()=>{this._slider.toggleClassName("active",!1)})}scrollDueToTouchEvent(T){const R=this._domNode.domNode.getBoundingClientRect().top,P=this._lastRenderData.renderedLayout.getDesiredScrollTopFromTouchLocation(T.pageY-R);this._model.setScrollTop(P)}dispose(){this._mouseDownListener.dispose(),this._sliderMouseMoveMonitor.dispose(),this._sliderMouseDownListener.dispose(),this._gestureDisposable.dispose(),this._sliderTouchStartListener.dispose(),this._sliderTouchMoveListener.dispose(),this._sliderTouchEndListener.dispose(),super.dispose()}_getMinimapDomNodeClassName(){return this._model.options.showSlider==="always"?"minimap slider-always":"minimap slider-mouseover"}getDomNode(){return this._domNode}_applyLayout(){this._domNode.setLeft(this._model.options.minimapLeft),this._domNode.setWidth(this._model.options.minimapWidth),this._domNode.setHeight(this._model.options.minimapHeight),this._shadow.setHeight(this._model.options.minimapHeight),this._canvas.setWidth(this._model.options.canvasOuterWidth),this._canvas.setHeight(this._model.options.canvasOuterHeight),this._canvas.domNode.width=this._model.options.canvasInnerWidth,this._canvas.domNode.height=this._model.options.canvasInnerHeight,this._decorationsCanvas.setWidth(this._model.options.canvasOuterWidth),this._decorationsCanvas.setHeight(this._model.options.canvasOuterHeight),this._decorationsCanvas.domNode.width=this._model.options.canvasInnerWidth,this._decorationsCanvas.domNode.height=this._model.options.canvasInnerHeight,this._slider.setWidth(this._model.options.minimapWidth)}_getBuffer(){return this._buffers||this._model.options.canvasInnerWidth>0&&this._model.options.canvasInnerHeight>0&&(this._buffers=new E(this._canvas.domNode.getContext("2d"),this._model.options.canvasInnerWidth,this._model.options.canvasInnerHeight,this._model.options.backgroundColor)),this._buffers?this._buffers.getBuffer():null}onDidChangeOptions(){this._lastRenderData=null,this._buffers=null,this._applyLayout(),this._domNode.setClassName(this._getMinimapDomNodeClassName())}onSelectionChanged(){return this._renderDecorations=!0,!0}onDecorationsChanged(){return this._renderDecorations=!0,!0}onFlushed(){return this._lastRenderData=null,!0}onLinesChanged(T,R){return this._lastRenderData?this._lastRenderData.onLinesChanged(T,R):!1}onLinesDeleted(T,R){return this._lastRenderData&&this._lastRenderData.onLinesDeleted(T,R),!0}onLinesInserted(T,R){return this._lastRenderData&&this._lastRenderData.onLinesInserted(T,R),!0}onScrollChanged(){return this._renderDecorations=!0,!0}onThemeChanged(){return this._selectionColor=this._theme.getColor(c.minimapSelection),this._renderDecorations=!0,!0}onTokensChanged(T){return this._lastRenderData?this._lastRenderData.onTokensChanged(T):!1}onTokensColorsChanged(){return this._lastRenderData=null,this._buffers=null,!0}onZonesChanged(){return this._lastRenderData=null,!0}render(T){if(this._model.options.renderMinimap===0){this._shadow.setClassName("minimap-shadow-hidden"),this._sliderHorizontal.setWidth(0),this._sliderHorizontal.setHeight(0);return}T.scrollLeft+T.viewportWidth>=T.scrollWidth?this._shadow.setClassName("minimap-shadow-hidden"):this._shadow.setClassName("minimap-shadow-visible");const P=C.create(this._model.options,T.viewportStartLineNumber,T.viewportEndLineNumber,T.viewportStartLineNumberVerticalOffset,T.viewportHeight,T.viewportContainsWhitespaceGaps,this._model.getLineCount(),this._model.getRealLineCount(),T.scrollTop,T.scrollHeight,this._lastRenderData?this._lastRenderData.renderedLayout:null);this._slider.setDisplay(P.sliderNeeded?"block":"none"),this._slider.setTop(P.sliderTop),this._slider.setHeight(P.sliderHeight),this._sliderHorizontal.setLeft(0),this._sliderHorizontal.setWidth(this._model.options.minimapWidth),this._sliderHorizontal.setTop(0),this._sliderHorizontal.setHeight(P.sliderHeight),this.renderDecorations(P),this._lastRenderData=this.renderLines(P)}renderDecorations(T){if(this._renderDecorations){this._renderDecorations=!1;const R=this._model.getSelections();R.sort(t.Range.compareRangesUsingStarts);const P=this._model.getMinimapDecorationsInViewport(T.startLineNumber,T.endLineNumber);P.sort((ae,oe)=>(ae.options.zIndex||0)-(oe.options.zIndex||0));const{canvasInnerWidth:F,canvasInnerHeight:W}=this._model.options,A=this._model.options.minimapLineHeight,H=this._model.options.minimapCharWidth,q=this._model.getOptions().tabSize,X=this._decorationsCanvas.domNode.getContext("2d");X.clearRect(0,0,F,W);const G=new O(T.startLineNumber,T.endLineNumber,!1);this._renderSelectionLineHighlights(X,R,G,T,A),this._renderDecorationsLineHighlights(X,P,G,T,A);const re=new O(T.startLineNumber,T.endLineNumber,null);this._renderSelectionsHighlights(X,R,re,T,A,q,H,F),this._renderDecorationsHighlights(X,P,re,T,A,q,H,F)}}_renderSelectionLineHighlights(T,R,P,F,W){if(!this._selectionColor||this._selectionColor.isTransparent())return;T.fillStyle=this._selectionColor.transparent(.5).toString();let A=0,H=0;for(const q of R){const X=Math.max(F.startLineNumber,q.startLineNumber),G=Math.min(F.endLineNumber,q.endLineNumber);if(X>G)continue;for(let oe=X;oe<=G;oe++)P.set(oe,!0);const re=(X-F.startLineNumber)*W,ae=(G-F.startLineNumber)*W+W;H>=re||(H>A&&T.fillRect(g.MINIMAP_GUTTER_WIDTH,A,T.canvas.width,H-A),A=re),H=ae}H>A&&T.fillRect(g.MINIMAP_GUTTER_WIDTH,A,T.canvas.width,H-A)}_renderDecorationsLineHighlights(T,R,P,F,W){const A=new Map;for(let H=R.length-1;H>=0;H--){const q=R[H],X=q.options.minimap;if(!X||X.position!==d.MinimapPosition.Inline)continue;const G=Math.max(F.startLineNumber,q.range.startLineNumber),re=Math.min(F.endLineNumber,q.range.endLineNumber);if(G>re)continue;const ae=X.getColor(this._theme.value);if(!ae||ae.isTransparent())continue;let oe=A.get(ae.toString());oe||(oe=ae.transparent(.5).toString(),A.set(ae.toString(),oe)),T.fillStyle=oe;for(let Z=G;Z<=re;Z++){if(P.has(Z))continue;P.set(Z,!0);const x=(G-F.startLineNumber)*W;T.fillRect(g.MINIMAP_GUTTER_WIDTH,x,T.canvas.width,W)}}}_renderSelectionsHighlights(T,R,P,F,W,A,H,q){if(!(!this._selectionColor||this._selectionColor.isTransparent()))for(const X of R){const G=Math.max(F.startLineNumber,X.startLineNumber),re=Math.min(F.endLineNumber,X.endLineNumber);if(!(G>re))for(let ae=G;ae<=re;ae++)this.renderDecorationOnLine(T,P,X,this._selectionColor,F,ae,W,W,A,H,q)}}_renderDecorationsHighlights(T,R,P,F,W,A,H,q){for(const X of R){const G=X.options.minimap;if(!G)continue;const re=Math.max(F.startLineNumber,X.range.startLineNumber),ae=Math.min(F.endLineNumber,X.range.endLineNumber);if(re>ae)continue;const oe=G.getColor(this._theme.value);if(!(!oe||oe.isTransparent()))for(let Z=re;Z<=ae;Z++)switch(G.position){case d.MinimapPosition.Inline:this.renderDecorationOnLine(T,P,X.range,oe,F,Z,W,W,A,H,q);continue;case d.MinimapPosition.Gutter:{const x=(Z-F.startLineNumber)*W,U=2;this.renderDecoration(T,oe,U,x,S,W);continue}}}}renderDecorationOnLine(T,R,P,F,W,A,H,q,X,G,re){const ae=(A-W.startLineNumber)*q;if(ae+H<0||ae>this._model.options.canvasInnerHeight)return;const{startLineNumber:oe,endLineNumber:Z}=P,x=oe===A?P.startColumn:1,U=Z===A?P.endColumn:this._model.getLineMaxColumn(A),Q=this.getXOffsetForPosition(R,A,x,X,G,re),ne=this.getXOffsetForPosition(R,A,U,X,G,re);this.renderDecoration(T,F,Q,ae,ne-Q,H)}getXOffsetForPosition(T,R,P,F,W,A){if(P===1)return g.MINIMAP_GUTTER_WIDTH;if((P-1)*W>=A)return A;let q=T.get(R);if(!q){const X=this._model.getLineContent(R);q=[g.MINIMAP_GUTTER_WIDTH];let G=g.MINIMAP_GUTTER_WIDTH;for(let re=1;re<X.length+1;re++){const ae=X.charCodeAt(re-1),oe=ae===9?F*W:b.isFullWidthCharacter(ae)?2*W:W,Z=G+oe;if(Z>=A){q[re]=A;break}q[re]=Z,G=Z}T.set(R,q)}return P-1<q.length?q[P-1]:A}renderDecoration(T,R,P,F,W,A){T.fillStyle=R&&R.toString()||"",T.fillRect(P,F,W,A)}renderLines(T){const R=T.startLineNumber,P=T.endLineNumber,F=this._model.options.minimapLineHeight;if(this._lastRenderData&&this._lastRenderData.linesEquals(T)){const le=this._lastRenderData._get();return new L(T,le.imageData,le.lines)}const W=this._getBuffer();if(!W)return null;const[A,H,q]=M._renderUntouchedLines(W,R,P,F,this._lastRenderData),X=this._model.getMinimapLinesRenderingData(R,P,q),G=this._model.getOptions().tabSize,re=this._model.options.defaultBackgroundColor,ae=this._model.options.backgroundColor,oe=this._model.options.foregroundAlpha,Z=this._model.tokensColorTracker,x=Z.backgroundIsLight(),U=this._model.options.renderMinimap,Q=this._model.options.charRenderer(),ne=this._model.options.fontScale,ce=this._model.options.minimapCharWidth,ue=(U===1?2:2+1)*ne,z=F>ue?Math.floor((F-ue)/2):0,V=ae.a/255,$=new i.RGBA8(Math.round((ae.r-re.r)*V+re.r),Math.round((ae.g-re.g)*V+re.g),Math.round((ae.b-re.b)*V+re.b),255);let K=0;const J=[];for(let le=0,he=P-R+1;le<he;le++)q[le]&&M._renderLine(W,$,ae.a,x,U,ce,Z,oe,Q,K,z,G,X[le],ne,F),J[le]=new _(K),K+=F;const Y=A===-1?0:A,ge=(H===-1?W.height:H)-Y;return this._canvas.domNode.getContext("2d").putImageData(W,0,0,0,Y,W.width,ge),new L(T,W,J)}static _renderUntouchedLines(T,R,P,F,W){const A=[];if(!W){for(let $=0,K=P-R+1;$<K;$++)A[$]=!0;return[-1,-1,A]}const H=W._get(),q=H.imageData.data,X=H.rendLineNumberStart,G=H.lines,re=G.length,ae=T.width,oe=T.data,Z=(P-R+1)*F*ae*4;let x=-1,U=-1,Q=-1,ne=-1,ce=-1,ee=-1,ue=0;for(let $=R;$<=P;$++){const K=$-R,J=$-X,Y=J>=0&&J<re?G[J].dy:-1;if(Y===-1){A[K]=!0,ue+=F;continue}const se=Y*ae*4,ge=(Y+F)*ae*4,me=ue*ae*4,le=(ue+F)*ae*4;ne===se&&ee===me?(ne=ge,ee=le):(Q!==-1&&(oe.set(q.subarray(Q,ne),ce),x===-1&&Q===0&&Q===ce&&(x=ne),U===-1&&ne===Z&&Q===ce&&(U=Q)),Q=se,ne=ge,ce=me,ee=le),A[K]=!1,ue+=F}Q!==-1&&(oe.set(q.subarray(Q,ne),ce),x===-1&&Q===0&&Q===ce&&(x=ne),U===-1&&ne===Z&&Q===ce&&(U=Q));const z=x===-1?-1:x/(ae*4),V=U===-1?-1:U/(ae*4);return[z,V,A]}static _renderLine(T,R,P,F,W,A,H,q,X,G,re,ae,oe,Z,x){const U=oe.content,Q=oe.tokens,ne=T.width-A,ce=x===1;let ee=g.MINIMAP_GUTTER_WIDTH,ue=0,z=0;for(let V=0,$=Q.getCount();V<$;V++){const K=Q.getEndOffset(V),J=Q.getForeground(V),Y=H.getColor(J);for(;ue<K;ue++){if(ee>ne)return;const se=U.charCodeAt(ue);if(se===9){const ge=ae-(ue+z)%ae;z+=ge-1,ee+=ge*A}else if(se===32)ee+=A;else{const ge=b.isFullWidthCharacter(se)?2:1;for(let me=0;me<ge;me++)if(W===2?X.blockRenderChar(T,ee,G+re,Y,q,R,P,ce):X.renderChar(T,ee,G+re,se,Y,q,R,P,Z,F,ce),ee+=A,ee>ne)return}}}}}class O{constructor(T,R,P){this._startLineNumber=T,this._endLineNumber=R,this._defaultValue=P,this._values=[];for(let F=0,W=this._endLineNumber-this._startLineNumber+1;F<W;F++)this._values[F]=P}has(T){return this.get(T)!==this._defaultValue}set(T,R){T<this._startLineNumber||T>this._endLineNumber||(this._values[T-this._startLineNumber]=R)}get(T){return T<this._startLineNumber||T>this._endLineNumber?this._defaultValue:this._values[T-this._startLineNumber]}}(0,r.registerThemingParticipant)((B,T)=>{const R=B.getColor(c.minimapSliderBackground);R&&T.addRule(`.monaco-editor .minimap-slider .minimap-slider-horizontal { background: ${R}; }`);const P=B.getColor(c.minimapSliderHoverBackground);P&&T.addRule(`.monaco-editor .minimap-slider:hover .minimap-slider-horizontal { background: ${P}; }`);const F=B.getColor(c.minimapSliderActiveBackground);F&&T.addRule(`.monaco-editor .minimap-slider.active .minimap-slider-horizontal { background: ${F}; }`);const W=B.getColor(c.scrollbarShadow);W&&T.addRule(`.monaco-editor .minimap-shadow-visible { box-shadow: ${W} -6px 0 6px -6px inset; }`)})}),define(te[641],ie([1,0,30,50,23,14,362]),function(j,e,y,m,D,I){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ScrollDecorationViewPart=void 0;class w extends m.ViewPart{constructor(p){super(p);this._scrollTop=0,this._width=0,this._updateWidth(),this._shouldShow=!1;const g=this._context.configuration.options.get(92);this._useShadows=g.useShadows,this._domNode=(0,y.createFastDomNode)(document.createElement("div")),this._domNode.setAttribute("role","presentation"),this._domNode.setAttribute("aria-hidden","true")}dispose(){super.dispose()}_updateShouldShow(){const p=this._useShadows&&this._scrollTop>0;return this._shouldShow!==p?(this._shouldShow=p,!0):!1}getDomNode(){return this._domNode}_updateWidth(){const h=this._context.configuration.options.get(131);h.minimap.renderMinimap===0||h.minimap.minimapWidth>0&&h.minimap.minimapLeft===0?this._width=h.width:this._width=h.width-h.minimap.minimapWidth-h.verticalScrollbarWidth}onConfigurationChanged(p){const g=this._context.configuration.options.get(92);return this._useShadows=g.useShadows,this._updateWidth(),this._updateShouldShow(),!0}onScrollChanged(p){return this._scrollTop=p.scrollTop,this._updateShouldShow()}prepareRender(p){}render(p){this._domNode.setWidth(this._width),this._domNode.setClassName(this._shouldShow?"scroll-decoration":"")}}e.ScrollDecorationViewPart=w,(0,I.registerThemingParticipant)((b,p)=>{const h=b.getColor(D.scrollbarShadow);h&&p.addRule(`.monaco-editor .scroll-decoration { box-shadow: ${h} 0 6px 6px -6px inset; }`)})}),define(te[642],ie([1,0,100,23,14,363]),function(j,e,y,m,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SelectionsOverlay=void 0;class I{constructor(i){this.left=i.left,this.width=i.width,this.startStyle=null,this.endStyle=null}}class w{constructor(i,n){this.lineNumber=i,this.ranges=n}}function b(t){return new I(t)}function p(t){return new w(t.lineNumber,t.ranges.map(b))}class h extends y.DynamicViewOverlay{constructor(i){super();this._previousFrameVisibleRangesWithStyle=[],this._context=i;const n=this._context.configuration.options;this._lineHeight=n.get(59),this._roundedSelection=n.get(90),this._typicalHalfwidthCharacterWidth=n.get(44).typicalHalfwidthCharacterWidth,this._selections=[],this._renderResult=null,this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),this._renderResult=null,super.dispose()}onConfigurationChanged(i){const n=this._context.configuration.options;return this._lineHeight=n.get(59),this._roundedSelection=n.get(90),this._typicalHalfwidthCharacterWidth=n.get(44).typicalHalfwidthCharacterWidth,!0}onCursorStateChanged(i){return this._selections=i.selections.slice(0),!0}onDecorationsChanged(i){return!0}onFlushed(i){return!0}onLinesChanged(i){return!0}onLinesDeleted(i){return!0}onLinesInserted(i){return!0}onScrollChanged(i){return i.scrollTopChanged}onZonesChanged(i){return!0}_visibleRangesHaveGaps(i){for(let n=0,l=i.length;n<l;n++)if(i[n].ranges.length>1)return!0;return!1}_enrichVisibleRangesWithStyle(i,n,l){const c=this._typicalHalfwidthCharacterWidth/4;let r=null,s=null;if(l&&l.length>0&&n.length>0){const o=n[0].lineNumber;if(o===i.startLineNumber)for(let d=0;!r&&d<l.length;d++)l[d].lineNumber===o&&(r=l[d].ranges[0]);const a=n[n.length-1].lineNumber;if(a===i.endLineNumber)for(let d=l.length-1;!s&&d>=0;d--)l[d].lineNumber===a&&(s=l[d].ranges[0]);r&&!r.startStyle&&(r=null),s&&!s.startStyle&&(s=null)}for(let o=0,a=n.length;o<a;o++){const d=n[o].ranges[0],u=d.left,f=d.left+d.width,S={top:0,bottom:0},v={top:0,bottom:0};if(o>0){const C=n[o-1].ranges[0].left,_=n[o-1].ranges[0].left+n[o-1].ranges[0].width;g(u-C)<c?S.top=2:u>C&&(S.top=1),g(f-_)<c?v.top=2:C<f&&f<_&&(v.top=1)}else r&&(S.top=r.startStyle.top,v.top=r.endStyle.top);if(o+1<a){const C=n[o+1].ranges[0].left,_=n[o+1].ranges[0].left+n[o+1].ranges[0].width;g(u-C)<c?S.bottom=2:C<u&&u<_&&(S.bottom=1),g(f-_)<c?v.bottom=2:f<_&&(v.bottom=1)}else s&&(S.bottom=s.startStyle.bottom,v.bottom=s.endStyle.bottom);d.startStyle=S,d.endStyle=v}}_getVisibleRangesWithStyle(i,n,l){const r=(n.linesVisibleRangesForRange(i,!0)||[]).map(p);return!this._visibleRangesHaveGaps(r)&&this._roundedSelection&&this._enrichVisibleRangesWithStyle(n.visibleRange,r,l),r}_createSelectionPiece(i,n,l,c,r){return'<div class="cslr '+l+'" style="top:'+i.toString()+"px;left:"+c.toString()+"px;width:"+r.toString()+"px;height:"+n+'px;"></div>'}_actualRenderOneSelection(i,n,l,c){if(c.length===0)return;const r=!!c[0].ranges[0].startStyle,s=this._lineHeight.toString(),o=(this._lineHeight-1).toString(),a=c[0].lineNumber,d=c[c.length-1].lineNumber;for(let u=0,f=c.length;u<f;u++){const S=c[u],v=S.lineNumber,C=v-n,_=l&&(v===d||v===a)?o:s,L=l&&v===a?1:0;let E="",N="";for(let k=0,M=S.ranges.length;k<M;k++){const O=S.ranges[k];if(r){const T=O.startStyle,R=O.endStyle;if(T.top===1||T.bottom===1){E+=this._createSelectionPiece(L,_,h.SELECTION_CLASS_NAME,O.left-h.ROUNDED_PIECE_WIDTH,h.ROUNDED_PIECE_WIDTH);let P=h.EDITOR_BACKGROUND_CLASS_NAME;T.top===1&&(P+=" "+h.SELECTION_TOP_RIGHT),T.bottom===1&&(P+=" "+h.SELECTION_BOTTOM_RIGHT),E+=this._createSelectionPiece(L,_,P,O.left-h.ROUNDED_PIECE_WIDTH,h.ROUNDED_PIECE_WIDTH)}if(R.top===1||R.bottom===1){E+=this._createSelectionPiece(L,_,h.SELECTION_CLASS_NAME,O.left+O.width,h.ROUNDED_PIECE_WIDTH);let P=h.EDITOR_BACKGROUND_CLASS_NAME;R.top===1&&(P+=" "+h.SELECTION_TOP_LEFT),R.bottom===1&&(P+=" "+h.SELECTION_BOTTOM_LEFT),E+=this._createSelectionPiece(L,_,P,O.left+O.width,h.ROUNDED_PIECE_WIDTH)}}let B=h.SELECTION_CLASS_NAME;if(r){const T=O.startStyle,R=O.endStyle;T.top===0&&(B+=" "+h.SELECTION_TOP_LEFT),T.bottom===0&&(B+=" "+h.SELECTION_BOTTOM_LEFT),R.top===0&&(B+=" "+h.SELECTION_TOP_RIGHT),R.bottom===0&&(B+=" "+h.SELECTION_BOTTOM_RIGHT)}N+=this._createSelectionPiece(L,_,B,O.left,O.width)}i[C][0]+=E,i[C][1]+=N}}prepareRender(i){const n=[],l=i.visibleRange.startLineNumber,c=i.visibleRange.endLineNumber;for(let s=l;s<=c;s++){const o=s-l;n[o]=["",""]}const r=[];for(let s=0,o=this._selections.length;s<o;s++){const a=this._selections[s];if(a.isEmpty()){r[s]=null;continue}const d=this._getVisibleRangesWithStyle(a,i,this._previousFrameVisibleRangesWithStyle[s]);r[s]=d,this._actualRenderOneSelection(n,l,this._selections.length>1,d)}this._previousFrameVisibleRangesWithStyle=r,this._renderResult=n.map(([s,o])=>s+o)}render(i,n){if(!this._renderResult)return"";const l=n-i;return l<0||l>=this._renderResult.length?"":this._renderResult[l]}}e.SelectionsOverlay=h,h.SELECTION_CLASS_NAME="selected-text",h.SELECTION_TOP_LEFT="top-left-radius",h.SELECTION_BOTTOM_LEFT="bottom-left-radius",h.SELECTION_TOP_RIGHT="top-right-radius",h.SELECTION_BOTTOM_RIGHT="bottom-right-radius",h.EDITOR_BACKGROUND_CLASS_NAME="monaco-editor-background",h.ROUNDED_PIECE_WIDTH=10,(0,D.registerThemingParticipant)((t,i)=>{const n=t.getColor(m.editorSelectionBackground);n&&i.addRule(`.monaco-editor .focused .selected-text { background-color: ${n}; }`);const l=t.getColor(m.editorInactiveSelection);l&&i.addRule(`.monaco-editor .selected-text { background-color: ${l}; }`);const c=t.getColor(m.editorSelectionForeground);c&&!c.isTransparent()&&i.addRule(`.monaco-editor .view-line span.inline-selected-text { color: ${c}; }`)});function g(t){return t<0?-t:t}}),define(te[52],ie([1,0,511,29,23,14]),function(j,e,y,m,D,I){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.editorUnicodeHighlightBorder=e.editorBracketPairGuideActiveBackground6=e.editorBracketPairGuideActiveBackground5=e.editorBracketPairGuideActiveBackground4=e.editorBracketPairGuideActiveBackground3=e.editorBracketPairGuideActiveBackground2=e.editorBracketPairGuideActiveBackground1=e.editorBracketPairGuideBackground6=e.editorBracketPairGuideBackground5=e.editorBracketPairGuideBackground4=e.editorBracketPairGuideBackground3=e.editorBracketPairGuideBackground2=e.editorBracketPairGuideBackground1=e.editorBracketHighlightingUnexpectedBracketForeground=e.editorBracketHighlightingForeground6=e.editorBracketHighlightingForeground5=e.editorBracketHighlightingForeground4=e.editorBracketHighlightingForeground3=e.editorBracketHighlightingForeground2=e.editorBracketHighlightingForeground1=e.overviewRulerInfo=e.overviewRulerWarning=e.overviewRulerError=e.overviewRulerRangeHighlight=e.ghostTextBackground=e.ghostTextForeground=e.ghostTextBorder=e.editorUnnecessaryCodeOpacity=e.editorUnnecessaryCodeBorder=e.editorGutter=e.editorOverviewRulerBackground=e.editorOverviewRulerBorder=e.editorBracketMatchBorder=e.editorBracketMatchBackground=e.editorCodeLensForeground=e.editorRuler=e.editorActiveLineNumber=e.editorLineNumbers=e.editorActiveIndentGuides=e.editorIndentGuides=e.editorWhitespaces=e.editorCursorBackground=e.editorCursorForeground=e.editorSymbolHighlightBorder=e.editorSymbolHighlight=e.editorRangeHighlightBorder=e.editorRangeHighlight=e.editorLineHighlightBorder=e.editorLineHighlight=void 0,e.editorLineHighlight=(0,D.registerColor)("editor.lineHighlightBackground",{dark:null,light:null,hc:null},y.localize(0,null)),e.editorLineHighlightBorder=(0,D.registerColor)("editor.lineHighlightBorder",{dark:"#282828",light:"#eeeeee",hc:"#f38518"},y.localize(1,null)),e.editorRangeHighlight=(0,D.registerColor)("editor.rangeHighlightBackground",{dark:"#ffffff0b",light:"#fdff0033",hc:null},y.localize(2,null),!0),e.editorRangeHighlightBorder=(0,D.registerColor)("editor.rangeHighlightBorder",{dark:null,light:null,hc:D.activeContrastBorder},y.localize(3,null),!0),e.editorSymbolHighlight=(0,D.registerColor)("editor.symbolHighlightBackground",{dark:D.editorFindMatchHighlight,light:D.editorFindMatchHighlight,hc:null},y.localize(4,null),!0),e.editorSymbolHighlightBorder=(0,D.registerColor)("editor.symbolHighlightBorder",{dark:null,light:null,hc:D.activeContrastBorder},y.localize(5,null),!0),e.editorCursorForeground=(0,D.registerColor)("editorCursor.foreground",{dark:"#AEAFAD",light:m.Color.black,hc:m.Color.white},y.localize(6,null)),e.editorCursorBackground=(0,D.registerColor)("editorCursor.background",null,y.localize(7,null)),e.editorWhitespaces=(0,D.registerColor)("editorWhitespace.foreground",{dark:"#e3e4e229",light:"#33333333",hc:"#e3e4e229"},y.localize(8,null)),e.editorIndentGuides=(0,D.registerColor)("editorIndentGuide.background",{dark:e.editorWhitespaces,light:e.editorWhitespaces,hc:e.editorWhitespaces},y.localize(9,null)),e.editorActiveIndentGuides=(0,D.registerColor)("editorIndentGuide.activeBackground",{dark:e.editorWhitespaces,light:e.editorWhitespaces,hc:e.editorWhitespaces},y.localize(10,null)),e.editorLineNumbers=(0,D.registerColor)("editorLineNumber.foreground",{dark:"#858585",light:"#237893",hc:m.Color.white},y.localize(11,null));const w=(0,D.registerColor)("editorActiveLineNumber.foreground",{dark:"#c6c6c6",light:"#0B216F",hc:D.activeContrastBorder},y.localize(12,null),!1,y.localize(13,null));e.editorActiveLineNumber=(0,D.registerColor)("editorLineNumber.activeForeground",{dark:w,light:w,hc:w},y.localize(14,null)),e.editorRuler=(0,D.registerColor)("editorRuler.foreground",{dark:"#5A5A5A",light:m.Color.lightgrey,hc:m.Color.white},y.localize(15,null)),e.editorCodeLensForeground=(0,D.registerColor)("editorCodeLens.foreground",{dark:"#999999",light:"#919191",hc:"#999999"},y.localize(16,null)),e.editorBracketMatchBackground=(0,D.registerColor)("editorBracketMatch.background",{dark:"#0064001a",light:"#0064001a",hc:"#0064001a"},y.localize(17,null)),e.editorBracketMatchBorder=(0,D.registerColor)("editorBracketMatch.border",{dark:"#888",light:"#B9B9B9",hc:D.contrastBorder},y.localize(18,null)),e.editorOverviewRulerBorder=(0,D.registerColor)("editorOverviewRuler.border",{dark:"#7f7f7f4d",light:"#7f7f7f4d",hc:"#7f7f7f4d"},y.localize(19,null)),e.editorOverviewRulerBackground=(0,D.registerColor)("editorOverviewRuler.background",null,y.localize(20,null)),e.editorGutter=(0,D.registerColor)("editorGutter.background",{dark:D.editorBackground,light:D.editorBackground,hc:D.editorBackground},y.localize(21,null)),e.editorUnnecessaryCodeBorder=(0,D.registerColor)("editorUnnecessaryCode.border",{dark:null,light:null,hc:m.Color.fromHex("#fff").transparent(.8)},y.localize(22,null)),e.editorUnnecessaryCodeOpacity=(0,D.registerColor)("editorUnnecessaryCode.opacity",{dark:m.Color.fromHex("#000a"),light:m.Color.fromHex("#0007"),hc:null},y.localize(23,null)),e.ghostTextBorder=(0,D.registerColor)("editorGhostText.border",{dark:null,light:null,hc:m.Color.fromHex("#fff").transparent(.8)},y.localize(24,null)),e.ghostTextForeground=(0,D.registerColor)("editorGhostText.foreground",{dark:m.Color.fromHex("#ffffff56"),light:m.Color.fromHex("#0007"),hc:null},y.localize(25,null)),e.ghostTextBackground=(0,D.registerColor)("editorGhostText.background",{dark:null,light:null,hc:null},y.localize(26,null));const b=new m.Color(new m.RGBA(0,122,204,.6));e.overviewRulerRangeHighlight=(0,D.registerColor)("editorOverviewRuler.rangeHighlightForeground",{dark:b,light:b,hc:b},y.localize(27,null),!0),e.overviewRulerError=(0,D.registerColor)("editorOverviewRuler.errorForeground",{dark:new m.Color(new m.RGBA(255,18,18,.7)),light:new m.Color(new m.RGBA(255,18,18,.7)),hc:new m.Color(new m.RGBA(255,50,50,1))},y.localize(28,null)),e.overviewRulerWarning=(0,D.registerColor)("editorOverviewRuler.warningForeground",{dark:D.editorWarningForeground,light:D.editorWarningForeground,hc:D.editorWarningBorder},y.localize(29,null)),e.overviewRulerInfo=(0,D.registerColor)("editorOverviewRuler.infoForeground",{dark:D.editorInfoForeground,light:D.editorInfoForeground,hc:D.editorInfoBorder},y.localize(30,null)),e.editorBracketHighlightingForeground1=(0,D.registerColor)("editorBracketHighlight.foreground1",{dark:"#FFD700",light:"#0431FAFF",hc:"#FFD700"},y.localize(31,null)),e.editorBracketHighlightingForeground2=(0,D.registerColor)("editorBracketHighlight.foreground2",{dark:"#DA70D6",light:"#319331FF",hc:"#DA70D6"},y.localize(32,null)),e.editorBracketHighlightingForeground3=(0,D.registerColor)("editorBracketHighlight.foreground3",{dark:"#179FFF",light:"#7B3814FF",hc:"#87CEFA"},y.localize(33,null)),e.editorBracketHighlightingForeground4=(0,D.registerColor)("editorBracketHighlight.foreground4",{dark:"#00000000",light:"#00000000",hc:"#00000000"},y.localize(34,null)),e.editorBracketHighlightingForeground5=(0,D.registerColor)("editorBracketHighlight.foreground5",{dark:"#00000000",light:"#00000000",hc:"#00000000"},y.localize(35,null)),e.editorBracketHighlightingForeground6=(0,D.registerColor)("editorBracketHighlight.foreground6",{dark:"#00000000",light:"#00000000",hc:"#00000000"},y.localize(36,null)),e.editorBracketHighlightingUnexpectedBracketForeground=(0,D.registerColor)("editorBracketHighlight.unexpectedBracket.foreground",{dark:new m.Color(new m.RGBA(255,18,18,.8)),light:new m.Color(new m.RGBA(255,18,18,.8)),hc:new m.Color(new m.RGBA(255,50,50,1))},y.localize(37,null)),e.editorBracketPairGuideBackground1=(0,D.registerColor)("editorBracketPairGuide.background1",{dark:"#00000000",light:"#00000000",hc:"#00000000"},y.localize(38,null)),e.editorBracketPairGuideBackground2=(0,D.registerColor)("editorBracketPairGuide.background2",{dark:"#00000000",light:"#00000000",hc:"#00000000"},y.localize(39,null)),e.editorBracketPairGuideBackground3=(0,D.registerColor)("editorBracketPairGuide.background3",{dark:"#00000000",light:"#00000000",hc:"#00000000"},y.localize(40,null)),e.editorBracketPairGuideBackground4=(0,D.registerColor)("editorBracketPairGuide.background4",{dark:"#00000000",light:"#00000000",hc:"#00000000"},y.localize(41,null)),e.editorBracketPairGuideBackground5=(0,D.registerColor)("editorBracketPairGuide.background5",{dark:"#00000000",light:"#00000000",hc:"#00000000"},y.localize(42,null)),e.editorBracketPairGuideBackground6=(0,D.registerColor)("editorBracketPairGuide.background6",{dark:"#00000000",light:"#00000000",hc:"#00000000"},y.localize(43,null)),e.editorBracketPairGuideActiveBackground1=(0,D.registerColor)("editorBracketPairGuide.activeBackground1",{dark:"#00000000",light:"#00000000",hc:"#00000000"},y.localize(44,null)),e.editorBracketPairGuideActiveBackground2=(0,D.registerColor)("editorBracketPairGuide.activeBackground2",{dark:"#00000000",light:"#00000000",hc:"#00000000"},y.localize(45,null)),e.editorBracketPairGuideActiveBackground3=(0,D.registerColor)("editorBracketPairGuide.activeBackground3",{dark:"#00000000",light:"#00000000",hc:"#00000000"},y.localize(46,null)),e.editorBracketPairGuideActiveBackground4=(0,D.registerColor)("editorBracketPairGuide.activeBackground4",{dark:"#00000000",light:"#00000000",hc:"#00000000"},y.localize(47,null)),e.editorBracketPairGuideActiveBackground5=(0,D.registerColor)("editorBracketPairGuide.activeBackground5",{dark:"#00000000",light:"#00000000",hc:"#00000000"},y.localize(48,null)),e.editorBracketPairGuideActiveBackground6=(0,D.registerColor)("editorBracketPairGuide.activeBackground6",{dark:"#00000000",light:"#00000000",hc:"#00000000"},y.localize(49,null)),e.editorUnicodeHighlightBorder=(0,D.registerColor)("editorUnicodeHighlight.border",{dark:"#BD9B03",light:"#CEA33D",hc:"#ff0000"},y.localize(50,null)),(0,I.registerThemingParticipant)((p,h)=>{const g=p.getColor(D.editorBackground);g&&h.addRule(`.monaco-editor, .monaco-editor-background, .monaco-editor .inputarea.ime-input { background-color: ${g}; }`);const t=p.getColor(D.editorForeground);t&&h.addRule(`.monaco-editor, .monaco-editor .inputarea.ime-input { color: ${t}; }`);const i=p.getColor(e.editorGutter);i&&h.addRule(`.monaco-editor .margin { background-color: ${i}; }`);const n=p.getColor(e.editorRangeHighlight);n&&h.addRule(`.monaco-editor .rangeHighlight { background-color: ${n}; }`);const l=p.getColor(e.editorRangeHighlightBorder);l&&h.addRule(`.monaco-editor .rangeHighlight { border: 1px ${p.type==="hc"?"dotted":"solid"} ${l}; }`);const c=p.getColor(e.editorSymbolHighlight);c&&h.addRule(`.monaco-editor .symbolHighlight { background-color: ${c}; }`);const r=p.getColor(e.editorSymbolHighlightBorder);r&&h.addRule(`.monaco-editor .symbolHighlight { border: 1px ${p.type==="hc"?"dotted":"solid"} ${r}; }`);const s=p.getColor(e.editorWhitespaces);s&&(h.addRule(`.monaco-editor .mtkw { color: ${s} !important; }`),h.addRule(`.monaco-editor .mtkz { color: ${s} !important; }`))})}),define(te[643],ie([1,0,100,52,19,14,22,351]),function(j,e,y,m,D,I,w){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CurrentLineMarginHighlightOverlay=e.CurrentLineHighlightOverlay=e.AbstractLineHighlightOverlay=void 0;class b extends y.DynamicViewOverlay{constructor(t){super();this._context=t;const i=this._context.configuration.options,n=i.get(131);this._lineHeight=i.get(59),this._renderLineHighlight=i.get(85),this._renderLineHighlightOnlyWhenFocus=i.get(86),this._contentLeft=n.contentLeft,this._contentWidth=n.contentWidth,this._selectionIsEmpty=!0,this._focused=!1,this._cursorLineNumbers=[1],this._selections=[new w.Selection(1,1,1,1)],this._renderData=null,this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),super.dispose()}_readFromSelections(){let t=!1;const i=this._selections.map(l=>l.positionLineNumber);i.sort((l,c)=>l-c),D.equals(this._cursorLineNumbers,i)||(this._cursorLineNumbers=i,t=!0);const n=this._selections.every(l=>l.isEmpty());return this._selectionIsEmpty!==n&&(this._selectionIsEmpty=n,t=!0),t}onThemeChanged(t){return this._readFromSelections()}onConfigurationChanged(t){const i=this._context.configuration.options,n=i.get(131);return this._lineHeight=i.get(59),this._renderLineHighlight=i.get(85),this._renderLineHighlightOnlyWhenFocus=i.get(86),this._contentLeft=n.contentLeft,this._contentWidth=n.contentWidth,!0}onCursorStateChanged(t){return this._selections=t.selections,this._readFromSelections()}onFlushed(t){return!0}onLinesDeleted(t){return!0}onLinesInserted(t){return!0}onScrollChanged(t){return t.scrollWidthChanged||t.scrollTopChanged}onZonesChanged(t){return!0}onFocusChanged(t){return this._renderLineHighlightOnlyWhenFocus?(this._focused=t.isFocused,!0):!1}prepareRender(t){if(!this._shouldRenderThis()){this._renderData=null;return}const i=this._renderOne(t),n=t.visibleRange.startLineNumber,l=t.visibleRange.endLineNumber,c=this._cursorLineNumbers.length;let r=0;const s=[];for(let o=n;o<=l;o++){const a=o-n;for(;r<c&&this._cursorLineNumbers[r]<o;)r++;r<c&&this._cursorLineNumbers[r]===o?s[a]=i:s[a]=""}this._renderData=s}render(t,i){if(!this._renderData)return"";const n=i-t;return n>=this._renderData.length?"":this._renderData[n]}_shouldRenderInMargin(){return(this._renderLineHighlight==="gutter"||this._renderLineHighlight==="all")&&(!this._renderLineHighlightOnlyWhenFocus||this._focused)}_shouldRenderInContent(){return(this._renderLineHighlight==="line"||this._renderLineHighlight==="all")&&this._selectionIsEmpty&&(!this._renderLineHighlightOnlyWhenFocus||this._focused)}}e.AbstractLineHighlightOverlay=b;class p extends b{_renderOne(t){return`<div class="${"current-line"+(this._shouldRenderOther()?" current-line-both":"")}" style="width:${Math.max(t.scrollWidth,this._contentWidth)}px; height:${this._lineHeight}px;"></div>`}_shouldRenderThis(){return this._shouldRenderInContent()}_shouldRenderOther(){return this._shouldRenderInMargin()}}e.CurrentLineHighlightOverlay=p;class h extends b{_renderOne(t){return`<div class="${"current-line"+(this._shouldRenderInMargin()?" current-line-margin":"")+(this._shouldRenderOther()?" current-line-margin-both":"")}" style="width:${this._contentLeft}px; height:${this._lineHeight}px;"></div>`}_shouldRenderThis(){return!0}_shouldRenderOther(){return this._shouldRenderInContent()}}e.CurrentLineMarginHighlightOverlay=h,(0,I.registerThemingParticipant)((g,t)=>{const i=g.getColor(m.editorLineHighlight);if(i&&(t.addRule(`.monaco-editor .view-overlays .current-line { background-color: ${i}; }`),t.addRule(`.monaco-editor .margin-view-overlays .current-line-margin { background-color: ${i}; border: none; }`)),!i||i.isTransparent()||g.defines(m.editorLineHighlightBorder)){const n=g.getColor(m.editorLineHighlightBorder);n&&(t.addRule(`.monaco-editor .view-overlays .current-line { border: 2px solid ${n}; }`),t.addRule(`.monaco-editor .margin-view-overlays .current-line-margin { border: 2px solid ${n}; }`),g.type==="hc"&&(t.addRule(".monaco-editor .view-overlays .current-line { border-width: 1px; }"),t.addRule(".monaco-editor .margin-view-overlays .current-line-margin { border-width: 1px; }")))}})}),define(te[644],ie([1,0,100,52,14,11,19,20,246,180,354]),function(j,e,y,m,D,I,w,b,p,h){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IndentGuidesOverlay=void 0;class g extends y.DynamicViewOverlay{constructor(n){super();this._context=n,this._primaryPosition=null;const l=this._context.configuration.options,c=l.get(132),r=l.get(44);this._lineHeight=l.get(59),this._spaceWidth=r.spaceWidth,this._maxIndentLeft=c.wrappingColumn===-1?-1:c.wrappingColumn*r.typicalHalfwidthCharacterWidth,this._bracketPairGuideOptions=l.get(13),this._renderResult=null,this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),this._renderResult=null,super.dispose()}onConfigurationChanged(n){const l=this._context.configuration.options,c=l.get(132),r=l.get(44);return this._lineHeight=l.get(59),this._spaceWidth=r.spaceWidth,this._maxIndentLeft=c.wrappingColumn===-1?-1:c.wrappingColumn*r.typicalHalfwidthCharacterWidth,this._bracketPairGuideOptions=l.get(13),!0}onCursorStateChanged(n){var l;const r=n.selections[0].getPosition();return((l=this._primaryPosition)===null||l===void 0?void 0:l.equals(r))?!1:(this._primaryPosition=r,!0)}onDecorationsChanged(n){return!0}onFlushed(n){return!0}onLinesChanged(n){return!0}onLinesDeleted(n){return!0}onLinesInserted(n){return!0}onScrollChanged(n){return n.scrollTopChanged}onZonesChanged(n){return!0}onLanguageConfigurationChanged(n){return!0}prepareRender(n){var l,c,r,s;if(!this._bracketPairGuideOptions.indentation&&this._bracketPairGuideOptions.bracketPairs===!1){this._renderResult=null;return}const o=n.visibleRange.startLineNumber,a=n.visibleRange.endLineNumber,d=n.scrollWidth,u=this._lineHeight,f=this._primaryPosition,S=this.getGuidesByLine(o,a,f),v=[];for(let C=o;C<=a;C++){const _=C-o,L=S[_];let E="";const N=(c=(l=n.visibleRangeForPosition(new I.Position(C,1)))===null||l===void 0?void 0:l.left)!==null&&c!==void 0?c:0;for(const k of L){const M=N+(k.visibleColumn-1)*this._spaceWidth;if(M>d||this._maxIndentLeft>0&&M>this._maxIndentLeft)break;const O=k.horizontalLine?k.horizontalLine.top?"horizontal-top":"horizontal-bottom":"vertical",B=k.horizontalLine?((s=(r=n.visibleRangeForPosition(new I.Position(C,k.horizontalLine.endColumn)))===null||r===void 0?void 0:r.left)!==null&&s!==void 0?s:M+this._spaceWidth)-M:this._spaceWidth;E+=`<div class="core-guide ${k.className} ${O}" style="left:${M}px;height:${u}px;width:${B}px"></div>`}v[_]=E}this._renderResult=v}getGuidesByLine(n,l,c){const r=this._bracketPairGuideOptions.bracketPairs!==!1?this._context.model.getBracketGuidesInRangeByLine(n,l,c,{highlightActive:this._bracketPairGuideOptions.highlightActiveBracketPair,horizontalGuides:this._bracketPairGuideOptions.bracketPairsHorizontal===!0?h.HorizontalGuidesState.Enabled:this._bracketPairGuideOptions.bracketPairsHorizontal==="active"?h.HorizontalGuidesState.EnabledForActive:h.HorizontalGuidesState.Disabled,includeInactive:this._bracketPairGuideOptions.bracketPairs===!0}):null,s=this._bracketPairGuideOptions.indentation?this._context.model.getLinesIndentGuides(n,l):null;let o=0,a=0,d=0;if(this._bracketPairGuideOptions.highlightActiveIndentation&&c){const S=this._context.model.getActiveIndentGuide(c.lineNumber,n,l);o=S.startLineNumber,a=S.endLineNumber,d=S.indent}const{indentSize:u}=this._context.model.getTextModelOptions(),f=[];for(let S=n;S<=l;S++){const v=new Array;f.push(v);const C=r?r[S-n]:[],_=new w.ArrayQueue(C),L=s?s[S-n]:[];for(let E=1;E<=L;E++){const N=(E-1)*u+1,k=C.length===0&&o<=S&&S<=a&&E===d;v.push(..._.takeWhile(O=>O.visibleColumn<N)||[]);const M=_.peek();(!M||M.visibleColumn!==N||M.horizontalLine)&&v.push(new h.IndentGuide(N,k?"core-guide-indent-active":"core-guide-indent",null))}v.push(..._.takeWhile(E=>!0)||[])}return f}render(n,l){if(!this._renderResult)return"";const c=l-n;return c<0||c>=this._renderResult.length?"":this._renderResult[c]}}e.IndentGuidesOverlay=g;function t(i){if(!(i&&i.isTransparent()))return i}(0,D.registerThemingParticipant)((i,n)=>{const l=i.getColor(m.editorIndentGuides);l&&n.addRule(`.monaco-editor .lines-content .core-guide-indent { box-shadow: 1px 0 0 0 ${l} inset; }`);const c=i.getColor(m.editorActiveIndentGuides)||l;c&&n.addRule(`.monaco-editor .lines-content .core-guide-indent-active { box-shadow: 1px 0 0 0 ${c} inset; }`);const r=[{bracketColor:m.editorBracketHighlightingForeground1,guideColor:m.editorBracketPairGuideBackground1,guideColorActive:m.editorBracketPairGuideActiveBackground1},{bracketColor:m.editorBracketHighlightingForeground2,guideColor:m.editorBracketPairGuideBackground2,guideColorActive:m.editorBracketPairGuideActiveBackground2},{bracketColor:m.editorBracketHighlightingForeground3,guideColor:m.editorBracketPairGuideBackground3,guideColorActive:m.editorBracketPairGuideActiveBackground3},{bracketColor:m.editorBracketHighlightingForeground4,guideColor:m.editorBracketPairGuideBackground4,guideColorActive:m.editorBracketPairGuideActiveBackground4},{bracketColor:m.editorBracketHighlightingForeground5,guideColor:m.editorBracketPairGuideBackground5,guideColorActive:m.editorBracketPairGuideActiveBackground5},{bracketColor:m.editorBracketHighlightingForeground6,guideColor:m.editorBracketPairGuideBackground6,guideColorActive:m.editorBracketPairGuideActiveBackground6}],s=new p.BracketPairGuidesClassNames,o=r.map(a=>{var d,u;const f=i.getColor(a.bracketColor),S=i.getColor(a.guideColor),v=i.getColor(a.guideColorActive),C=t((d=t(S))!==null&&d!==void 0?d:f==null?void 0:f.transparent(.3)),_=t((u=t(v))!==null&&u!==void 0?u:f);if(!(!C||!_))return{guideColor:C,guideColorActive:_}}).filter(b.isDefined);if(o.length>0){for(let a=0;a<30;a++){const d=o[a%o.length];n.addRule(`.monaco-editor .${s.getInlineClassNameOfLevel(a).replace(/ /g,".")} { --guide-color: ${d.guideColor}; --guide-color-active: ${d.guideColorActive}; }`)}n.addRule(".monaco-editor .vertical { box-shadow: 1px 0 0 0 var(--guide-color) inset; }"),n.addRule(".monaco-editor .horizontal-top { border-top: 1px solid var(--guide-color); }"),n.addRule(".monaco-editor .horizontal-bottom { border-bottom: 1px solid var(--guide-color); }"),n.addRule(`.monaco-editor .vertical.${s.activeClassName} { box-shadow: 1px 0 0 0 var(--guide-color-active) inset; }`),n.addRule(`.monaco-editor .horizontal-top.${s.activeClassName} { border-top: 1px solid var(--guide-color-active); }`),n.addRule(`.monaco-editor .horizontal-bottom.${s.activeClassName} { border-bottom: 1px solid var(--guide-color-active); }`)}})}),define(te[280],ie([1,0,17,100,11,52,14,355]),function(j,e,y,m,D,I,w){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.LineNumbersOverlay=void 0;class b extends m.DynamicViewOverlay{constructor(h){super();this._context=h,this._readConfig(),this._lastCursorModelPosition=new D.Position(1,1),this._renderResult=null,this._activeLineNumber=1,this._context.addEventHandler(this)}_readConfig(){const h=this._context.configuration.options;this._lineHeight=h.get(59);const g=h.get(60);this._renderLineNumbers=g.renderType,this._renderCustomLineNumbers=g.renderFn,this._renderFinalNewline=h.get(84);const t=h.get(131);this._lineNumbersLeft=t.lineNumbersLeft,this._lineNumbersWidth=t.lineNumbersWidth}dispose(){this._context.removeEventHandler(this),this._renderResult=null,super.dispose()}onConfigurationChanged(h){return this._readConfig(),!0}onCursorStateChanged(h){const g=h.selections[0].getPosition();this._lastCursorModelPosition=this._context.model.coordinatesConverter.convertViewPositionToModelPosition(g);let t=!1;return this._activeLineNumber!==g.lineNumber&&(this._activeLineNumber=g.lineNumber,t=!0),(this._renderLineNumbers===2||this._renderLineNumbers===3)&&(t=!0),t}onFlushed(h){return!0}onLinesChanged(h){return!0}onLinesDeleted(h){return!0}onLinesInserted(h){return!0}onScrollChanged(h){return h.scrollTopChanged}onZonesChanged(h){return!0}_getLineRenderLineNumber(h){const g=this._context.model.coordinatesConverter.convertViewPositionToModelPosition(new D.Position(h,1));if(g.column!==1)return"";const t=g.lineNumber;if(this._renderCustomLineNumbers)return this._renderCustomLineNumbers(t);if(this._renderLineNumbers===2){const i=Math.abs(this._lastCursorModelPosition.lineNumber-t);return i===0?'<span class="relative-current-line-number">'+t+"</span>":String(i)}return this._renderLineNumbers===3?this._lastCursorModelPosition.lineNumber===t||t%10==0?String(t):"":String(t)}prepareRender(h){if(this._renderLineNumbers===0){this._renderResult=null;return}const g=y.isLinux?this._lineHeight%2==0?" lh-even":" lh-odd":"",t=h.visibleRange.startLineNumber,i=h.visibleRange.endLineNumber,n='<div class="'+b.CLASS_NAME+g+'" style="left:'+this._lineNumbersLeft+"px;width:"+this._lineNumbersWidth+'px;">',l=this._context.model.getLineCount(),c=[];for(let r=t;r<=i;r++){const s=r-t;if(!this._renderFinalNewline&&r===l&&this._context.model.getLineLength(r)===0){c[s]="";continue}const o=this._getLineRenderLineNumber(r);o?r===this._activeLineNumber?c[s]='<div class="active-line-number '+b.CLASS_NAME+g+'" style="left:'+this._lineNumbersLeft+"px;width:"+this._lineNumbersWidth+'px;">'+o+"</div>":c[s]=n+o+"</div>":c[s]=""}this._renderResult=c}render(h,g){if(!this._renderResult)return"";const t=g-h;return t<0||t>=this._renderResult.length?"":this._renderResult[t]}}e.LineNumbersOverlay=b,b.CLASS_NAME="line-numbers",(0,w.registerThemingParticipant)((p,h)=>{const g=p.getColor(I.editorLineNumbers);g&&h.addRule(`.monaco-editor .line-numbers { color: ${g}; }`);const t=p.getColor(I.editorActiveLineNumber);t&&h.addRule(`.monaco-editor .line-numbers.active-line-number { color: ${t}; }`)})}),define(te[645],ie([1,0,498,34,30,17,8,62,175,234,50,280,253,31,118,11,3,22,141,18,29,350]),function(j,e,y,m,D,I,w,b,p,h,g,t,i,n,l,c,r,s,o,a,d){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TextAreaHandler=void 0;class u{constructor(_,L,E,N,k){this._context=_,this.modelLineNumber=L,this.distanceToModelLineStart=E,this.widthOfHiddenLineTextBefore=N,this.distanceToModelLineEnd=k,this._visibleTextAreaBrand=void 0,this.startPosition=null,this.endPosition=null,this.visibleTextareaStart=null,this.visibleTextareaEnd=null}prepareRender(_){const L=new c.Position(this.modelLineNumber,this.distanceToModelLineStart+1),E=new c.Position(this.modelLineNumber,this._context.model.getModelLineMaxColumn(this.modelLineNumber)-this.distanceToModelLineEnd);this.startPosition=this._context.model.coordinatesConverter.convertModelPositionToViewPosition(L),this.endPosition=this._context.model.coordinatesConverter.convertModelPositionToViewPosition(E),this.startPosition.lineNumber===this.endPosition.lineNumber?(this.visibleTextareaStart=_.visibleRangeForPosition(this.startPosition),this.visibleTextareaEnd=_.visibleRangeForPosition(this.endPosition)):(this.visibleTextareaStart=null,this.visibleTextareaEnd=null)}}const f=m.isFirefox;class S extends g.ViewPart{constructor(_,L,E){super(_);this._primaryCursorPosition=new c.Position(1,1),this._primaryCursorVisibleRange=null,this._viewController=L,this._visibleRangeProvider=E,this._scrollLeft=0,this._scrollTop=0;const N=this._context.configuration.options,k=N.get(131);this._setAccessibilityOptions(N),this._contentLeft=k.contentLeft,this._contentWidth=k.contentWidth,this._contentHeight=k.height,this._fontInfo=N.get(44),this._lineHeight=N.get(59),this._emptySelectionClipboard=N.get(32),this._copyWithSyntaxHighlighting=N.get(21),this._visibleTextArea=null,this._selections=[new s.Selection(1,1,1,1)],this._modelSelections=[new s.Selection(1,1,1,1)],this._lastRenderPosition=null,this.textArea=(0,D.createFastDomNode)(document.createElement("textarea")),g.PartFingerprints.write(this.textArea,6),this.textArea.setClassName(`inputarea ${o.MOUSE_CURSOR_TEXT_CSS_CLASS_NAME}`),this.textArea.setAttribute("wrap","off"),this.textArea.setAttribute("autocorrect","off"),this.textArea.setAttribute("autocapitalize","off"),this.textArea.setAttribute("autocomplete","off"),this.textArea.setAttribute("spellcheck","false"),this.textArea.setAttribute("aria-label",this._getAriaLabel(N)),this.textArea.setAttribute("tabindex",String(N.get(112))),this.textArea.setAttribute("role","textbox"),this.textArea.setAttribute("aria-roledescription",y.localize(0,null)),this.textArea.setAttribute("aria-multiline","true"),this.textArea.setAttribute("aria-haspopup","false"),this.textArea.setAttribute("aria-autocomplete","both"),N.get(30)&&N.get(81)&&this.textArea.setAttribute("readonly","true"),this.textAreaCover=(0,D.createFastDomNode)(document.createElement("div")),this.textAreaCover.setPosition("absolute");const M={getLineCount:()=>this._context.model.getLineCount(),getLineMaxColumn:T=>this._context.model.getLineMaxColumn(T),getValueInRange:(T,R)=>this._context.model.getValueInRange(T,R)},O={getDataToCopy:()=>{const T=this._context.model.getPlainTextToCopy(this._modelSelections,this._emptySelectionClipboard,I.isWindows),R=this._context.model.getEOL(),P=this._emptySelectionClipboard&&this._modelSelections.length===1&&this._modelSelections[0].isEmpty(),F=Array.isArray(T)?T:null,W=Array.isArray(T)?T.join(R):T;let A,H=null;if(p.CopyOptions.forceCopyWithSyntaxHighlighting||this._copyWithSyntaxHighlighting&&W.length<65536){const q=this._context.model.getRichTextToCopy(this._modelSelections,this._emptySelectionClipboard);q&&(A=q.html,H=q.mode)}return{isFromEmptySelection:P,multicursorText:F,text:W,html:A,mode:H}},getScreenReaderContent:T=>{if(this._accessibilitySupport===1){if(I.isMacintosh){const R=this._selections[0];if(R.isEmpty()){const P=R.getStartPosition();let F=this._getWordBeforePosition(P);if(F.length===0&&(F=this._getCharacterBeforePosition(P)),F.length>0)return new h.TextAreaState(F,F.length,F.length,P,P)}}return h.TextAreaState.EMPTY}if(m.isAndroid){const R=this._selections[0];if(R.isEmpty()){const P=R.getStartPosition(),[F,W]=this._getAndroidWordAtPosition(P);if(F.length>0)return new h.TextAreaState(F,W,W,P,P)}return h.TextAreaState.EMPTY}return h.PagedScreenReaderStrategy.fromEditorSelection(T,M,this._selections[0],this._accessibilityPageSize,this._accessibilitySupport===0)},deduceModelPosition:(T,R,P)=>this._context.model.deduceModelPositionRelativeToViewPosition(T,R,P)},B=this._register(new p.TextAreaWrapper(this.textArea.domNode));this._textAreaInput=this._register(new p.TextAreaInput(O,B,I.OS,m)),this._register(this._textAreaInput.onKeyDown(T=>{this._viewController.emitKeyDown(T)})),this._register(this._textAreaInput.onKeyUp(T=>{this._viewController.emitKeyUp(T)})),this._register(this._textAreaInput.onPaste(T=>{let R=!1,P=null,F=null;T.metadata&&(R=this._emptySelectionClipboard&&!!T.metadata.isFromEmptySelection,P=typeof T.metadata.multicursorText!="undefined"?T.metadata.multicursorText:null,F=T.metadata.mode),this._viewController.paste(T.text,R,P,F)})),this._register(this._textAreaInput.onCut(()=>{this._viewController.cut()})),this._register(this._textAreaInput.onType(T=>{T.replacePrevCharCnt||T.replaceNextCharCnt||T.positionDelta?(h._debugComposition&&console.log(` => compositionType: <<${T.text}>>, ${T.replacePrevCharCnt}, ${T.replaceNextCharCnt}, ${T.positionDelta}`),this._viewController.compositionType(T.text,T.replacePrevCharCnt,T.replaceNextCharCnt,T.positionDelta)):(h._debugComposition&&console.log(` => type: <<${T.text}>>`),this._viewController.type(T.text))})),this._register(this._textAreaInput.onSelectionChangeRequest(T=>{this._viewController.setSelection(T)})),this._register(this._textAreaInput.onCompositionStart(T=>{const R=this.textArea.domNode,P=this._modelSelections[0],{distanceToModelLineStart:F,widthOfHiddenTextBefore:W}=(()=>{const H=R.value.substring(0,Math.min(R.selectionStart,R.selectionEnd)),q=H.lastIndexOf(`
|
||
`),X=H.substring(q+1),G=X.lastIndexOf(" "),re=X.length-G-1,ae=P.getStartPosition(),oe=Math.min(ae.column-1,re),Z=ae.column-1-oe,x=X.substring(0,X.length-oe),U=v(x,this._fontInfo);return{distanceToModelLineStart:Z,widthOfHiddenTextBefore:U}})(),{distanceToModelLineEnd:A}=(()=>{const H=R.value.substring(Math.max(R.selectionStart,R.selectionEnd)),q=H.indexOf(`
|
||
`),X=q===-1?H:H.substring(0,q),G=X.indexOf(" "),re=G===-1?X.length:X.length-G-1,ae=P.getEndPosition(),oe=Math.min(this._context.model.getModelLineMaxColumn(ae.lineNumber)-ae.column,re);return{distanceToModelLineEnd:this._context.model.getModelLineMaxColumn(ae.lineNumber)-ae.column-oe}})();this._context.model.revealRange("keyboard",!0,r.Range.fromPositions(this._selections[0].getStartPosition()),0,1),this._visibleTextArea=new u(this._context,P.startLineNumber,F,W,A),this._visibleTextArea.prepareRender(this._visibleRangeProvider),this._render(),this.textArea.setClassName(`inputarea ${o.MOUSE_CURSOR_TEXT_CSS_CLASS_NAME} ime-input`),this._viewController.compositionStart(),this._context.model.onCompositionStart()})),this._register(this._textAreaInput.onCompositionUpdate(T=>{!this._visibleTextArea||(this._visibleTextArea.prepareRender(this._visibleRangeProvider),this._render())})),this._register(this._textAreaInput.onCompositionEnd(()=>{this._visibleTextArea=null,this._render(),this.textArea.setClassName(`inputarea ${o.MOUSE_CURSOR_TEXT_CSS_CLASS_NAME}`),this._viewController.compositionEnd(),this._context.model.onCompositionEnd()})),this._register(this._textAreaInput.onFocus(()=>{this._context.model.setHasFocus(!0)})),this._register(this._textAreaInput.onBlur(()=>{this._context.model.setHasFocus(!1)}))}dispose(){super.dispose()}_getAndroidWordAtPosition(_){const L='`~!@#$%^&*()-=+[{]}\\|;:",.<>/?',E=this._context.model.getLineContent(_.lineNumber),N=(0,l.getMapForWordSeparators)(L);let k=!0,M=_.column,O=!0,B=_.column,T=0;for(;T<50&&(k||O);){if(k&&M<=1&&(k=!1),k){const R=E.charCodeAt(M-2);N.get(R)!==0?k=!1:M--}if(O&&B>E.length&&(O=!1),O){const R=E.charCodeAt(B-1);N.get(R)!==0?O=!1:B++}T++}return[E.substring(M-1,B-1),_.column-M]}_getWordBeforePosition(_){const L=this._context.model.getLineContent(_.lineNumber),E=(0,l.getMapForWordSeparators)(this._context.configuration.options.get(117));let N=_.column,k=0;for(;N>1;){const M=L.charCodeAt(N-2);if(E.get(M)!==0||k>50)return L.substring(N-1,_.column-1);k++,N--}return L.substring(0,_.column-1)}_getCharacterBeforePosition(_){if(_.column>1){const E=this._context.model.getLineContent(_.lineNumber).charAt(_.column-2);if(!w.isHighSurrogate(E.charCodeAt(0)))return E}return""}_getAriaLabel(_){return _.get(2)===1?y.localize(1,null,I.isLinux?"Shift+Alt+F1":"Alt+F1"):_.get(4)}_setAccessibilityOptions(_){this._accessibilitySupport=_.get(2);const L=_.get(3);this._accessibilitySupport===2&&L===n.EditorOptions.accessibilityPageSize.defaultValue?this._accessibilityPageSize=500:this._accessibilityPageSize=L}onConfigurationChanged(_){const L=this._context.configuration.options,E=L.get(131);return this._setAccessibilityOptions(L),this._contentLeft=E.contentLeft,this._contentWidth=E.contentWidth,this._contentHeight=E.height,this._fontInfo=L.get(44),this._lineHeight=L.get(59),this._emptySelectionClipboard=L.get(32),this._copyWithSyntaxHighlighting=L.get(21),this.textArea.setAttribute("aria-label",this._getAriaLabel(L)),this.textArea.setAttribute("tabindex",String(L.get(112))),(_.hasChanged(30)||_.hasChanged(81))&&(L.get(30)&&L.get(81)?this.textArea.setAttribute("readonly","true"):this.textArea.removeAttribute("readonly")),_.hasChanged(2)&&this._textAreaInput.writeScreenReaderContent("strategy changed"),!0}onCursorStateChanged(_){return this._selections=_.selections.slice(0),this._modelSelections=_.modelSelections.slice(0),this._textAreaInput.writeScreenReaderContent("selection changed"),!0}onDecorationsChanged(_){return!0}onFlushed(_){return!0}onLinesChanged(_){return!0}onLinesDeleted(_){return!0}onLinesInserted(_){return!0}onScrollChanged(_){return this._scrollLeft=_.scrollLeft,this._scrollTop=_.scrollTop,!0}onZonesChanged(_){return!0}isFocused(){return this._textAreaInput.isFocused()}focusTextArea(){this._textAreaInput.focusTextArea()}getLastRenderData(){return this._lastRenderPosition}setAriaOptions(_){_.activeDescendant?(this.textArea.setAttribute("aria-haspopup","true"),this.textArea.setAttribute("aria-autocomplete","list"),this.textArea.setAttribute("aria-activedescendant",_.activeDescendant)):(this.textArea.setAttribute("aria-haspopup","false"),this.textArea.setAttribute("aria-autocomplete","both"),this.textArea.removeAttribute("aria-activedescendant")),_.role&&this.textArea.setAttribute("role",_.role)}prepareRender(_){this._primaryCursorPosition=new c.Position(this._selections[0].positionLineNumber,this._selections[0].positionColumn),this._primaryCursorVisibleRange=_.visibleRangeForPosition(this._primaryCursorPosition),this._visibleTextArea&&this._visibleTextArea.prepareRender(_)}render(_){this._textAreaInput.writeScreenReaderContent("render"),this._render()}_render(){if(this._visibleTextArea){const E=this._visibleTextArea.visibleTextareaStart,N=this._visibleTextArea.visibleTextareaEnd,k=this._visibleTextArea.startPosition,M=this._visibleTextArea.endPosition;if(k&&M&&E&&N&&N.left>=this._scrollLeft&&E.left<=this._scrollLeft+this._contentWidth){const O=this._context.viewLayout.getVerticalOffsetForLineNumber(this._primaryCursorPosition.lineNumber)-this._scrollTop,B=this._newlinecount(this.textArea.domNode.value.substr(0,this.textArea.domNode.selectionStart));this.textArea.domNode.scrollTop=B*this._lineHeight;let T=this._visibleTextArea.widthOfHiddenLineTextBefore,R=this._contentLeft+E.left-this._scrollLeft,P=N.left-E.left;if(R<this._contentLeft){const X=this._contentLeft-R;R+=X,T+=X,P-=X}P>this._contentWidth&&(P=this._contentWidth),this.textArea.domNode.scrollLeft=T,this._renderInsideEditor(null,O,R,P,this._lineHeight);const F=this._context.model.getViewLineData(k.lineNumber),W=F.tokens.findTokenIndexAtOffset(k.column-1),A=F.tokens.findTokenIndexAtOffset(M.column-1);let H;W===A?H=F.tokens.getPresentation(W):H={foreground:1,italic:!1,bold:!1,underline:!1,strikethrough:!1};const q=(a.TokenizationRegistry.getColorMap()||[])[H.foreground];this.textArea.domNode.style.color=q?d.Color.Format.CSS.formatHex(q):"inherit",this.textArea.domNode.style.fontStyle=H.italic?"italic":"inherit",H.bold&&(this.textArea.domNode.style.fontWeight="bold"),this.textArea.domNode.style.textDecoration=`${H.underline?" underline":""}${H.strikethrough?" line-through":""}`}return}if(!this._primaryCursorVisibleRange){this._renderAtTopLeft();return}const _=this._contentLeft+this._primaryCursorVisibleRange.left-this._scrollLeft;if(_<this._contentLeft||_>this._contentLeft+this._contentWidth){this._renderAtTopLeft();return}const L=this._context.viewLayout.getVerticalOffsetForLineNumber(this._selections[0].positionLineNumber)-this._scrollTop;if(L<0||L>this._contentHeight){this._renderAtTopLeft();return}if(I.isMacintosh){this._renderInsideEditor(this._primaryCursorPosition,L,_,f?0:1,this._lineHeight),this.textArea.domNode.scrollLeft=this._primaryCursorVisibleRange.left;const E=this._newlinecount(this.textArea.domNode.value.substr(0,this.textArea.domNode.selectionStart));this.textArea.domNode.scrollTop=E*this._lineHeight;return}this._renderInsideEditor(this._primaryCursorPosition,L,_,f?0:1,f?0:1)}_newlinecount(_){let L=0,E=-1;do{if(E=_.indexOf(`
|
||
`,E+1),E===-1)break;L++}while(!0);return L}_renderInsideEditor(_,L,E,N,k){this._lastRenderPosition=_;const M=this.textArea,O=this.textAreaCover;(0,b.applyFontInfo)(M,this._fontInfo),M.setTop(L),M.setLeft(E),M.setWidth(N),M.setHeight(k),O.setTop(0),O.setLeft(0),O.setWidth(0),O.setHeight(0)}_renderAtTopLeft(){this._lastRenderPosition=null;const _=this.textArea,L=this.textAreaCover;if((0,b.applyFontInfo)(_,this._fontInfo),_.setTop(0),_.setLeft(0),L.setTop(0),L.setLeft(0),f){_.setWidth(0),_.setHeight(0),L.setWidth(0),L.setHeight(0);return}_.setWidth(1),_.setHeight(1),L.setWidth(1),L.setHeight(1);const E=this._context.configuration.options;E.get(50)?L.setClassName("monaco-editor-background textAreaCover "+i.Margin.OUTER_CLASS_NAME):E.get(60).renderType!==0?L.setClassName("monaco-editor-background textAreaCover "+t.LineNumbersOverlay.CLASS_NAME):L.setClassName("monaco-editor-background textAreaCover")}}e.TextAreaHandler=S;function v(C,_){if(C.length===0)return 0;const L=document.createElement("div");L.style.position="absolute",L.style.top="-50000px",L.style.width="50000px";const E=document.createElement("span");(0,b.applyFontInfo)(E,_),E.style.whiteSpace="pre",E.append(C),L.appendChild(E),document.body.appendChild(L);const N=E.offsetWidth;return document.body.removeChild(L),N}}),define(te[646],ie([1,0,30,29,50,11,18,52,69]),function(j,e,y,m,D,I,w,b,p){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DecorationsOverviewRuler=void 0;class h{constructor(i,n){const l=i.options;this.lineHeight=l.get(59),this.pixelRatio=l.get(129),this.overviewRulerLanes=l.get(74),this.renderBorder=l.get(73);const c=n.getColor(b.editorOverviewRulerBorder);this.borderColor=c?c.toString():null,this.hideCursor=l.get(52);const r=n.getColor(b.editorCursorForeground);this.cursorColor=r?r.transparent(.7).toString():null,this.themeType=n.type;const s=l.get(65),o=s.enabled,a=s.side,d=o?n.getColor(b.editorOverviewRulerBackground)||w.TokenizationRegistry.getDefaultBackground():null;d===null||a==="left"?this.backgroundColor=null:this.backgroundColor=m.Color.Format.CSS.formatHex(d);const f=l.get(131).overviewRuler;this.top=f.top,this.right=f.right,this.domWidth=f.width,this.domHeight=f.height,this.overviewRulerLanes===0?(this.canvasWidth=0,this.canvasHeight=0):(this.canvasWidth=this.domWidth*this.pixelRatio|0,this.canvasHeight=this.domHeight*this.pixelRatio|0);const[S,v]=this._initLanes(1,this.canvasWidth,this.overviewRulerLanes);this.x=S,this.w=v}_initLanes(i,n,l){const c=n-i;if(l>=3){const r=Math.floor(c/3),s=Math.floor(c/3),o=c-r-s,a=i,d=a+r,u=a+r+o;return[[0,a,d,a,u,a,d,a],[0,r,o,r+o,s,r+o+s,o+s,r+o+s]]}else if(l===2){const r=Math.floor(c/2),s=c-r,o=i,a=o+r;return[[0,o,o,o,a,o,o,o],[0,r,r,r,s,r+s,r+s,r+s]]}else{const r=i,s=c;return[[0,r,r,r,r,r,r,r],[0,s,s,s,s,s,s,s]]}}equals(i){return this.lineHeight===i.lineHeight&&this.pixelRatio===i.pixelRatio&&this.overviewRulerLanes===i.overviewRulerLanes&&this.renderBorder===i.renderBorder&&this.borderColor===i.borderColor&&this.hideCursor===i.hideCursor&&this.cursorColor===i.cursorColor&&this.themeType===i.themeType&&this.backgroundColor===i.backgroundColor&&this.top===i.top&&this.right===i.right&&this.domWidth===i.domWidth&&this.domHeight===i.domHeight&&this.canvasWidth===i.canvasWidth&&this.canvasHeight===i.canvasHeight}}class g extends D.ViewPart{constructor(i){super(i);this._domNode=(0,y.createFastDomNode)(document.createElement("canvas")),this._domNode.setClassName("decorationsOverviewRuler"),this._domNode.setPosition("absolute"),this._domNode.setLayerHinting(!0),this._domNode.setContain("strict"),this._domNode.setAttribute("aria-hidden","true"),this._updateSettings(!1),this._tokensColorTrackerListener=w.TokenizationRegistry.onDidChange(n=>{n.changedColorMap&&this._updateSettings(!0)}),this._cursorPositions=[]}dispose(){super.dispose(),this._tokensColorTrackerListener.dispose()}_updateSettings(i){const n=new h(this._context.configuration,this._context.theme);return this._settings&&this._settings.equals(n)?!1:(this._settings=n,this._domNode.setTop(this._settings.top),this._domNode.setRight(this._settings.right),this._domNode.setWidth(this._settings.domWidth),this._domNode.setHeight(this._settings.domHeight),this._domNode.domNode.width=this._settings.canvasWidth,this._domNode.domNode.height=this._settings.canvasHeight,i&&this._render(),!0)}onConfigurationChanged(i){return this._updateSettings(!1)}onCursorStateChanged(i){this._cursorPositions=[];for(let n=0,l=i.selections.length;n<l;n++)this._cursorPositions[n]=i.selections[n].getPosition();return this._cursorPositions.sort(I.Position.compare),!0}onDecorationsChanged(i){return!!i.affectsOverviewRuler}onFlushed(i){return!0}onScrollChanged(i){return i.scrollHeightChanged}onZonesChanged(i){return!0}onThemeChanged(i){return this._context.model.invalidateOverviewRulerColorCache(),this._updateSettings(!1)}getDomNode(){return this._domNode.domNode}prepareRender(i){}render(i){this._render()}_render(){if(this._settings.overviewRulerLanes===0){this._domNode.setBackgroundColor(this._settings.backgroundColor?this._settings.backgroundColor:""),this._domNode.setDisplay("none");return}this._domNode.setDisplay("block");const i=this._settings.canvasWidth,n=this._settings.canvasHeight,l=this._settings.lineHeight,c=this._context.viewLayout,r=this._context.viewLayout.getScrollHeight(),s=n/r,o=this._context.model.getAllOverviewRulerDecorations(this._context.theme),a=6*this._settings.pixelRatio|0,d=a/2|0,u=this._domNode.domNode.getContext("2d");this._settings.backgroundColor===null?u.clearRect(0,0,i,n):(u.fillStyle=this._settings.backgroundColor,u.fillRect(0,0,i,n));const f=this._settings.x,S=this._settings.w;o.sort(p.OverviewRulerDecorationsGroup.cmp);for(const v of o){const C=v.color,_=v.data;u.fillStyle=C;let L=0,E=0,N=0;for(let k=0,M=_.length/3;k<M;k++){const O=_[3*k],B=_[3*k+1],T=_[3*k+2];let R=c.getVerticalOffsetForLineNumber(B)*s|0,P=(c.getVerticalOffsetForLineNumber(T)+l)*s|0;if(P-R<a){let W=(R+P)/2|0;W<d?W=d:W+d>n&&(W=n-d),R=W-d,P=W+d}R>N+1||O!==L?(k!==0&&u.fillRect(f[L],E,S[L],N-E),L=O,E=R,N=P):P>N&&(N=P)}u.fillRect(f[L],E,S[L],N-E)}if(!this._settings.hideCursor&&this._settings.cursorColor){const v=2*this._settings.pixelRatio|0,C=v/2|0,_=this._settings.x[7],L=this._settings.w[7];u.fillStyle=this._settings.cursorColor;let E=-100,N=-100;for(let k=0,M=this._cursorPositions.length;k<M;k++){const O=this._cursorPositions[k];let B=c.getVerticalOffsetForLineNumber(O.lineNumber)*s|0;B<C?B=C:B+C>n&&(B=n-C);const T=B-C,R=T+v;T>N+1?(k!==0&&u.fillRect(_,E,L,N-E),E=T,N=R):R>N&&(N=R)}u.fillRect(_,E,L,N-E)}this._settings.renderBorder&&this._settings.borderColor&&this._settings.overviewRulerLanes>0&&(u.beginPath(),u.lineWidth=1,u.strokeStyle=this._settings.borderColor,u.moveTo(0,0),u.lineTo(0,n),u.stroke(),u.moveTo(0,0),u.lineTo(i,0),u.stroke())}}e.DecorationsOverviewRuler=g}),define(te[647],ie([1,0,30,50,52,14,361]),function(j,e,y,m,D,I){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Rulers=void 0;class w extends m.ViewPart{constructor(p){super(p);this.domNode=(0,y.createFastDomNode)(document.createElement("div")),this.domNode.setAttribute("role","presentation"),this.domNode.setAttribute("aria-hidden","true"),this.domNode.setClassName("view-rulers"),this._renderedRulers=[];const h=this._context.configuration.options;this._rulers=h.get(91),this._typicalHalfwidthCharacterWidth=h.get(44).typicalHalfwidthCharacterWidth}dispose(){super.dispose()}onConfigurationChanged(p){const h=this._context.configuration.options;return this._rulers=h.get(91),this._typicalHalfwidthCharacterWidth=h.get(44).typicalHalfwidthCharacterWidth,!0}onScrollChanged(p){return p.scrollHeightChanged}prepareRender(p){}_ensureRulersCount(){const p=this._renderedRulers.length,h=this._rulers.length;if(p===h)return;if(p<h){const{tabSize:t}=this._context.model.getTextModelOptions(),i=t;let n=h-p;for(;n>0;){const l=(0,y.createFastDomNode)(document.createElement("div"));l.setClassName("view-ruler"),l.setWidth(i),this.domNode.appendChild(l),this._renderedRulers.push(l),n--}return}let g=p-h;for(;g>0;){const t=this._renderedRulers.pop();this.domNode.removeChild(t),g--}}render(p){this._ensureRulersCount();for(let h=0,g=this._rulers.length;h<g;h++){const t=this._renderedRulers[h],i=this._rulers[h];t.setBoxShadow(i.color?`1px 0 0 0 ${i.color} inset`:""),t.setHeight(Math.min(p.scrollHeight,1e6)),t.setLeft(i.column*this._typicalHalfwidthCharacterWidth)}}}e.Rulers=w,(0,I.registerThemingParticipant)((b,p)=>{const h=b.getColor(D.editorRuler);h&&p.addRule(`.monaco-editor .view-ruler { box-shadow: 1px 0 0 0 ${h} inset; }`)})}),define(te[648],ie([1,0,30,10,50,510,31,52,14,364]),function(j,e,y,m,D,I,w,b,p){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ViewCursors=void 0;class h extends D.ViewPart{constructor(t){super(t);const i=this._context.configuration.options;this._readOnly=i.get(81),this._cursorBlinking=i.get(22),this._cursorStyle=i.get(24),this._cursorSmoothCaretAnimation=i.get(23),this._selectionIsEmpty=!0,this._isComposingInput=!1,this._isVisible=!1,this._primaryCursor=new I.ViewCursor(this._context),this._secondaryCursors=[],this._renderData=[],this._domNode=(0,y.createFastDomNode)(document.createElement("div")),this._domNode.setAttribute("role","presentation"),this._domNode.setAttribute("aria-hidden","true"),this._updateDomClassName(),this._domNode.appendChild(this._primaryCursor.getDomNode()),this._startCursorBlinkAnimation=new m.TimeoutTimer,this._cursorFlatBlinkInterval=new m.IntervalTimer,this._blinkingEnabled=!1,this._editorHasFocus=!1,this._updateBlinking()}dispose(){super.dispose(),this._startCursorBlinkAnimation.dispose(),this._cursorFlatBlinkInterval.dispose()}getDomNode(){return this._domNode}onCompositionStart(t){return this._isComposingInput=!0,this._updateBlinking(),!0}onCompositionEnd(t){return this._isComposingInput=!1,this._updateBlinking(),!0}onConfigurationChanged(t){const i=this._context.configuration.options;this._readOnly=i.get(81),this._cursorBlinking=i.get(22),this._cursorStyle=i.get(24),this._cursorSmoothCaretAnimation=i.get(23),this._updateBlinking(),this._updateDomClassName(),this._primaryCursor.onConfigurationChanged(t);for(let n=0,l=this._secondaryCursors.length;n<l;n++)this._secondaryCursors[n].onConfigurationChanged(t);return!0}_onCursorPositionChanged(t,i){if(this._primaryCursor.onCursorPositionChanged(t),this._updateBlinking(),this._secondaryCursors.length<i.length){const n=i.length-this._secondaryCursors.length;for(let l=0;l<n;l++){const c=new I.ViewCursor(this._context);this._domNode.domNode.insertBefore(c.getDomNode().domNode,this._primaryCursor.getDomNode().domNode.nextSibling),this._secondaryCursors.push(c)}}else if(this._secondaryCursors.length>i.length){const n=this._secondaryCursors.length-i.length;for(let l=0;l<n;l++)this._domNode.removeChild(this._secondaryCursors[0].getDomNode()),this._secondaryCursors.splice(0,1)}for(let n=0;n<i.length;n++)this._secondaryCursors[n].onCursorPositionChanged(i[n])}onCursorStateChanged(t){const i=[];for(let l=0,c=t.selections.length;l<c;l++)i[l]=t.selections[l].getPosition();this._onCursorPositionChanged(i[0],i.slice(1));const n=t.selections[0].isEmpty();return this._selectionIsEmpty!==n&&(this._selectionIsEmpty=n,this._updateDomClassName()),!0}onDecorationsChanged(t){return!0}onFlushed(t){return!0}onFocusChanged(t){return this._editorHasFocus=t.isFocused,this._updateBlinking(),!1}onLinesChanged(t){return!0}onLinesDeleted(t){return!0}onLinesInserted(t){return!0}onScrollChanged(t){return!0}onTokensChanged(t){const i=n=>{for(let l=0,c=t.ranges.length;l<c;l++)if(t.ranges[l].fromLineNumber<=n.lineNumber&&n.lineNumber<=t.ranges[l].toLineNumber)return!0;return!1};if(i(this._primaryCursor.getPosition()))return!0;for(const n of this._secondaryCursors)if(i(n.getPosition()))return!0;return!1}onZonesChanged(t){return!0}_getCursorBlinking(){return this._isComposingInput||!this._editorHasFocus?0:this._readOnly?5:this._cursorBlinking}_updateBlinking(){this._startCursorBlinkAnimation.cancel(),this._cursorFlatBlinkInterval.cancel();const t=this._getCursorBlinking(),i=t===0,n=t===5;i?this._hide():this._show(),this._blinkingEnabled=!1,this._updateDomClassName(),!i&&!n&&(t===1?this._cursorFlatBlinkInterval.cancelAndSet(()=>{this._isVisible?this._hide():this._show()},h.BLINK_INTERVAL):this._startCursorBlinkAnimation.setIfNotSet(()=>{this._blinkingEnabled=!0,this._updateDomClassName()},h.BLINK_INTERVAL))}_updateDomClassName(){this._domNode.setClassName(this._getClassName())}_getClassName(){let t="cursors-layer";switch(this._selectionIsEmpty||(t+=" has-selection"),this._cursorStyle){case w.TextEditorCursorStyle.Line:t+=" cursor-line-style";break;case w.TextEditorCursorStyle.Block:t+=" cursor-block-style";break;case w.TextEditorCursorStyle.Underline:t+=" cursor-underline-style";break;case w.TextEditorCursorStyle.LineThin:t+=" cursor-line-thin-style";break;case w.TextEditorCursorStyle.BlockOutline:t+=" cursor-block-outline-style";break;case w.TextEditorCursorStyle.UnderlineThin:t+=" cursor-underline-thin-style";break;default:t+=" cursor-line-style"}if(this._blinkingEnabled)switch(this._getCursorBlinking()){case 1:t+=" cursor-blink";break;case 2:t+=" cursor-smooth";break;case 3:t+=" cursor-phase";break;case 4:t+=" cursor-expand";break;case 5:t+=" cursor-solid";break;default:t+=" cursor-solid"}else t+=" cursor-solid";return this._cursorSmoothCaretAnimation&&(t+=" cursor-smooth-caret-animation"),t}_show(){this._primaryCursor.show();for(let t=0,i=this._secondaryCursors.length;t<i;t++)this._secondaryCursors[t].show();this._isVisible=!0}_hide(){this._primaryCursor.hide();for(let t=0,i=this._secondaryCursors.length;t<i;t++)this._secondaryCursors[t].hide();this._isVisible=!1}prepareRender(t){this._primaryCursor.prepareRender(t);for(let i=0,n=this._secondaryCursors.length;i<n;i++)this._secondaryCursors[i].prepareRender(t)}render(t){const i=[];let n=0;const l=this._primaryCursor.render(t);l&&(i[n++]=l);for(let c=0,r=this._secondaryCursors.length;c<r;c++){const s=this._secondaryCursors[c].render(t);s&&(i[n++]=s)}this._renderData=i}getLastRenderData(){return this._renderData}}e.ViewCursors=h,h.BLINK_INTERVAL=500,(0,p.registerThemingParticipant)((g,t)=>{const i=g.getColor(b.editorCursorForeground);if(i){let n=g.getColor(b.editorCursorBackground);n||(n=i.opposite()),t.addRule(`.monaco-editor .cursors-layer .cursor { background-color: ${i}; border-color: ${i}; color: ${n}; }`),g.type==="hc"&&t.addRule(`.monaco-editor .cursors-layer.has-selection .cursor { border-left: 1px solid ${n}; border-right: 1px solid ${n}; }`)}})}),define(te[649],ie([1,0,4,2,3,52,14]),function(j,e,y,m,D,I,w){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ColorizedBracketPairsDecorationProvider=void 0;class b extends m.Disposable{constructor(g){super();this.textModel=g,this.colorProvider=new p,this.onDidChangeEmitter=new y.Emitter,this.onDidChange=this.onDidChangeEmitter.event,this.colorizationOptions=g.getOptions().bracketPairColorizationOptions,this._register(g.onDidChangeOptions(t=>{this.colorizationOptions=g.getOptions().bracketPairColorizationOptions})),this._register(g.bracketPairs.onDidChange(t=>{this.onDidChangeEmitter.fire()}))}getDecorationsInRange(g,t,i){if(t===void 0)return[];if(!this.colorizationOptions.enabled)return[];const n=new Array,l=this.textModel.bracketPairs.getBracketsInRange(g);for(const c of l)n.push({id:`bracket${c.range.toString()}-${c.nestingLevel}`,options:{description:"BracketPairColorization",inlineClassName:this.colorProvider.getInlineClassName(c)},ownerId:0,range:c.range});return n}getAllDecorations(g,t){return g===void 0?[]:this.colorizationOptions.enabled?this.getDecorationsInRange(new D.Range(1,1,this.textModel.getLineCount(),1),g,t):[]}}e.ColorizedBracketPairsDecorationProvider=b;class p{constructor(){this.unexpectedClosingBracketClassName="unexpected-closing-bracket"}getInlineClassName(g){return g.isInvalid?this.unexpectedClosingBracketClassName:this.getInlineClassNameOfLevel(g.nestingLevel)}getInlineClassNameOfLevel(g){return`bracket-highlighting-${g%30}`}}(0,w.registerThemingParticipant)((h,g)=>{const t=[I.editorBracketHighlightingForeground1,I.editorBracketHighlightingForeground2,I.editorBracketHighlightingForeground3,I.editorBracketHighlightingForeground4,I.editorBracketHighlightingForeground5,I.editorBracketHighlightingForeground6],i=new p;g.addRule(`.monaco-editor .${i.unexpectedClosingBracketClassName} { color: ${h.getColor(I.editorBracketHighlightingUnexpectedBracketForeground)}; }`);const n=t.map(l=>h.getColor(l)).filter(l=>!!l).filter(l=>!l.isTransparent());for(let l=0;l<30;l++){const c=n[l%n.length];g.addRule(`.monaco-editor .${i.getInlineClassNameOfLevel(l)} { color: ${c}; }`)}})}),define(te[650],ie([1,0,77,2,49,14,52,45,3,48,4,23,47]),function(j,e,y,m,D,I,w,b,p,h,g,t,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MarkerDecorationsService=void 0;class n extends m.Disposable{constructor(r){super();this.model=r,this._markersData=new Map,this._register((0,m.toDisposable)(()=>{this.model.deltaDecorations([...this._markersData.keys()],[]),this._markersData.clear()}))}update(r,s){const o=[...this._markersData.keys()];this._markersData.clear();const a=this.model.deltaDecorations(o,s);for(let d=0;d<a.length;d++)this._markersData.set(a[d],r[d]);return o.length!==0||a.length!==0}getMarker(r){return this._markersData.get(r.id)}}let l=class extends m.Disposable{constructor(r,s){super();this._markerService=s,this._onDidChangeMarker=this._register(new g.Emitter),this._markerDecorations=new i.ResourceMap,r.getModels().forEach(o=>this._onModelAdded(o)),this._register(r.onModelAdded(this._onModelAdded,this)),this._register(r.onModelRemoved(this._onModelRemoved,this)),this._register(this._markerService.onMarkerChanged(this._handleMarkerChange,this))}dispose(){super.dispose(),this._markerDecorations.forEach(r=>r.dispose()),this._markerDecorations.clear()}getMarker(r,s){const o=this._markerDecorations.get(r);return o&&o.getMarker(s)||null}_handleMarkerChange(r){r.forEach(s=>{const o=this._markerDecorations.get(s);o&&this._updateDecorations(o)})}_onModelAdded(r){const s=new n(r);this._markerDecorations.set(r.uri,s),this._updateDecorations(s)}_onModelRemoved(r){const s=this._markerDecorations.get(r.uri);s&&(s.dispose(),this._markerDecorations.delete(r.uri)),(r.uri.scheme===h.Schemas.inMemory||r.uri.scheme===h.Schemas.internal||r.uri.scheme===h.Schemas.vscode)&&this._markerService&&this._markerService.read({resource:r.uri}).map(o=>o.owner).forEach(o=>this._markerService.remove(o,[r.uri]))}_updateDecorations(r){const s=this._markerService.read({resource:r.model.uri,take:500}),o=s.map(a=>({range:this._createDecorationRange(r.model,a),options:this._createDecorationOption(a)}));r.update(s,o)&&this._onDidChangeMarker.fire(r.model)}_createDecorationRange(r,s){let o=p.Range.lift(s);return s.severity===y.MarkerSeverity.Hint&&!this._hasMarkerTag(s,1)&&!this._hasMarkerTag(s,2)&&(o=o.setEndPosition(o.startLineNumber,o.startColumn+2)),r.validateRange(o)}_createDecorationOption(r){let s,o,a,d,u;switch(r.severity){case y.MarkerSeverity.Hint:this._hasMarkerTag(r,2)?s=void 0:this._hasMarkerTag(r,1)?s="squiggly-unnecessary":s="squiggly-hint",a=0;break;case y.MarkerSeverity.Warning:s="squiggly-warning",o=(0,I.themeColorFromId)(w.overviewRulerWarning),a=20,u={color:(0,I.themeColorFromId)(t.minimapWarning),position:D.MinimapPosition.Inline};break;case y.MarkerSeverity.Info:s="squiggly-info",o=(0,I.themeColorFromId)(w.overviewRulerInfo),a=10;break;case y.MarkerSeverity.Error:default:s="squiggly-error",o=(0,I.themeColorFromId)(w.overviewRulerError),a=30,u={color:(0,I.themeColorFromId)(t.minimapError),position:D.MinimapPosition.Inline};break}return r.tags&&(r.tags.indexOf(1)!==-1&&(d="squiggly-inline-unnecessary"),r.tags.indexOf(2)!==-1&&(d="squiggly-inline-deprecated")),{description:"marker-decoration",stickiness:1,className:s,showIfCollapsed:!0,overviewRuler:{color:o,position:D.OverviewRulerLane.Right},minimap:u,zIndex:a,inlineClassName:d}}_hasMarkerTag(r,s){return r.tags?r.tags.indexOf(s)>=0:!1}};l=Ie([Ce(0,b.IModelService),Ce(1,y.IMarkerService)],l),e.MarkerDecorationsService=l}),define(te[281],ie([1,0,18,14,64,435,35]),function(j,e,y,m,D,I,w){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.toMultilineTokens2=e.SemanticTokensProviderStyling=void 0;let b=class{constructor(i,n,l,c){this._legend=i,this._themeService=n,this._languageService=l,this._logService=c,this._hashTable=new g,this._hasWarnedOverlappingTokens=!1}getMetadata(i,n,l){const c=this._languageService.languageIdCodec.encodeLanguageId(l),r=this._hashTable.get(i,n,c);let s;if(r)s=r.metadata,this._logService.getLevel()===D.LogLevel.Trace&&this._logService.trace(`SemanticTokensProviderStyling [CACHED] ${i} / ${n}: foreground ${y.TokenMetadata.getForeground(s)}, fontStyle ${y.TokenMetadata.getFontStyle(s).toString(2)}`);else{let o=this._legend.tokenTypes[i];const a=[];if(o){let d=n;for(let f=0;d>0&&f<this._legend.tokenModifiers.length;f++)d&1&&a.push(this._legend.tokenModifiers[f]),d=d>>1;d>0&&this._logService.getLevel()===D.LogLevel.Trace&&(this._logService.trace(`SemanticTokensProviderStyling: unknown token modifier index: ${n.toString(2)} for legend: ${JSON.stringify(this._legend.tokenModifiers)}`),a.push("not-in-legend"));const u=this._themeService.getColorTheme().getTokenStyleMetadata(o,a,l);typeof u=="undefined"?s=2147483647:(s=0,typeof u.italic!="undefined"&&(s|=(u.italic?1:0)<<10|1),typeof u.bold!="undefined"&&(s|=(u.bold?2:0)<<10|2),typeof u.underline!="undefined"&&(s|=(u.underline?4:0)<<10|4),typeof u.strikethrough!="undefined"&&(s|=(u.strikethrough?8:0)<<10|8),u.foreground&&(s|=u.foreground<<14|16),s===0&&(s=2147483647))}else this._logService.getLevel()===D.LogLevel.Trace&&this._logService.trace(`SemanticTokensProviderStyling: unknown token type index: ${i} for legend: ${JSON.stringify(this._legend.tokenTypes)}`),s=2147483647,o="not-in-legend";this._hashTable.add(i,n,c,s),this._logService.getLevel()===D.LogLevel.Trace&&this._logService.trace(`SemanticTokensProviderStyling ${i} (${o}) / ${n} (${a.join(" ")}): foreground ${y.TokenMetadata.getForeground(s)}, fontStyle ${y.TokenMetadata.getFontStyle(s).toString(2)}`)}return s}warnOverlappingSemanticTokens(i,n){this._hasWarnedOverlappingTokens||(this._hasWarnedOverlappingTokens=!0,console.warn(`Overlapping semantic tokens detected at lineNumber ${i}, column ${n}`))}};b=Ie([Ce(1,m.IThemeService),Ce(2,w.ILanguageService),Ce(3,D.ILogService)],b),e.SemanticTokensProviderStyling=b;function p(t,i,n){const l=t.data,c=t.data.length/5|0,r=Math.max(Math.ceil(c/1024),400),s=[];let o=0,a=1,d=0;for(;o<c;){const u=o;let f=Math.min(u+r,c);if(f<c){let k=f;for(;k-1>u&&l[5*k]===0;)k--;if(k-1===u){let M=f;for(;M+1<c&&l[5*M]===0;)M++;f=M}else f=k}let S=new Uint32Array((f-u)*4),v=0,C=0,_=0,L=0,E=0;for(;o<f;){const k=5*o,M=l[k],O=l[k+1],B=a+M|0,T=M===0?d+O|0:O,R=l[k+2],P=l[k+3],F=l[k+4],W=i.getMetadata(P,F,n);W!==2147483647&&(C===0&&(C=B),_===B&&E>T&&(i.warnOverlappingSemanticTokens(B,T+1),L<T?S[v-4+2]=T:v-=4),S[v]=B-C,S[v+1]=T,S[v+2]=T+R,S[v+3]=W,v+=4,_=B,L=T,E=T+R),a=B,d=T,o++}v!==S.length&&(S=S.subarray(0,v));const N=I.SparseMultilineTokens.create(C,S);s.push(N)}return s}e.toMultilineTokens2=p;class h{constructor(i,n,l,c){this.tokenTypeIndex=i,this.tokenModifierSet=n,this.languageId=l,this.metadata=c,this.next=null}}class g{constructor(){this._elementsCount=0,this._currentLengthIndex=0,this._currentLength=g._SIZES[this._currentLengthIndex],this._growCount=Math.round(this._currentLengthIndex+1<g._SIZES.length?2/3*this._currentLength:0),this._elements=[],g._nullOutEntries(this._elements,this._currentLength)}static _nullOutEntries(i,n){for(let l=0;l<n;l++)i[l]=null}_hash2(i,n){return(i<<5)-i+n|0}_hashFunc(i,n,l){return this._hash2(this._hash2(i,n),l)%this._currentLength}get(i,n,l){const c=this._hashFunc(i,n,l);let r=this._elements[c];for(;r;){if(r.tokenTypeIndex===i&&r.tokenModifierSet===n&&r.languageId===l)return r;r=r.next}return null}add(i,n,l,c){if(this._elementsCount++,this._growCount!==0&&this._elementsCount>=this._growCount){const r=this._elements;this._currentLengthIndex++,this._currentLength=g._SIZES[this._currentLengthIndex],this._growCount=Math.round(this._currentLengthIndex+1<g._SIZES.length?2/3*this._currentLength:0),this._elements=[],g._nullOutEntries(this._elements,this._currentLength);for(const s of r){let o=s;for(;o;){const a=o.next;o.next=null,this._add(o),o=a}}}this._add(new h(i,n,l,c))}_add(i){const n=this._hashFunc(i.tokenTypeIndex,i.tokenModifierSet,i.languageId);i.next=this._elements[n],this._elements[n]=i}}g._SIZES=[3,7,13,31,61,127,251,509,1021,2039,4093,8191,16381,32749,65521,131071,262139,524287,1048573,2097143]}),define(te[651],ie([1,0,7,96,57,27,4,2,178,522,42,23,14,370]),function(j,e,y,m,D,I,w,b,p,h,g,t,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.LightBulbWidget=void 0;var n;(function(c){c.Hidden={type:0};class r{constructor(o,a,d,u){this.actions=o,this.trigger=a,this.editorPosition=d,this.widgetPosition=u,this.type=1}}c.Showing=r})(n||(n={}));let l=class wi extends b.Disposable{constructor(r,s,o,a){super();this._editor=r,this._quickFixActionId=s,this._preferredFixActionId=o,this._keybindingService=a,this._onClick=this._register(new w.Emitter),this.onClick=this._onClick.event,this._state=n.Hidden,this._domNode=document.createElement("div"),this._domNode.className=I.Codicon.lightBulb.classNames,this._editor.addContentWidget(this),this._register(this._editor.onDidChangeModelContent(d=>{const u=this._editor.getModel();(this.state.type!==1||!u||this.state.editorPosition.lineNumber>=u.getLineCount())&&this.hide()})),D.Gesture.ignoreTarget(this._domNode),this._register(y.addStandardDisposableGenericMouseDownListner(this._domNode,d=>{if(this.state.type!==1)return;this._editor.focus(),d.preventDefault();const{top:u,height:f}=y.getDomNodePagePosition(this._domNode),S=this._editor.getOption(59);let v=Math.floor(S/3);this.state.widgetPosition.position!==null&&this.state.widgetPosition.position.lineNumber<this.state.editorPosition.lineNumber&&(v+=S),this._onClick.fire({x:d.posx,y:u+f+v,actions:this.state.actions,trigger:this.state.trigger})})),this._register(y.addDisposableListener(this._domNode,"mouseenter",d=>{if((d.buttons&1)!=1)return;this.hide();const u=new m.GlobalMouseMoveMonitor;u.startMonitoring(d.target,d.buttons,m.standardMouseMoveMerger,()=>{},()=>{u.dispose()})})),this._register(this._editor.onDidChangeConfiguration(d=>{d.hasChanged(57)&&!this._editor.getOption(57).enabled&&this.hide()})),this._updateLightBulbTitleAndIcon(),this._register(this._keybindingService.onDidUpdateKeybindings(this._updateLightBulbTitleAndIcon,this))}dispose(){super.dispose(),this._editor.removeContentWidget(this)}getId(){return"LightBulbWidget"}getDomNode(){return this._domNode}getPosition(){return this._state.type===1?this._state.widgetPosition:null}update(r,s,o){if(r.validActions.length<=0)return this.hide();const a=this._editor.getOptions();if(!a.get(57).enabled)return this.hide();const d=this._editor.getModel();if(!d)return this.hide();const{lineNumber:u,column:f}=d.validatePosition(o),S=d.getOptions().tabSize,v=a.get(44),C=d.getLineContent(u),_=(0,p.computeIndentLevel)(C,S),L=v.spaceWidth*_>22,E=k=>k>2&&this._editor.getTopForLineNumber(k)===this._editor.getTopForLineNumber(k-1);let N=u;if(!L){if(u>1&&!E(u-1))N-=1;else if(!E(u+1))N+=1;else if(f*v.spaceWidth<22)return this.hide()}this.state=new n.Showing(r,s,o,{position:{lineNumber:N,column:1},preference:wi._posPref}),this._editor.layoutContentWidget(this)}hide(){this.state=n.Hidden,this._editor.layoutContentWidget(this)}get state(){return this._state}set state(r){this._state=r,this._updateLightBulbTitleAndIcon()}_updateLightBulbTitleAndIcon(){if(this.state.type===1&&this.state.actions.hasAutoFix){this._domNode.classList.remove(...I.Codicon.lightBulb.classNamesArray),this._domNode.classList.add(...I.Codicon.lightbulbAutofix.classNamesArray);const s=this._keybindingService.lookupKeybinding(this._preferredFixActionId);if(s){this.title=h.localize(0,null,s.getLabel());return}}this._domNode.classList.remove(...I.Codicon.lightbulbAutofix.classNamesArray),this._domNode.classList.add(...I.Codicon.lightBulb.classNamesArray);const r=this._keybindingService.lookupKeybinding(this._quickFixActionId);r?this.title=h.localize(1,null,r.getLabel()):this.title=h.localize(2,null)}set title(r){this._domNode.title=r}};l._posPref=[0],l=Ie([Ce(3,g.IKeybindingService)],l),e.LightBulbWidget=l,(0,i.registerThemingParticipant)((c,r)=>{var s;const o=(s=c.getColor(t.editorBackground))===null||s===void 0?void 0:s.transparent(.7),a=c.getColor(t.editorLightBulbForeground);a&&r.addRule(`
|
||
.monaco-editor .contentWidgets ${I.Codicon.lightBulb.cssSelector} {
|
||
color: ${a};
|
||
background-color: ${o};
|
||
}`);const d=c.getColor(t.editorLightBulbAutoFixForeground);d&&r.addRule(`
|
||
.monaco-editor .contentWidgets ${I.Codicon.lightbulbAutofix.cssSelector} {
|
||
color: ${d};
|
||
background-color: ${o};
|
||
}`)})}),define(te[652],ie([1,0,34,7,96,60,29,4,2,524,23,14,372]),function(j,e,y,m,D,I,w,b,p,h,g,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ColorPickerWidget=e.ColorPickerBody=e.ColorPickerHeader=void 0;const i=m.$;class n extends p.Disposable{constructor(u,f,S){super();this.model=f,this.domNode=i(".colorpicker-header"),m.append(u,this.domNode),this.pickedColorNode=m.append(this.domNode,i(".picked-color"));const v=(0,h.localize)(0,null);this.pickedColorNode.setAttribute("title",v);const C=m.append(this.domNode,i(".original-color"));C.style.backgroundColor=w.Color.Format.CSS.format(this.model.originalColor)||"",this.backgroundColor=S.getColorTheme().getColor(g.editorHoverBackground)||w.Color.white,this._register((0,t.registerThemingParticipant)((_,L)=>{this.backgroundColor=_.getColor(g.editorHoverBackground)||w.Color.white})),this._register(m.addDisposableListener(this.pickedColorNode,m.EventType.CLICK,()=>this.model.selectNextColorPresentation())),this._register(m.addDisposableListener(C,m.EventType.CLICK,()=>{this.model.color=this.model.originalColor,this.model.flushColor()})),this._register(f.onDidChangeColor(this.onDidChangeColor,this)),this._register(f.onDidChangePresentation(this.onDidChangePresentation,this)),this.pickedColorNode.style.backgroundColor=w.Color.Format.CSS.format(f.color)||"",this.pickedColorNode.classList.toggle("light",f.color.rgba.a<.5?this.backgroundColor.isLighter():f.color.isLighter()),this.onDidChangeColor(this.model.color)}onDidChangeColor(u){this.pickedColorNode.style.backgroundColor=w.Color.Format.CSS.format(u)||"",this.pickedColorNode.classList.toggle("light",u.rgba.a<.5?this.backgroundColor.isLighter():u.isLighter()),this.onDidChangePresentation()}onDidChangePresentation(){this.pickedColorNode.textContent=this.model.presentation?this.model.presentation.label:"",this.pickedColorNode.prepend(i(".codicon.codicon-color-mode"))}}e.ColorPickerHeader=n;class l extends p.Disposable{constructor(u,f,S){super();this.model=f,this.pixelRatio=S,this.domNode=i(".colorpicker-body"),m.append(u,this.domNode),this.saturationBox=new c(this.domNode,this.model,this.pixelRatio),this._register(this.saturationBox),this._register(this.saturationBox.onDidChange(this.onDidSaturationValueChange,this)),this._register(this.saturationBox.onColorFlushed(this.flushColor,this)),this.opacityStrip=new s(this.domNode,this.model),this._register(this.opacityStrip),this._register(this.opacityStrip.onDidChange(this.onDidOpacityChange,this)),this._register(this.opacityStrip.onColorFlushed(this.flushColor,this)),this.hueStrip=new o(this.domNode,this.model),this._register(this.hueStrip),this._register(this.hueStrip.onDidChange(this.onDidHueChange,this)),this._register(this.hueStrip.onColorFlushed(this.flushColor,this))}flushColor(){this.model.flushColor()}onDidSaturationValueChange({s:u,v:f}){const S=this.model.color.hsva;this.model.color=new w.Color(new w.HSVA(S.h,u,f,S.a))}onDidOpacityChange(u){const f=this.model.color.hsva;this.model.color=new w.Color(new w.HSVA(f.h,f.s,f.v,u))}onDidHueChange(u){const f=this.model.color.hsva,S=(1-u)*360;this.model.color=new w.Color(new w.HSVA(S===360?0:S,f.s,f.v,f.a))}layout(){this.saturationBox.layout(),this.opacityStrip.layout(),this.hueStrip.layout()}}e.ColorPickerBody=l;class c extends p.Disposable{constructor(u,f,S){super();this.model=f,this.pixelRatio=S,this._onDidChange=new b.Emitter,this.onDidChange=this._onDidChange.event,this._onColorFlushed=new b.Emitter,this.onColorFlushed=this._onColorFlushed.event,this.domNode=i(".saturation-wrap"),m.append(u,this.domNode),this.canvas=document.createElement("canvas"),this.canvas.className="saturation-box",m.append(this.domNode,this.canvas),this.selection=i(".saturation-selection"),m.append(this.domNode,this.selection),this.layout(),this._register(m.addDisposableGenericMouseDownListner(this.domNode,v=>this.onMouseDown(v))),this._register(this.model.onDidChangeColor(this.onDidChangeColor,this)),this.monitor=null}onMouseDown(u){this.monitor=this._register(new D.GlobalMouseMoveMonitor);const f=m.getDomNodePagePosition(this.domNode);u.target!==this.selection&&this.onDidChangePosition(u.offsetX,u.offsetY),this.monitor.startMonitoring(u.target,u.buttons,D.standardMouseMoveMerger,v=>this.onDidChangePosition(v.posx-f.left,v.posy-f.top),()=>null);const S=m.addDisposableGenericMouseUpListner(document,()=>{this._onColorFlushed.fire(),S.dispose(),this.monitor&&(this.monitor.stopMonitoring(!0),this.monitor=null)},!0)}onDidChangePosition(u,f){const S=Math.max(0,Math.min(1,u/this.width)),v=Math.max(0,Math.min(1,1-f/this.height));this.paintSelection(S,v),this._onDidChange.fire({s:S,v})}layout(){this.width=this.domNode.offsetWidth,this.height=this.domNode.offsetHeight,this.canvas.width=this.width*this.pixelRatio,this.canvas.height=this.height*this.pixelRatio,this.paint();const u=this.model.color.hsva;this.paintSelection(u.s,u.v)}paint(){const u=this.model.color.hsva,f=new w.Color(new w.HSVA(u.h,1,1,1)),S=this.canvas.getContext("2d"),v=S.createLinearGradient(0,0,this.canvas.width,0);v.addColorStop(0,"rgba(255, 255, 255, 1)"),v.addColorStop(.5,"rgba(255, 255, 255, 0.5)"),v.addColorStop(1,"rgba(255, 255, 255, 0)");const C=S.createLinearGradient(0,0,0,this.canvas.height);C.addColorStop(0,"rgba(0, 0, 0, 0)"),C.addColorStop(1,"rgba(0, 0, 0, 1)"),S.rect(0,0,this.canvas.width,this.canvas.height),S.fillStyle=w.Color.Format.CSS.format(f),S.fill(),S.fillStyle=v,S.fill(),S.fillStyle=C,S.fill()}paintSelection(u,f){this.selection.style.left=`${u*this.width}px`,this.selection.style.top=`${this.height-f*this.height}px`}onDidChangeColor(){this.monitor&&this.monitor.isMonitoring()||this.paint()}}class r extends p.Disposable{constructor(u,f){super();this.model=f,this._onDidChange=new b.Emitter,this.onDidChange=this._onDidChange.event,this._onColorFlushed=new b.Emitter,this.onColorFlushed=this._onColorFlushed.event,this.domNode=m.append(u,i(".strip")),this.overlay=m.append(this.domNode,i(".overlay")),this.slider=m.append(this.domNode,i(".slider")),this.slider.style.top="0px",this._register(m.addDisposableGenericMouseDownListner(this.domNode,S=>this.onMouseDown(S))),this.layout()}layout(){this.height=this.domNode.offsetHeight-this.slider.offsetHeight;const u=this.getValue(this.model.color);this.updateSliderPosition(u)}onMouseDown(u){const f=this._register(new D.GlobalMouseMoveMonitor),S=m.getDomNodePagePosition(this.domNode);this.domNode.classList.add("grabbing"),u.target!==this.slider&&this.onDidChangeTop(u.offsetY),f.startMonitoring(u.target,u.buttons,D.standardMouseMoveMerger,C=>this.onDidChangeTop(C.posy-S.top),()=>null);const v=m.addDisposableGenericMouseUpListner(document,()=>{this._onColorFlushed.fire(),v.dispose(),f.stopMonitoring(!0),this.domNode.classList.remove("grabbing")},!0)}onDidChangeTop(u){const f=Math.max(0,Math.min(1,1-u/this.height));this.updateSliderPosition(f),this._onDidChange.fire(f)}updateSliderPosition(u){this.slider.style.top=`${(1-u)*this.height}px`}}class s extends r{constructor(u,f){super(u,f);this.domNode.classList.add("opacity-strip"),this._register(f.onDidChangeColor(this.onDidChangeColor,this)),this.onDidChangeColor(this.model.color)}onDidChangeColor(u){const{r:f,g:S,b:v}=u.rgba,C=new w.Color(new w.RGBA(f,S,v,1)),_=new w.Color(new w.RGBA(f,S,v,0));this.overlay.style.background=`linear-gradient(to bottom, ${C} 0%, ${_} 100%)`}getValue(u){return u.hsva.a}}class o extends r{constructor(u,f){super(u,f);this.domNode.classList.add("hue-strip")}getValue(u){return 1-u.hsva.h/360}}class a extends I.Widget{constructor(u,f,S,v){super();this.model=f,this.pixelRatio=S,this._register(y.PixelRatio.onDidChange(()=>this.layout()));const C=i(".colorpicker-widget");u.appendChild(C);const _=new n(C,this.model,v);this.body=new l(C,this.model,this.pixelRatio),this._register(_),this._register(this.body)}layout(){this.body.layout()}}e.ColorPickerWidget=a}),define(te[653],ie([1,0,7,223,217,190,73,171,2,41,58,541,9,42,128,131,14,126]),function(j,e,y,m,D,I,w,b,p,h,g,t,i,n,l,c,r,s){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AccessibilityProvider=e.OneReferenceRenderer=e.FileReferencesRenderer=e.IdentityProvider=e.StringRepresentationProvider=e.Delegate=e.DataSource=void 0;let o=class{constructor(E){this._resolverService=E}hasChildren(E){return E instanceof s.ReferencesModel||E instanceof s.FileReferences}getChildren(E){if(E instanceof s.ReferencesModel)return E.groups;if(E instanceof s.FileReferences)return E.resolve(this._resolverService).then(N=>N.children);throw new Error("bad tree")}};o=Ie([Ce(0,g.ITextModelService)],o),e.DataSource=o;class a{getHeight(){return 23}getTemplateId(E){return E instanceof s.FileReferences?S.id:C.id}}e.Delegate=a;let d=class{constructor(E){this._keybindingService=E}getKeyboardNavigationLabel(E){var N;if(E instanceof s.OneReference){const k=(N=E.parent.getPreview(E))===null||N===void 0?void 0:N.preview(E.range);if(k)return k.value}return(0,h.basename)(E.uri)}};d=Ie([Ce(0,n.IKeybindingService)],d),e.StringRepresentationProvider=d;class u{getId(E){return E instanceof s.OneReference?E.id:E.uri}}e.IdentityProvider=u;let f=class extends p.Disposable{constructor(E,N,k){super();this._uriLabel=N;const M=document.createElement("div");M.classList.add("reference-file"),this.file=this._register(new I.IconLabel(M,{supportHighlights:!0})),this.badge=new m.CountBadge(y.append(M,y.$(".count"))),this._register((0,c.attachBadgeStyler)(this.badge,k)),E.appendChild(M)}set(E,N){let k=(0,h.dirname)(E.uri);this.file.setLabel((0,b.getBaseLabel)(E.uri),this._uriLabel.getUriLabel(k,{relative:!0}),{title:this._uriLabel.getUriLabel(E.uri),matches:N});const M=E.children.length;this.badge.setCount(M),M>1?this.badge.setTitleFormat((0,t.localize)(0,null,M)):this.badge.setTitleFormat((0,t.localize)(1,null,M))}};f=Ie([Ce(1,l.ILabelService),Ce(2,r.IThemeService)],f);let S=class yi{constructor(E){this._instantiationService=E,this.templateId=yi.id}renderTemplate(E){return this._instantiationService.createInstance(f,E)}renderElement(E,N,k){k.set(E.element,(0,w.createMatches)(E.filterData))}disposeTemplate(E){E.dispose()}};S.id="FileReferencesRenderer",S=Ie([Ce(0,i.IInstantiationService)],S),e.FileReferencesRenderer=S;class v{constructor(E){this.label=new D.HighlightedLabel(E)}set(E,N){var k;const M=(k=E.parent.getPreview(E))===null||k===void 0?void 0:k.preview(E.range);if(!M||!M.value)this.label.set(`${(0,h.basename)(E.uri)}:${E.range.startLineNumber+1}:${E.range.startColumn+1}`);else{const{value:O,highlight:B}=M;N&&!w.FuzzyScore.isDefault(N)?(this.label.element.classList.toggle("referenceMatch",!1),this.label.set(O,(0,w.createMatches)(N))):(this.label.element.classList.toggle("referenceMatch",!0),this.label.set(O,[B]))}}}class C{constructor(){this.templateId=C.id}renderTemplate(E){return new v(E)}renderElement(E,N,k){k.set(E.element,E.filterData)}disposeTemplate(){}}e.OneReferenceRenderer=C,C.id="OneReferenceRenderer";class _{getWidgetAriaLabel(){return(0,t.localize)(2,null)}getAriaLabel(E){return E.ariaMessage}}e.AccessibilityProvider=_}),define(te[654],ie([1,0,7,2,8,62,31,75,11,3,90,35,52,151,122,9,14,379]),function(j,e,y,m,D,I,w,b,p,h,g,t,i,n,l,c,r){"use strict";var s;Object.defineProperty(e,"__esModule",{value:!0}),e.GhostTextWidget=void 0;const o=(s=window.trustedTypes)===null||s===void 0?void 0:s.createPolicy("editorGhostText",{createHTML:v=>v});let a=class extends m.Disposable{constructor(C,_,L,E){super();this.editor=C,this.model=_,this.instantiationService=L,this.languageService=E,this.disposed=!1,this.partsWidget=this._register(this.instantiationService.createInstance(d,this.editor)),this.additionalLinesWidget=this._register(new u(this.editor,this.languageService.languageIdCodec)),this.viewMoreContentWidget=void 0,this._register(this.editor.onDidChangeConfiguration(N=>{(N.hasChanged(29)||N.hasChanged(105)||N.hasChanged(88)||N.hasChanged(83)||N.hasChanged(45)||N.hasChanged(44)||N.hasChanged(59))&&this.update()})),this._register((0,m.toDisposable)(()=>{var N;this.disposed=!0,this.update(),(N=this.viewMoreContentWidget)===null||N===void 0||N.dispose(),this.viewMoreContentWidget=void 0})),this._register(_.onDidChange(()=>{this.update()})),this.update()}shouldShowHoverAtViewZone(C){return this.additionalLinesWidget.viewZoneId===C}update(){var C;const _=this.model.ghostText;if(!this.editor.hasModel()||!_||this.disposed){this.partsWidget.clear(),this.additionalLinesWidget.clear();return}const L=new Array,E=new Array;function N(B,T){if(E.length>0){const R=E[E.length-1];T&&R.decorations.push(new n.LineDecoration(R.content.length+1,R.content.length+1+B[0].length,T,0)),R.content+=B[0],B=B.slice(1)}for(const R of B)E.push({content:R,decorations:T?[new n.LineDecoration(1,R.length+1,T,0)]:[]})}const k=this.editor.getModel().getLineContent(_.lineNumber);this.editor.getModel().getLineTokens(_.lineNumber);let M,O=0;for(const B of _.parts){let T=B.lines;M===void 0?(L.push({column:B.column,text:T[0],preview:B.preview}),T=T.slice(1)):N([k.substring(O,B.column-1)],void 0),T.length>0&&(N(T,"ghost-text"),M===void 0&&B.column<=k.length&&(M=B.column)),O=B.column-1}M!==void 0&&N([k.substring(O)],void 0),this.partsWidget.setParts(_.lineNumber,L,M!==void 0?{column:M,length:k.length+1-M}:void 0),this.additionalLinesWidget.updateLines(_.lineNumber,E,_.additionalReservedLineCount),_.parts.some(B=>B.lines.length<0)?this.viewMoreContentWidget=this.renderViewMoreLines(new p.Position(_.lineNumber,this.editor.getModel().getLineMaxColumn(_.lineNumber)),"",0):((C=this.viewMoreContentWidget)===null||C===void 0||C.dispose(),this.viewMoreContentWidget=void 0)}renderViewMoreLines(C,_,L){const E=this.editor.getOption(44),N=document.createElement("div");N.className="suggest-preview-additional-widget",(0,I.applyFontInfo)(N,E);const k=document.createElement("span");k.className="content-spacer",k.append(_),N.append(k);const M=document.createElement("span");M.className="content-newline suggest-preview-text",M.append("\u23CE "),N.append(M);const O=new m.DisposableStore,B=document.createElement("div");return B.className="button suggest-preview-text",B.append(`+${L} lines\u2026`),O.add(y.addStandardDisposableListener(B,"mousedown",T=>{var R;(R=this.model)===null||R===void 0||R.setExpanded(!0),T.preventDefault(),this.editor.focus()})),N.append(B),new S(this.editor,C,N,O)}};a=Ie([Ce(2,c.IInstantiationService),Ce(3,t.ILanguageService)],a),e.GhostTextWidget=a;class d{constructor(C){this.editor=C,this.decorationIds=[],this.disposableStore=new m.DisposableStore}dispose(){this.clear(),this.disposableStore.dispose()}clear(){this.editor.deltaDecorations(this.decorationIds,[]),this.disposableStore.clear()}setParts(C,_,L){if(this.disposableStore.clear(),!this.editor.getModel())return;const N=new Array;L&&N.push({range:h.Range.fromPositions(new p.Position(C,L.column),new p.Position(C,L.column+L.length)),options:{inlineClassName:"ghost-text-hidden",description:"ghost-text-hidden"}}),this.decorationIds=this.editor.deltaDecorations(this.decorationIds,_.map(k=>({range:h.Range.fromPositions(new p.Position(C,k.column)),options:{description:"ghost-text",after:{content:k.text,inlineClassName:k.preview?"ghost-text-decoration-preview":"ghost-text-decoration"},showIfCollapsed:!0}})).concat(N))}}class u{constructor(C,_){this.editor=C,this.languageIdCodec=_,this._viewZoneId=void 0}get viewZoneId(){return this._viewZoneId}dispose(){this.clear()}clear(){this.editor.changeViewZones(C=>{this._viewZoneId&&(C.removeZone(this._viewZoneId),this._viewZoneId=void 0)})}updateLines(C,_,L){const E=this.editor.getModel();if(!E)return;const{tabSize:N}=E.getOptions();this.editor.changeViewZones(k=>{this._viewZoneId&&(k.removeZone(this._viewZoneId),this._viewZoneId=void 0);const M=Math.max(_.length,L);if(M>0){const O=document.createElement("div");f(O,N,_,this.editor.getOptions(),this.languageIdCodec),this._viewZoneId=k.addZone({afterLineNumber:C,heightInLines:M,domNode:O,afterColumnAffinity:1})}})}}function f(v,C,_,L,E){const N=L.get(29),k=L.get(105),M="none",O=L.get(83),B=L.get(45),T=L.get(44),R=L.get(59),P=(0,g.createStringBuilder)(1e4);P.appendASCIIString('<div class="suggest-preview-text">');for(let A=0,H=_.length;A<H;A++){const q=_[A],X=q.content;P.appendASCIIString('<div class="view-line'),P.appendASCIIString('" style="top:'),P.appendASCIIString(String(A*R)),P.appendASCIIString('px;width:1000000px;">');const G=D.isBasicASCII(X),re=D.containsRTL(X),ae=b.LineTokens.createEmpty(X,E);(0,l.renderViewLine)(new l.RenderLineInput(T.isMonospace&&!N,T.canUseHalfwidthRightwardsArrow,X,!1,G,re,0,ae,q.decorations,C,0,T.spaceWidth,T.middotWidth,T.wsmiddotWidth,k,M,O,B!==w.EditorFontLigatures.OFF,null),P),P.appendASCIIString("</div>")}P.appendASCIIString("</div>"),(0,I.applyFontInfo)(v,T);const F=P.build(),W=o?o.createHTML(F):F;v.innerHTML=W}class S extends m.Disposable{constructor(C,_,L,E){super();this.editor=C,this.position=_,this.domNode=L,this.allowEditorOverflow=!1,this.suppressMouseDown=!1,this._register(E),this._register((0,m.toDisposable)(()=>{this.editor.removeContentWidget(this)})),this.editor.addContentWidget(this)}getId(){return"editor.widget.viewMoreLinesWidget"}getDomNode(){return this.domNode}getPosition(){return{position:this.position,preference:[0]}}}(0,r.registerThemingParticipant)((v,C)=>{const _=v.getColor(i.ghostTextForeground);_&&(C.addRule(`.monaco-editor .ghost-text-decoration { color: ${_.toString()} !important; }`),C.addRule(`.monaco-editor .ghost-text-decoration-preview { color: ${_.toString()} !important; }`),C.addRule(`.monaco-editor .suggest-preview-text .ghost-text { color: ${_.toString()} !important; }`));const L=v.getColor(i.ghostTextBackground);L&&(C.addRule(`.monaco-editor .ghost-text-decoration { background-color: ${L.toString()}; }`),C.addRule(`.monaco-editor .ghost-text-decoration-preview { background-color: ${L.toString()}; }`),C.addRule(`.monaco-editor .suggest-preview-text .ghost-text { background-color: ${L.toString()}; }`));const E=v.getColor(i.ghostTextBorder);E&&(C.addRule(`.monaco-editor .suggest-preview-text .ghost-text { border: 1px solid ${E}; }`),C.addRule(`.monaco-editor .ghost-text-decoration { border: 1px solid ${E}; }`),C.addRule(`.monaco-editor .ghost-text-decoration-preview { border: 1px solid ${E}; }`))})}),define(te[282],ie([1,0,88,2,20,148,49,52,14]),function(j,e,y,m,D,I,w,b,p){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AbstractEditorNavigationQuickAccessProvider=void 0;class h{constructor(t){this.options=t,this.rangeHighlightDecorationId=void 0}provide(t,i){var n;const l=new m.DisposableStore;t.canAcceptInBackground=!!((n=this.options)===null||n===void 0?void 0:n.canAcceptInBackground),t.matchOnLabel=t.matchOnDescription=t.matchOnDetail=t.sortByLabel=!1;const c=l.add(new m.MutableDisposable);return c.value=this.doProvide(t,i),l.add(this.onDidActiveTextEditorControlChange(()=>{c.value=void 0,c.value=this.doProvide(t,i)})),l}doProvide(t,i){const n=new m.DisposableStore,l=this.activeTextEditorControl;if(l&&this.canProvideWithTextEditor(l)){const c={editor:l},r=(0,I.getCodeEditor)(l);if(r){let s=(0,D.withNullAsUndefined)(l.saveViewState());n.add(r.onDidChangeCursorPosition(()=>{s=(0,D.withNullAsUndefined)(l.saveViewState())})),c.restoreViewState=()=>{s&&l===this.activeTextEditorControl&&l.restoreViewState(s)},n.add((0,y.once)(i.onCancellationRequested)(()=>{var o;return(o=c.restoreViewState)===null||o===void 0?void 0:o.call(c)}))}n.add((0,m.toDisposable)(()=>this.clearDecorations(l))),n.add(this.provideWithTextEditor(c,t,i))}else n.add(this.provideWithoutTextEditor(t,i));return n}canProvideWithTextEditor(t){return!0}gotoLocation({editor:t},i){t.setSelection(i.range),t.revealRangeInCenter(i.range,0),i.preserveFocus||t.focus()}getModel(t){var i;return(0,I.isDiffEditor)(t)?(i=t.getModel())===null||i===void 0?void 0:i.modified:t.getModel()}addDecorations(t,i){t.changeDecorations(n=>{const l=[];this.rangeHighlightDecorationId&&(l.push(this.rangeHighlightDecorationId.overviewRulerDecorationId),l.push(this.rangeHighlightDecorationId.rangeHighlightId),this.rangeHighlightDecorationId=void 0);const c=[{range:i,options:{description:"quick-access-range-highlight",className:"rangeHighlight",isWholeLine:!0}},{range:i,options:{description:"quick-access-range-highlight-overview",overviewRuler:{color:(0,p.themeColorFromId)(b.overviewRulerRangeHighlight),position:w.OverviewRulerLane.Full}}}],[r,s]=n.deltaDecorations(l,c);this.rangeHighlightDecorationId={rangeHighlightId:r,overviewRulerDecorationId:s}})}clearDecorations(t){const i=this.rangeHighlightDecorationId;i&&(t.changeDecorations(n=>{n.deltaDecorations([i.overviewRulerDecorationId,i.rangeHighlightId],[])}),this.rangeHighlightDecorationId=void 0)}}e.AbstractEditorNavigationQuickAccessProvider=h}),define(te[655],ie([1,0,2,148,282,561]),function(j,e,y,m,D,I){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AbstractGotoLineQuickAccessProvider=void 0;class w extends D.AbstractEditorNavigationQuickAccessProvider{constructor(){super({canAcceptInBackground:!0})}provideWithoutTextEditor(p){const h=(0,I.localize)(0,null);return p.items=[{label:h}],p.ariaLabel=h,y.Disposable.None}provideWithTextEditor(p,h,g){const t=p.editor,i=new y.DisposableStore;i.add(h.onDidAccept(c=>{const[r]=h.selectedItems;if(r){if(!this.isValidLineNumber(t,r.lineNumber))return;this.gotoLocation(p,{range:this.toRange(r.lineNumber,r.column),keyMods:h.keyMods,preserveFocus:c.inBackground}),c.inBackground||h.hide()}}));const n=()=>{const c=this.parsePosition(t,h.value.trim().substr(w.PREFIX.length)),r=this.getPickLabel(t,c.lineNumber,c.column);if(h.items=[{lineNumber:c.lineNumber,column:c.column,label:r}],h.ariaLabel=r,!this.isValidLineNumber(t,c.lineNumber)){this.clearDecorations(t);return}const s=this.toRange(c.lineNumber,c.column);t.revealRangeInCenter(s,0),this.addDecorations(t,s)};n(),i.add(h.onDidChangeValue(()=>n()));const l=(0,m.getCodeEditor)(t);return l&&l.getOptions().get(60).renderType===2&&(l.updateOptions({lineNumbers:"on"}),i.add((0,y.toDisposable)(()=>l.updateOptions({lineNumbers:"relative"})))),i}toRange(p=1,h=1){return{startLineNumber:p,startColumn:h,endLineNumber:p,endColumn:h}}parsePosition(p,h){const g=h.split(/,|:|#/).map(i=>parseInt(i,10)).filter(i=>!isNaN(i)),t=this.lineCount(p)+1;return{lineNumber:g[0]>0?g[0]:t+g[0],column:g[1]}}getPickLabel(p,h,g){if(this.isValidLineNumber(p,h))return this.isValidColumn(p,h,g)?(0,I.localize)(1,null,h,g):(0,I.localize)(2,null,h);const t=p.getPosition()||{lineNumber:1,column:1},i=this.lineCount(p);return i>1?(0,I.localize)(3,null,t.lineNumber,t.column,i):(0,I.localize)(4,null,t.lineNumber,t.column)}isValidLineNumber(p,h){return!h||typeof h!="number"?!1:h>0&&h<=this.lineCount(p)}isValidColumn(p,h,g){if(!g||typeof g!="number")return!1;const t=this.getModel(p);if(!t)return!1;const i={lineNumber:h,column:g};return t.validatePosition(i).equals(i)}lineCount(p){var h,g;return(g=(h=this.getModel(p))===null||h===void 0?void 0:h.getLineCount())!==null&&g!==void 0?g:0}}e.AbstractGotoLineQuickAccessProvider=w,w.PREFIX=":"}),define(te[656],ie([1,0,10,21,27,319,2,8,3,18,199,282,562]),function(j,e,y,m,D,I,w,b,p,h,g,t,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AbstractGotoSymbolQuickAccessProvider=void 0;let n=class Xt extends t.AbstractEditorNavigationQuickAccessProvider{constructor(s,o=Object.create(null)){super(o);this._outlineModelService=s,this.options=o,this.options.canAcceptInBackground=!0}provideWithoutTextEditor(s){return this.provideLabelPick(s,(0,i.localize)(0,null)),w.Disposable.None}provideWithTextEditor(s,o,a){const d=s.editor,u=this.getModel(d);return u?h.DocumentSymbolProviderRegistry.has(u)?this.doProvideWithEditorSymbols(s,u,o,a):this.doProvideWithoutEditorSymbols(s,u,o,a):w.Disposable.None}doProvideWithoutEditorSymbols(s,o,a,d){const u=new w.DisposableStore;return this.provideLabelPick(a,(0,i.localize)(1,null)),(()=>ye(this,void 0,void 0,function*(){!(yield this.waitForLanguageSymbolRegistry(o,u))||d.isCancellationRequested||u.add(this.doProvideWithEditorSymbols(s,o,a,d))}))(),u}provideLabelPick(s,o){s.items=[{label:o,index:0,kind:14}],s.ariaLabel=o}waitForLanguageSymbolRegistry(s,o){return ye(this,void 0,void 0,function*(){if(h.DocumentSymbolProviderRegistry.has(s))return!0;const a=new y.DeferredPromise,d=o.add(h.DocumentSymbolProviderRegistry.onDidChange(()=>{h.DocumentSymbolProviderRegistry.has(s)&&(d.dispose(),a.complete(!0))}));return o.add((0,w.toDisposable)(()=>a.complete(!1))),a.p})}doProvideWithEditorSymbols(s,o,a,d){const u=s.editor,f=new w.DisposableStore;f.add(a.onDidAccept(L=>{const[E]=a.selectedItems;E&&E.range&&(this.gotoLocation(s,{range:E.range.selection,keyMods:a.keyMods,preserveFocus:L.inBackground}),L.inBackground||a.hide())})),f.add(a.onDidTriggerItemButton(({item:L})=>{L&&L.range&&(this.gotoLocation(s,{range:L.range.selection,keyMods:a.keyMods,forceSideBySide:!0}),a.hide())}));const S=this.getDocumentSymbols(o,d);let v;const C=()=>ye(this,void 0,void 0,function*(){v==null||v.dispose(!0),a.busy=!1,v=new m.CancellationTokenSource(d),a.busy=!0;try{const L=(0,I.prepareQuery)(a.value.substr(Xt.PREFIX.length).trim()),E=yield this.doGetSymbolPicks(S,L,void 0,v.token);if(d.isCancellationRequested)return;E.length>0?a.items=E:L.original.length>0?this.provideLabelPick(a,(0,i.localize)(2,null)):this.provideLabelPick(a,(0,i.localize)(3,null))}finally{d.isCancellationRequested||(a.busy=!1)}});f.add(a.onDidChangeValue(()=>C())),C();let _=!0;return f.add(a.onDidChangeActive(()=>{const[L]=a.activeItems;if(L&&L.range){if(_){_=!1;return}u.revealRangeInCenter(L.range.selection,0),this.addDecorations(u,L.range.decoration)}})),f}doGetSymbolPicks(s,o,a,d){return ye(this,void 0,void 0,function*(){const u=yield s;if(d.isCancellationRequested)return[];const f=o.original.indexOf(Xt.SCOPE_PREFIX)===0,S=f?1:0;let v,C;o.values&&o.values.length>1?(v=(0,I.pieceToQuery)(o.values[0]),C=(0,I.pieceToQuery)(o.values.slice(1))):v=o;const _=[];for(let N=0;N<u.length;N++){const k=u[N],M=(0,b.trim)(k.name),O=`$(${h.SymbolKinds.toIcon(k.kind).id}) ${M}`,B=O.length-M.length;let T=k.containerName;(a==null?void 0:a.extraContainerLabel)&&(T?T=`${a.extraContainerLabel} \u2022 ${T}`:T=a.extraContainerLabel);let R,P,F,W;if(o.original.length>S){let H=!1;if(v!==o&&([R,P]=(0,I.scoreFuzzy2)(O,Object.assign(Object.assign({},o),{values:void 0}),S,B),typeof R=="number"&&(H=!0)),typeof R!="number"&&([R,P]=(0,I.scoreFuzzy2)(O,v,S,B),typeof R!="number"))continue;if(!H&&C){if(T&&C.original.length>0&&([F,W]=(0,I.scoreFuzzy2)(T,C)),typeof F!="number")continue;typeof R=="number"&&(R+=F)}}const A=k.tags&&k.tags.indexOf(1)>=0;_.push({index:N,kind:k.kind,score:R,label:O,ariaLabel:M,description:T,highlights:A?void 0:{label:P,description:W},range:{selection:p.Range.collapseToStart(k.selectionRange),decoration:k.range},strikethrough:A,buttons:(()=>{var H,q;const X=((H=this.options)===null||H===void 0?void 0:H.openSideBySideDirection)?(q=this.options)===null||q===void 0?void 0:q.openSideBySideDirection():void 0;if(!!X)return[{iconClass:X==="right"?D.Codicon.splitHorizontal.classNames:D.Codicon.splitVertical.classNames,tooltip:X==="right"?(0,i.localize)(4,null):(0,i.localize)(5,null)}]})()})}const L=_.sort((N,k)=>f?this.compareByKindAndScore(N,k):this.compareByScore(N,k));let E=[];if(f){let O=function(){k&&typeof N=="number"&&M>0&&(k.label=(0,b.format)(c[N]||l,M))},N,k,M=0;for(const B of L)N!==B.kind?(O(),N=B.kind,M=1,k={type:"separator"},E.push(k)):M++,E.push(B);O()}else L.length>0&&(E=[{label:(0,i.localize)(6,null,_.length),type:"separator"},...L]);return E})}compareByScore(s,o){if(typeof s.score!="number"&&typeof o.score=="number")return 1;if(typeof s.score=="number"&&typeof o.score!="number")return-1;if(typeof s.score=="number"&&typeof o.score=="number"){if(s.score>o.score)return-1;if(s.score<o.score)return 1}return s.index<o.index?-1:s.index>o.index?1:0}compareByKindAndScore(s,o){const a=c[s.kind]||l,d=c[o.kind]||l,u=a.localeCompare(d);return u===0?this.compareByScore(s,o):u}getDocumentSymbols(s,o){return ye(this,void 0,void 0,function*(){const a=yield this._outlineModelService.getOrCreate(s,o);return o.isCancellationRequested?[]:a.asListOfDocumentSymbols()})}};n.PREFIX="@",n.SCOPE_PREFIX=":",n.PREFIX_BY_CATEGORY=`${n.PREFIX}${n.SCOPE_PREFIX}`,n=Ie([Ce(0,g.IOutlineModelService)],n),e.AbstractGotoSymbolQuickAccessProvider=n;const l=(0,i.localize)(7,null),c={[5]:(0,i.localize)(8,null),[11]:(0,i.localize)(9,null),[8]:(0,i.localize)(10,null),[12]:(0,i.localize)(11,null),[4]:(0,i.localize)(12,null),[22]:(0,i.localize)(13,null),[23]:(0,i.localize)(14,null),[24]:(0,i.localize)(15,null),[10]:(0,i.localize)(16,null),[2]:(0,i.localize)(17,null),[3]:(0,i.localize)(18,null),[25]:(0,i.localize)(19,null),[1]:(0,i.localize)(20,null),[6]:(0,i.localize)(21,null),[9]:(0,i.localize)(22,null),[21]:(0,i.localize)(23,null),[14]:(0,i.localize)(24,null),[0]:(0,i.localize)(25,null),[17]:(0,i.localize)(26,null),[15]:(0,i.localize)(27,null),[16]:(0,i.localize)(28,null),[18]:(0,i.localize)(29,null),[19]:(0,i.localize)(30,null),[7]:(0,i.localize)(31,null),[13]:(0,i.localize)(32,null)}}),define(te[657],ie([1,0,2,11,564,16,42,23,14,384]),function(j,e,y,m,D,I,w,b,p){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.RenameInputField=e.CONTEXT_RENAME_INPUT_VISIBLE=void 0,e.CONTEXT_RENAME_INPUT_VISIBLE=new I.RawContextKey("renameInputVisible",!1,(0,D.localize)(0,null));let h=class{constructor(t,i,n,l,c){this._editor=t,this._acceptKeybindings=i,this._themeService=n,this._keybindingService=l,this._disposables=new y.DisposableStore,this.allowEditorOverflow=!0,this._visibleContextKey=e.CONTEXT_RENAME_INPUT_VISIBLE.bindTo(c),this._editor.addContentWidget(this),this._disposables.add(this._editor.onDidChangeConfiguration(r=>{r.hasChanged(44)&&this._updateFont()})),this._disposables.add(n.onDidColorThemeChange(this._updateStyles,this))}dispose(){this._disposables.dispose(),this._editor.removeContentWidget(this)}getId(){return"__renameInputWidget"}getDomNode(){if(!this._domNode){this._domNode=document.createElement("div"),this._domNode.className="monaco-editor rename-box",this._input=document.createElement("input"),this._input.className="rename-input",this._input.type="text",this._input.setAttribute("aria-label",(0,D.localize)(1,null)),this._domNode.appendChild(this._input),this._label=document.createElement("div"),this._label.className="rename-label",this._domNode.appendChild(this._label);const t=()=>{var i,n;const[l,c]=this._acceptKeybindings;this._keybindingService.lookupKeybinding(l),this._label.innerText=(0,D.localize)(2,null,(i=this._keybindingService.lookupKeybinding(l))===null||i===void 0?void 0:i.getLabel(),(n=this._keybindingService.lookupKeybinding(c))===null||n===void 0?void 0:n.getLabel())};t(),this._disposables.add(this._keybindingService.onDidUpdateKeybindings(t)),this._updateFont(),this._updateStyles(this._themeService.getColorTheme())}return this._domNode}_updateStyles(t){var i,n,l,c;if(!this._input||!this._domNode)return;const r=t.getColor(b.widgetShadow);this._domNode.style.backgroundColor=String((i=t.getColor(b.editorWidgetBackground))!==null&&i!==void 0?i:""),this._domNode.style.boxShadow=r?` 0 0 8px 2px ${r}`:"",this._domNode.style.color=String((n=t.getColor(b.inputForeground))!==null&&n!==void 0?n:""),this._input.style.backgroundColor=String((l=t.getColor(b.inputBackground))!==null&&l!==void 0?l:"");const s=t.getColor(b.inputBorder);this._input.style.borderWidth=s?"1px":"0px",this._input.style.borderStyle=s?"solid":"none",this._input.style.borderColor=(c=s==null?void 0:s.toString())!==null&&c!==void 0?c:"none"}_updateFont(){if(!this._input||!this._label)return;const t=this._editor.getOption(44);this._input.style.fontFamily=t.fontFamily,this._input.style.fontWeight=t.fontWeight,this._input.style.fontSize=`${t.fontSize}px`,this._label.style.fontSize=`${t.fontSize*.8}px`}getPosition(){return this._visible?{position:this._position,preference:[2,1]}:null}afterRender(t){t||this.cancelInput(!0)}acceptInput(t){this._currentAcceptInput&&this._currentAcceptInput(t)}cancelInput(t){this._currentCancelInput&&this._currentCancelInput(t)}getInput(t,i,n,l,c,r){this._domNode.classList.toggle("preview",c),this._position=new m.Position(t.startLineNumber,t.startColumn),this._input.value=i,this._input.setAttribute("selectionStart",n.toString()),this._input.setAttribute("selectionEnd",l.toString()),this._input.size=Math.max((t.endColumn-t.startColumn)*1.1,20);const s=new y.DisposableStore;return new Promise(o=>{this._currentCancelInput=a=>(this._currentAcceptInput=void 0,this._currentCancelInput=void 0,o(a),!0),this._currentAcceptInput=a=>{if(this._input.value.trim().length===0||this._input.value===i){this.cancelInput(!0);return}this._currentAcceptInput=void 0,this._currentCancelInput=void 0,o({newName:this._input.value,wantsPreview:c&&a})},r.onCancellationRequested(()=>this.cancelInput(!0)),s.add(this._editor.onDidBlurEditorWidget(()=>this.cancelInput(!1))),this._show()}).finally(()=>{s.dispose(),this._hide()})}_show(){this._editor.revealLineInCenterIfOutsideViewport(this._position.lineNumber,0),this._visible=!0,this._visibleContextKey.set(!0),this._editor.layoutContentWidget(this),setTimeout(()=>{this._input.focus(),this._input.setSelectionRange(parseInt(this._input.getAttribute("selectionStart")),parseInt(this._input.getAttribute("selectionEnd")))},100)}_hide(){this._visible=!1,this._visibleContextKey.reset(),this._editor.layoutContentWidget(this)}};h=Ie([Ce(2,p.IThemeService),Ce(3,w.IKeybindingService),Ce(4,I.IContextKeyService)],h),e.RenameInputField=h}),define(te[283],ie([1,0,27,574,23,14]),function(j,e,y,m,D,I){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SYMBOL_ICON_VARIABLE_FOREGROUND=e.SYMBOL_ICON_UNIT_FOREGROUND=e.SYMBOL_ICON_TYPEPARAMETER_FOREGROUND=e.SYMBOL_ICON_TEXT_FOREGROUND=e.SYMBOL_ICON_STRUCT_FOREGROUND=e.SYMBOL_ICON_STRING_FOREGROUND=e.SYMBOL_ICON_SNIPPET_FOREGROUND=e.SYMBOL_ICON_REFERENCE_FOREGROUND=e.SYMBOL_ICON_PROPERTY_FOREGROUND=e.SYMBOL_ICON_PACKAGE_FOREGROUND=e.SYMBOL_ICON_OPERATOR_FOREGROUND=e.SYMBOL_ICON_OBJECT_FOREGROUND=e.SYMBOL_ICON_NUMBER_FOREGROUND=e.SYMBOL_ICON_NULL_FOREGROUND=e.SYMBOL_ICON_NAMESPACE_FOREGROUND=e.SYMBOL_ICON_MODULE_FOREGROUND=e.SYMBOL_ICON_METHOD_FOREGROUND=e.SYMBOL_ICON_KEYWORD_FOREGROUND=e.SYMBOL_ICON_KEY_FOREGROUND=e.SYMBOL_ICON_INTERFACE_FOREGROUND=e.SYMBOL_ICON_FUNCTION_FOREGROUND=e.SYMBOL_ICON_FOLDER_FOREGROUND=e.SYMBOL_ICON_FILE_FOREGROUND=e.SYMBOL_ICON_FIELD_FOREGROUND=e.SYMBOL_ICON_EVENT_FOREGROUND=e.SYMBOL_ICON_ENUMERATOR_MEMBER_FOREGROUND=e.SYMBOL_ICON_ENUMERATOR_FOREGROUND=e.SYMBOL_ICON_CONSTRUCTOR_FOREGROUND=e.SYMBOL_ICON_CONSTANT_FOREGROUND=e.SYMBOL_ICON_COLOR_FOREGROUND=e.SYMBOL_ICON_CLASS_FOREGROUND=e.SYMBOL_ICON_BOOLEAN_FOREGROUND=e.SYMBOL_ICON_ARRAY_FOREGROUND=void 0,e.SYMBOL_ICON_ARRAY_FOREGROUND=(0,D.registerColor)("symbolIcon.arrayForeground",{dark:D.foreground,light:D.foreground,hc:D.foreground},(0,m.localize)(0,null)),e.SYMBOL_ICON_BOOLEAN_FOREGROUND=(0,D.registerColor)("symbolIcon.booleanForeground",{dark:D.foreground,light:D.foreground,hc:D.foreground},(0,m.localize)(1,null)),e.SYMBOL_ICON_CLASS_FOREGROUND=(0,D.registerColor)("symbolIcon.classForeground",{dark:"#EE9D28",light:"#D67E00",hc:"#EE9D28"},(0,m.localize)(2,null)),e.SYMBOL_ICON_COLOR_FOREGROUND=(0,D.registerColor)("symbolIcon.colorForeground",{dark:D.foreground,light:D.foreground,hc:D.foreground},(0,m.localize)(3,null)),e.SYMBOL_ICON_CONSTANT_FOREGROUND=(0,D.registerColor)("symbolIcon.constantForeground",{dark:D.foreground,light:D.foreground,hc:D.foreground},(0,m.localize)(4,null)),e.SYMBOL_ICON_CONSTRUCTOR_FOREGROUND=(0,D.registerColor)("symbolIcon.constructorForeground",{dark:"#B180D7",light:"#652D90",hc:"#B180D7"},(0,m.localize)(5,null)),e.SYMBOL_ICON_ENUMERATOR_FOREGROUND=(0,D.registerColor)("symbolIcon.enumeratorForeground",{dark:"#EE9D28",light:"#D67E00",hc:"#EE9D28"},(0,m.localize)(6,null)),e.SYMBOL_ICON_ENUMERATOR_MEMBER_FOREGROUND=(0,D.registerColor)("symbolIcon.enumeratorMemberForeground",{dark:"#75BEFF",light:"#007ACC",hc:"#75BEFF"},(0,m.localize)(7,null)),e.SYMBOL_ICON_EVENT_FOREGROUND=(0,D.registerColor)("symbolIcon.eventForeground",{dark:"#EE9D28",light:"#D67E00",hc:"#EE9D28"},(0,m.localize)(8,null)),e.SYMBOL_ICON_FIELD_FOREGROUND=(0,D.registerColor)("symbolIcon.fieldForeground",{dark:"#75BEFF",light:"#007ACC",hc:"#75BEFF"},(0,m.localize)(9,null)),e.SYMBOL_ICON_FILE_FOREGROUND=(0,D.registerColor)("symbolIcon.fileForeground",{dark:D.foreground,light:D.foreground,hc:D.foreground},(0,m.localize)(10,null)),e.SYMBOL_ICON_FOLDER_FOREGROUND=(0,D.registerColor)("symbolIcon.folderForeground",{dark:D.foreground,light:D.foreground,hc:D.foreground},(0,m.localize)(11,null)),e.SYMBOL_ICON_FUNCTION_FOREGROUND=(0,D.registerColor)("symbolIcon.functionForeground",{dark:"#B180D7",light:"#652D90",hc:"#B180D7"},(0,m.localize)(12,null)),e.SYMBOL_ICON_INTERFACE_FOREGROUND=(0,D.registerColor)("symbolIcon.interfaceForeground",{dark:"#75BEFF",light:"#007ACC",hc:"#75BEFF"},(0,m.localize)(13,null)),e.SYMBOL_ICON_KEY_FOREGROUND=(0,D.registerColor)("symbolIcon.keyForeground",{dark:D.foreground,light:D.foreground,hc:D.foreground},(0,m.localize)(14,null)),e.SYMBOL_ICON_KEYWORD_FOREGROUND=(0,D.registerColor)("symbolIcon.keywordForeground",{dark:D.foreground,light:D.foreground,hc:D.foreground},(0,m.localize)(15,null)),e.SYMBOL_ICON_METHOD_FOREGROUND=(0,D.registerColor)("symbolIcon.methodForeground",{dark:"#B180D7",light:"#652D90",hc:"#B180D7"},(0,m.localize)(16,null)),e.SYMBOL_ICON_MODULE_FOREGROUND=(0,D.registerColor)("symbolIcon.moduleForeground",{dark:D.foreground,light:D.foreground,hc:D.foreground},(0,m.localize)(17,null)),e.SYMBOL_ICON_NAMESPACE_FOREGROUND=(0,D.registerColor)("symbolIcon.namespaceForeground",{dark:D.foreground,light:D.foreground,hc:D.foreground},(0,m.localize)(18,null)),e.SYMBOL_ICON_NULL_FOREGROUND=(0,D.registerColor)("symbolIcon.nullForeground",{dark:D.foreground,light:D.foreground,hc:D.foreground},(0,m.localize)(19,null)),e.SYMBOL_ICON_NUMBER_FOREGROUND=(0,D.registerColor)("symbolIcon.numberForeground",{dark:D.foreground,light:D.foreground,hc:D.foreground},(0,m.localize)(20,null)),e.SYMBOL_ICON_OBJECT_FOREGROUND=(0,D.registerColor)("symbolIcon.objectForeground",{dark:D.foreground,light:D.foreground,hc:D.foreground},(0,m.localize)(21,null)),e.SYMBOL_ICON_OPERATOR_FOREGROUND=(0,D.registerColor)("symbolIcon.operatorForeground",{dark:D.foreground,light:D.foreground,hc:D.foreground},(0,m.localize)(22,null)),e.SYMBOL_ICON_PACKAGE_FOREGROUND=(0,D.registerColor)("symbolIcon.packageForeground",{dark:D.foreground,light:D.foreground,hc:D.foreground},(0,m.localize)(23,null)),e.SYMBOL_ICON_PROPERTY_FOREGROUND=(0,D.registerColor)("symbolIcon.propertyForeground",{dark:D.foreground,light:D.foreground,hc:D.foreground},(0,m.localize)(24,null)),e.SYMBOL_ICON_REFERENCE_FOREGROUND=(0,D.registerColor)("symbolIcon.referenceForeground",{dark:D.foreground,light:D.foreground,hc:D.foreground},(0,m.localize)(25,null)),e.SYMBOL_ICON_SNIPPET_FOREGROUND=(0,D.registerColor)("symbolIcon.snippetForeground",{dark:D.foreground,light:D.foreground,hc:D.foreground},(0,m.localize)(26,null)),e.SYMBOL_ICON_STRING_FOREGROUND=(0,D.registerColor)("symbolIcon.stringForeground",{dark:D.foreground,light:D.foreground,hc:D.foreground},(0,m.localize)(27,null)),e.SYMBOL_ICON_STRUCT_FOREGROUND=(0,D.registerColor)("symbolIcon.structForeground",{dark:D.foreground,light:D.foreground,hc:D.foreground},(0,m.localize)(28,null)),e.SYMBOL_ICON_TEXT_FOREGROUND=(0,D.registerColor)("symbolIcon.textForeground",{dark:D.foreground,light:D.foreground,hc:D.foreground},(0,m.localize)(29,null)),e.SYMBOL_ICON_TYPEPARAMETER_FOREGROUND=(0,D.registerColor)("symbolIcon.typeParameterForeground",{dark:D.foreground,light:D.foreground,hc:D.foreground},(0,m.localize)(30,null)),e.SYMBOL_ICON_UNIT_FOREGROUND=(0,D.registerColor)("symbolIcon.unitForeground",{dark:D.foreground,light:D.foreground,hc:D.foreground},(0,m.localize)(31,null)),e.SYMBOL_ICON_VARIABLE_FOREGROUND=(0,D.registerColor)("symbolIcon.variableForeground",{dark:"#75BEFF",light:"#007ACC",hc:"#75BEFF"},(0,m.localize)(32,null)),(0,I.registerThemingParticipant)((w,b)=>{const p=w.getColor(e.SYMBOL_ICON_ARRAY_FOREGROUND);p&&b.addRule(`${y.Codicon.symbolArray.cssSelector} { color: ${p}; }`);const h=w.getColor(e.SYMBOL_ICON_BOOLEAN_FOREGROUND);h&&b.addRule(`${y.Codicon.symbolBoolean.cssSelector} { color: ${h}; }`);const g=w.getColor(e.SYMBOL_ICON_CLASS_FOREGROUND);g&&b.addRule(`${y.Codicon.symbolClass.cssSelector} { color: ${g}; }`);const t=w.getColor(e.SYMBOL_ICON_METHOD_FOREGROUND);t&&b.addRule(`${y.Codicon.symbolMethod.cssSelector} { color: ${t}; }`);const i=w.getColor(e.SYMBOL_ICON_COLOR_FOREGROUND);i&&b.addRule(`${y.Codicon.symbolColor.cssSelector} { color: ${i}; }`);const n=w.getColor(e.SYMBOL_ICON_CONSTANT_FOREGROUND);n&&b.addRule(`${y.Codicon.symbolConstant.cssSelector} { color: ${n}; }`);const l=w.getColor(e.SYMBOL_ICON_CONSTRUCTOR_FOREGROUND);l&&b.addRule(`${y.Codicon.symbolConstructor.cssSelector} { color: ${l}; }`);const c=w.getColor(e.SYMBOL_ICON_ENUMERATOR_FOREGROUND);c&&b.addRule(`
|
||
${y.Codicon.symbolValue.cssSelector},${y.Codicon.symbolEnum.cssSelector} { color: ${c}; }`);const r=w.getColor(e.SYMBOL_ICON_ENUMERATOR_MEMBER_FOREGROUND);r&&b.addRule(`${y.Codicon.symbolEnumMember.cssSelector} { color: ${r}; }`);const s=w.getColor(e.SYMBOL_ICON_EVENT_FOREGROUND);s&&b.addRule(`${y.Codicon.symbolEvent.cssSelector} { color: ${s}; }`);const o=w.getColor(e.SYMBOL_ICON_FIELD_FOREGROUND);o&&b.addRule(`${y.Codicon.symbolField.cssSelector} { color: ${o}; }`);const a=w.getColor(e.SYMBOL_ICON_FILE_FOREGROUND);a&&b.addRule(`${y.Codicon.symbolFile.cssSelector} { color: ${a}; }`);const d=w.getColor(e.SYMBOL_ICON_FOLDER_FOREGROUND);d&&b.addRule(`${y.Codicon.symbolFolder.cssSelector} { color: ${d}; }`);const u=w.getColor(e.SYMBOL_ICON_FUNCTION_FOREGROUND);u&&b.addRule(`${y.Codicon.symbolFunction.cssSelector} { color: ${u}; }`);const f=w.getColor(e.SYMBOL_ICON_INTERFACE_FOREGROUND);f&&b.addRule(`${y.Codicon.symbolInterface.cssSelector} { color: ${f}; }`);const S=w.getColor(e.SYMBOL_ICON_KEY_FOREGROUND);S&&b.addRule(`${y.Codicon.symbolKey.cssSelector} { color: ${S}; }`);const v=w.getColor(e.SYMBOL_ICON_KEYWORD_FOREGROUND);v&&b.addRule(`${y.Codicon.symbolKeyword.cssSelector} { color: ${v}; }`);const C=w.getColor(e.SYMBOL_ICON_MODULE_FOREGROUND);C&&b.addRule(`${y.Codicon.symbolModule.cssSelector} { color: ${C}; }`);const _=w.getColor(e.SYMBOL_ICON_NAMESPACE_FOREGROUND);_&&b.addRule(`${y.Codicon.symbolNamespace.cssSelector} { color: ${_}; }`);const L=w.getColor(e.SYMBOL_ICON_NULL_FOREGROUND);L&&b.addRule(`${y.Codicon.symbolNull.cssSelector} { color: ${L}; }`);const E=w.getColor(e.SYMBOL_ICON_NUMBER_FOREGROUND);E&&b.addRule(`${y.Codicon.symbolNumber.cssSelector} { color: ${E}; }`);const N=w.getColor(e.SYMBOL_ICON_OBJECT_FOREGROUND);N&&b.addRule(`${y.Codicon.symbolObject.cssSelector} { color: ${N}; }`);const k=w.getColor(e.SYMBOL_ICON_OPERATOR_FOREGROUND);k&&b.addRule(`${y.Codicon.symbolOperator.cssSelector} { color: ${k}; }`);const M=w.getColor(e.SYMBOL_ICON_PACKAGE_FOREGROUND);M&&b.addRule(`${y.Codicon.symbolPackage.cssSelector} { color: ${M}; }`);const O=w.getColor(e.SYMBOL_ICON_PROPERTY_FOREGROUND);O&&b.addRule(`${y.Codicon.symbolProperty.cssSelector} { color: ${O}; }`);const B=w.getColor(e.SYMBOL_ICON_REFERENCE_FOREGROUND);B&&b.addRule(`${y.Codicon.symbolReference.cssSelector} { color: ${B}; }`);const T=w.getColor(e.SYMBOL_ICON_SNIPPET_FOREGROUND);T&&b.addRule(`${y.Codicon.symbolSnippet.cssSelector} { color: ${T}; }`);const R=w.getColor(e.SYMBOL_ICON_STRING_FOREGROUND);R&&b.addRule(`${y.Codicon.symbolString.cssSelector} { color: ${R}; }`);const P=w.getColor(e.SYMBOL_ICON_STRUCT_FOREGROUND);P&&b.addRule(`${y.Codicon.symbolStruct.cssSelector} { color: ${P}; }`);const F=w.getColor(e.SYMBOL_ICON_TEXT_FOREGROUND);F&&b.addRule(`${y.Codicon.symbolText.cssSelector} { color: ${F}; }`);const W=w.getColor(e.SYMBOL_ICON_TYPEPARAMETER_FOREGROUND);W&&b.addRule(`${y.Codicon.symbolTypeParameter.cssSelector} { color: ${W}; }`);const A=w.getColor(e.SYMBOL_ICON_UNIT_FOREGROUND);A&&b.addRule(`${y.Codicon.symbolUnit.cssSelector} { color: ${A}; }`);const H=w.getColor(e.SYMBOL_ICON_VARIABLE_FOREGROUND);H&&b.addRule(`${y.Codicon.symbolVariable.cssSelector} { color: ${H}; }`)})}),define(te[284],ie([1,0,7,48,638,28,16,53,14]),function(j,e,y,m,D,I,w,b,p){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.StandaloneCodeEditorService=void 0;let h=class extends D.AbstractCodeEditorService{constructor(t,i){super(i);this.onCodeEditorAdd(()=>this._checkContextKey()),this.onCodeEditorRemove(()=>this._checkContextKey()),this._editorIsOpen=t.createKey("editorIsOpen",!1),this._activeCodeEditor=null}_checkContextKey(){let t=!1;for(const i of this.listCodeEditors())if(!i.isSimpleWidget){t=!0;break}this._editorIsOpen.set(t)}setActiveCodeEditor(t){this._activeCodeEditor=t}getActiveCodeEditor(){return this._activeCodeEditor}openCodeEditor(t,i,n){return i?Promise.resolve(this.doOpenEditor(i,t)):Promise.resolve(null)}doOpenEditor(t,i){if(!this.findModel(t,i.resource)){if(i.resource){const c=i.resource.scheme;if(c===m.Schemas.http||c===m.Schemas.https)return(0,y.windowOpenNoOpener)(i.resource.toString()),t}return null}const l=i.options?i.options.selection:null;if(l)if(typeof l.endLineNumber=="number"&&typeof l.endColumn=="number")t.setSelection(l),t.revealRangeInCenter(l,1);else{const c={lineNumber:l.startLineNumber,column:l.startColumn};t.setPosition(c),t.revealPositionInCenter(c,1)}return t}findModel(t,i){const n=t.getModel();return n&&n.uri.toString()!==i.toString()?null:n}};h=Ie([Ce(0,w.IContextKeyService),Ce(1,p.IThemeService)],h),e.StandaloneCodeEditorService=h,(0,b.registerSingleton)(I.ICodeEditorService,h)}),define(te[658],ie([1,0,52,23]),function(j,e,y,m){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.hc_black=e.vs_dark=e.vs=void 0,e.vs={base:"vs",inherit:!1,rules:[{token:"",foreground:"000000",background:"fffffe"},{token:"invalid",foreground:"cd3131"},{token:"emphasis",fontStyle:"italic"},{token:"strong",fontStyle:"bold"},{token:"variable",foreground:"001188"},{token:"variable.predefined",foreground:"4864AA"},{token:"constant",foreground:"dd0000"},{token:"comment",foreground:"008000"},{token:"number",foreground:"098658"},{token:"number.hex",foreground:"3030c0"},{token:"regexp",foreground:"800000"},{token:"annotation",foreground:"808080"},{token:"type",foreground:"008080"},{token:"delimiter",foreground:"000000"},{token:"delimiter.html",foreground:"383838"},{token:"delimiter.xml",foreground:"0000FF"},{token:"tag",foreground:"800000"},{token:"tag.id.pug",foreground:"4F76AC"},{token:"tag.class.pug",foreground:"4F76AC"},{token:"meta.scss",foreground:"800000"},{token:"metatag",foreground:"e00000"},{token:"metatag.content.html",foreground:"FF0000"},{token:"metatag.html",foreground:"808080"},{token:"metatag.xml",foreground:"808080"},{token:"metatag.php",fontStyle:"bold"},{token:"key",foreground:"863B00"},{token:"string.key.json",foreground:"A31515"},{token:"string.value.json",foreground:"0451A5"},{token:"attribute.name",foreground:"FF0000"},{token:"attribute.value",foreground:"0451A5"},{token:"attribute.value.number",foreground:"098658"},{token:"attribute.value.unit",foreground:"098658"},{token:"attribute.value.html",foreground:"0000FF"},{token:"attribute.value.xml",foreground:"0000FF"},{token:"string",foreground:"A31515"},{token:"string.html",foreground:"0000FF"},{token:"string.sql",foreground:"FF0000"},{token:"string.yaml",foreground:"0451A5"},{token:"keyword",foreground:"0000FF"},{token:"keyword.json",foreground:"0451A5"},{token:"keyword.flow",foreground:"AF00DB"},{token:"keyword.flow.scss",foreground:"0000FF"},{token:"operator.scss",foreground:"666666"},{token:"operator.sql",foreground:"778899"},{token:"operator.swift",foreground:"666666"},{token:"predefined.sql",foreground:"C700C7"}],colors:{[m.editorBackground]:"#FFFFFE",[m.editorForeground]:"#000000",[m.editorInactiveSelection]:"#E5EBF1",[y.editorIndentGuides]:"#D3D3D3",[y.editorActiveIndentGuides]:"#939393",[m.editorSelectionHighlight]:"#ADD6FF4D"}},e.vs_dark={base:"vs-dark",inherit:!1,rules:[{token:"",foreground:"D4D4D4",background:"1E1E1E"},{token:"invalid",foreground:"f44747"},{token:"emphasis",fontStyle:"italic"},{token:"strong",fontStyle:"bold"},{token:"variable",foreground:"74B0DF"},{token:"variable.predefined",foreground:"4864AA"},{token:"variable.parameter",foreground:"9CDCFE"},{token:"constant",foreground:"569CD6"},{token:"comment",foreground:"608B4E"},{token:"number",foreground:"B5CEA8"},{token:"number.hex",foreground:"5BB498"},{token:"regexp",foreground:"B46695"},{token:"annotation",foreground:"cc6666"},{token:"type",foreground:"3DC9B0"},{token:"delimiter",foreground:"DCDCDC"},{token:"delimiter.html",foreground:"808080"},{token:"delimiter.xml",foreground:"808080"},{token:"tag",foreground:"569CD6"},{token:"tag.id.pug",foreground:"4F76AC"},{token:"tag.class.pug",foreground:"4F76AC"},{token:"meta.scss",foreground:"A79873"},{token:"meta.tag",foreground:"CE9178"},{token:"metatag",foreground:"DD6A6F"},{token:"metatag.content.html",foreground:"9CDCFE"},{token:"metatag.html",foreground:"569CD6"},{token:"metatag.xml",foreground:"569CD6"},{token:"metatag.php",fontStyle:"bold"},{token:"key",foreground:"9CDCFE"},{token:"string.key.json",foreground:"9CDCFE"},{token:"string.value.json",foreground:"CE9178"},{token:"attribute.name",foreground:"9CDCFE"},{token:"attribute.value",foreground:"CE9178"},{token:"attribute.value.number.css",foreground:"B5CEA8"},{token:"attribute.value.unit.css",foreground:"B5CEA8"},{token:"attribute.value.hex.css",foreground:"D4D4D4"},{token:"string",foreground:"CE9178"},{token:"string.sql",foreground:"FF0000"},{token:"keyword",foreground:"569CD6"},{token:"keyword.flow",foreground:"C586C0"},{token:"keyword.json",foreground:"CE9178"},{token:"keyword.flow.scss",foreground:"569CD6"},{token:"operator.scss",foreground:"909090"},{token:"operator.sql",foreground:"778899"},{token:"operator.swift",foreground:"909090"},{token:"predefined.sql",foreground:"FF00FF"}],colors:{[m.editorBackground]:"#1E1E1E",[m.editorForeground]:"#D4D4D4",[m.editorInactiveSelection]:"#3A3D41",[y.editorIndentGuides]:"#404040",[y.editorActiveIndentGuides]:"#707070",[m.editorSelectionHighlight]:"#ADD6FF26"}},e.hc_black={base:"hc-black",inherit:!1,rules:[{token:"",foreground:"FFFFFF",background:"000000"},{token:"invalid",foreground:"f44747"},{token:"emphasis",fontStyle:"italic"},{token:"strong",fontStyle:"bold"},{token:"variable",foreground:"1AEBFF"},{token:"variable.parameter",foreground:"9CDCFE"},{token:"constant",foreground:"569CD6"},{token:"comment",foreground:"608B4E"},{token:"number",foreground:"FFFFFF"},{token:"regexp",foreground:"C0C0C0"},{token:"annotation",foreground:"569CD6"},{token:"type",foreground:"3DC9B0"},{token:"delimiter",foreground:"FFFF00"},{token:"delimiter.html",foreground:"FFFF00"},{token:"tag",foreground:"569CD6"},{token:"tag.id.pug",foreground:"4F76AC"},{token:"tag.class.pug",foreground:"4F76AC"},{token:"meta",foreground:"D4D4D4"},{token:"meta.tag",foreground:"CE9178"},{token:"metatag",foreground:"569CD6"},{token:"metatag.content.html",foreground:"1AEBFF"},{token:"metatag.html",foreground:"569CD6"},{token:"metatag.xml",foreground:"569CD6"},{token:"metatag.php",fontStyle:"bold"},{token:"key",foreground:"9CDCFE"},{token:"string.key",foreground:"9CDCFE"},{token:"string.value",foreground:"CE9178"},{token:"attribute.name",foreground:"569CD6"},{token:"attribute.value",foreground:"3FF23F"},{token:"string",foreground:"CE9178"},{token:"string.sql",foreground:"FF0000"},{token:"keyword",foreground:"569CD6"},{token:"keyword.flow",foreground:"C586C0"},{token:"operator.sql",foreground:"778899"},{token:"operator.swift",foreground:"909090"},{token:"predefined.sql",foreground:"FF00FF"}],colors:{[m.editorBackground]:"#000000",[m.editorForeground]:"#FFFFFF",[y.editorIndentGuides]:"#FFFFFF",[y.editorActiveIndentGuides]:"#FFFFFF"}}}),define(te[37],ie([1,0,44,27,4,54,2,81,26,16,9,14]),function(j,e,y,m,D,I,w,b,p,h,g,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MenuItemAction=e.SubmenuItemAction=e.MenuRegistry=e.IMenuService=e.MenuId=e.isIMenuItem=void 0;function i(r){return r.command!==void 0}e.isIMenuItem=i;class n{constructor(s){this.id=n._idPool++,this._debugName=s}}e.MenuId=n,n._idPool=0,n.CommandPalette=new n("CommandPalette"),n.DebugBreakpointsContext=new n("DebugBreakpointsContext"),n.DebugCallStackContext=new n("DebugCallStackContext"),n.DebugConsoleContext=new n("DebugConsoleContext"),n.DebugVariablesContext=new n("DebugVariablesContext"),n.DebugWatchContext=new n("DebugWatchContext"),n.DebugToolBar=new n("DebugToolBar"),n.EditorContext=new n("EditorContext"),n.SimpleEditorContext=new n("SimpleEditorContext"),n.EditorContextCopy=new n("EditorContextCopy"),n.EditorContextPeek=new n("EditorContextPeek"),n.EditorTitle=new n("EditorTitle"),n.EditorTitleRun=new n("EditorTitleRun"),n.EditorTitleContext=new n("EditorTitleContext"),n.EmptyEditorGroup=new n("EmptyEditorGroup"),n.EmptyEditorGroupContext=new n("EmptyEditorGroupContext"),n.ExplorerContext=new n("ExplorerContext"),n.ExtensionContext=new n("ExtensionContext"),n.GlobalActivity=new n("GlobalActivity"),n.LayoutControlMenu=new n("LayoutControlMenu"),n.MenubarMainMenu=new n("MenubarMainMenu"),n.MenubarAppearanceMenu=new n("MenubarAppearanceMenu"),n.MenubarDebugMenu=new n("MenubarDebugMenu"),n.MenubarEditMenu=new n("MenubarEditMenu"),n.MenubarCopy=new n("MenubarCopy"),n.MenubarFileMenu=new n("MenubarFileMenu"),n.MenubarGoMenu=new n("MenubarGoMenu"),n.MenubarHelpMenu=new n("MenubarHelpMenu"),n.MenubarLayoutMenu=new n("MenubarLayoutMenu"),n.MenubarNewBreakpointMenu=new n("MenubarNewBreakpointMenu"),n.MenubarPanelAlignmentMenu=new n("MenubarPanelAlignmentMenu"),n.MenubarPreferencesMenu=new n("MenubarPreferencesMenu"),n.MenubarRecentMenu=new n("MenubarRecentMenu"),n.MenubarSelectionMenu=new n("MenubarSelectionMenu"),n.MenubarSwitchEditorMenu=new n("MenubarSwitchEditorMenu"),n.MenubarSwitchGroupMenu=new n("MenubarSwitchGroupMenu"),n.MenubarTerminalMenu=new n("MenubarTerminalMenu"),n.MenubarViewMenu=new n("MenubarViewMenu"),n.MenubarHomeMenu=new n("MenubarHomeMenu"),n.OpenEditorsContext=new n("OpenEditorsContext"),n.ProblemsPanelContext=new n("ProblemsPanelContext"),n.SCMChangeContext=new n("SCMChangeContext"),n.SCMResourceContext=new n("SCMResourceContext"),n.SCMResourceFolderContext=new n("SCMResourceFolderContext"),n.SCMResourceGroupContext=new n("SCMResourceGroupContext"),n.SCMSourceControl=new n("SCMSourceControl"),n.SCMTitle=new n("SCMTitle"),n.SearchContext=new n("SearchContext"),n.StatusBarWindowIndicatorMenu=new n("StatusBarWindowIndicatorMenu"),n.StatusBarRemoteIndicatorMenu=new n("StatusBarRemoteIndicatorMenu"),n.TestItem=new n("TestItem"),n.TestItemGutter=new n("TestItemGutter"),n.TestPeekElement=new n("TestPeekElement"),n.TestPeekTitle=new n("TestPeekTitle"),n.TouchBarContext=new n("TouchBarContext"),n.TitleBarContext=new n("TitleBarContext"),n.TunnelContext=new n("TunnelContext"),n.TunnelPrivacy=new n("TunnelPrivacy"),n.TunnelProtocol=new n("TunnelProtocol"),n.TunnelPortInline=new n("TunnelInline"),n.TunnelTitle=new n("TunnelTitle"),n.TunnelLocalAddressInline=new n("TunnelLocalAddressInline"),n.TunnelOriginInline=new n("TunnelOriginInline"),n.ViewItemContext=new n("ViewItemContext"),n.ViewContainerTitle=new n("ViewContainerTitle"),n.ViewContainerTitleContext=new n("ViewContainerTitleContext"),n.ViewTitle=new n("ViewTitle"),n.ViewTitleContext=new n("ViewTitleContext"),n.CommentThreadTitle=new n("CommentThreadTitle"),n.CommentThreadActions=new n("CommentThreadActions"),n.CommentTitle=new n("CommentTitle"),n.CommentActions=new n("CommentActions"),n.InteractiveToolbar=new n("InteractiveToolbar"),n.InteractiveCellTitle=new n("InteractiveCellTitle"),n.InteractiveCellExecute=new n("InteractiveCellExecute"),n.InteractiveInputExecute=new n("InteractiveInputExecute"),n.NotebookToolbar=new n("NotebookToolbar"),n.NotebookCellTitle=new n("NotebookCellTitle"),n.NotebookCellInsert=new n("NotebookCellInsert"),n.NotebookCellBetween=new n("NotebookCellBetween"),n.NotebookCellListTop=new n("NotebookCellTop"),n.NotebookCellExecute=new n("NotebookCellExecute"),n.NotebookCellExecutePrimary=new n("NotebookCellExecutePrimary"),n.NotebookDiffCellInputTitle=new n("NotebookDiffCellInputTitle"),n.NotebookDiffCellMetadataTitle=new n("NotebookDiffCellMetadataTitle"),n.NotebookDiffCellOutputsTitle=new n("NotebookDiffCellOutputsTitle"),n.NotebookOutputToolbar=new n("NotebookOutputToolbar"),n.NotebookEditorLayoutConfigure=new n("NotebookEditorLayoutConfigure"),n.BulkEditTitle=new n("BulkEditTitle"),n.BulkEditContext=new n("BulkEditContext"),n.TimelineItemContext=new n("TimelineItemContext"),n.TimelineTitle=new n("TimelineTitle"),n.TimelineTitleContext=new n("TimelineTitleContext"),n.AccountsContext=new n("AccountsContext"),n.PanelTitle=new n("PanelTitle"),n.TerminalInstanceContext=new n("TerminalInstanceContext"),n.TerminalEditorInstanceContext=new n("TerminalEditorInstanceContext"),n.TerminalNewDropdownContext=new n("TerminalNewDropdownContext"),n.TerminalTabContext=new n("TerminalTabContext"),n.TerminalTabEmptyAreaContext=new n("TerminalTabEmptyAreaContext"),n.TerminalInlineTabContext=new n("TerminalInlineTabContext"),n.WebviewContext=new n("WebviewContext"),n.InlineCompletionsActions=new n("InlineCompletionsActions"),n.NewFile=new n("NewFile"),e.IMenuService=(0,g.createDecorator)("menuService"),e.MenuRegistry=new class{constructor(){this._commands=new Map,this._menuItems=new Map,this._onDidChangeMenu=new D.Emitter,this.onDidChangeMenu=this._onDidChangeMenu.event,this._commandPaletteChangeEvent={has:r=>r===n.CommandPalette}}addCommand(r){return this.addCommands(I.Iterable.single(r))}addCommands(r){for(const s of r)this._commands.set(s.id,s);return this._onDidChangeMenu.fire(this._commandPaletteChangeEvent),(0,w.toDisposable)(()=>{let s=!1;for(const o of r)s=this._commands.delete(o.id)||s;s&&this._onDidChangeMenu.fire(this._commandPaletteChangeEvent)})}getCommand(r){return this._commands.get(r)}getCommands(){const r=new Map;return this._commands.forEach((s,o)=>r.set(o,s)),r}appendMenuItem(r,s){return this.appendMenuItems(I.Iterable.single({id:r,item:s}))}appendMenuItems(r){const s=new Set,o=new b.LinkedList;for(const{id:a,item:d}of r){let u=this._menuItems.get(a);u||(u=new b.LinkedList,this._menuItems.set(a,u)),o.push(u.push(d)),s.add(a)}return this._onDidChangeMenu.fire(s),(0,w.toDisposable)(()=>{if(o.size>0){for(let a of o)a();this._onDidChangeMenu.fire(s),o.clear()}})}getMenuItems(r){let s;return this._menuItems.has(r)?s=[...this._menuItems.get(r)]:s=[],r===n.CommandPalette&&this._appendImplicitItems(s),s}_appendImplicitItems(r){const s=new Set;for(const o of r)i(o)&&(s.add(o.command.id),o.alt&&s.add(o.alt.id));this._commands.forEach((o,a)=>{s.has(a)||r.push({command:o})})}};class l extends y.SubmenuAction{constructor(s,o,a,d){super(`submenuitem.${s.submenu.id}`,typeof s.title=="string"?s.title:s.title.value,[],"submenu");this.item=s,this._menuService=o,this._contextKeyService=a,this._options=d}get actions(){const s=[],o=this._menuService.createMenu(this.item.submenu,this._contextKeyService),a=o.getActions(this._options);o.dispose();for(const[,d]of a)d.length>0&&(s.push(...d),s.push(new y.Separator));return s.length&&s.pop(),s}}e.SubmenuItemAction=l;let c=class Li{constructor(s,o,a,d,u){var f,S;if(this._commandService=u,this.id=s.id,this.label=(a==null?void 0:a.renderShortTitle)&&s.shortTitle?typeof s.shortTitle=="string"?s.shortTitle:s.shortTitle.value:typeof s.title=="string"?s.title:s.title.value,this.tooltip=(S=typeof s.tooltip=="string"?s.tooltip:(f=s.tooltip)===null||f===void 0?void 0:f.value)!==null&&S!==void 0?S:"",this.enabled=!s.precondition||d.contextMatchesRules(s.precondition),this.checked=void 0,s.toggled){const v=s.toggled.condition?s.toggled:{condition:s.toggled};this.checked=d.contextMatchesRules(v.condition),this.checked&&v.tooltip&&(this.tooltip=typeof v.tooltip=="string"?v.tooltip:v.tooltip.value),v.title&&(this.label=typeof v.title=="string"?v.title:v.title.value)}this.item=s,this.alt=o?new Li(o,void 0,a,d,u):void 0,this._options=a,t.ThemeIcon.isThemeIcon(s.icon)&&(this.class=m.CSSIcon.asClassName(s.icon))}dispose(){}run(...s){var o,a;let d=[];return((o=this._options)===null||o===void 0?void 0:o.arg)&&(d=[...d,this._options.arg]),((a=this._options)===null||a===void 0?void 0:a.shouldForwardArgs)&&(d=[...d,...s]),this._commandService.executeCommand(this.id,...d)}};c=Ie([Ce(3,h.IContextKeyService),Ce(4,p.ICommandService)],c),e.MenuItemAction=c}),define(te[15],ie([1,0,499,25,28,11,45,58,37,26,16,86,36,87,20,64]),function(j,e,y,m,D,I,w,b,p,h,g,t,i,n,l,c){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SelectAllCommand=e.RedoCommand=e.UndoCommand=e.EditorExtensionsRegistry=e.registerEditorContribution=e.registerInstantiatedEditorAction=e.registerMultiEditorAction=e.registerEditorAction=e.registerEditorCommand=e.registerModelCommand=e.registerModelAndPositionCommand=e.MultiEditorAction=e.EditorAction=e.EditorCommand=e.ProxyCommand=e.MultiCommand=e.Command=void 0;class r{constructor(T){this.id=T.id,this.precondition=T.precondition,this._kbOpts=T.kbOpts,this._menuOpts=T.menuOpts,this._description=T.description}register(){if(Array.isArray(this._menuOpts)?this._menuOpts.forEach(this._registerMenuItem,this):this._menuOpts&&this._registerMenuItem(this._menuOpts),this._kbOpts){const T=Array.isArray(this._kbOpts)?this._kbOpts:[this._kbOpts];for(const R of T){let P=R.kbExpr;this.precondition&&(P?P=g.ContextKeyExpr.and(P,this.precondition):P=this.precondition);const F={id:this.id,weight:R.weight,args:R.args,when:P,primary:R.primary,secondary:R.secondary,win:R.win,linux:R.linux,mac:R.mac};t.KeybindingsRegistry.registerKeybindingRule(F)}}h.CommandsRegistry.registerCommand({id:this.id,handler:(T,R)=>this.runCommand(T,R),description:this._description})}_registerMenuItem(T){p.MenuRegistry.appendMenuItem(T.menuId,{group:T.group,command:{id:this.id,title:T.title,icon:T.icon,precondition:this.precondition},when:T.when,order:T.order})}}e.Command=r;class s extends r{constructor(){super(...arguments);this._implementations=[]}addImplementation(T,R,P){return this._implementations.push({priority:T,name:R,implementation:P}),this._implementations.sort((F,W)=>W.priority-F.priority),{dispose:()=>{for(let F=0;F<this._implementations.length;F++)if(this._implementations[F].implementation===P){this._implementations.splice(F,1);return}}}}runCommand(T,R){const P=T.get(c.ILogService);P.trace(`Executing Command '${this.id}' which has ${this._implementations.length} bound.`);for(const F of this._implementations){const W=F.implementation(T,R);if(W)return P.trace(`Command '${this.id}' was handled by '${F.name}'.`),typeof W=="boolean"?void 0:W}P.trace(`The Command '${this.id}' was not handled by any implementation.`)}}e.MultiCommand=s;class o extends r{constructor(T,R){super(R);this.command=T}runCommand(T,R){return this.command.runCommand(T,R)}}e.ProxyCommand=o;class a extends r{static bindToContribution(T){return class extends a{constructor(P){super(P);this._callback=P.handler}runEditorCommand(P,F,W){const A=T(F);A&&this._callback(A,W)}}}runCommand(T,R){const P=T.get(D.ICodeEditorService),F=P.getFocusedCodeEditor()||P.getActiveCodeEditor();if(!!F)return F.invokeWithinContext(W=>{if(!!W.get(g.IContextKeyService).contextMatchesRules((0,l.withNullAsUndefined)(this.precondition)))return this.runEditorCommand(W,F,R)})}}e.EditorCommand=a;class d extends a{constructor(T){super(d.convertOptions(T));this.label=T.label,this.alias=T.alias}static convertOptions(T){let R;Array.isArray(T.menuOpts)?R=T.menuOpts:T.menuOpts?R=[T.menuOpts]:R=[];function P(F){return F.menuId||(F.menuId=p.MenuId.EditorContext),F.title||(F.title=T.label),F.when=g.ContextKeyExpr.and(T.precondition,F.when),F}return Array.isArray(T.contextMenuOpts)?R.push(...T.contextMenuOpts.map(P)):T.contextMenuOpts&&R.push(P(T.contextMenuOpts)),T.menuOpts=R,T}runEditorCommand(T,R,P){return this.reportTelemetry(T,R),this.run(T,R,P||{})}reportTelemetry(T,R){T.get(n.ITelemetryService).publicLog2("editorActionInvoked",{name:this.label,id:this.id})}}e.EditorAction=d;class u extends d{constructor(){super(...arguments);this._implementations=[]}addImplementation(T,R){return this._implementations.push([T,R]),this._implementations.sort((P,F)=>F[0]-P[0]),{dispose:()=>{for(let P=0;P<this._implementations.length;P++)if(this._implementations[P][1]===R){this._implementations.splice(P,1);return}}}}run(T,R,P){for(const F of this._implementations){const W=F[1](T,R,P);if(W)return typeof W=="boolean"?void 0:W}}}e.MultiEditorAction=u;function f(B,T){h.CommandsRegistry.registerCommand(B,function(R,...P){const[F,W]=P;(0,l.assertType)(m.URI.isUri(F)),(0,l.assertType)(I.Position.isIPosition(W));const A=R.get(w.IModelService).getModel(F);if(A){const H=I.Position.lift(W);return T(A,H,...P.slice(2))}return R.get(b.ITextModelService).createModelReference(F).then(H=>new Promise((q,X)=>{try{const G=T(H.object.textEditorModel,I.Position.lift(W),P.slice(2));q(G)}catch(G){X(G)}}).finally(()=>{H.dispose()}))})}e.registerModelAndPositionCommand=f;function S(B,T){h.CommandsRegistry.registerCommand(B,function(R,...P){const[F]=P;(0,l.assertType)(m.URI.isUri(F));const W=R.get(w.IModelService).getModel(F);return W?T(W,...P.slice(1)):R.get(b.ITextModelService).createModelReference(F).then(A=>new Promise((H,q)=>{try{const X=T(A.object.textEditorModel,P.slice(1));H(X)}catch(X){q(X)}}).finally(()=>{A.dispose()}))})}e.registerModelCommand=S;function v(B){return M.INSTANCE.registerEditorCommand(B),B}e.registerEditorCommand=v;function C(B){const T=new B;return M.INSTANCE.registerEditorAction(T),T}e.registerEditorAction=C;function _(B){return M.INSTANCE.registerEditorAction(B),B}e.registerMultiEditorAction=_;function L(B){M.INSTANCE.registerEditorAction(B)}e.registerInstantiatedEditorAction=L;function E(B,T){M.INSTANCE.registerEditorContribution(B,T)}e.registerEditorContribution=E;var N;(function(B){function T(A){return M.INSTANCE.getEditorCommand(A)}B.getEditorCommand=T;function R(){return M.INSTANCE.getEditorActions()}B.getEditorActions=R;function P(){return M.INSTANCE.getEditorContributions()}B.getEditorContributions=P;function F(A){return M.INSTANCE.getEditorContributions().filter(H=>A.indexOf(H.id)>=0)}B.getSomeEditorContributions=F;function W(){return M.INSTANCE.getDiffEditorContributions()}B.getDiffEditorContributions=W})(N=e.EditorExtensionsRegistry||(e.EditorExtensionsRegistry={}));const k={EditorCommonContributions:"editor.contributions"};class M{constructor(){this.editorContributions=[],this.diffEditorContributions=[],this.editorActions=[],this.editorCommands=Object.create(null)}registerEditorContribution(T,R){this.editorContributions.push({id:T,ctor:R})}getEditorContributions(){return this.editorContributions.slice(0)}getDiffEditorContributions(){return this.diffEditorContributions.slice(0)}registerEditorAction(T){T.register(),this.editorActions.push(T)}getEditorActions(){return this.editorActions.slice(0)}registerEditorCommand(T){T.register(),this.editorCommands[T.id]=T}getEditorCommand(T){return this.editorCommands[T]||null}}M.INSTANCE=new M,i.Registry.add(k.EditorCommonContributions,M.INSTANCE);function O(B){return B.register(),B}e.UndoCommand=O(new s({id:"undo",precondition:void 0,kbOpts:{weight:0,primary:2048|56},menuOpts:[{menuId:p.MenuId.MenubarEditMenu,group:"1_do",title:y.localize(0,null),order:1},{menuId:p.MenuId.CommandPalette,group:"",title:y.localize(1,null),order:1}]})),O(new o(e.UndoCommand,{id:"default:undo",precondition:void 0})),e.RedoCommand=O(new s({id:"redo",precondition:void 0,kbOpts:{weight:0,primary:2048|55,secondary:[2048|1024|56],mac:{primary:2048|1024|56}},menuOpts:[{menuId:p.MenuId.MenubarEditMenu,group:"1_do",title:y.localize(2,null),order:2},{menuId:p.MenuId.CommandPalette,group:"",title:y.localize(3,null),order:1}]})),O(new o(e.RedoCommand,{id:"default:redo",precondition:void 0})),e.SelectAllCommand=O(new s({id:"editor.action.selectAll",precondition:void 0,kbOpts:{weight:0,kbExpr:null,primary:2048|31},menuOpts:[{menuId:p.MenuId.MenubarSelectionMenu,group:"1_basic",title:y.localize(4,null),order:1},{menuId:p.MenuId.CommandPalette,group:"",title:y.localize(5,null),order:1}]}))}),define(te[659],ie([1,0,196,15]),function(j,e,y,m){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MarkerDecorationsContribution=void 0;let D=class{constructor(w,b){}dispose(){}};D.ID="editor.contrib.markerDecorations",D=Ie([Ce(1,y.IMarkerDecorationsService)],D),e.MarkerDecorationsContribution=D,(0,m.registerEditorContribution)(D.ID,D)}),define(te[660],ie([1,0,43,66,55,15,22,24,516,16,368]),function(j,e,y,m,D,I,w,b,p,h){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SelectionAnchorSet=void 0,e.SelectionAnchorSet=new h.RawContextKey("selectionAnchorSet",!1);let g=class Ei{constructor(r,s){this.editor=r,this.selectionAnchorSetContextKey=e.SelectionAnchorSet.bindTo(s),this.modelChangeListener=r.onDidChangeModel(()=>this.selectionAnchorSetContextKey.reset())}static get(r){return r.getContribution(Ei.ID)}setSelectionAnchor(){if(this.editor.hasModel()){const r=this.editor.getPosition(),s=this.decorationId?[this.decorationId]:[],o=this.editor.deltaDecorations(s,[{range:w.Selection.fromPositions(r,r),options:{description:"selection-anchor",stickiness:1,hoverMessage:new m.MarkdownString().appendText((0,p.localize)(0,null)),className:"selection-anchor"}}]);this.decorationId=o[0],this.selectionAnchorSetContextKey.set(!!this.decorationId),(0,y.alert)((0,p.localize)(1,null,r.lineNumber,r.column))}}goToSelectionAnchor(){if(this.editor.hasModel()&&this.decorationId){const r=this.editor.getModel().getDecorationRange(this.decorationId);r&&this.editor.setPosition(r.getStartPosition())}}selectFromAnchorToCursor(){if(this.editor.hasModel()&&this.decorationId){const r=this.editor.getModel().getDecorationRange(this.decorationId);if(r){const s=this.editor.getPosition();this.editor.setSelection(w.Selection.fromPositions(r.getStartPosition(),s)),this.cancelSelectionAnchor()}}}cancelSelectionAnchor(){this.decorationId&&(this.editor.deltaDecorations([this.decorationId],[]),this.decorationId=void 0,this.selectionAnchorSetContextKey.set(!1))}dispose(){this.cancelSelectionAnchor(),this.modelChangeListener.dispose()}};g.ID="editor.contrib.selectionAnchorController",g=Ie([Ce(1,h.IContextKeyService)],g);class t extends I.EditorAction{constructor(){super({id:"editor.action.setSelectionAnchor",label:(0,p.localize)(2,null),alias:"Set Selection Anchor",precondition:void 0,kbOpts:{kbExpr:b.EditorContextKeys.editorTextFocus,primary:(0,D.KeyChord)(2048|41,2048|32),weight:100}})}run(r,s){var o;return ye(this,void 0,void 0,function*(){(o=g.get(s))===null||o===void 0||o.setSelectionAnchor()})}}class i extends I.EditorAction{constructor(){super({id:"editor.action.goToSelectionAnchor",label:(0,p.localize)(3,null),alias:"Go to Selection Anchor",precondition:e.SelectionAnchorSet})}run(r,s){var o;return ye(this,void 0,void 0,function*(){(o=g.get(s))===null||o===void 0||o.goToSelectionAnchor()})}}class n extends I.EditorAction{constructor(){super({id:"editor.action.selectFromAnchorToCursor",label:(0,p.localize)(4,null),alias:"Select from Anchor to Cursor",precondition:e.SelectionAnchorSet,kbOpts:{kbExpr:b.EditorContextKeys.editorTextFocus,primary:(0,D.KeyChord)(2048|41,2048|41),weight:100}})}run(r,s){var o;return ye(this,void 0,void 0,function*(){(o=g.get(s))===null||o===void 0||o.selectFromAnchorToCursor()})}}class l extends I.EditorAction{constructor(){super({id:"editor.action.cancelSelectionAnchor",label:(0,p.localize)(5,null),alias:"Cancel Selection Anchor",precondition:e.SelectionAnchorSet,kbOpts:{kbExpr:b.EditorContextKeys.editorTextFocus,primary:9,weight:100}})}run(r,s){var o;return ye(this,void 0,void 0,function*(){(o=g.get(s))===null||o===void 0||o.cancelSelectionAnchor()})}}(0,I.registerEditorContribution)(g.ID,g),(0,I.registerEditorAction)(t),(0,I.registerEditorAction)(i),(0,I.registerEditorAction)(n),(0,I.registerEditorAction)(l)}),define(te[661],ie([1,0,15,24,450,518]),function(j,e,y,m,D,I){"use strict";Object.defineProperty(e,"__esModule",{value:!0});class w extends y.EditorAction{constructor(g,t){super(t);this.left=g}run(g,t){if(!t.hasModel())return;const i=[],n=t.getSelections();for(const l of n)i.push(new D.MoveCaretCommand(l,this.left));t.pushUndoStop(),t.executeCommands(this.id,i),t.pushUndoStop()}}class b extends w{constructor(){super(!0,{id:"editor.action.moveCarretLeftAction",label:I.localize(0,null),alias:"Move Selected Text Left",precondition:m.EditorContextKeys.writable})}}class p extends w{constructor(){super(!1,{id:"editor.action.moveCarretRightAction",label:I.localize(1,null),alias:"Move Selected Text Right",precondition:m.EditorContextKeys.writable})}}(0,y.registerEditorAction)(b),(0,y.registerEditorAction)(p)}),define(te[662],ie([1,0,34,17,175,15,28,24,520,37,102]),function(j,e,y,m,D,I,w,b,p,h,g){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.PasteAction=e.CopyAction=e.CutAction=void 0;const t="9_cutcopypaste",i=m.isNative||document.queryCommandSupported("cut"),n=m.isNative||document.queryCommandSupported("copy"),l=typeof navigator.clipboard=="undefined"||y.isFirefox?document.queryCommandSupported("paste"):!0;function c(o){return o.register(),o}e.CutAction=i?c(new I.MultiCommand({id:"editor.action.clipboardCutAction",precondition:void 0,kbOpts:m.isNative?{primary:2048|54,win:{primary:2048|54,secondary:[1024|20]},weight:100}:void 0,menuOpts:[{menuId:h.MenuId.MenubarEditMenu,group:"2_ccp",title:p.localize(0,null),order:1},{menuId:h.MenuId.EditorContext,group:t,title:p.localize(1,null),when:b.EditorContextKeys.writable,order:1},{menuId:h.MenuId.CommandPalette,group:"",title:p.localize(2,null),order:1},{menuId:h.MenuId.SimpleEditorContext,group:t,title:p.localize(3,null),when:b.EditorContextKeys.writable,order:1}]})):void 0,e.CopyAction=n?c(new I.MultiCommand({id:"editor.action.clipboardCopyAction",precondition:void 0,kbOpts:m.isNative?{primary:2048|33,win:{primary:2048|33,secondary:[2048|19]},weight:100}:void 0,menuOpts:[{menuId:h.MenuId.MenubarEditMenu,group:"2_ccp",title:p.localize(4,null),order:2},{menuId:h.MenuId.EditorContext,group:t,title:p.localize(5,null),order:2},{menuId:h.MenuId.CommandPalette,group:"",title:p.localize(6,null),order:1},{menuId:h.MenuId.SimpleEditorContext,group:t,title:p.localize(7,null),order:2}]})):void 0,h.MenuRegistry.appendMenuItem(h.MenuId.MenubarEditMenu,{submenu:h.MenuId.MenubarCopy,title:{value:p.localize(8,null),original:"Copy As"},group:"2_ccp",order:3}),h.MenuRegistry.appendMenuItem(h.MenuId.EditorContext,{submenu:h.MenuId.EditorContextCopy,title:{value:p.localize(9,null),original:"Copy As"},group:t,order:3}),e.PasteAction=l?c(new I.MultiCommand({id:"editor.action.clipboardPasteAction",precondition:void 0,kbOpts:m.isNative?{primary:2048|52,win:{primary:2048|52,secondary:[1024|19]},linux:{primary:2048|52,secondary:[1024|19]},weight:100}:void 0,menuOpts:[{menuId:h.MenuId.MenubarEditMenu,group:"2_ccp",title:p.localize(10,null),order:4},{menuId:h.MenuId.EditorContext,group:t,title:p.localize(11,null),when:b.EditorContextKeys.writable,order:4},{menuId:h.MenuId.CommandPalette,group:"",title:p.localize(12,null),order:1},{menuId:h.MenuId.SimpleEditorContext,group:t,title:p.localize(13,null),when:b.EditorContextKeys.writable,order:4}]})):void 0;class r extends I.EditorAction{constructor(){super({id:"editor.action.clipboardCopyWithSyntaxHighlightingAction",label:p.localize(14,null),alias:"Copy With Syntax Highlighting",precondition:void 0,kbOpts:{kbExpr:b.EditorContextKeys.textInputFocus,primary:0,weight:100}})}run(a,d){!d.hasModel()||!d.getOption(32)&&d.getSelection().isEmpty()||(D.CopyOptions.forceCopyWithSyntaxHighlighting=!0,d.focus(),document.execCommand("copy"),D.CopyOptions.forceCopyWithSyntaxHighlighting=!1)}}function s(o,a){!o||(o.addImplementation(1e4,"code-editor",(d,u)=>{const f=d.get(w.ICodeEditorService).getFocusedCodeEditor();if(f&&f.hasTextFocus()){const S=f.getOption(32),v=f.getSelection();return v&&v.isEmpty()&&!S||document.execCommand(a),!0}return!1}),o.addImplementation(0,"generic-dom",(d,u)=>(document.execCommand(a),!0)))}s(e.CutAction,"cut"),s(e.CopyAction,"copy"),e.PasteAction&&(e.PasteAction.addImplementation(1e4,"code-editor",(o,a)=>{const d=o.get(w.ICodeEditorService),u=o.get(g.IClipboardService),f=d.getFocusedCodeEditor();return f&&f.hasTextFocus()?!document.execCommand("paste")&&m.isWeb?(()=>ye(void 0,void 0,void 0,function*(){const v=yield u.readText();if(v!==""){const C=D.InMemoryClipboardMetadataManager.INSTANCE.get(v);let _=!1,L=null,E=null;C&&(_=f.getOption(32)&&!!C.isFromEmptySelection,L=typeof C.multicursorText!="undefined"?C.multicursorText:null,E=C.mode),f.trigger("keyboard","paste",{text:v,pasteOnNewLine:_,multicursorText:L,mode:E})}}))():!0:!1}),e.PasteAction.addImplementation(0,"generic-dom",(o,a)=>(document.execCommand("paste"),!0))),n&&(0,I.registerEditorAction)(r)}),define(te[663],ie([1,0,55,15,3,24,32,254,599,525,37]),function(j,e,y,m,D,I,w,b,p,h,g){"use strict";Object.defineProperty(e,"__esModule",{value:!0});class t extends m.EditorAction{constructor(s,o){super(o);this._type=s}run(s,o){const a=s.get(w.ILanguageConfigurationService);if(!o.hasModel())return;const d=o.getModel(),u=[],f=d.getOptions(),S=o.getOption(19),v=o.getSelections().map((_,L)=>({selection:_,index:L,ignoreFirstLine:!1}));v.sort((_,L)=>D.Range.compareRangesUsingStarts(_.selection,L.selection));let C=v[0];for(let _=1;_<v.length;_++){const L=v[_];C.selection.endLineNumber===L.selection.startLineNumber&&(C.index<L.index?L.ignoreFirstLine=!0:(C.ignoreFirstLine=!0,C=L))}for(const _ of v)u.push(new p.LineCommentCommand(a,_.selection,f.tabSize,this._type,S.insertSpace,S.ignoreEmptyLines,_.ignoreFirstLine));o.pushUndoStop(),o.executeCommands(this.id,u),o.pushUndoStop()}}class i extends t{constructor(){super(0,{id:"editor.action.commentLine",label:h.localize(0,null),alias:"Toggle Line Comment",precondition:I.EditorContextKeys.writable,kbOpts:{kbExpr:I.EditorContextKeys.editorTextFocus,primary:2048|85,weight:100},menuOpts:{menuId:g.MenuId.MenubarEditMenu,group:"5_insert",title:h.localize(1,null),order:1}})}}class n extends t{constructor(){super(1,{id:"editor.action.addCommentLine",label:h.localize(2,null),alias:"Add Line Comment",precondition:I.EditorContextKeys.writable,kbOpts:{kbExpr:I.EditorContextKeys.editorTextFocus,primary:(0,y.KeyChord)(2048|41,2048|33),weight:100}})}}class l extends t{constructor(){super(2,{id:"editor.action.removeCommentLine",label:h.localize(3,null),alias:"Remove Line Comment",precondition:I.EditorContextKeys.writable,kbOpts:{kbExpr:I.EditorContextKeys.editorTextFocus,primary:(0,y.KeyChord)(2048|41,2048|51),weight:100}})}}class c extends m.EditorAction{constructor(){super({id:"editor.action.blockComment",label:h.localize(4,null),alias:"Toggle Block Comment",precondition:I.EditorContextKeys.writable,kbOpts:{kbExpr:I.EditorContextKeys.editorTextFocus,primary:1024|512|31,linux:{primary:2048|1024|31},weight:100},menuOpts:{menuId:g.MenuId.MenubarEditMenu,group:"5_insert",title:h.localize(5,null),order:2}})}run(s,o){const a=s.get(w.ILanguageConfigurationService);if(!o.hasModel())return;const d=o.getOption(19),u=[],f=o.getSelections();for(const S of f)u.push(new b.BlockCommentCommand(S,d.insertSpace,a));o.pushUndoStop(),o.executeCommands(this.id,u),o.pushUndoStop()}}(0,m.registerEditorAction)(i),(0,m.registerEditorAction)(n),(0,m.registerEditorAction)(l),(0,m.registerEditorAction)(c)}),define(te[664],ie([1,0,7,125,44,2,17,15,24,526,37,16,76,42]),function(j,e,y,m,D,I,w,b,p,h,g,t,i,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ContextMenuController=void 0;let l=class Ii{constructor(s,o,a,d,u,f){this._contextMenuService=o,this._contextViewService=a,this._contextKeyService=d,this._keybindingService=u,this._menuService=f,this._toDispose=new I.DisposableStore,this._contextMenuIsBeingShownCount=0,this._editor=s,this._toDispose.add(this._editor.onContextMenu(S=>this._onContextMenu(S))),this._toDispose.add(this._editor.onMouseWheel(S=>{if(this._contextMenuIsBeingShownCount>0){const v=this._contextViewService.getContextViewElement(),C=S.srcElement;C.shadowRoot&&y.getShadowRoot(v)===C.shadowRoot||this._contextViewService.hideContextView()}})),this._toDispose.add(this._editor.onKeyDown(S=>{S.keyCode===58&&(S.preventDefault(),S.stopPropagation(),this.showContextMenu())}))}static get(s){return s.getContribution(Ii.ID)}_onContextMenu(s){if(!this._editor.hasModel())return;if(!this._editor.getOption(20)){this._editor.focus(),s.target.position&&!this._editor.getSelection().containsPosition(s.target.position)&&this._editor.setPosition(s.target.position);return}if(s.target.type===12||s.target.type===6&&s.target.detail.injectedText||(s.event.preventDefault(),s.event.stopPropagation(),s.target.type!==6&&s.target.type!==7&&s.target.type!==1))return;if(this._editor.focus(),s.target.position){let a=!1;for(const d of this._editor.getSelections())if(d.containsPosition(s.target.position)){a=!0;break}a||this._editor.setPosition(s.target.position)}let o=null;s.target.type!==1&&(o={x:s.event.posx-1,width:2,y:s.event.posy-1,height:2}),this.showContextMenu(o)}showContextMenu(s){if(!this._editor.getOption(20)||!this._editor.hasModel())return;if(!this._contextMenuService){this._editor.focus();return}const o=this._getMenuActions(this._editor.getModel(),this._editor.isSimpleWidget?g.MenuId.SimpleEditorContext:g.MenuId.EditorContext);o.length>0&&this._doShowContextMenu(o,s)}_getMenuActions(s,o){const a=[],d=this._menuService.createMenu(o,this._contextKeyService),u=d.getActions({arg:s.uri});d.dispose();for(let f of u){const[,S]=f;let v=0;for(const C of S)if(C instanceof g.SubmenuItemAction){const _=this._getMenuActions(s,C.item.submenu);_.length>0&&(a.push(new D.SubmenuAction(C.id,C.label,_)),v++)}else a.push(C),v++;v&&a.push(new D.Separator)}return a.length&&a.pop(),a}_doShowContextMenu(s,o=null){if(!this._editor.hasModel())return;const a=this._editor.getOption(53);if(this._editor.updateOptions({hover:{enabled:!1}}),!o){this._editor.revealPosition(this._editor.getPosition(),1),this._editor.render();const u=this._editor.getScrolledVisiblePosition(this._editor.getPosition()),f=y.getDomNodePagePosition(this._editor.getDomNode()),S=f.left+u.left,v=f.top+u.top+u.height;o={x:S,y:v}}const d=this._editor.getOption(115)&&!w.isIOS;this._contextMenuIsBeingShownCount++,this._contextMenuService.showContextMenu({domForShadowRoot:d?this._editor.getDomNode():void 0,getAnchor:()=>o,getActions:()=>s,getActionViewItem:u=>{const f=this._keybindingFor(u);if(f)return new m.ActionViewItem(u,u,{label:!0,keybinding:f.getLabel(),isMenu:!0});const S=u;return typeof S.getActionViewItem=="function"?S.getActionViewItem():new m.ActionViewItem(u,u,{icon:!0,label:!0,isMenu:!0})},getKeyBinding:u=>this._keybindingFor(u),onHide:u=>{this._contextMenuIsBeingShownCount--,this._editor.focus(),this._editor.updateOptions({hover:a})}})}_keybindingFor(s){return this._keybindingService.lookupKeybinding(s.id)}dispose(){this._contextMenuIsBeingShownCount>0&&this._contextViewService.hideContextView(),this._toDispose.dispose()}};l.ID="editor.contrib.contextmenu",l=Ie([Ce(1,i.IContextMenuService),Ce(2,i.IContextViewService),Ce(3,t.IContextKeyService),Ce(4,n.IKeybindingService),Ce(5,g.IMenuService)],l),e.ContextMenuController=l;class c extends b.EditorAction{constructor(){super({id:"editor.action.showContextMenu",label:h.localize(0,null),alias:"Show Editor Context Menu",precondition:void 0,kbOpts:{kbExpr:p.EditorContextKeys.textInputFocus,primary:1024|68,weight:100}})}run(s,o){var a;(a=l.get(o))===null||a===void 0||a.showContextMenu()}}(0,b.registerEditorContribution)(l.ID,l),(0,b.registerEditorAction)(c)}),define(te[665],ie([1,0,2,15,24,527]),function(j,e,y,m,D,I){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CursorRedo=e.CursorUndo=e.CursorUndoRedoController=void 0;class w{constructor(i){this.selections=i}equals(i){const n=this.selections.length,l=i.selections.length;if(n!==l)return!1;for(let c=0;c<n;c++)if(!this.selections[c].equalsSelection(i.selections[c]))return!1;return!0}}class b{constructor(i,n,l){this.cursorState=i,this.scrollTop=n,this.scrollLeft=l}}class p extends y.Disposable{constructor(i){super();this._editor=i,this._isCursorUndoRedo=!1,this._undoStack=[],this._redoStack=[],this._register(i.onDidChangeModel(n=>{this._undoStack=[],this._redoStack=[]})),this._register(i.onDidChangeModelContent(n=>{this._undoStack=[],this._redoStack=[]})),this._register(i.onDidChangeCursorSelection(n=>{if(this._isCursorUndoRedo||!n.oldSelections||n.oldModelVersionId!==n.modelVersionId)return;const l=new w(n.oldSelections);this._undoStack.length>0&&this._undoStack[this._undoStack.length-1].cursorState.equals(l)||(this._undoStack.push(new b(l,i.getScrollTop(),i.getScrollLeft())),this._redoStack=[],this._undoStack.length>50&&this._undoStack.shift())}))}static get(i){return i.getContribution(p.ID)}cursorUndo(){!this._editor.hasModel()||this._undoStack.length===0||(this._redoStack.push(new b(new w(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 b(new w(this._editor.getSelections()),this._editor.getScrollTop(),this._editor.getScrollLeft())),this._applyState(this._redoStack.pop()))}_applyState(i){this._isCursorUndoRedo=!0,this._editor.setSelections(i.cursorState.selections),this._editor.setScrollPosition({scrollTop:i.scrollTop,scrollLeft:i.scrollLeft}),this._isCursorUndoRedo=!1}}e.CursorUndoRedoController=p,p.ID="editor.contrib.cursorUndoRedoController";class h extends m.EditorAction{constructor(){super({id:"cursorUndo",label:I.localize(0,null),alias:"Cursor Undo",precondition:void 0,kbOpts:{kbExpr:D.EditorContextKeys.textInputFocus,primary:2048|51,weight:100}})}run(i,n,l){var c;(c=p.get(n))===null||c===void 0||c.cursorUndo()}}e.CursorUndo=h;class g extends m.EditorAction{constructor(){super({id:"cursorRedo",label:I.localize(1,null),alias:"Cursor Redo",precondition:void 0})}run(i,n,l){var c;(c=p.get(n))===null||c===void 0||c.cursorRedo()}}e.CursorRedo=g,(0,m.registerEditorContribution)(p.ID,p),(0,m.registerEditorAction)(h),(0,m.registerEditorAction)(g)}),define(te[666],ie([1,0,15,16,21,81,9,53,528]),function(j,e,y,m,D,I,w,b,p){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.EditorKeybindingCancellationTokenSource=void 0;const h=(0,w.createDecorator)("IEditorCancelService"),g=new m.RawContextKey("cancellableOperation",!1,(0,p.localize)(0,null));(0,b.registerSingleton)(h,class{constructor(){this._tokens=new WeakMap}add(i,n){let l=this._tokens.get(i);l||(l=i.invokeWithinContext(r=>{const s=g.bindTo(r.get(m.IContextKeyService)),o=new I.LinkedList;return{key:s,tokens:o}}),this._tokens.set(i,l));let c;return l.key.set(!0),c=l.tokens.push(n),()=>{c&&(c(),l.key.set(!l.tokens.isEmpty()),c=void 0)}}cancel(i){const n=this._tokens.get(i);if(!n)return;const l=n.tokens.pop();l&&(l.cancel(),n.key.set(!n.tokens.isEmpty()))}},!0);class t extends D.CancellationTokenSource{constructor(n,l){super(l);this.editor=n,this._unregister=n.invokeWithinContext(c=>c.get(h).add(n,this))}dispose(){this._unregister(),super.dispose()}}e.EditorKeybindingCancellationTokenSource=t,(0,y.registerEditorCommand)(new class extends y.EditorCommand{constructor(){super({id:"editor.cancelOperation",kbOpts:{weight:100,primary:9},precondition:g})}runEditorCommand(i,n){i.get(h).cancel(n)}})}),define(te[106],ie([1,0,8,3,21,2,666]),function(j,e,y,m,D,I,w){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TextModelCancellationTokenSource=e.EditorStateCancellationTokenSource=e.EditorState=void 0;class b{constructor(t,i){if(this.flags=i,(this.flags&1)!=0){const n=t.getModel();this.modelVersionId=n?y.format("{0}#{1}",n.uri.toString(),n.getVersionId()):null}else this.modelVersionId=null;(this.flags&4)!=0?this.position=t.getPosition():this.position=null,(this.flags&2)!=0?this.selection=t.getSelection():this.selection=null,(this.flags&8)!=0?(this.scrollLeft=t.getScrollLeft(),this.scrollTop=t.getScrollTop()):(this.scrollLeft=-1,this.scrollTop=-1)}_equals(t){if(!(t instanceof b))return!1;const i=t;return!(this.modelVersionId!==i.modelVersionId||this.scrollLeft!==i.scrollLeft||this.scrollTop!==i.scrollTop||!this.position&&i.position||this.position&&!i.position||this.position&&i.position&&!this.position.equals(i.position)||!this.selection&&i.selection||this.selection&&!i.selection||this.selection&&i.selection&&!this.selection.equalsRange(i.selection))}validate(t){return this._equals(new b(t,this.flags))}}e.EditorState=b;class p extends w.EditorKeybindingCancellationTokenSource{constructor(t,i,n,l){super(t,l);this._listener=new I.DisposableStore,i&4&&this._listener.add(t.onDidChangeCursorPosition(c=>{(!n||!m.Range.containsPosition(n,c.position))&&this.cancel()})),i&2&&this._listener.add(t.onDidChangeCursorSelection(c=>{(!n||!m.Range.containsRange(n,c.selection))&&this.cancel()})),i&8&&this._listener.add(t.onDidScrollChange(c=>this.cancel())),i&1&&(this._listener.add(t.onDidChangeModel(c=>this.cancel())),this._listener.add(t.onDidChangeModelContent(c=>this.cancel())))}dispose(){this._listener.dispose(),super.dispose()}}e.EditorStateCancellationTokenSource=p;class h extends D.CancellationTokenSource{constructor(t,i){super(i);this._listener=t.onDidChangeContent(()=>this.cancel())}dispose(){this._listener.dispose(),super.dispose()}}e.TextModelCancellationTokenSource=h}),define(te[155],ie([1,0,19,21,13,2,25,106,3,22,18,45,26,71,152]),function(j,e,y,m,D,I,w,b,p,h,g,t,i,n,l){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getCodeActions=e.CodeActionItem=e.fixAllCommandId=e.organizeImportsCommandId=e.sourceActionCommandId=e.refactorCommandId=e.codeActionCommandId=void 0,e.codeActionCommandId="editor.action.codeAction",e.refactorCommandId="editor.action.refactor",e.sourceActionCommandId="editor.action.sourceAction",e.organizeImportsCommandId="editor.action.organizeImports",e.fixAllCommandId="editor.action.fixAll";class c{constructor(f,S){this.action=f,this.provider=S}resolve(f){var S;return ye(this,void 0,void 0,function*(){if(((S=this.provider)===null||S===void 0?void 0:S.resolveCodeAction)&&!this.action.edit){let v;try{v=yield this.provider.resolveCodeAction(this.action,f)}catch(C){(0,D.onUnexpectedExternalError)(C)}v&&(this.action.edit=v.edit)}return this})}}e.CodeActionItem=c;class r extends I.Disposable{constructor(f,S,v){super();this.documentation=S,this._register(v),this.allActions=[...f].sort(r.codeActionsComparator),this.validActions=this.allActions.filter(({action:C})=>!C.disabled)}static codeActionsComparator({action:f},{action:S}){return f.isPreferred&&!S.isPreferred?-1:!f.isPreferred&&S.isPreferred?1:(0,y.isNonEmptyArray)(f.diagnostics)?(0,y.isNonEmptyArray)(S.diagnostics)?f.diagnostics[0].message.localeCompare(S.diagnostics[0].message):-1:(0,y.isNonEmptyArray)(S.diagnostics)?1:0}get hasAutoFix(){return this.validActions.some(({action:f})=>!!f.kind&&l.CodeActionKind.QuickFix.contains(new l.CodeActionKind(f.kind))&&!!f.isPreferred)}}const s={actions:[],documentation:void 0};function o(u,f,S,v,C){var _;const L=S.filter||{},E={only:(_=L.include)===null||_===void 0?void 0:_.value,trigger:S.type},N=new b.TextModelCancellationTokenSource(u,C),k=a(u,L),M=new I.DisposableStore,O=k.map(T=>ye(this,void 0,void 0,function*(){try{v.report(T);const R=yield T.provideCodeActions(u,f,E,N.token);if(R&&M.add(R),N.token.isCancellationRequested)return s;const P=((R==null?void 0:R.actions)||[]).filter(W=>W&&(0,l.filtersAction)(L,W)),F=d(T,P,L.include);return{actions:P.map(W=>new c(W,T)),documentation:F}}catch(R){if((0,D.isCancellationError)(R))throw R;return(0,D.onUnexpectedExternalError)(R),s}})),B=g.CodeActionProviderRegistry.onDidChange(()=>{const T=g.CodeActionProviderRegistry.all(u);(0,y.equals)(T,k)||N.cancel()});return Promise.all(O).then(T=>{const R=(0,y.flatten)(T.map(F=>F.actions)),P=(0,y.coalesce)(T.map(F=>F.documentation));return new r(R,P,M)}).finally(()=>{B.dispose(),N.dispose()})}e.getCodeActions=o;function a(u,f){return g.CodeActionProviderRegistry.all(u).filter(S=>S.providedCodeActionKinds?S.providedCodeActionKinds.some(v=>(0,l.mayIncludeActionsOfKind)(f,new l.CodeActionKind(v))):!0)}function d(u,f,S){if(!u.documentation)return;const v=u.documentation.map(C=>({kind:new l.CodeActionKind(C.kind),command:C.command}));if(S){let C;for(const _ of v)_.kind.contains(S)&&(C?C.kind.contains(_.kind)&&(C=_):C=_);if(C)return C==null?void 0:C.command}for(const C of f)if(!!C.kind){for(const _ of v)if(_.kind.contains(new l.CodeActionKind(C.kind)))return _.command}}i.CommandsRegistry.registerCommand("_executeCodeActionProvider",function(u,f,S,v,C){return ye(this,void 0,void 0,function*(){if(!(f instanceof w.URI))throw(0,D.illegalArgument)();const _=u.get(t.IModelService).getModel(f);if(!_)throw(0,D.illegalArgument)();const L=h.Selection.isISelection(S)?h.Selection.liftSelection(S):p.Range.isIRange(S)?_.validateRange(S):void 0;if(!L)throw(0,D.illegalArgument)();const E=typeof v=="string"?new l.CodeActionKind(v):void 0,N=yield o(_,L,{type:1,filter:{includeSourceActions:!0,include:E}},n.Progress.None,m.CancellationToken.None),k=[],M=Math.min(N.validActions.length,typeof C=="number"?C:0);for(let O=0;O<M;O++)k.push(N.validActions[O].resolve(m.CancellationToken.None));try{return yield Promise.all(k),N.validActions.map(O=>O.action)}finally{setTimeout(()=>N.dispose(),100)}})})}),define(te[667],ie([1,0,7,44,13,134,2,11,18,155,152,76,42]),function(j,e,y,m,D,I,w,b,p,h,g,t,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CodeActionKeybindingResolver=e.CodeActionMenu=void 0;class n extends m.Action{constructor(o,a){super(o.command?o.command.id:o.title,l(o.title),void 0,!o.disabled,a);this.action=o}}function l(s){return s.replace(/\r\n|\r|\n/g," ")}let c=class extends w.Disposable{constructor(o,a,d,u){super();this._editor=o,this._delegate=a,this._contextMenuService=d,this._visible=!1,this._showingActions=this._register(new w.MutableDisposable),this._keybindingResolver=new r({getKeybindings:()=>u.getKeybindings()})}get isVisible(){return this._visible}show(o,a,d,u){return ye(this,void 0,void 0,function*(){const f=u.includeDisabledActions?a.allActions:a.validActions;if(!f.length){this._visible=!1;return}if(!this._editor.getDomNode())throw this._visible=!1,(0,D.canceled)();this._visible=!0,this._showingActions.value=a;const S=this.getMenuActions(o,f,a.documentation),v=b.Position.isIPosition(d)?this._toCoords(d):d||{x:0,y:0},C=this._keybindingResolver.getResolver(),_=this._editor.getOption(115);this._contextMenuService.showContextMenu({domForShadowRoot:_?this._editor.getDomNode():void 0,getAnchor:()=>v,getActions:()=>S,onHide:()=>{this._visible=!1,this._editor.focus()},autoSelectFirstItem:!0,getKeyBinding:L=>L instanceof n?C(L.action):void 0})})}getMenuActions(o,a,d){var u,f;const S=L=>new n(L.action,()=>this._delegate.onSelectCodeAction(L)),v=a.map(S),C=[...d],_=this._editor.getModel();if(_&&v.length)for(const L of p.CodeActionProviderRegistry.all(_))L._getAdditionalMenuItems&&C.push(...L._getAdditionalMenuItems({trigger:o.type,only:(f=(u=o.filter)===null||u===void 0?void 0:u.include)===null||f===void 0?void 0:f.value},a.map(E=>E.action)));return C.length&&v.push(new m.Separator,...C.map(L=>S(new h.CodeActionItem({title:L.title,command:L},void 0)))),v}_toCoords(o){if(!this._editor.hasModel())return{x:0,y:0};this._editor.revealPosition(o,1),this._editor.render();const a=this._editor.getScrolledVisiblePosition(o),d=(0,y.getDomNodePagePosition)(this._editor.getDomNode()),u=d.left+a.left,f=d.top+a.top+a.height;return{x:u,y:f}}};c=Ie([Ce(2,t.IContextMenuService),Ce(3,i.IKeybindingService)],c),e.CodeActionMenu=c;class r{constructor(o){this._keybindingProvider=o}getResolver(){const o=new I.Lazy(()=>this._keybindingProvider.getKeybindings().filter(a=>r.codeActionCommands.indexOf(a.command)>=0).filter(a=>a.resolvedKeybinding).map(a=>{let d=a.commandArgs;return a.command===h.organizeImportsCommandId?d={kind:g.CodeActionKind.SourceOrganizeImports.value}:a.command===h.fixAllCommandId&&(d={kind:g.CodeActionKind.SourceFixAll.value}),Object.assign({resolvedKeybinding:a.resolvedKeybinding},g.CodeActionCommandArgs.fromUser(d,{kind:g.CodeActionKind.None,apply:"never"}))}));return a=>{if(a.kind){const d=this.bestKeybindingForCodeAction(a,o.getValue());return d==null?void 0:d.resolvedKeybinding}}}bestKeybindingForCodeAction(o,a){if(!o.kind)return;const d=new g.CodeActionKind(o.kind);return a.filter(u=>u.kind.contains(d)).filter(u=>u.preferred?o.isPreferred:!0).reduceRight((u,f)=>u?u.kind.contains(f.kind)?f:u:f,void 0)}}e.CodeActionKeybindingResolver=r,r.codeActionCommands=[h.refactorCommandId,h.codeActionCommandId,h.sourceActionCommandId,h.organizeImportsCommandId,h.fixAllCommandId]});var kt=this&&this.__classPrivateFieldGet||function(j,e,y,m){if(y==="a"&&!m)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?j!==e||!m:!e.has(j))throw new TypeError("Cannot read private member from an object whose class did not declare it");return y==="m"?m:y==="a"?m.call(j):m?m.value:e.get(j)},Yt=this&&this.__classPrivateFieldSet||function(j,e,y,m,D){if(m==="m")throw new TypeError("Private method is not writable");if(m==="a"&&!D)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?j!==e||!D:!e.has(j))throw new TypeError("Cannot write private member to an object whose class did not declare it");return m==="a"?D.call(j,y):D?D.value=y:e.set(j,y),y};define(te[668],ie([1,0,10,13,4,2,41,3,18,16,71,155]),function(j,e,y,m,D,I,w,b,p,h,g,t){"use strict";var i;Object.defineProperty(e,"__esModule",{value:!0}),e.CodeActionModel=e.CodeActionsState=e.SUPPORTED_CODE_ACTIONS=void 0,e.SUPPORTED_CODE_ACTIONS=new h.RawContextKey("supportedCodeAction","");class n extends I.Disposable{constructor(o,a,d,u=250){super();this._editor=o,this._markerService=a,this._signalChange=d,this._delay=u,this._autoTriggerTimer=this._register(new y.TimeoutTimer),this._register(this._markerService.onMarkerChanged(f=>this._onMarkerChanges(f))),this._register(this._editor.onDidChangeCursorPosition(()=>this._onCursorChange()))}trigger(o){const a=this._getRangeOfSelectionUnlessWhitespaceEnclosed(o);return this._createEventAndSignalChange(o,a)}_onMarkerChanges(o){const a=this._editor.getModel();!a||o.some(d=>(0,w.isEqual)(d,a.uri))&&this._autoTriggerTimer.cancelAndSet(()=>{this.trigger({type:2})},this._delay)}_onCursorChange(){this._autoTriggerTimer.cancelAndSet(()=>{this.trigger({type:2})},this._delay)}_getRangeOfMarker(o){const a=this._editor.getModel();if(!!a)for(const d of this._markerService.read({resource:a.uri})){const u=a.validateRange(d);if(b.Range.intersectRanges(u,o))return b.Range.lift(u)}}_getRangeOfSelectionUnlessWhitespaceEnclosed(o){if(!this._editor.hasModel())return;const a=this._editor.getModel(),d=this._editor.getSelection();if(d.isEmpty()&&o.type===2){const{lineNumber:u,column:f}=d.getPosition(),S=a.getLineContent(u);if(S.length===0)return;if(f===1){if(/\s/.test(S[0]))return}else if(f===a.getLineMaxColumn(u)){if(/\s/.test(S[S.length-1]))return}else if(/\s/.test(S[f-2])&&/\s/.test(S[f-1]))return}return d}_createEventAndSignalChange(o,a){const d=this._editor.getModel();if(!a||!d){this._signalChange(void 0);return}const u=this._getRangeOfMarker(a),f=u?u.getStartPosition():a.getStartPosition(),S={trigger:o,selection:a,position:f};return this._signalChange(S),S}}var l;(function(s){s.Empty={type:0};class o{constructor(d,u,f,S){this.trigger=d,this.rangeOrSelection=u,this.position=f,this._cancellablePromise=S,this.type=1,this.actions=S.catch(v=>{if((0,m.isCancellationError)(v))return c;throw v})}cancel(){this._cancellablePromise.cancel()}}s.Triggered=o})(l=e.CodeActionsState||(e.CodeActionsState={}));const c={allActions:[],validActions:[],dispose:()=>{},documentation:[],hasAutoFix:!1};class r extends I.Disposable{constructor(o,a,d,u){super();this._editor=o,this._markerService=a,this._progressService=u,this._codeActionOracle=this._register(new I.MutableDisposable),this._state=l.Empty,this._onDidChangeState=this._register(new D.Emitter),this.onDidChangeState=this._onDidChangeState.event,i.set(this,!1),this._supportedCodeActions=e.SUPPORTED_CODE_ACTIONS.bindTo(d),this._register(this._editor.onDidChangeModel(()=>this._update())),this._register(this._editor.onDidChangeModelLanguage(()=>this._update())),this._register(p.CodeActionProviderRegistry.onDidChange(()=>this._update())),this._update()}dispose(){kt(this,i,"f")||(Yt(this,i,!0,"f"),super.dispose(),this.setState(l.Empty,!0))}_update(){if(kt(this,i,"f"))return;this._codeActionOracle.value=void 0,this.setState(l.Empty);const o=this._editor.getModel();if(o&&p.CodeActionProviderRegistry.has(o)&&!this._editor.getOption(81)){const a=[];for(const d of p.CodeActionProviderRegistry.all(o))Array.isArray(d.providedCodeActionKinds)&&a.push(...d.providedCodeActionKinds);this._supportedCodeActions.set(a.join(" ")),this._codeActionOracle.value=new n(this._editor,this._markerService,d=>{var u;if(!d){this.setState(l.Empty);return}const f=(0,y.createCancelablePromise)(S=>(0,t.getCodeActions)(o,d.selection,d.trigger,g.Progress.None,S));d.trigger.type===1&&((u=this._progressService)===null||u===void 0||u.showWhile(f,250)),this.setState(new l.Triggered(d.trigger,d.selection,d.position,f))},void 0),this._codeActionOracle.value.trigger({type:2})}else this._supportedCodeActions.reset()}trigger(o){this._codeActionOracle.value&&this._codeActionOracle.value.trigger(o)}setState(o,a){o!==this._state&&(this._state.type===1&&this._state.cancel(),this._state=o,!a&&!kt(this,i,"f")&&this._onDidChangeState.fire(o))}}e.CodeActionModel=r,i=new WeakMap}),define(te[669],ie([1,0,15,144,533]),function(j,e,y,m,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0});class I extends y.EditorAction{constructor(){super({id:"editor.action.fontZoomIn",label:D.localize(0,null),alias:"Editor Font Zoom In",precondition:void 0})}run(h,g){m.EditorZoom.setZoomLevel(m.EditorZoom.getZoomLevel()+1)}}class w extends y.EditorAction{constructor(){super({id:"editor.action.fontZoomOut",label:D.localize(1,null),alias:"Editor Font Zoom Out",precondition:void 0})}run(h,g){m.EditorZoom.setZoomLevel(m.EditorZoom.getZoomLevel()-1)}}class b extends y.EditorAction{constructor(){super({id:"editor.action.fontZoomReset",label:D.localize(2,null),alias:"Editor Font Zoom Reset",precondition:void 0})}run(h,g){m.EditorZoom.setZoomLevel(0)}}(0,y.registerEditorAction)(I),(0,y.registerEditorAction)(w),(0,y.registerEditorAction)(b)}),define(te[285],ie([1,0,43,19,21,13,54,81,20,25,106,148,11,3,22,18,85,58,256,534,26,595,9]),function(j,e,y,m,D,I,w,b,p,h,g,t,i,n,l,c,r,s,o,a,d,u,f){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getOnTypeFormattingEdits=e.getDocumentFormattingEditsUntilResult=e.getDocumentRangeFormattingEditsUntilResult=e.formatDocumentWithProvider=e.formatDocumentWithSelectedProvider=e.formatDocumentRangesWithProvider=e.formatDocumentRangesWithSelectedProvider=e.FormattingConflicts=e.getRealAndSyntheticDocumentFormattersOrdered=e.alertFormattingEdits=void 0;function S(B){if(B=B.filter(F=>F.range),!B.length)return;let{range:T}=B[0];for(let F=1;F<B.length;F++)T=n.Range.plusRange(T,B[F].range);const{startLineNumber:R,endLineNumber:P}=T;R===P?B.length===1?(0,y.alert)(a.localize(0,null,R)):(0,y.alert)(a.localize(1,null,B.length,R)):B.length===1?(0,y.alert)(a.localize(2,null,R,P)):(0,y.alert)(a.localize(3,null,B.length,R,P))}e.alertFormattingEdits=S;function v(B){const T=[],R=new Set,P=c.DocumentFormattingEditProviderRegistry.ordered(B);for(const W of P)T.push(W),W.extensionId&&R.add(u.ExtensionIdentifier.toKey(W.extensionId));const F=c.DocumentRangeFormattingEditProviderRegistry.ordered(B);for(const W of F){if(W.extensionId){if(R.has(u.ExtensionIdentifier.toKey(W.extensionId)))continue;R.add(u.ExtensionIdentifier.toKey(W.extensionId))}T.push({displayName:W.displayName,extensionId:W.extensionId,provideDocumentFormattingEdits(A,H,q){return W.provideDocumentRangeFormattingEdits(A,A.getFullModelRange(),H,q)}})}return T}e.getRealAndSyntheticDocumentFormattersOrdered=v;class C{static setFormatterSelector(T){return{dispose:C._selectors.unshift(T)}}static select(T,R,P){return ye(this,void 0,void 0,function*(){if(T.length===0)return;const F=w.Iterable.first(C._selectors);if(F)return yield F(T,R,P)})}}e.FormattingConflicts=C,C._selectors=new b.LinkedList;function _(B,T,R,P,F,W){return ye(this,void 0,void 0,function*(){const A=B.get(f.IInstantiationService),H=(0,t.isCodeEditor)(T)?T.getModel():T,q=c.DocumentRangeFormattingEditProviderRegistry.ordered(H),X=yield C.select(q,H,P);X&&(F.report(X),yield A.invokeFunction(L,X,T,R,W))})}e.formatDocumentRangesWithSelectedProvider=_;function L(B,T,R,P,F){return ye(this,void 0,void 0,function*(){const W=B.get(r.IEditorWorkerService);let A,H;(0,t.isCodeEditor)(R)?(A=R.getModel(),H=new g.EditorStateCancellationTokenSource(R,1|4,void 0,F)):(A=R,H=new g.TextModelCancellationTokenSource(R,F));let q=[],X=0;for(let Z of(0,m.asArray)(P).sort(n.Range.compareRangesUsingStarts))X>0&&n.Range.areIntersectingOrTouching(q[X-1],Z)?q[X-1]=n.Range.fromPositions(q[X-1].getStartPosition(),Z.getEndPosition()):X=q.push(Z);const G=Z=>ye(this,void 0,void 0,function*(){return(yield T.provideDocumentRangeFormattingEdits(A,Z,A.getFormattingOptions(),H.token))||[]}),re=(Z,x)=>{if(!Z.length||!x.length)return!1;const U=Z.reduce((Q,ne)=>n.Range.plusRange(Q,ne.range),Z[0].range);if(!x.some(Q=>n.Range.intersectRanges(U,Q.range)))return!1;for(let Q of Z)for(let ne of x)if(n.Range.intersectRanges(Q.range,ne.range))return!0;return!1},ae=[],oe=[];try{for(let Z of q){if(H.token.isCancellationRequested)return!0;oe.push(yield G(Z))}for(let Z=0;Z<q.length;++Z)for(let x=Z+1;x<q.length;++x){if(H.token.isCancellationRequested)return!0;if(re(oe[Z],oe[x])){const U=n.Range.plusRange(q[Z],q[x]),Q=yield G(U);q.splice(x,1),q.splice(Z,1),q.push(U),oe.splice(x,1),oe.splice(Z,1),oe.push(Q),Z=0,x=0}}for(let Z of oe){if(H.token.isCancellationRequested)return!0;const x=yield W.computeMoreMinimalEdits(A.uri,Z);x&&ae.push(...x)}}finally{H.dispose()}if(ae.length===0)return!1;if((0,t.isCodeEditor)(R))o.FormattingEdit.execute(R,ae,!0),S(ae),R.revealPositionInCenterIfOutsideViewport(R.getPosition(),1);else{const[{range:Z}]=ae,x=new l.Selection(Z.startLineNumber,Z.startColumn,Z.endLineNumber,Z.endColumn);A.pushEditOperations([x],ae.map(U=>({text:U.text,range:n.Range.lift(U.range),forceMoveMarkers:!0})),U=>{for(const{range:Q}of U)if(n.Range.areIntersectingOrTouching(Q,x))return[new l.Selection(Q.startLineNumber,Q.startColumn,Q.endLineNumber,Q.endColumn)];return null})}return!0})}e.formatDocumentRangesWithProvider=L;function E(B,T,R,P,F){return ye(this,void 0,void 0,function*(){const W=B.get(f.IInstantiationService),A=(0,t.isCodeEditor)(T)?T.getModel():T,H=v(A),q=yield C.select(H,A,R);q&&(P.report(q),yield W.invokeFunction(N,q,T,R,F))})}e.formatDocumentWithSelectedProvider=E;function N(B,T,R,P,F){return ye(this,void 0,void 0,function*(){const W=B.get(r.IEditorWorkerService);let A,H;(0,t.isCodeEditor)(R)?(A=R.getModel(),H=new g.EditorStateCancellationTokenSource(R,1|4,void 0,F)):(A=R,H=new g.TextModelCancellationTokenSource(R,F));let q;try{const X=yield T.provideDocumentFormattingEdits(A,A.getFormattingOptions(),H.token);if(q=yield W.computeMoreMinimalEdits(A.uri,X),H.token.isCancellationRequested)return!0}finally{H.dispose()}if(!q||q.length===0)return!1;if((0,t.isCodeEditor)(R))o.FormattingEdit.execute(R,q,P!==2),P!==2&&(S(q),R.revealPositionInCenterIfOutsideViewport(R.getPosition(),1));else{const[{range:X}]=q,G=new l.Selection(X.startLineNumber,X.startColumn,X.endLineNumber,X.endColumn);A.pushEditOperations([G],q.map(re=>({text:re.text,range:n.Range.lift(re.range),forceMoveMarkers:!0})),re=>{for(const{range:ae}of re)if(n.Range.areIntersectingOrTouching(ae,G))return[new l.Selection(ae.startLineNumber,ae.startColumn,ae.endLineNumber,ae.endColumn)];return null})}return!0})}e.formatDocumentWithProvider=N;function k(B,T,R,P,F){return ye(this,void 0,void 0,function*(){const W=c.DocumentRangeFormattingEditProviderRegistry.ordered(T);for(const A of W){let H=yield Promise.resolve(A.provideDocumentRangeFormattingEdits(T,R,P,F)).catch(I.onUnexpectedExternalError);if((0,m.isNonEmptyArray)(H))return yield B.computeMoreMinimalEdits(T.uri,H)}})}e.getDocumentRangeFormattingEditsUntilResult=k;function M(B,T,R,P){return ye(this,void 0,void 0,function*(){const F=v(T);for(const W of F){let A=yield Promise.resolve(W.provideDocumentFormattingEdits(T,R,P)).catch(I.onUnexpectedExternalError);if((0,m.isNonEmptyArray)(A))return yield B.computeMoreMinimalEdits(T.uri,A)}})}e.getDocumentFormattingEditsUntilResult=M;function O(B,T,R,P,F,W){const A=c.OnTypeFormattingEditProviderRegistry.ordered(T);return A.length===0||A[0].autoFormatTriggerCharacters.indexOf(P)<0?Promise.resolve(void 0):Promise.resolve(A[0].provideOnTypeFormattingEdits(T,R,P,F,W)).catch(I.onUnexpectedExternalError).then(H=>B.computeMoreMinimalEdits(T.uri,H))}e.getOnTypeFormattingEdits=O,d.CommandsRegistry.registerCommand("_executeFormatRangeProvider",function(B,...T){return ye(this,void 0,void 0,function*(){const[R,P,F]=T;(0,p.assertType)(h.URI.isUri(R)),(0,p.assertType)(n.Range.isIRange(P));const W=B.get(s.ITextModelService),A=B.get(r.IEditorWorkerService),H=yield W.createModelReference(R);try{return k(A,H.object.textEditorModel,n.Range.lift(P),F,D.CancellationToken.None)}finally{H.dispose()}})}),d.CommandsRegistry.registerCommand("_executeFormatDocumentProvider",function(B,...T){return ye(this,void 0,void 0,function*(){const[R,P]=T;(0,p.assertType)(h.URI.isUri(R));const F=B.get(s.ITextModelService),W=B.get(r.IEditorWorkerService),A=yield F.createModelReference(R);try{return M(W,A.object.textEditorModel,P,D.CancellationToken.None)}finally{A.dispose()}})}),d.CommandsRegistry.registerCommand("_executeFormatOnTypeProvider",function(B,...T){return ye(this,void 0,void 0,function*(){const[R,P,F,W]=T;(0,p.assertType)(h.URI.isUri(R)),(0,p.assertType)(i.Position.isIPosition(P)),(0,p.assertType)(typeof F=="string");const A=B.get(s.ITextModelService),H=B.get(r.IEditorWorkerService),q=yield A.createModelReference(R);try{return O(H,q.object.textEditorModel,i.Position.lift(P),F,W,D.CancellationToken.None)}finally{q.dispose()}})})}),define(te[670],ie([1,0,19,21,13,55,2,15,28,97,3,24,18,85,285,256,535,26,16,9,71]),function(j,e,y,m,D,I,w,b,p,h,g,t,i,n,l,c,r,s,o,a,d){"use strict";Object.defineProperty(e,"__esModule",{value:!0});let u=class{constructor(_,L){this._editor=_,this._workerService=L,this._disposables=new w.DisposableStore,this._sessionDisposables=new w.DisposableStore,this._disposables.add(i.OnTypeFormattingEditProviderRegistry.onDidChange(this._update,this)),this._disposables.add(_.onDidChangeModel(()=>this._update())),this._disposables.add(_.onDidChangeModelLanguage(()=>this._update())),this._disposables.add(_.onDidChangeConfiguration(E=>{E.hasChanged(49)&&this._update()}))}dispose(){this._disposables.dispose(),this._sessionDisposables.dispose()}_update(){if(this._sessionDisposables.clear(),!this._editor.getOption(49)||!this._editor.hasModel())return;const _=this._editor.getModel(),[L]=i.OnTypeFormattingEditProviderRegistry.ordered(_);if(!L||!L.autoFormatTriggerCharacters)return;let E=new h.CharacterSet;for(let N of L.autoFormatTriggerCharacters)E.add(N.charCodeAt(0));this._sessionDisposables.add(this._editor.onDidType(N=>{let k=N.charCodeAt(N.length-1);E.has(k)&&this._trigger(String.fromCharCode(k))}))}_trigger(_){if(!this._editor.hasModel()||this._editor.getSelections().length>1||!this._editor.getSelection().isEmpty())return;const L=this._editor.getModel(),E=this._editor.getPosition(),N=new m.CancellationTokenSource,k=this._editor.onDidChangeModelContent(M=>{if(M.isFlush){N.cancel(),k.dispose();return}for(let O=0,B=M.changes.length;O<B;O++)if(M.changes[O].range.endLineNumber<=E.lineNumber){N.cancel(),k.dispose();return}});(0,l.getOnTypeFormattingEdits)(this._workerService,L,E,_,L.getFormattingOptions(),N.token).then(M=>{N.token.isCancellationRequested||(0,y.isNonEmptyArray)(M)&&(c.FormattingEdit.execute(this._editor,M,!0),(0,l.alertFormattingEdits)(M))}).finally(()=>{k.dispose()})}};u.ID="editor.contrib.autoFormat",u=Ie([Ce(1,n.IEditorWorkerService)],u);let f=class{constructor(_,L){this.editor=_,this._instantiationService=L,this._callOnDispose=new w.DisposableStore,this._callOnModel=new w.DisposableStore,this._callOnDispose.add(_.onDidChangeConfiguration(()=>this._update())),this._callOnDispose.add(_.onDidChangeModel(()=>this._update())),this._callOnDispose.add(_.onDidChangeModelLanguage(()=>this._update())),this._callOnDispose.add(i.DocumentRangeFormattingEditProviderRegistry.onDidChange(this._update,this))}dispose(){this._callOnDispose.dispose(),this._callOnModel.dispose()}_update(){this._callOnModel.clear(),!!this.editor.getOption(48)&&(!this.editor.hasModel()||!i.DocumentRangeFormattingEditProviderRegistry.has(this.editor.getModel())||this._callOnModel.add(this.editor.onDidPaste(({range:_})=>this._trigger(_))))}_trigger(_){!this.editor.hasModel()||this.editor.getSelections().length>1||this._instantiationService.invokeFunction(l.formatDocumentRangesWithSelectedProvider,this.editor,_,2,d.Progress.None,m.CancellationToken.None).catch(D.onUnexpectedError)}};f.ID="editor.contrib.formatOnPaste",f=Ie([Ce(1,a.IInstantiationService)],f);class S extends b.EditorAction{constructor(){super({id:"editor.action.formatDocument",label:r.localize(0,null),alias:"Format Document",precondition:o.ContextKeyExpr.and(t.EditorContextKeys.notInCompositeEditor,t.EditorContextKeys.writable,t.EditorContextKeys.hasDocumentFormattingProvider),kbOpts:{kbExpr:t.EditorContextKeys.editorTextFocus,primary:1024|512|36,linux:{primary:2048|1024|39},weight:100},contextMenuOpts:{group:"1_modification",order:1.3}})}run(_,L){return ye(this,void 0,void 0,function*(){if(L.hasModel()){const E=_.get(a.IInstantiationService);yield _.get(d.IEditorProgressService).showWhile(E.invokeFunction(l.formatDocumentWithSelectedProvider,L,1,d.Progress.None,m.CancellationToken.None),250)}})}}class v extends b.EditorAction{constructor(){super({id:"editor.action.formatSelection",label:r.localize(1,null),alias:"Format Selection",precondition:o.ContextKeyExpr.and(t.EditorContextKeys.writable,t.EditorContextKeys.hasDocumentSelectionFormattingProvider),kbOpts:{kbExpr:t.EditorContextKeys.editorTextFocus,primary:(0,I.KeyChord)(2048|41,2048|36),weight:100},contextMenuOpts:{when:t.EditorContextKeys.hasNonEmptySelection,group:"1_modification",order:1.31}})}run(_,L){return ye(this,void 0,void 0,function*(){if(!L.hasModel())return;const E=_.get(a.IInstantiationService),N=L.getModel(),k=L.getSelections().map(O=>O.isEmpty()?new g.Range(O.startLineNumber,1,O.startLineNumber,N.getLineMaxColumn(O.startLineNumber)):O);yield _.get(d.IEditorProgressService).showWhile(E.invokeFunction(l.formatDocumentRangesWithSelectedProvider,L,k,1,d.Progress.None,m.CancellationToken.None),250)})}}(0,b.registerEditorContribution)(u.ID,u),(0,b.registerEditorContribution)(f.ID,f),(0,b.registerEditorAction)(S),(0,b.registerEditorAction)(v),s.CommandsRegistry.registerCommand("editor.action.format",C=>ye(void 0,void 0,void 0,function*(){const _=C.get(p.ICodeEditorService).getFocusedCodeEditor();if(!_||!_.hasModel())return;const L=C.get(s.ICommandService);_.getSelection().isEmpty()?yield L.executeCommand("editor.action.formatDocument"):yield L.executeCommand("editor.action.formatSelection")}))}),define(te[286],ie([1,0,21,13,15,18,126]),function(j,e,y,m,D,I,w){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getReferencesAtPosition=e.getTypeDefinitionsAtPosition=e.getImplementationsAtPosition=e.getDeclarationsAtPosition=e.getDefinitionsAtPosition=void 0;function b(l,c,r,s){const a=r.ordered(l).map(d=>Promise.resolve(s(d,l,c)).then(void 0,u=>{(0,m.onUnexpectedExternalError)(u)}));return Promise.all(a).then(d=>{const u=[];for(let f of d)Array.isArray(f)?u.push(...f):f&&u.push(f);return u})}function p(l,c,r){return b(l,c,I.DefinitionProviderRegistry,(s,o,a)=>s.provideDefinition(o,a,r))}e.getDefinitionsAtPosition=p;function h(l,c,r){return b(l,c,I.DeclarationProviderRegistry,(s,o,a)=>s.provideDeclaration(o,a,r))}e.getDeclarationsAtPosition=h;function g(l,c,r){return b(l,c,I.ImplementationProviderRegistry,(s,o,a)=>s.provideImplementation(o,a,r))}e.getImplementationsAtPosition=g;function t(l,c,r){return b(l,c,I.TypeDefinitionProviderRegistry,(s,o,a)=>s.provideTypeDefinition(o,a,r))}e.getTypeDefinitionsAtPosition=t;function i(l,c,r,s){return b(l,c,I.ReferenceProviderRegistry,(o,a,d)=>ye(this,void 0,void 0,function*(){const u=yield o.provideReferences(a,d,{includeDeclaration:!0},s);if(!r||!u||u.length!==2)return u;const f=yield o.provideReferences(a,d,{includeDeclaration:!1},s);return f&&f.length===1?f:u}))}e.getReferencesAtPosition=i;function n(l){return ye(this,void 0,void 0,function*(){const c=yield l(),r=new w.ReferencesModel(c,""),s=r.references.map(o=>o.link);return r.dispose(),s})}(0,D.registerModelAndPositionCommand)("_executeDefinitionProvider",(l,c)=>n(()=>p(l,c,y.CancellationToken.None))),(0,D.registerModelAndPositionCommand)("_executeDeclarationProvider",(l,c)=>n(()=>h(l,c,y.CancellationToken.None))),(0,D.registerModelAndPositionCommand)("_executeImplementationProvider",(l,c)=>n(()=>g(l,c,y.CancellationToken.None))),(0,D.registerModelAndPositionCommand)("_executeTypeDefinitionProvider",(l,c)=>n(()=>t(l,c,y.CancellationToken.None))),(0,D.registerModelAndPositionCommand)("_executeReferenceProvider",(l,c)=>n(()=>i(l,c,!1,y.CancellationToken.None)))}),define(te[671],ie([1,0,4,2,41,15,28,3,544,16,53,9,42,86,38]),function(j,e,y,m,D,I,w,b,p,h,g,t,i,n,l){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ISymbolNavigationService=e.ctxHasSymbols=void 0,e.ctxHasSymbols=new h.RawContextKey("hasSymbols",!1,(0,p.localize)(0,null)),e.ISymbolNavigationService=(0,t.createDecorator)("ISymbolNavigationService");let c=class{constructor(o,a,d,u){this._editorService=a,this._notificationService=d,this._keybindingService=u,this._currentModel=void 0,this._currentIdx=-1,this._ignoreEditorChange=!1,this._ctxHasSymbols=e.ctxHasSymbols.bindTo(o)}reset(){var o,a;this._ctxHasSymbols.reset(),(o=this._currentState)===null||o===void 0||o.dispose(),(a=this._currentMessage)===null||a===void 0||a.dispose(),this._currentModel=void 0,this._currentIdx=-1}put(o){const a=o.parent.parent;if(a.references.length<=1){this.reset();return}this._currentModel=a,this._currentIdx=a.references.indexOf(o),this._ctxHasSymbols.set(!0),this._showMessage();const d=new r(this._editorService),u=d.onDidChange(f=>{if(this._ignoreEditorChange)return;const S=this._editorService.getActiveCodeEditor();if(!S)return;const v=S.getModel(),C=S.getPosition();if(!v||!C)return;let _=!1,L=!1;for(const E of a.references)if((0,D.isEqual)(E.uri,v.uri))_=!0,L=L||b.Range.containsPosition(E.range,C);else if(_)break;(!_||!L)&&this.reset()});this._currentState=(0,m.combinedDisposable)(d,u)}revealNext(o){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:b.Range.collapseToStart(a.range),selectionRevealType:3}},o).finally(()=>{this._ignoreEditorChange=!1})}_showMessage(){var o;(o=this._currentMessage)===null||o===void 0||o.dispose();const a=this._keybindingService.lookupKeybinding("editor.gotoNextSymbolFromResult"),d=a?(0,p.localize)(1,null,this._currentIdx+1,this._currentModel.references.length,a.getLabel()):(0,p.localize)(2,null,this._currentIdx+1,this._currentModel.references.length);this._currentMessage=this._notificationService.status(d)}};c=Ie([Ce(0,h.IContextKeyService),Ce(1,w.ICodeEditorService),Ce(2,l.INotificationService),Ce(3,i.IKeybindingService)],c),(0,g.registerSingleton)(e.ISymbolNavigationService,c,!0),(0,I.registerEditorCommand)(new class extends I.EditorCommand{constructor(){super({id:"editor.gotoNextSymbolFromResult",precondition:e.ctxHasSymbols,kbOpts:{weight:100,primary:70}})}runEditorCommand(s,o){return s.get(e.ISymbolNavigationService).revealNext(o)}}),n.KeybindingsRegistry.registerCommandAndKeybindingRule({id:"editor.gotoNextSymbolFromResult.cancel",weight:100,when:e.ctxHasSymbols,primary:9,handler(s){s.get(e.ISymbolNavigationService).reset()}});let r=class{constructor(o){this._listener=new Map,this._disposables=new m.DisposableStore,this._onDidChange=new y.Emitter,this.onDidChange=this._onDidChange.event,this._disposables.add(o.onCodeEditorRemove(this._onDidRemoveEditor,this)),this._disposables.add(o.onCodeEditorAdd(this._onDidAddEditor,this)),o.listCodeEditors().forEach(this._onDidAddEditor,this)}dispose(){this._disposables.dispose(),this._onDidChange.dispose(),(0,m.dispose)(this._listener.values())}_onDidAddEditor(o){this._listener.set(o,(0,m.combinedDisposable)(o.onDidChangeCursorPosition(a=>this._onDidChange.fire({editor:o})),o.onDidChangeModelContent(a=>this._onDidChange.fire({editor:o}))))}_onDidRemoveEditor(o){var a;(a=this._listener.get(o))===null||a===void 0||a.dispose(),this._listener.delete(o)}};r=Ie([Ce(0,w.ICodeEditorService)],r)}),define(te[287],ie([1,0,10,21,13,15,18]),function(j,e,y,m,D,I,w){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getHoverPromise=e.getHover=e.HoverProviderResult=void 0;class b{constructor(n,l,c){this.provider=n,this.hover=l,this.ordinal=c}}e.HoverProviderResult=b;function p(i,n,l,c,r){return ye(this,void 0,void 0,function*(){try{const s=yield Promise.resolve(i.provideHover(l,c,r));if(s&&t(s))return new b(i,s,n)}catch(s){(0,D.onUnexpectedExternalError)(s)}})}function h(i,n,l){const r=w.HoverProviderRegistry.ordered(i).map((s,o)=>p(s,o,i,n,l));return y.AsyncIterableObject.fromPromises(r).coalesce()}e.getHover=h;function g(i,n,l){return h(i,n,l).map(c=>c.hover).toPromise()}e.getHoverPromise=g,(0,I.registerModelAndPositionCommand)("_executeHoverProvider",(i,n)=>g(i,n,m.CancellationToken.None));function t(i){const n=typeof i.range!="undefined",l=typeof i.contents!="undefined"&&i.contents&&i.contents.length>0;return n&&l}}),define(te[201],ie([1,0,7,19,10,66,2,104,11,3,18,35,287,546,40,51]),function(j,e,y,m,D,I,w,b,p,h,g,t,i,n,l,c){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.renderMarkdownHovers=e.MarkdownHoverParticipant=e.MarkdownHover=void 0;const r=y.$;class s{constructor(u,f,S,v){this.owner=u,this.range=f,this.contents=S,this.ordinal=v}isValidForHoverAnchor(u){return u.type===1&&this.range.startColumn<=u.range.startColumn&&this.range.endColumn>=u.range.endColumn}}e.MarkdownHover=s;let o=class{constructor(u,f,S,v){this._editor=u,this._languageService=f,this._openerService=S,this._configurationService=v}createLoadingMessage(u){return new s(this,u.range,[new I.MarkdownString().appendText(n.localize(0,null))],2e3)}computeSync(u,f){if(!this._editor.hasModel()||u.type!==1)return[];const S=this._editor.getModel(),v=u.range.startLineNumber,C=S.getLineMaxColumn(v),_=[];let L=1e3;const E=S.getLineLength(v),N=S.getLanguageIdAtPosition(u.range.startLineNumber,u.range.startColumn),k=this._configurationService.getValue("editor.maxTokenizationLineLength",{overrideIdentifier:N});typeof k=="number"&&E>=k&&_.push(new s(this,u.range,[{value:n.localize(1,null)}],L++));for(const M of f){const O=M.range.startLineNumber===v?M.range.startColumn:1,B=M.range.endLineNumber===v?M.range.endColumn:C,T=M.options.hoverMessage;if(!T||(0,I.isEmptyMarkdownString)(T))continue;const R=new h.Range(u.range.startLineNumber,O,u.range.startLineNumber,B);_.push(new s(this,R,(0,m.asArray)(T),L++))}return _}computeAsync(u,f,S){if(!this._editor.hasModel()||u.type!==1)return D.AsyncIterableObject.EMPTY;const v=this._editor.getModel();if(!g.HoverProviderRegistry.has(v))return D.AsyncIterableObject.EMPTY;const C=new p.Position(u.range.startLineNumber,u.range.startColumn);return(0,i.getHover)(v,C,S).filter(_=>!(0,I.isEmptyMarkdownString)(_.hover.contents)).map(_=>{const L=_.hover.range?h.Range.lift(_.hover.range):u.range;return new s(this,L,_.hover.contents,_.ordinal)})}renderHoverParts(u,f){return a(u,f,this._editor,this._languageService,this._openerService)}};o=Ie([Ce(1,t.ILanguageService),Ce(2,c.IOpenerService),Ce(3,l.IConfigurationService)],o),e.MarkdownHoverParticipant=o;function a(d,u,f,S,v){u.sort((_,L)=>_.ordinal-L.ordinal);const C=new w.DisposableStore;for(const _ of u)for(const L of _.contents){if((0,I.isEmptyMarkdownString)(L))continue;const E=r("div.hover-row.markdown-hover"),N=y.append(E,r("div.hover-contents")),k=C.add(new b.MarkdownRenderer({editor:f},S,v));C.add(k.onDidRenderAsync(()=>{N.className="hover-contents code-hover-contents",d.onContentsChanged()}));const M=C.add(k.render(L));N.appendChild(M.element),d.fragment.appendChild(E)}return C}e.renderMarkdownHovers=a}),define(te[156],ie([1,0,43,10,2,15,3,556,16,381]),function(j,e,y,m,D,I,w,b,p){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MessageController=void 0;let h=class Qt{constructor(n,l){this._messageWidget=new D.MutableDisposable,this._messageListeners=new D.DisposableStore,this._editor=n,this._visible=Qt.MESSAGE_VISIBLE.bindTo(l),this._editorListener=this._editor.onDidAttemptReadOnlyEdit(()=>this._onDidAttemptReadOnlyEdit())}static get(n){return n.getContribution(Qt.ID)}dispose(){this._editorListener.dispose(),this._messageListeners.dispose(),this._messageWidget.dispose(),this._visible.reset()}showMessage(n,l){(0,y.alert)(n),this._visible.set(!0),this._messageWidget.clear(),this._messageListeners.clear(),this._messageWidget.value=new t(this._editor,l,n),this._messageListeners.add(this._editor.onDidBlurEditorText(()=>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(new m.TimeoutTimer(()=>this.closeMessage(),3e3));let c;this._messageListeners.add(this._editor.onMouseMove(r=>{!r.target.position||(c?c.containsPosition(r.target.position)||this.closeMessage():c=new w.Range(l.lineNumber-3,1,r.target.position.lineNumber+3,1))}))}closeMessage(){this._visible.reset(),this._messageListeners.clear(),this._messageWidget.value&&this._messageListeners.add(t.fadeOut(this._messageWidget.value))}_onDidAttemptReadOnlyEdit(){this._editor.hasModel()&&this.showMessage(b.localize(1,null),this._editor.getPosition())}};h.ID="editor.contrib.messageController",h.MESSAGE_VISIBLE=new p.RawContextKey("messageVisible",!1,b.localize(0,null)),h=Ie([Ce(1,p.IContextKeyService)],h),e.MessageController=h;const g=I.EditorCommand.bindToContribution(h.get);(0,I.registerEditorCommand)(new g({id:"leaveEditorMessage",precondition:h.MESSAGE_VISIBLE,handler:i=>i.closeMessage(),kbOpts:{weight:100+30,primary:9}}));class t{constructor(n,{lineNumber:l,column:c},r){this.allowEditorOverflow=!0,this.suppressMouseDown=!1,this._editor=n,this._editor.revealLinesInCenterIfOutsideViewport(l,l,0),this._position={lineNumber:l,column:c-1},this._domNode=document.createElement("div"),this._domNode.classList.add("monaco-editor-overlaymessage");const s=document.createElement("div");s.classList.add("anchor","top"),this._domNode.appendChild(s);const o=document.createElement("div");o.classList.add("message"),o.textContent=r,this._domNode.appendChild(o);const a=document.createElement("div");a.classList.add("anchor","below"),this._domNode.appendChild(a),this._editor.addContentWidget(this),this._domNode.classList.add("fadeIn")}static fadeOut(n){let l;const c=()=>{n.dispose(),clearTimeout(l),n.getDomNode().removeEventListener("animationend",c)};return l=setTimeout(c,110),n.getDomNode().addEventListener("animationend",c),n.getDomNode().classList.add("fadeOut"),{dispose:c}}dispose(){this._editor.removeContentWidget(this)}getId(){return"messageoverlay"}getDomNode(){return this._domNode}getPosition(){return{position:this._position,preference:[1,2]}}afterRender(n){this._domNode.classList.toggle("below",n===2)}}(0,I.registerEditorContribution)(h.ID,h)});var Yt=this&&this.__classPrivateFieldSet||function(j,e,y,m,D){if(m==="m")throw new TypeError("Private method is not writable");if(m==="a"&&!D)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?j!==e||!D:!e.has(j))throw new TypeError("Cannot write private member to an object whose class did not declare it");return m==="a"?D.call(j,y):D?D.value=y:e.set(j,y),y},kt=this&&this.__classPrivateFieldGet||function(j,e,y,m){if(y==="a"&&!m)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?j!==e||!m:!e.has(j))throw new TypeError("Cannot read private member from an object whose class did not declare it");return y==="m"?m:y==="a"?m.call(j):m?m.value:e.get(j)};define(te[672],ie([1,0,13,134,2,156,9,667,651]),function(j,e,y,m,D,I,w,b,p){"use strict";var h;Object.defineProperty(e,"__esModule",{value:!0}),e.CodeActionUi=void 0;let g=class extends D.Disposable{constructor(i,n,l,c,r){super();this._editor=i,this.delegate=c,this._activeCodeActions=this._register(new D.MutableDisposable),h.set(this,!1),this._codeActionWidget=new m.Lazy(()=>this._register(r.createInstance(b.CodeActionMenu,this._editor,{onSelectCodeAction:s=>ye(this,void 0,void 0,function*(){this.delegate.applyCodeAction(s,!0)})}))),this._lightBulbWidget=new m.Lazy(()=>{const s=this._register(r.createInstance(p.LightBulbWidget,this._editor,n,l));return this._register(s.onClick(o=>this.showCodeActionList(o.trigger,o.actions,o,{includeDisabledActions:!1}))),s})}dispose(){Yt(this,h,!0,"f"),super.dispose()}update(i){var n,l,c,r,s;return ye(this,void 0,void 0,function*(){if(i.type!==1){(n=this._lightBulbWidget.rawValue)===null||n===void 0||n.hide();return}let o;try{o=yield i.actions}catch(a){(0,y.onUnexpectedError)(a);return}if(!kt(this,h,"f"))if(this._lightBulbWidget.getValue().update(o,i.trigger,i.position),i.trigger.type===1){if((l=i.trigger.filter)===null||l===void 0?void 0:l.include){const d=this.tryGetValidActionToApply(i.trigger,o);if(d){try{this._lightBulbWidget.getValue().hide(),yield this.delegate.applyCodeAction(d,!1)}finally{o.dispose()}return}if(i.trigger.context){const u=this.getInvalidActionThatWouldHaveBeenApplied(i.trigger,o);if(u&&u.action.disabled){(c=I.MessageController.get(this._editor))===null||c===void 0||c.showMessage(u.action.disabled,i.trigger.context.position),o.dispose();return}}}const a=!!((r=i.trigger.filter)===null||r===void 0?void 0:r.include);if(i.trigger.context&&(!o.allActions.length||!a&&!o.validActions.length)){(s=I.MessageController.get(this._editor))===null||s===void 0||s.showMessage(i.trigger.context.notAvailableMessage,i.trigger.context.position),this._activeCodeActions.value=o,o.dispose();return}this._activeCodeActions.value=o,this._codeActionWidget.getValue().show(i.trigger,o,i.position,{includeDisabledActions:a})}else this._codeActionWidget.getValue().isVisible?o.dispose():this._activeCodeActions.value=o})}getInvalidActionThatWouldHaveBeenApplied(i,n){if(!!n.allActions.length&&(i.autoApply==="first"&&n.validActions.length===0||i.autoApply==="ifSingle"&&n.allActions.length===1))return n.allActions.find(({action:l})=>l.disabled)}tryGetValidActionToApply(i,n){if(!!n.validActions.length&&(i.autoApply==="first"&&n.validActions.length>0||i.autoApply==="ifSingle"&&n.validActions.length===1))return n.validActions[0]}showCodeActionList(i,n,l,c){return ye(this,void 0,void 0,function*(){this._codeActionWidget.getValue().show(i,n,l,c)})}};h=new WeakMap,g=Ie([Ce(4,w.IInstantiationService)],g),e.CodeActionUi=g}),define(te[288],ie([1,0,21,134,2,8,15,195,24,155,672,156,521,26,16,9,77,38,71,87,668,152]),function(j,e,y,m,D,I,w,b,p,h,g,t,i,n,l,c,r,s,o,a,d,u){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AutoFixAction=e.FixAllAction=e.OrganizeImportsAction=e.SourceAction=e.RefactorAction=e.CodeActionCommand=e.QuickFixAction=e.applyCodeAction=e.QuickFixController=void 0;function f(R){return l.ContextKeyExpr.regex(d.SUPPORTED_CODE_ACTIONS.keys()[0],new RegExp("(\\s|^)"+(0,I.escapeRegExpCharacters)(R.value)+"\\b"))}const S={type:"object",defaultSnippets:[{body:{kind:""}}],properties:{kind:{type:"string",description:i.localize(0,null)},apply:{type:"string",description:i.localize(1,null),default:"ifSingle",enum:["first","ifSingle","never"],enumDescriptions:[i.localize(2,null),i.localize(3,null),i.localize(4,null)]},preferred:{type:"boolean",default:!1,description:i.localize(5,null)}}};let v=class Di extends D.Disposable{constructor(P,F,W,A,H){super();this._instantiationService=H,this._editor=P,this._model=this._register(new d.CodeActionModel(this._editor,F,W,A)),this._register(this._model.onDidChangeState(q=>this.update(q))),this._ui=new m.Lazy(()=>this._register(new g.CodeActionUi(P,E.Id,T.Id,{applyCodeAction:(q,X)=>ye(this,void 0,void 0,function*(){try{yield this._applyCodeAction(q)}finally{X&&this._trigger({type:2,filter:{}})}})},this._instantiationService)))}static get(P){return P.getContribution(Di.ID)}update(P){this._ui.getValue().update(P)}showCodeActions(P,F,W){return this._ui.getValue().showCodeActionList(P,F,W,{includeDisabledActions:!1})}manualTriggerAtCurrentPosition(P,F,W){var A;if(!this._editor.hasModel())return;(A=t.MessageController.get(this._editor))===null||A===void 0||A.closeMessage();const H=this._editor.getPosition();this._trigger({type:1,filter:F,autoApply:W,context:{notAvailableMessage:P,position:H}})}_trigger(P){return this._model.trigger(P)}_applyCodeAction(P){return this._instantiationService.invokeFunction(C,P,this._editor)}};v.ID="editor.contrib.quickFixController",v=Ie([Ce(1,r.IMarkerService),Ce(2,l.IContextKeyService),Ce(3,o.IEditorProgressService),Ce(4,c.IInstantiationService)],v),e.QuickFixController=v;function C(R,P,F){return ye(this,void 0,void 0,function*(){const W=R.get(b.IBulkEditService),A=R.get(n.ICommandService),H=R.get(a.ITelemetryService),q=R.get(s.INotificationService);if(H.publicLog2("codeAction.applyCodeAction",{codeActionTitle:P.action.title,codeActionKind:P.action.kind,codeActionIsPreferred:!!P.action.isPreferred}),yield P.resolve(y.CancellationToken.None),P.action.edit&&(yield W.apply(b.ResourceEdit.convert(P.action.edit),{editor:F,label:P.action.title})),P.action.command)try{yield A.executeCommand(P.action.command.id,...P.action.command.arguments||[])}catch(X){const G=_(X);q.error(typeof G=="string"?G:i.localize(6,null))}})}e.applyCodeAction=C;function _(R){return typeof R=="string"?R:R instanceof Error&&typeof R.message=="string"?R.message:void 0}function L(R,P,F,W){if(R.hasModel()){const A=v.get(R);A&&A.manualTriggerAtCurrentPosition(P,F,W)}}class E extends w.EditorAction{constructor(){super({id:E.Id,label:i.localize(7,null),alias:"Quick Fix...",precondition:l.ContextKeyExpr.and(p.EditorContextKeys.writable,p.EditorContextKeys.hasCodeActionsProvider),kbOpts:{kbExpr:p.EditorContextKeys.editorTextFocus,primary:2048|84,weight:100}})}run(P,F){return L(F,i.localize(8,null),void 0,void 0)}}e.QuickFixAction=E,E.Id="editor.action.quickFix";class N extends w.EditorCommand{constructor(){super({id:h.codeActionCommandId,precondition:l.ContextKeyExpr.and(p.EditorContextKeys.writable,p.EditorContextKeys.hasCodeActionsProvider),description:{description:"Trigger a code action",args:[{name:"args",schema:S}]}})}runEditorCommand(P,F,W){const A=u.CodeActionCommandArgs.fromUser(W,{kind:u.CodeActionKind.Empty,apply:"ifSingle"});return L(F,typeof(W==null?void 0:W.kind)=="string"?A.preferred?i.localize(9,null,W.kind):i.localize(10,null,W.kind):A.preferred?i.localize(11,null):i.localize(12,null),{include:A.kind,includeSourceActions:!0,onlyIncludePreferredActions:A.preferred},A.apply)}}e.CodeActionCommand=N;class k extends w.EditorAction{constructor(){super({id:h.refactorCommandId,label:i.localize(13,null),alias:"Refactor...",precondition:l.ContextKeyExpr.and(p.EditorContextKeys.writable,p.EditorContextKeys.hasCodeActionsProvider),kbOpts:{kbExpr:p.EditorContextKeys.editorTextFocus,primary:2048|1024|48,mac:{primary:256|1024|48},weight:100},contextMenuOpts:{group:"1_modification",order:2,when:l.ContextKeyExpr.and(p.EditorContextKeys.writable,f(u.CodeActionKind.Refactor))},description:{description:"Refactor...",args:[{name:"args",schema:S}]}})}run(P,F,W){const A=u.CodeActionCommandArgs.fromUser(W,{kind:u.CodeActionKind.Refactor,apply:"never"});return L(F,typeof(W==null?void 0:W.kind)=="string"?A.preferred?i.localize(14,null,W.kind):i.localize(15,null,W.kind):A.preferred?i.localize(16,null):i.localize(17,null),{include:u.CodeActionKind.Refactor.contains(A.kind)?A.kind:u.CodeActionKind.None,onlyIncludePreferredActions:A.preferred},A.apply)}}e.RefactorAction=k;class M extends w.EditorAction{constructor(){super({id:h.sourceActionCommandId,label:i.localize(18,null),alias:"Source Action...",precondition:l.ContextKeyExpr.and(p.EditorContextKeys.writable,p.EditorContextKeys.hasCodeActionsProvider),contextMenuOpts:{group:"1_modification",order:2.1,when:l.ContextKeyExpr.and(p.EditorContextKeys.writable,f(u.CodeActionKind.Source))},description:{description:"Source Action...",args:[{name:"args",schema:S}]}})}run(P,F,W){const A=u.CodeActionCommandArgs.fromUser(W,{kind:u.CodeActionKind.Source,apply:"never"});return L(F,typeof(W==null?void 0:W.kind)=="string"?A.preferred?i.localize(19,null,W.kind):i.localize(20,null,W.kind):A.preferred?i.localize(21,null):i.localize(22,null),{include:u.CodeActionKind.Source.contains(A.kind)?A.kind:u.CodeActionKind.None,includeSourceActions:!0,onlyIncludePreferredActions:A.preferred},A.apply)}}e.SourceAction=M;class O extends w.EditorAction{constructor(){super({id:h.organizeImportsCommandId,label:i.localize(23,null),alias:"Organize Imports",precondition:l.ContextKeyExpr.and(p.EditorContextKeys.writable,f(u.CodeActionKind.SourceOrganizeImports)),kbOpts:{kbExpr:p.EditorContextKeys.editorTextFocus,primary:1024|512|45,weight:100}})}run(P,F){return L(F,i.localize(24,null),{include:u.CodeActionKind.SourceOrganizeImports,includeSourceActions:!0},"ifSingle")}}e.OrganizeImportsAction=O;class B extends w.EditorAction{constructor(){super({id:h.fixAllCommandId,label:i.localize(25,null),alias:"Fix All",precondition:l.ContextKeyExpr.and(p.EditorContextKeys.writable,f(u.CodeActionKind.SourceFixAll))})}run(P,F){return L(F,i.localize(26,null),{include:u.CodeActionKind.SourceFixAll,includeSourceActions:!0},"ifSingle")}}e.FixAllAction=B;class T extends w.EditorAction{constructor(){super({id:T.Id,label:i.localize(27,null),alias:"Auto Fix...",precondition:l.ContextKeyExpr.and(p.EditorContextKeys.writable,f(u.CodeActionKind.QuickFix)),kbOpts:{kbExpr:p.EditorContextKeys.editorTextFocus,primary:512|1024|84,mac:{primary:2048|512|84},weight:100}})}run(P,F){return L(F,i.localize(28,null),{include:u.CodeActionKind.QuickFix,onlyIncludePreferredActions:!0},"ifSingle")}}e.AutoFixAction=T,T.Id="editor.action.autoFix"}),define(te[673],ie([1,0,15,288]),function(j,e,y,m){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),(0,y.registerEditorContribution)(m.QuickFixController.ID,m.QuickFixController),(0,y.registerEditorAction)(m.QuickFixAction),(0,y.registerEditorAction)(m.RefactorAction),(0,y.registerEditorAction)(m.SourceAction),(0,y.registerEditorAction)(m.OrganizeImportsAction),(0,y.registerEditorAction)(m.AutoFixAction),(0,y.registerEditorAction)(m.FixAllAction),(0,y.registerEditorCommand)(new m.CodeActionCommand)}),define(te[674],ie([1,0,43,10,21,13,2,20,25,106,15,195,28,11,3,24,18,153,156,563,103,16,9,64,38,71,36,657]),function(j,e,y,m,D,I,w,b,p,h,g,t,i,n,l,c,r,s,o,a,d,u,f,S,v,C,_,L){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.RenameAction=e.rename=void 0;class E{constructor(T,R){this.model=T,this.position=R,this._providerRenameIdx=0,this._providers=r.RenameProviderRegistry.ordered(T)}hasProvider(){return this._providers.length>0}resolveRenameLocation(T){return ye(this,void 0,void 0,function*(){const R=[];for(this._providerRenameIdx=0;this._providerRenameIdx<this._providers.length;this._providerRenameIdx++){const F=this._providers[this._providerRenameIdx];if(!F.resolveRenameLocation)break;let W=yield F.resolveRenameLocation(this.model,this.position,T);if(!!W){if(W.rejectReason){R.push(W.rejectReason);continue}return W}}const P=this.model.getWordAtPosition(this.position);return P?{range:new l.Range(this.position.lineNumber,P.startColumn,this.position.lineNumber,P.endColumn),text:P.word,rejectReason:R.length>0?R.join(`
|
||
`):void 0}:{range:l.Range.fromPositions(this.position),text:"",rejectReason:R.length>0?R.join(`
|
||
`):void 0}})}provideRenameEdits(T,R){return ye(this,void 0,void 0,function*(){return this._provideRenameEdits(T,this._providerRenameIdx,[],R)})}_provideRenameEdits(T,R,P,F){return ye(this,void 0,void 0,function*(){const W=this._providers[R];if(!W)return{edits:[],rejectReason:P.join(`
|
||
`)};const A=yield W.provideRenameEdits(this.model,this.position,T,F);if(A){if(A.rejectReason)return this._provideRenameEdits(T,R+1,P.concat(A.rejectReason),F)}else return this._provideRenameEdits(T,R+1,P.concat(a.localize(0,null)),F);return A})}}function N(B,T,R){return ye(this,void 0,void 0,function*(){const P=new E(B,T),F=yield P.resolveRenameLocation(D.CancellationToken.None);return(F==null?void 0:F.rejectReason)?{edits:[],rejectReason:F.rejectReason}:P.provideRenameEdits(R,D.CancellationToken.None)})}e.rename=N;let k=class ki{constructor(T,R,P,F,W,A,H){this.editor=T,this._instaService=R,this._notificationService=P,this._bulkEditService=F,this._progressService=W,this._logService=A,this._configService=H,this._dispoableStore=new w.DisposableStore,this._cts=new D.CancellationTokenSource,this._renameInputField=this._dispoableStore.add(new m.IdleValue(()=>this._dispoableStore.add(this._instaService.createInstance(L.RenameInputField,this.editor,["acceptRenameInput","acceptRenameInputWithPreview"]))))}static get(T){return T.getContribution(ki.ID)}dispose(){this._dispoableStore.dispose(),this._cts.dispose(!0)}run(){var T,R;return ye(this,void 0,void 0,function*(){if(this._cts.dispose(!0),!this.editor.hasModel())return;const P=this.editor.getPosition(),F=new E(this.editor.getModel(),P);if(!F.hasProvider())return;this._cts=new h.EditorStateCancellationTokenSource(this.editor,4|1);let W;try{const ae=F.resolveRenameLocation(this._cts.token);this._progressService.showWhile(ae,250),W=yield ae}catch(ae){(T=o.MessageController.get(this.editor))===null||T===void 0||T.showMessage(ae||a.localize(1,null),P);return}if(!W)return;if(W.rejectReason){(R=o.MessageController.get(this.editor))===null||R===void 0||R.showMessage(W.rejectReason,P);return}if(this._cts.token.isCancellationRequested)return;this._cts.dispose(),this._cts=new h.EditorStateCancellationTokenSource(this.editor,4|1,W.range);let A=this.editor.getSelection(),H=0,q=W.text.length;!l.Range.isEmpty(A)&&!l.Range.spansMultipleLines(A)&&l.Range.containsRange(W.range,A)&&(H=Math.max(0,A.startColumn-W.range.startColumn),q=Math.min(W.range.endColumn,A.endColumn)-W.range.startColumn);const X=this._bulkEditService.hasPreviewHandler()&&this._configService.getValue(this.editor.getModel().uri,"editor.rename.enablePreview"),G=yield this._renameInputField.value.getInput(W.range,W.text,H,q,X,this._cts.token);if(typeof G=="boolean"){G&&this.editor.focus();return}this.editor.focus();const re=(0,m.raceCancellation)(F.provideRenameEdits(G.newName,this._cts.token),this._cts.token).then(ae=>ye(this,void 0,void 0,function*(){if(!(!ae||!this.editor.hasModel())){if(ae.rejectReason){this._notificationService.info(ae.rejectReason);return}this.editor.setSelection(l.Range.fromPositions(this.editor.getSelection().getPosition())),this._bulkEditService.apply(t.ResourceEdit.convert(ae),{editor:this.editor,showPreview:G.wantsPreview,label:a.localize(2,null,W==null?void 0:W.text),quotableLabel:a.localize(3,null,W==null?void 0:W.text)}).then(oe=>{oe.ariaSummary&&(0,y.alert)(a.localize(4,null,W.text,G.newName,oe.ariaSummary))}).catch(oe=>{this._notificationService.error(a.localize(5,null)),this._logService.error(oe)})}}),ae=>{this._notificationService.error(a.localize(6,null)),this._logService.error(ae)});return this._progressService.showWhile(re,250),re})}acceptRenameInput(T){this._renameInputField.value.acceptInput(T)}cancelRenameInput(){this._renameInputField.value.cancelInput(!0)}};k.ID="editor.contrib.renameController",k=Ie([Ce(1,f.IInstantiationService),Ce(2,v.INotificationService),Ce(3,t.IBulkEditService),Ce(4,C.IEditorProgressService),Ce(5,S.ILogService),Ce(6,s.ITextResourceConfigurationService)],k);class M extends g.EditorAction{constructor(){super({id:"editor.action.rename",label:a.localize(7,null),alias:"Rename Symbol",precondition:u.ContextKeyExpr.and(c.EditorContextKeys.writable,c.EditorContextKeys.hasRenameProvider),kbOpts:{kbExpr:c.EditorContextKeys.editorTextFocus,primary:60,weight:100},contextMenuOpts:{group:"1_modification",order:1.1}})}runCommand(T,R){const P=T.get(i.ICodeEditorService),[F,W]=Array.isArray(R)&&R||[void 0,void 0];return p.URI.isUri(F)&&n.Position.isIPosition(W)?P.openCodeEditor({resource:F},P.getActiveCodeEditor()).then(A=>{!A||(A.setPosition(W),A.invokeWithinContext(H=>(this.reportTelemetry(H,A),this.run(H,A))))},I.onUnexpectedError):super.runCommand(T,R)}run(T,R){const P=k.get(R);return P?P.run():Promise.resolve()}}e.RenameAction=M,(0,g.registerEditorContribution)(k.ID,k),(0,g.registerEditorAction)(M);const O=g.EditorCommand.bindToContribution(k.get);(0,g.registerEditorCommand)(new O({id:"acceptRenameInput",precondition:L.CONTEXT_RENAME_INPUT_VISIBLE,handler:B=>B.acceptRenameInput(!1),kbOpts:{weight:100+99,kbExpr:c.EditorContextKeys.focus,primary:3}})),(0,g.registerEditorCommand)(new O({id:"acceptRenameInputWithPreview",precondition:u.ContextKeyExpr.and(L.CONTEXT_RENAME_INPUT_VISIBLE,u.ContextKeyExpr.has("config.editor.rename.enablePreview")),handler:B=>B.acceptRenameInput(!0),kbOpts:{weight:100+99,kbExpr:c.EditorContextKeys.focus,primary:1024+3}})),(0,g.registerEditorCommand)(new O({id:"cancelRenameInput",precondition:L.CONTEXT_RENAME_INPUT_VISIBLE,handler:B=>B.cancelRenameInput(),kbOpts:{weight:100+99,kbExpr:c.EditorContextKeys.focus,primary:9,secondary:[1024|9]}})),(0,g.registerModelAndPositionCommand)("_executeDocumentRenameProvider",function(B,T,...R){const[P]=R;return(0,b.assertType)(typeof P=="string"),N(B,T,P)}),(0,g.registerModelAndPositionCommand)("_executePrepareRename",function(B,T){return ye(this,void 0,void 0,function*(){const P=yield new E(B,T).resolveRenameLocation(D.CancellationToken.None);if(P==null?void 0:P.rejectReason)throw new Error(P.rejectReason);return P})}),_.Registry.as(d.Extensions.Configuration).registerConfiguration({id:"editor",properties:{"editor.rename.enablePreview":{scope:5,description:a.localize(8,null),default:!0,type:"boolean"}}})}),define(te[675],ie([1,0,19,21,13,15,11,3,22,24,18,260,464,565,37,26]),function(j,e,y,m,D,I,w,b,p,h,g,t,i,n,l,c){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.provideSelectionRanges=void 0;class r{constructor(S,v){this.index=S,this.ranges=v}mov(S){let v=this.index+(S?1:-1);if(v<0||v>=this.ranges.length)return this;const C=new r(v,this.ranges);return C.ranges[v].equalsRange(this.ranges[this.index])?C.mov(S):C}}class s{constructor(S){this._editor=S,this._ignoreSelection=!1}static get(S){return S.getContribution(s.ID)}dispose(){var S;(S=this._selectionListener)===null||S===void 0||S.dispose()}run(S){return ye(this,void 0,void 0,function*(){if(!this._editor.hasModel())return;const v=this._editor.getSelections(),C=this._editor.getModel();if(!g.SelectionRangeRegistry.has(C)||(this._state||(yield u(C,v.map(L=>L.getPosition()),this._editor.getOption(102),m.CancellationToken.None).then(L=>{var E;if(!(!y.isNonEmptyArray(L)||L.length!==v.length)&&!(!this._editor.hasModel()||!y.equals(this._editor.getSelections(),v,(N,k)=>N.equalsSelection(k)))){for(let N=0;N<L.length;N++)L[N]=L[N].filter(k=>k.containsPosition(v[N].getStartPosition())&&k.containsPosition(v[N].getEndPosition())),L[N].unshift(v[N]);this._state=L.map(N=>new r(0,N)),(E=this._selectionListener)===null||E===void 0||E.dispose(),this._selectionListener=this._editor.onDidChangeCursorPosition(()=>{var N;this._ignoreSelection||((N=this._selectionListener)===null||N===void 0||N.dispose(),this._state=void 0)})}})),!this._state))return;this._state=this._state.map(L=>L.mov(S));const _=this._state.map(L=>p.Selection.fromPositions(L.ranges[L.index].getStartPosition(),L.ranges[L.index].getEndPosition()));this._ignoreSelection=!0;try{this._editor.setSelections(_)}finally{this._ignoreSelection=!1}})}}s.ID="editor.contrib.smartSelectController";class o extends I.EditorAction{constructor(S,v){super(v);this._forward=S}run(S,v){return ye(this,void 0,void 0,function*(){let C=s.get(v);C&&(yield C.run(this._forward))})}}class a extends o{constructor(){super(!0,{id:"editor.action.smartSelect.expand",label:n.localize(0,null),alias:"Expand Selection",precondition:void 0,kbOpts:{kbExpr:h.EditorContextKeys.editorTextFocus,primary:1024|512|17,mac:{primary:2048|256|1024|17,secondary:[256|1024|17]},weight:100},menuOpts:{menuId:l.MenuId.MenubarSelectionMenu,group:"1_basic",title:n.localize(1,null),order:2}})}}c.CommandsRegistry.registerCommandAlias("editor.action.smartSelect.grow","editor.action.smartSelect.expand");class d extends o{constructor(){super(!1,{id:"editor.action.smartSelect.shrink",label:n.localize(2,null),alias:"Shrink Selection",precondition:void 0,kbOpts:{kbExpr:h.EditorContextKeys.editorTextFocus,primary:1024|512|15,mac:{primary:2048|256|1024|15,secondary:[256|1024|15]},weight:100},menuOpts:{menuId:l.MenuId.MenubarSelectionMenu,group:"1_basic",title:n.localize(3,null),order:3}})}}(0,I.registerEditorContribution)(s.ID,s),(0,I.registerEditorAction)(a),(0,I.registerEditorAction)(d),g.SelectionRangeRegistry.register("*",new i.WordSelectionRangeProvider);function u(f,S,v,C){return ye(this,void 0,void 0,function*(){const _=g.SelectionRangeRegistry.all(f);_.length===1&&_.unshift(new t.BracketSelectionRangeProvider);let L=[],E=[];for(const N of _)L.push(Promise.resolve(N.provideSelectionRanges(f,S,C)).then(k=>{if(y.isNonEmptyArray(k)&&k.length===S.length)for(let M=0;M<S.length;M++){E[M]||(E[M]=[]);for(const O of k[M])b.Range.isIRange(O.range)&&b.Range.containsPosition(O.range,S[M])&&E[M].push(b.Range.lift(O.range))}},D.onUnexpectedExternalError));return yield Promise.all(L),E.map(N=>{if(N.length===0)return[];N.sort((B,T)=>w.Position.isBefore(B.getStartPosition(),T.getStartPosition())?1:w.Position.isBefore(T.getStartPosition(),B.getStartPosition())||w.Position.isBefore(B.getEndPosition(),T.getEndPosition())?-1:w.Position.isBefore(T.getEndPosition(),B.getEndPosition())?1:0);let k=[],M;for(const B of N)(!M||b.Range.containsRange(B,M)&&!b.Range.equalsRange(B,M))&&(k.push(B),M=B);if(!v.selectLeadingAndTrailingWhitespace)return k;let O=[k[0]];for(let B=1;B<k.length;B++){const T=k[B-1],R=k[B];if(R.startLineNumber!==T.startLineNumber||R.endLineNumber!==T.endLineNumber){const P=new b.Range(T.startLineNumber,f.getLineFirstNonWhitespaceColumn(T.startLineNumber),T.endLineNumber,f.getLineLastNonWhitespaceColumn(T.endLineNumber));P.containsRange(T)&&!P.equalsRange(T)&&R.containsRange(P)&&!R.equalsRange(P)&&O.push(P);const F=new b.Range(T.startLineNumber,1,T.endLineNumber,f.getLineMaxColumn(T.endLineNumber));F.containsRange(T)&&!F.equalsRange(P)&&R.containsRange(F)&&!R.equalsRange(F)&&O.push(F)}O.push(R)}return O})})}e.provideSelectionRanges=u,(0,I.registerModelCommand)("_executeSelectionRangeProvider",function(f,...S){const[v]=S;return u(f,v,{selectLeadingAndTrailingWhitespace:!0},m.CancellationToken.None)})}),define(te[107],ie([1,0,21,13,73,2,65,20,25,11,3,18,58,124,568,37,26,16]),function(j,e,y,m,D,I,w,b,p,h,g,t,i,n,l,c,r,s){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.showSimpleSuggestions=e.getSuggestionComparator=e.provideSuggestionItems=e.CompletionItemModel=e.getSnippetSuggestSupport=e.CompletionOptions=e.CompletionItem=e.suggestWidgetStatusbarMenu=e.Context=void 0,e.Context={Visible:new s.RawContextKey("suggestWidgetVisible",!1,(0,l.localize)(0,null)),DetailsVisible:new s.RawContextKey("suggestWidgetDetailsVisible",!1,(0,l.localize)(1,null)),MultipleSuggestions:new s.RawContextKey("suggestWidgetMultipleSuggestions",!1,(0,l.localize)(2,null)),MakesTextEdit:new s.RawContextKey("suggestionMakesTextEdit",!0,(0,l.localize)(3,null)),AcceptSuggestionsOnEnter:new s.RawContextKey("acceptSuggestionOnEnter",!0,(0,l.localize)(4,null)),HasInsertAndReplaceRange:new s.RawContextKey("suggestionHasInsertAndReplaceRange",!1,(0,l.localize)(5,null)),InsertMode:new s.RawContextKey("suggestionInsertMode",void 0,{type:"string",description:(0,l.localize)(6,null)}),CanResolve:new s.RawContextKey("suggestionCanResolve",!1,(0,l.localize)(7,null))},e.suggestWidgetStatusbarMenu=new c.MenuId("suggestWidgetStatusBar");class o{constructor(O,B,T,R){this.position=O,this.completion=B,this.container=T,this.provider=R,this.isInvalid=!1,this.score=D.FuzzyScore.Default,this.distance=0,this.textLabel=typeof B.label=="string"?B.label:B.label.label,this.labelLow=this.textLabel.toLowerCase(),this.isInvalid=!this.textLabel,this.sortTextLow=B.sortText&&B.sortText.toLowerCase(),this.filterTextLow=B.filterText&&B.filterText.toLowerCase(),g.Range.isIRange(B.range)?(this.editStart=new h.Position(B.range.startLineNumber,B.range.startColumn),this.editInsertEnd=new h.Position(B.range.endLineNumber,B.range.endColumn),this.editReplaceEnd=new h.Position(B.range.endLineNumber,B.range.endColumn),this.isInvalid=this.isInvalid||g.Range.spansMultipleLines(B.range)||B.range.startLineNumber!==O.lineNumber):(this.editStart=new h.Position(B.range.insert.startLineNumber,B.range.insert.startColumn),this.editInsertEnd=new h.Position(B.range.insert.endLineNumber,B.range.insert.endColumn),this.editReplaceEnd=new h.Position(B.range.replace.endLineNumber,B.range.replace.endColumn),this.isInvalid=this.isInvalid||g.Range.spansMultipleLines(B.range.insert)||g.Range.spansMultipleLines(B.range.replace)||B.range.insert.startLineNumber!==O.lineNumber||B.range.replace.startLineNumber!==O.lineNumber||B.range.insert.startColumn!==B.range.replace.startColumn),typeof R.resolveCompletionItem!="function"&&(this._resolveCache=Promise.resolve(),this._isResolved=!0)}get isResolved(){return!!this._isResolved}resolve(O){return ye(this,void 0,void 0,function*(){if(!this._resolveCache){const B=O.onCancellationRequested(()=>{this._resolveCache=void 0,this._isResolved=!1});this._resolveCache=Promise.resolve(this.provider.resolveCompletionItem(this.completion,O)).then(T=>{Object.assign(this.completion,T),this._isResolved=!0,B.dispose()},T=>{(0,m.isCancellationError)(T)&&(this._resolveCache=void 0,this._isResolved=!1)})}return this._resolveCache})}}e.CompletionItem=o;class a{constructor(O=2,B=new Set,T=new Set,R=!0){this.snippetSortOrder=O,this.kindFilter=B,this.providerFilter=T,this.showDeprecated=R}}e.CompletionOptions=a,a.default=new a;let d;function u(){return d}e.getSnippetSuggestSupport=u;class f{constructor(O,B,T,R){this.items=O,this.needsClipboard=B,this.durations=T,this.disposable=R}}e.CompletionItemModel=f;function S(M,O,B=a.default,T={triggerKind:0},R=y.CancellationToken.None){return ye(this,void 0,void 0,function*(){const P=new w.StopWatch(!0);O=O.clone();const F=M.getWordAtPosition(O),W=F?new g.Range(O.lineNumber,F.startColumn,O.lineNumber,F.endColumn):g.Range.fromPositions(O),A={replace:W,insert:W.setEndPosition(O.lineNumber,O.column)},H=[],q=new I.DisposableStore,X=[];let G=!1;const re=(oe,Z,x)=>{var U,Q,ne;let ce=!1;if(!Z)return ce;for(let ee of Z.suggestions)if(!B.kindFilter.has(ee.kind)){if(!B.showDeprecated&&((U=ee==null?void 0:ee.tags)===null||U===void 0?void 0:U.includes(1)))continue;ee.range||(ee.range=A),ee.sortText||(ee.sortText=typeof ee.label=="string"?ee.label:ee.label.label),!G&&ee.insertTextRules&&ee.insertTextRules&4&&(G=n.SnippetParser.guessNeedsClipboard(ee.insertText)),H.push(new o(O,ee,Z,oe)),ce=!0}return(0,I.isDisposable)(Z)&&q.add(Z),X.push({providerName:(Q=oe._debugDisplayName)!==null&&Q!==void 0?Q:"unkown_provider",elapsedProvider:(ne=Z.duration)!==null&&ne!==void 0?ne:-1,elapsedOverall:x.elapsed()}),ce},ae=(()=>ye(this,void 0,void 0,function*(){if(!d||B.kindFilter.has(27)||B.providerFilter.size>0&&!B.providerFilter.has(d))return;const oe=new w.StopWatch(!0),Z=yield d.provideCompletionItems(M,O,T,R);re(d,Z,oe)}))();for(let oe of t.CompletionProviderRegistry.orderedGroups(M)){let Z=!1;if(yield Promise.all(oe.map(x=>ye(this,void 0,void 0,function*(){if(!(B.providerFilter.size>0&&!B.providerFilter.has(x)))try{const U=new w.StopWatch(!0),Q=yield x.provideCompletionItems(M,O,T,R);Z=re(x,Q,U)||Z}catch(U){(0,m.onUnexpectedExternalError)(U)}}))),Z||R.isCancellationRequested)break}return yield ae,R.isCancellationRequested?(q.dispose(),Promise.reject((0,m.canceled)())):new f(H.sort(E(B.snippetSortOrder)),G,{entries:X,elapsed:P.elapsed()},q)})}e.provideSuggestionItems=S;function v(M,O){if(M.sortTextLow&&O.sortTextLow){if(M.sortTextLow<O.sortTextLow)return-1;if(M.sortTextLow>O.sortTextLow)return 1}return M.completion.label<O.completion.label?-1:M.completion.label>O.completion.label?1:M.completion.kind-O.completion.kind}function C(M,O){if(M.completion.kind!==O.completion.kind){if(M.completion.kind===27)return-1;if(O.completion.kind===27)return 1}return v(M,O)}function _(M,O){if(M.completion.kind!==O.completion.kind){if(M.completion.kind===27)return 1;if(O.completion.kind===27)return-1}return v(M,O)}const L=new Map;L.set(0,C),L.set(2,_),L.set(1,v);function E(M){return L.get(M)}e.getSuggestionComparator=E,r.CommandsRegistry.registerCommand("_executeCompletionItemProvider",(M,...O)=>ye(void 0,void 0,void 0,function*(){const[B,T,R,P]=O;(0,b.assertType)(p.URI.isUri(B)),(0,b.assertType)(h.Position.isIPosition(T)),(0,b.assertType)(typeof R=="string"||!R),(0,b.assertType)(typeof P=="number"||!P);const F=yield M.get(i.ITextModelService).createModelReference(B);try{const W={incomplete:!1,suggestions:[]},A=[],H=yield S(F.object.textEditorModel,h.Position.lift(T),void 0,{triggerCharacter:R,triggerKind:R?1:0});for(const q of H.items)A.length<(P??0)&&A.push(q.resolve(y.CancellationToken.None)),W.incomplete=W.incomplete||q.container.incomplete,W.suggestions.push(q.completion);try{return yield Promise.all(A),W}finally{setTimeout(()=>H.disposable.dispose(),100)}}finally{F.dispose()}}));const N=new class{constructor(){this.onlyOnceSuggestions=[]}provideCompletionItems(){let O={suggestions:this.onlyOnceSuggestions.slice(0)};return this.onlyOnceSuggestions.length=0,O}};t.CompletionProviderRegistry.register("*",N);function k(M,O){setTimeout(()=>{var B;N.onlyOnceSuggestions.push(...O),(B=M.getContribution("editor.contrib.suggestController"))===null||B===void 0||B.triggerSuggest(new Set().add(N))},0)}e.showSimpleSuggestions=k}),define(te[289],ie([1,0,43,231,15,575]),function(j,e,y,m,D,I){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ToggleTabFocusModeAction=void 0;class w extends D.EditorAction{constructor(){super({id:w.ID,label:I.localize(0,null),alias:"Toggle Tab Key Moves Focus",precondition:void 0,kbOpts:{kbExpr:null,primary:2048|43,mac:{primary:256|1024|43},weight:100}})}run(p,h){const t=!m.TabFocus.getTabFocusMode();m.TabFocus.setTabFocusMode(t),t?(0,y.alert)(I.localize(1,null)):(0,y.alert)(I.localize(2,null))}}e.ToggleTabFocusModeAction=w,w.ID="editor.action.toggleTabFocusMode",(0,D.registerEditorAction)(w)}),define(te[676],ie([1,0,65,15,576]),function(j,e,y,m,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0});class I extends m.EditorAction{constructor(){super({id:"editor.action.forceRetokenize",label:D.localize(0,null),alias:"Developer: Force Retokenize",precondition:void 0})}run(b,p){if(!p.hasModel())return;const h=p.getModel();h.resetTokenization();const g=new y.StopWatch(!0);h.forceTokenization(h.getLineCount()),g.stop(),console.log(`tokenization took ${g.elapsed()}`)}}(0,m.registerEditorAction)(I)}),define(te[677],ie([1,0,2,41,15,28,578,127]),function(j,e,y,m,D,I,w,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.UnusualLineTerminatorsDetector=void 0;const p="ignoreUnusualLineTerminators";function h(i,n,l){i.setModelProperty(n.uri,p,l)}function g(i,n){return i.getModelProperty(n.uri,p)}let t=class extends y.Disposable{constructor(n,l,c){super();this._editor=n,this._dialogService=l,this._codeEditorService=c,this._config=this._editor.getOption(114),this._register(this._editor.onDidChangeConfiguration(r=>{r.hasChanged(114)&&(this._config=this._editor.getOption(114),this._checkForUnusualLineTerminators())})),this._register(this._editor.onDidChangeModel(()=>{this._checkForUnusualLineTerminators()})),this._register(this._editor.onDidChangeModelContent(r=>{r.isUndoing||this._checkForUnusualLineTerminators()}))}_checkForUnusualLineTerminators(){return ye(this,void 0,void 0,function*(){if(this._config==="off"||!this._editor.hasModel())return;const n=this._editor.getModel();if(!n.mightContainUnusualLineTerminators()||g(this._codeEditorService,n)===!0||this._editor.getOption(81))return;if(this._config==="auto"){n.removeUnusualLineTerminators(this._editor.getSelections());return}if(!(yield this._dialogService.confirm({title:w.localize(0,null),message:w.localize(1,null),detail:w.localize(2,null,(0,m.basename)(n.uri)),primaryButton:w.localize(3,null),secondaryButton:w.localize(4,null)})).confirmed){h(this._codeEditorService,n,!0);return}n.removeUnusualLineTerminators(this._editor.getSelections())})}};t.ID="editor.contrib.unusualLineTerminatorsDetector",t=Ie([Ce(1,b.IDialogService),Ce(2,I.ICodeEditorService)],t),e.UnusualLineTerminatorsDetector=t,(0,D.registerEditorContribution)(t.ID,t)}),define(te[678],ie([1,0,7,30,169,43,60,2,17,8,25,15,24,289,16,9,42,51,23,14,70,390]),function(j,e,y,m,D,I,w,b,p,h,g,t,i,n,l,c,r,s,o,a,d){"use strict";Object.defineProperty(e,"__esModule",{value:!0});const u=new l.RawContextKey("accessibilityHelpWidgetVisible",!1);let f=class Ni extends b.Disposable{constructor(E,N){super();this._editor=E,this._widget=this._register(N.createInstance(v,this._editor))}static get(E){return E.getContribution(Ni.ID)}show(){this._widget.show()}hide(){this._widget.hide()}};f.ID="editor.contrib.accessibilityHelpController",f=Ie([Ce(1,c.IInstantiationService)],f);function S(L,E){return!L||L.length===0?d.AccessibilityHelpNLS.noSelection:L.length===1?E?h.format(d.AccessibilityHelpNLS.singleSelectionRange,L[0].positionLineNumber,L[0].positionColumn,E):h.format(d.AccessibilityHelpNLS.singleSelection,L[0].positionLineNumber,L[0].positionColumn):E?h.format(d.AccessibilityHelpNLS.multiSelectionRange,L.length,E):L.length>0?h.format(d.AccessibilityHelpNLS.multiSelection,L.length):""}let v=class xt extends w.Widget{constructor(E,N,k,M){super();this._contextKeyService=N,this._keybindingService=k,this._openerService=M,this._editor=E,this._isVisibleKey=u.bindTo(this._contextKeyService),this._domNode=(0,m.createFastDomNode)(document.createElement("div")),this._domNode.setClassName("accessibilityHelpWidget"),this._domNode.setDisplay("none"),this._domNode.setAttribute("role","dialog"),this._domNode.setAttribute("aria-hidden","true"),this._contentDomNode=(0,m.createFastDomNode)(document.createElement("div")),this._contentDomNode.setAttribute("role","document"),this._domNode.appendChild(this._contentDomNode),this._isVisible=!1,this._register(this._editor.onDidLayoutChange(()=>{this._isVisible&&this._layout()})),this._register(y.addStandardDisposableListener(this._contentDomNode.domNode,"keydown",O=>{if(!!this._isVisible&&(O.equals(2048|35)&&((0,I.alert)(d.AccessibilityHelpNLS.emergencyConfOn),this._editor.updateOptions({accessibilitySupport:"on"}),y.clearNode(this._contentDomNode.domNode),this._buildContent(),this._contentDomNode.domNode.focus(),O.preventDefault(),O.stopPropagation()),O.equals(2048|38))){(0,I.alert)(d.AccessibilityHelpNLS.openingDocs);let B=this._editor.getRawOptions().accessibilityHelpUrl;typeof B=="undefined"&&(B="https://go.microsoft.com/fwlink/?linkid=852450"),this._openerService.open(g.URI.parse(B)),O.preventDefault(),O.stopPropagation()}})),this.onblur(this._contentDomNode.domNode,()=>{this.hide()}),this._editor.addOverlayWidget(this)}dispose(){this._editor.removeOverlayWidget(this),super.dispose()}getId(){return xt.ID}getDomNode(){return this._domNode.domNode}getPosition(){return{preference:null}}show(){this._isVisible||(this._isVisible=!0,this._isVisibleKey.set(!0),this._layout(),this._domNode.setDisplay("block"),this._domNode.setAttribute("aria-hidden","false"),this._contentDomNode.domNode.tabIndex=0,this._buildContent(),this._contentDomNode.domNode.focus())}_descriptionForCommand(E,N,k){const M=this._keybindingService.lookupKeybinding(E);return M?h.format(N,M.getAriaLabel()):h.format(k,E)}_buildContent(){const E=this._editor.getOptions(),N=this._editor.getSelections();let k=0;if(N){const T=this._editor.getModel();T&&N.forEach(R=>{k+=T.getValueLengthInRange(R)})}let M=S(N,k);E.get(54)?E.get(81)?M+=d.AccessibilityHelpNLS.readonlyDiffEditor:M+=d.AccessibilityHelpNLS.editableDiffEditor:E.get(81)?M+=d.AccessibilityHelpNLS.readonlyEditor:M+=d.AccessibilityHelpNLS.editableEditor;const O=p.isMacintosh?d.AccessibilityHelpNLS.changeConfigToOnMac:d.AccessibilityHelpNLS.changeConfigToOnWinLinux;switch(E.get(2)){case 0:M+=`
|
||
|
||
- `+O;break;case 2:M+=`
|
||
|
||
- `+d.AccessibilityHelpNLS.auto_on;break;case 1:M+=`
|
||
|
||
- `+d.AccessibilityHelpNLS.auto_off,M+=" "+O;break}E.get(130)?M+=`
|
||
|
||
- `+this._descriptionForCommand(n.ToggleTabFocusModeAction.ID,d.AccessibilityHelpNLS.tabFocusModeOnMsg,d.AccessibilityHelpNLS.tabFocusModeOnMsgNoKb):M+=`
|
||
|
||
- `+this._descriptionForCommand(n.ToggleTabFocusModeAction.ID,d.AccessibilityHelpNLS.tabFocusModeOffMsg,d.AccessibilityHelpNLS.tabFocusModeOffMsgNoKb);const B=p.isMacintosh?d.AccessibilityHelpNLS.openDocMac:d.AccessibilityHelpNLS.openDocWinLinux;M+=`
|
||
|
||
- `+B,M+=`
|
||
|
||
`+d.AccessibilityHelpNLS.outroMsg,this._contentDomNode.domNode.appendChild((0,D.renderFormattedText)(M)),this._contentDomNode.domNode.setAttribute("aria-label",M)}hide(){!this._isVisible||(this._isVisible=!1,this._isVisibleKey.reset(),this._domNode.setDisplay("none"),this._domNode.setAttribute("aria-hidden","true"),this._contentDomNode.domNode.tabIndex=-1,y.clearNode(this._contentDomNode.domNode),this._editor.focus())}_layout(){const E=this._editor.getLayoutInfo(),N=Math.max(5,Math.min(xt.WIDTH,E.width-40)),k=Math.max(5,Math.min(xt.HEIGHT,E.height-40));this._domNode.setWidth(N),this._domNode.setHeight(k);const M=Math.round((E.height-k)/2);this._domNode.setTop(M);const O=Math.round((E.width-N)/2);this._domNode.setLeft(O)}};v.ID="editor.contrib.accessibilityHelpWidget",v.WIDTH=500,v.HEIGHT=300,v=Ie([Ce(1,l.IContextKeyService),Ce(2,r.IKeybindingService),Ce(3,s.IOpenerService)],v);class C extends t.EditorAction{constructor(){super({id:"editor.action.showAccessibilityHelp",label:d.AccessibilityHelpNLS.showAccessibilityHelpAction,alias:"Show Accessibility Help",precondition:void 0,kbOpts:{primary:512|59,weight:100,linux:{primary:512|1024|59,secondary:[512|59]}}})}run(E,N){const k=f.get(N);k&&k.show()}}(0,t.registerEditorContribution)(f.ID,f),(0,t.registerEditorAction)(C);const _=t.EditorCommand.bindToContribution(f.get);(0,t.registerEditorCommand)(new _({id:"closeAccessibilityHelp",precondition:u,handler:L=>L.hide(),kbOpts:{weight:100+100,kbExpr:i.EditorContextKeys.focus,primary:9,secondary:[1024|9]}})),(0,a.registerThemingParticipant)((L,E)=>{const N=L.getColor(o.editorWidgetBackground);N&&E.addRule(`.monaco-editor .accessibilityHelpWidget { background-color: ${N}; }`);const k=L.getColor(o.editorWidgetForeground);k&&E.addRule(`.monaco-editor .accessibilityHelpWidget { color: ${k}; }`);const M=L.getColor(o.widgetShadow);M&&E.addRule(`.monaco-editor .accessibilityHelpWidget { box-shadow: 0 2px 8px ${M}; }`);const O=L.getColor(o.contrastBorder);O&&E.addRule(`.monaco-editor .accessibilityHelpWidget { border: 2px solid ${O}; }`)})}),define(te[679],ie([1,0,7,2,15,17,391]),function(j,e,y,m,D,I){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IPadShowKeyboard=void 0;class w extends m.Disposable{constructor(h){super();this.editor=h,this.widget=null,I.isIOS&&(this._register(h.onDidChangeConfiguration(()=>this.update())),this.update())}update(){const h=!this.editor.getOption(81);!this.widget&&h?this.widget=new b(this.editor):this.widget&&!h&&(this.widget.dispose(),this.widget=null)}dispose(){super.dispose(),this.widget&&(this.widget.dispose(),this.widget=null)}}e.IPadShowKeyboard=w,w.ID="editor.contrib.iPadShowKeyboard";class b extends m.Disposable{constructor(h){super();this.editor=h,this._domNode=document.createElement("textarea"),this._domNode.className="iPadShowKeyboard",this._register(y.addDisposableListener(this._domNode,"touchstart",g=>{this.editor.focus()})),this._register(y.addDisposableListener(this._domNode,"focus",g=>{this.editor.focus()})),this.editor.addOverlayWidget(this)}dispose(){this.editor.removeOverlayWidget(this),super.dispose()}getId(){return b.ID}getDomNode(){return this._domNode}getPosition(){return{preference:1}}}b.ID="editor.contrib.ShowKeyboardWidget",(0,D.registerEditorContribution)(w.ID,w)}),define(te[680],ie([1,0,7,29,2,15,18,121,35,101,23,14,70,132,392]),function(j,e,y,m,D,I,w,b,p,h,g,t,i,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});let l=class Ti extends D.Disposable{constructor(d,u,f){super();this._editor=d,this._languageService=f,this._widget=null,this._register(this._editor.onDidChangeModel(S=>this.stop())),this._register(this._editor.onDidChangeModelLanguage(S=>this.stop())),this._register(w.TokenizationRegistry.onDidChange(S=>this.stop())),this._register(this._editor.onKeyUp(S=>S.keyCode===9&&this.stop()))}static get(d){return d.getContribution(Ti.ID)}dispose(){this.stop(),super.dispose()}launch(){this._widget||!this._editor.hasModel()||(this._widget=new o(this._editor,this._languageService))}stop(){this._widget&&(this._widget.dispose(),this._widget=null)}};l.ID="editor.contrib.inspectTokens",l=Ie([Ce(1,h.IStandaloneThemeService),Ce(2,p.ILanguageService)],l);class c extends I.EditorAction{constructor(){super({id:"editor.action.inspectTokens",label:i.InspectTokensNLS.inspectTokensAction,alias:"Developer: Inspect Tokens",precondition:void 0})}run(d,u){const f=l.get(u);f&&f.launch()}}function r(a){let d="";for(let u=0,f=a.length;u<f;u++){const S=a.charCodeAt(u);switch(S){case 9:d+="\u2192";break;case 32:d+="\xB7";break;default:d+=String.fromCharCode(S)}}return d}function s(a,d){const u=w.TokenizationRegistry.get(d);if(u)return u;const f=a.encodeLanguageId(d);return{getInitialState:()=>b.NullState,tokenize:(S,v,C)=>(0,b.nullTokenize)(d,C),tokenizeEncoded:(S,v,C)=>(0,b.nullTokenizeEncoded)(f,C)}}class o extends D.Disposable{constructor(d,u){super();this.allowEditorOverflow=!0,this._editor=d,this._languageService=u,this._model=this._editor.getModel(),this._domNode=document.createElement("div"),this._domNode.className="tokens-inspect-widget",this._tokenizationSupport=s(this._languageService.languageIdCodec,this._model.getLanguageId()),this._compute(this._editor.getPosition()),this._register(this._editor.onDidChangeCursorPosition(f=>this._compute(this._editor.getPosition()))),this._editor.addContentWidget(this)}dispose(){this._editor.removeContentWidget(this),super.dispose()}getId(){return o._ID}_compute(d){const u=this._getTokensAtLine(d.lineNumber);let f=0;for(let L=u.tokens1.length-1;L>=0;L--){const E=u.tokens1[L];if(d.column-1>=E.offset){f=L;break}}let S=0;for(let L=u.tokens2.length>>>1;L>=0;L--)if(d.column-1>=u.tokens2[L<<1]){S=L;break}const v=this._model.getLineContent(d.lineNumber);let C="";if(f<u.tokens1.length){const L=u.tokens1[f].offset,E=f+1<u.tokens1.length?u.tokens1[f+1].offset:v.length;C=v.substring(L,E)}(0,y.reset)(this._domNode,(0,y.$)("h2.tm-token",void 0,r(C),(0,y.$)("span.tm-token-length",void 0,`${C.length} ${C.length===1?"char":"chars"}`))),(0,y.append)(this._domNode,(0,y.$)("hr.tokens-inspect-separator",{style:"clear:both"}));const _=(S<<1)+1<u.tokens2.length?this._decodeMetadata(u.tokens2[(S<<1)+1]):null;(0,y.append)(this._domNode,(0,y.$)("table.tm-metadata-table",void 0,(0,y.$)("tbody",void 0,(0,y.$)("tr",void 0,(0,y.$)("td.tm-metadata-key",void 0,"language"),(0,y.$)("td.tm-metadata-value",void 0,`${_?_.languageId:"-?-"}`)),(0,y.$)("tr",void 0,(0,y.$)("td.tm-metadata-key",void 0,"token type"),(0,y.$)("td.tm-metadata-value",void 0,`${_?this._tokenTypeToString(_.tokenType):"-?-"}`)),(0,y.$)("tr",void 0,(0,y.$)("td.tm-metadata-key",void 0,"font style"),(0,y.$)("td.tm-metadata-value",void 0,`${_?this._fontStyleToString(_.fontStyle):"-?-"}`)),(0,y.$)("tr",void 0,(0,y.$)("td.tm-metadata-key",void 0,"foreground"),(0,y.$)("td.tm-metadata-value",void 0,`${_?m.Color.Format.CSS.formatHex(_.foreground):"-?-"}`)),(0,y.$)("tr",void 0,(0,y.$)("td.tm-metadata-key",void 0,"background"),(0,y.$)("td.tm-metadata-value",void 0,`${_?m.Color.Format.CSS.formatHex(_.background):"-?-"}`))))),(0,y.append)(this._domNode,(0,y.$)("hr.tokens-inspect-separator")),f<u.tokens1.length&&(0,y.append)(this._domNode,(0,y.$)("span.tm-token-type",void 0,u.tokens1[f].type)),this._editor.layoutContentWidget(this)}_decodeMetadata(d){const u=w.TokenizationRegistry.getColorMap(),f=w.TokenMetadata.getLanguageId(d),S=w.TokenMetadata.getTokenType(d),v=w.TokenMetadata.getFontStyle(d),C=w.TokenMetadata.getForeground(d),_=w.TokenMetadata.getBackground(d);return{languageId:this._languageService.languageIdCodec.decodeLanguageId(f),tokenType:S,fontStyle:v,foreground:u[C],background:u[_]}}_tokenTypeToString(d){switch(d){case 0:return"Other";case 1:return"Comment";case 2:return"String";case 3:return"RegEx";default:return"??"}}_fontStyleToString(d){let u="";return d&1&&(u+="italic "),d&2&&(u+="bold "),d&4&&(u+="underline "),d&8&&(u+="strikethrough "),u.length===0&&(u="---"),u}_getTokensAtLine(d){const u=this._getStateBeforeLine(d),f=this._tokenizationSupport.tokenize(this._model.getLineContent(d),!0,u),S=this._tokenizationSupport.tokenizeEncoded(this._model.getLineContent(d),!0,u);return{startState:u,tokens1:f.tokens,tokens2:S.tokens,endState:f.endState}}_getStateBeforeLine(d){let u=this._tokenizationSupport.getInitialState();for(let f=1;f<d;f++)u=this._tokenizationSupport.tokenize(this._model.getLineContent(f),!0,u).endState;return u}getDomNode(){return this._domNode}getPosition(){return{position:this._editor.getPosition(),preference:[2,1]}}}o._ID="editor.contrib.inspectTokensWidget",(0,I.registerEditorContribution)(l.ID,l),(0,I.registerEditorAction)(c),(0,t.registerThemingParticipant)((a,d)=>{const u=a.getColor(g.editorHoverBorder);if(u){const v=a.type===n.ColorScheme.HIGH_CONTRAST?2:1;d.addRule(`.monaco-editor .tokens-inspect-widget { border: ${v}px solid ${u}; }`),d.addRule(`.monaco-editor .tokens-inspect-widget .tokens-inspect-separator { background-color: ${u}; }`)}const f=a.getColor(g.editorHoverBackground);f&&d.addRule(`.monaco-editor .tokens-inspect-widget { background-color: ${f}; }`);const S=a.getColor(g.editorHoverForeground);S&&d.addRule(`.monaco-editor .tokens-inspect-widget { color: ${S}; }`)})}),define(te[681],ie([1,0,36,105,70,28,633,20,9,42,26,87,127,15,24,78]),function(j,e,y,m,D,I,w,b,p,h,g,t,i,n,l,c){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.GotoLineAction=e.StandaloneCommandsQuickAccessProvider=void 0;let r=class extends w.AbstractEditorCommandsQuickAccessProvider{constructor(a,d,u,f,S,v){super({showAlias:!1},a,u,f,S,v);this.codeEditorService=d}get activeTextEditorControl(){return(0,b.withNullAsUndefined)(this.codeEditorService.getFocusedCodeEditor())}getCommandPicks(){return ye(this,void 0,void 0,function*(){return this.getCodeEditorCommandPicks()})}};r=Ie([Ce(0,p.IInstantiationService),Ce(1,I.ICodeEditorService),Ce(2,h.IKeybindingService),Ce(3,g.ICommandService),Ce(4,t.ITelemetryService),Ce(5,i.IDialogService)],r),e.StandaloneCommandsQuickAccessProvider=r,y.Registry.as(m.Extensions.Quickaccess).registerQuickAccessProvider({ctor:r,prefix:r.PREFIX,helpEntries:[{description:D.QuickCommandNLS.quickCommandHelp,needsEditor:!0}]});class s extends n.EditorAction{constructor(){super({id:"editor.action.quickCommand",label:D.QuickCommandNLS.quickCommandActionLabel,alias:"Command Palette",precondition:void 0,kbOpts:{kbExpr:l.EditorContextKeys.focus,primary:59,weight:100},contextMenuOpts:{group:"z_commands",order:1}})}run(a){a.get(c.IQuickInputService).quickAccess.show(r.PREFIX)}}e.GotoLineAction=s,(0,n.registerEditorAction)(s)}),define(te[682],ie([1,0,655,36,105,28,20,70,4,15,24,78]),function(j,e,y,m,D,I,w,b,p,h,g,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.GotoLineAction=e.StandaloneGotoLineQuickAccessProvider=void 0;let i=class extends y.AbstractGotoLineQuickAccessProvider{constructor(c){super();this.editorService=c,this.onDidActiveTextEditorControlChange=p.Event.None}get activeTextEditorControl(){return(0,w.withNullAsUndefined)(this.editorService.getFocusedCodeEditor())}};i=Ie([Ce(0,I.ICodeEditorService)],i),e.StandaloneGotoLineQuickAccessProvider=i,m.Registry.as(D.Extensions.Quickaccess).registerQuickAccessProvider({ctor:i,prefix:i.PREFIX,helpEntries:[{description:b.GoToLineNLS.gotoLineActionLabel,needsEditor:!0}]});class n extends h.EditorAction{constructor(){super({id:"editor.action.gotoLine",label:b.GoToLineNLS.gotoLineActionLabel,alias:"Go to Line/Column...",precondition:void 0,kbOpts:{kbExpr:g.EditorContextKeys.focus,primary:2048|37,mac:{primary:256|37},weight:100}})}run(c){c.get(t.IQuickInputService).quickAccess.show(i.PREFIX)}}e.GotoLineAction=n,(0,h.registerEditorAction)(n)}),define(te[683],ie([1,0,656,36,105,28,20,70,4,15,24,78,199,140,283]),function(j,e,y,m,D,I,w,b,p,h,g,t,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.GotoLineAction=e.StandaloneGotoSymbolQuickAccessProvider=void 0;let n=class extends y.AbstractGotoSymbolQuickAccessProvider{constructor(r,s){super(s);this.editorService=r,this.onDidActiveTextEditorControlChange=p.Event.None}get activeTextEditorControl(){return(0,w.withNullAsUndefined)(this.editorService.getFocusedCodeEditor())}};n=Ie([Ce(0,I.ICodeEditorService),Ce(1,i.IOutlineModelService)],n),e.StandaloneGotoSymbolQuickAccessProvider=n,m.Registry.as(D.Extensions.Quickaccess).registerQuickAccessProvider({ctor:n,prefix:y.AbstractGotoSymbolQuickAccessProvider.PREFIX,helpEntries:[{description:b.QuickOutlineNLS.quickOutlineActionLabel,prefix:y.AbstractGotoSymbolQuickAccessProvider.PREFIX,needsEditor:!0},{description:b.QuickOutlineNLS.quickOutlineByCategoryActionLabel,prefix:y.AbstractGotoSymbolQuickAccessProvider.PREFIX_BY_CATEGORY,needsEditor:!0}]});class l extends h.EditorAction{constructor(){super({id:"editor.action.quickOutline",label:b.QuickOutlineNLS.quickOutlineActionLabel,alias:"Go to Symbol...",precondition:g.EditorContextKeys.hasDocumentSymbolProvider,kbOpts:{kbExpr:g.EditorContextKeys.focus,primary:2048|1024|45,weight:100},contextMenuOpts:{group:"navigation",order:3}})}run(r){r.get(t.IQuickInputService).quickAccess.show(y.AbstractGotoSymbolQuickAccessProvider.PREFIX)}}e.GotoLineAction=l,(0,h.registerEditorAction)(l)}),define(te[684],ie([1,0,15,101,70]),function(j,e,y,m,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0});class I extends y.EditorAction{constructor(){super({id:"editor.action.toggleHighContrast",label:D.ToggleHighContrastNLS.toggleHighContrast,alias:"Toggle High Contrast Theme",precondition:void 0});this._originalThemeName=null}run(b,p){const h=b.get(m.IStandaloneThemeService);this._originalThemeName?(h.setTheme(this._originalThemeName),this._originalThemeName=null):(this._originalThemeName=h.getColorTheme().themeName,h.setTheme("hc-black"))}}(0,y.registerEditorAction)(I)}),define(te[202],ie([1,0,7,46,125,484,44,193,2,17,581,37,16,76,9,42,38,80,14,395]),function(j,e,y,m,D,I,w,b,p,h,g,t,i,n,l,c,r,s,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.createActionViewItem=e.SubmenuEntryActionViewItem=e.MenuEntryActionViewItem=e.createAndFillInActionBarActions=void 0;function a(_,L,E,N,k,M,O){const B=_.getActions(L);return u(B,E,!1,typeof N=="string"?R=>R===N:N,k,M,O),d(B)}e.createAndFillInActionBarActions=a;function d(_){const L=new p.DisposableStore;for(const[,E]of _)for(const N of E)L.add(N);return L}function u(_,L,E,N=B=>B==="navigation",k=Number.MAX_SAFE_INTEGER,M=()=>!1,O=!1){let B,T;Array.isArray(L)?(B=L,T=L):(B=L.primary,T=L.secondary);const R=new Set;for(const[P,F]of _){let W;N(P)?(W=B,W.length>0&&O&&W.push(new w.Separator)):(W=T,W.length>0&&W.push(new w.Separator));for(let A of F){E&&(A=A instanceof t.MenuItemAction&&A.alt?A.alt:A);const H=W.push(A);A instanceof w.SubmenuAction&&R.add({group:P,action:A,index:H-1})}}for(const{group:P,action:F,index:W}of R){const A=N(P)?B:T,H=F.actions;(H.length<=1||A.length+H.length-2<=k)&&M(F,P,A.length)&&A.splice(W,1,...H)}if(B!==T&&B.length>k){const P=B.splice(k,B.length-k);T.unshift(...P,new w.Separator)}}let f=class extends D.ActionViewItem{constructor(L,E,N,k,M){super(void 0,L,{icon:!!(L.class||L.item.icon),label:!L.class&&!L.item.icon,draggable:E==null?void 0:E.draggable});this._keybindingService=N,this._notificationService=k,this._contextKeyService=M,this._wantsAltCommand=!1,this._itemClassDispose=this._register(new p.MutableDisposable),this._altKey=y.ModifierKeyEmitter.getInstance()}get _menuItemAction(){return this._action}get _commandAction(){return this._wantsAltCommand&&this._menuItemAction.alt||this._menuItemAction}onClick(L){return ye(this,void 0,void 0,function*(){L.preventDefault(),L.stopPropagation();try{yield this.actionRunner.run(this._commandAction,this._context)}catch(E){this._notificationService.error(E)}})}render(L){super.render(L),L.classList.add("menu-entry"),this._updateItemClass(this._menuItemAction.item);let E=!1,N=this._altKey.keyStatus.altKey||(h.isWindows||h.isLinux)&&this._altKey.keyStatus.shiftKey;const k=()=>{const M=E&&N;M!==this._wantsAltCommand&&(this._wantsAltCommand=M,this.updateLabel(),this.updateTooltip(),this.updateClass())};this._menuItemAction.alt&&this._register(this._altKey.event(M=>{N=M.altKey||(h.isWindows||h.isLinux)&&M.shiftKey,k()})),this._register((0,y.addDisposableListener)(L,"mouseleave",M=>{E=!1,k()})),this._register((0,y.addDisposableListener)(L,"mouseenter",M=>{E=!0,k()}))}updateLabel(){this.options.label&&this.label&&(this.label.textContent=this._commandAction.label)}updateTooltip(){if(this.label){const L=this._keybindingService.lookupKeybinding(this._commandAction.id,this._contextKeyService),E=L&&L.getLabel(),N=this._commandAction.tooltip||this._commandAction.label;let k=E?(0,g.localize)(0,null,N,E):N;if(!this._wantsAltCommand&&this._menuItemAction.alt){const M=this._menuItemAction.alt.tooltip||this._menuItemAction.alt.label,O=this._keybindingService.lookupKeybinding(this._menuItemAction.alt.id,this._contextKeyService),B=O&&O.getLabel(),T=B?(0,g.localize)(1,null,M,B):M;k+=`
|
||
[${b.UILabelProvider.modifierLabels[h.OS].altKey}] ${T}`}this.label.title=k}}updateClass(){this.options.icon&&(this._commandAction!==this._menuItemAction?this._menuItemAction.alt&&this._updateItemClass(this._menuItemAction.alt.item):this._menuItemAction.alt&&this._updateItemClass(this._menuItemAction.item))}_updateItemClass(L){var E;this._itemClassDispose.value=void 0;const{element:N,label:k}=this;if(!N||!k)return;const M=this._commandAction.checked&&((E=L.toggled)===null||E===void 0?void 0:E.icon)?L.toggled.icon:L.icon;if(!!M)if(o.ThemeIcon.isThemeIcon(M)){const O=o.ThemeIcon.asClassNameArray(M);k.classList.add(...O),this._itemClassDispose.value=(0,p.toDisposable)(()=>{k.classList.remove(...O)})}else M.light&&k.style.setProperty("--menu-entry-icon-light",(0,y.asCSSUrl)(M.light)),M.dark&&k.style.setProperty("--menu-entry-icon-dark",(0,y.asCSSUrl)(M.dark)),k.classList.add("icon"),this._itemClassDispose.value=(0,p.toDisposable)(()=>{k.classList.remove("icon"),k.style.removeProperty("--menu-entry-icon-light"),k.style.removeProperty("--menu-entry-icon-dark")})}};f=Ie([Ce(2,c.IKeybindingService),Ce(3,r.INotificationService),Ce(4,i.IContextKeyService)],f),e.MenuEntryActionViewItem=f;let S=class extends I.DropdownMenuActionViewItem{constructor(L,E,N){var k,M;const O=Object.assign({},E??Object.create(null),{menuAsChild:(k=E==null?void 0:E.menuAsChild)!==null&&k!==void 0?k:!1,classNames:(M=E==null?void 0:E.classNames)!==null&&M!==void 0?M:o.ThemeIcon.isThemeIcon(L.item.icon)?o.ThemeIcon.asClassName(L.item.icon):void 0});super(L,{getActions:()=>L.actions},N,O)}render(L){if(super.render(L),this.element){L.classList.add("menu-entry");const{icon:E}=this._action.item;E&&!o.ThemeIcon.isThemeIcon(E)&&(this.element.classList.add("icon"),E.light&&this.element.style.setProperty("--menu-entry-icon-light",(0,y.asCSSUrl)(E.light)),E.dark&&this.element.style.setProperty("--menu-entry-icon-dark",(0,y.asCSSUrl)(E.dark)))}}};S=Ie([Ce(2,n.IContextMenuService)],S),e.SubmenuEntryActionViewItem=S;let v=class extends D.BaseActionViewItem{constructor(L,E,N,k,M,O,B,T){var R,P,F;super(null,L);this._keybindingService=N,this._notificationService=k,this._contextMenuService=M,this._menuService=O,this._instaService=B,this._storageService=T,this._container=null,this._storageKey=`${L.item.submenu._debugName}_lastActionId`;let W,A=T.get(this._storageKey,1);A&&(W=L.actions.find(q=>A===q.id)),W||(W=L.actions[0]),this._defaultAction=this._instaService.createInstance(f,W,void 0);const H=Object.assign({},E??Object.create(null),{menuAsChild:(R=E==null?void 0:E.menuAsChild)!==null&&R!==void 0?R:!0,classNames:(P=E==null?void 0:E.classNames)!==null&&P!==void 0?P:["codicon","codicon-chevron-down"],actionRunner:(F=E==null?void 0:E.actionRunner)!==null&&F!==void 0?F:new w.ActionRunner});this._dropdown=new I.DropdownMenuActionViewItem(L,L.actions,this._contextMenuService,H),this._dropdown.actionRunner.onDidRun(q=>{q.action instanceof t.MenuItemAction&&this.update(q.action)})}update(L){this._storageService.store(this._storageKey,L.id,1,0),this._defaultAction.dispose(),this._defaultAction=this._instaService.createInstance(f,L,void 0),this._defaultAction.actionRunner=new class extends w.ActionRunner{runAction(E,N){return ye(this,void 0,void 0,function*(){yield E.run(void 0)})}},this._container&&this._defaultAction.render((0,y.prepend)(this._container,(0,y.$)(".action-container")))}setActionContext(L){super.setActionContext(L),this._defaultAction.setActionContext(L),this._dropdown.setActionContext(L)}render(L){this._container=L,super.render(this._container),this._container.classList.add("monaco-dropdown-with-default");const E=(0,y.$)(".action-container");this._defaultAction.render((0,y.append)(this._container,E)),this._register((0,y.addDisposableListener)(E,y.EventType.KEY_DOWN,k=>{const M=new m.StandardKeyboardEvent(k);M.equals(17)&&(this._defaultAction.element.tabIndex=-1,this._dropdown.focus(),M.stopPropagation())}));const N=(0,y.$)(".dropdown-action-container");this._dropdown.render((0,y.append)(this._container,N)),this._register((0,y.addDisposableListener)(N,y.EventType.KEY_DOWN,k=>{var M;const O=new m.StandardKeyboardEvent(k);O.equals(15)&&(this._defaultAction.element.tabIndex=0,this._dropdown.setFocusable(!1),(M=this._defaultAction.element)===null||M===void 0||M.focus(),O.stopPropagation())}))}focus(L){L?this._dropdown.focus():(this._defaultAction.element.tabIndex=0,this._defaultAction.element.focus())}blur(){this._defaultAction.element.tabIndex=-1,this._dropdown.blur(),this._container.blur()}setFocusable(L){L?this._defaultAction.element.tabIndex=0:(this._defaultAction.element.tabIndex=-1,this._dropdown.setFocusable(!1))}dispose(){this._defaultAction.dispose(),this._dropdown.dispose(),super.dispose()}};v=Ie([Ce(2,c.IKeybindingService),Ce(3,r.INotificationService),Ce(4,n.IContextMenuService),Ce(5,t.IMenuService),Ce(6,l.IInstantiationService),Ce(7,s.IStorageService)],v);function C(_,L,E){return L instanceof t.MenuItemAction?_.createInstance(f,L,void 0):L instanceof t.SubmenuItemAction?L.item.rememberDefaultAction?_.createInstance(v,L,E):_.createInstance(S,L,E):void 0}e.createActionViewItem=C}),define(te[685],ie([1,0,7,84,2,107,573,202,37,16,9]),function(j,e,y,m,D,I,w,b,p,h,g){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SuggestWidgetStatus=void 0;class t extends b.MenuEntryActionViewItem{updateLabel(){const l=this._keybindingService.lookupKeybinding(this._action.id,this._contextKeyService);if(!l)return super.updateLabel();this.label&&(this.label.textContent=(0,w.localize)(0,null,this._action.label,t.symbolPrintEnter(l)))}static symbolPrintEnter(l){var c;return(c=l.getLabel())===null||c===void 0?void 0:c.replace(/\benter\b/gi,"\u23CE")}}let i=class{constructor(l,c,r,s){this._menuService=r,this._contextKeyService=s,this._menuDisposables=new D.DisposableStore,this.element=y.append(l,y.$(".suggest-status-bar"));const o=a=>a instanceof p.MenuItemAction?c.createInstance(t,a,void 0):void 0;this._leftActions=new m.ActionBar(this.element,{actionViewItemProvider:o}),this._rightActions=new m.ActionBar(this.element,{actionViewItemProvider:o}),this._leftActions.domNode.classList.add("left"),this._rightActions.domNode.classList.add("right")}dispose(){this._menuDisposables.dispose(),this.element.remove()}show(){const l=this._menuService.createMenu(I.suggestWidgetStatusbarMenu,this._contextKeyService),c=()=>{const r=[],s=[];for(let[o,a]of l.getActions())o==="left"?r.push(...a):s.push(...a);this._leftActions.clear(),this._leftActions.push(r),this._rightActions.clear(),this._rightActions.push(s)};this._menuDisposables.add(l.onDidChange(()=>c())),this._menuDisposables.add(l)}hide(){this._menuDisposables.clear()}};i=Ie([Ce(1,g.IInstantiationService),Ce(2,p.IMenuService),Ce(3,h.IContextKeyService)],i),e.SuggestWidgetStatus=i}),define(te[686],ie([1,0,10,4,2,37,26,16]),function(j,e,y,m,D,I,w,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MenuService=void 0;let p=class{constructor(t){this._commandService=t}createMenu(t,i,n){return new h(t,Object.assign({emitEventsForSubmenuChanges:!1,eventDebounceDelay:50},n),this._commandService,i,this)}};p=Ie([Ce(0,w.ICommandService)],p),e.MenuService=p;let h=class Et{constructor(t,i,n,l,c){this._id=t,this._options=i,this._commandService=n,this._contextKeyService=l,this._menuService=c,this._disposables=new D.DisposableStore,this._menuGroups=[],this._contextKeys=new Set,this._build();const r=new y.RunOnceScheduler(()=>{this._build(),this._onDidChange.fire(this)},i.eventDebounceDelay);this._disposables.add(r),this._disposables.add(I.MenuRegistry.onDidChangeMenu(a=>{a.has(t)&&r.schedule()}));const s=this._disposables.add(new D.DisposableStore),o=()=>{const a=new y.RunOnceScheduler(()=>this._onDidChange.fire(this),i.eventDebounceDelay);s.add(a),s.add(l.onDidChangeContext(d=>{d.affectsSome(this._contextKeys)&&a.schedule()}))};this._onDidChange=new m.Emitter({onFirstListenerAdd:o,onLastListenerRemove:s.clear.bind(s)}),this.onDidChange=this._onDidChange.event}dispose(){this._disposables.dispose(),this._onDidChange.dispose()}_build(){this._menuGroups.length=0,this._contextKeys.clear();const t=I.MenuRegistry.getMenuItems(this._id);let i;t.sort(Et._compareMenuItems);for(const n of t){const l=n.group||"";(!i||i[0]!==l)&&(i=[l,[]],this._menuGroups.push(i)),i[1].push(n),this._collectContextKeys(n)}}_collectContextKeys(t){if(Et._fillInKbExprKeys(t.when,this._contextKeys),(0,I.isIMenuItem)(t)){if(t.command.precondition&&Et._fillInKbExprKeys(t.command.precondition,this._contextKeys),t.command.toggled){const i=t.command.toggled.condition||t.command.toggled;Et._fillInKbExprKeys(i,this._contextKeys)}}else this._options.emitEventsForSubmenuChanges&&I.MenuRegistry.getMenuItems(t.submenu).forEach(this._collectContextKeys,this)}getActions(t){const i=[];for(let n of this._menuGroups){const[l,c]=n,r=[];for(const s of c)if(this._contextKeyService.contextMatchesRules(s.when)){const o=(0,I.isIMenuItem)(s)?new I.MenuItemAction(s.command,s.alt,t,this._contextKeyService,this._commandService):new I.SubmenuItemAction(s,this._menuService,this._contextKeyService,t);r.push(o)}r.length>0&&i.push([l,r])}return i}static _fillInKbExprKeys(t,i){if(t)for(let n of t.keys())i.add(n)}static _compareMenuItems(t,i){let n=t.group,l=i.group;if(n!==l){if(n){if(!l)return-1}else return 1;if(n==="navigation")return-1;if(l==="navigation")return 1;let s=n.localeCompare(l);if(s!==0)return s}let c=t.order||0,r=i.order||0;return c<r?-1:c>r?1:Et._compareTitles((0,I.isIMenuItem)(t)?t.command.title:t.title,(0,I.isIMenuItem)(i)?i.command.title:i.title)}static _compareTitles(t,i){const n=typeof t=="string"?t:t.original,l=typeof i=="string"?i:i.original;return n.localeCompare(l)}};h=Ie([Ce(2,w.ICommandService),Ce(3,b.IContextKeyService),Ce(4,I.IMenuService)],h)}),define(te[687],ie([1,0,7,4,2,42,38,87,14,634,76]),function(j,e,y,m,D,I,w,b,p,h,g){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ContextMenuService=void 0;let t=class extends D.Disposable{constructor(n,l,c,r,s){super();this._onDidShowContextMenu=new m.Emitter,this._onDidHideContextMenu=new m.Emitter,this.contextMenuHandler=new h.ContextMenuHandler(c,n,l,r,s)}configure(n){this.contextMenuHandler.configure(n)}showContextMenu(n){this.contextMenuHandler.showContextMenu(Object.assign(Object.assign({},n),{onHide:l=>{n.onHide&&n.onHide(l),this._onDidHideContextMenu.fire()}})),y.ModifierKeyEmitter.getInstance().resetKeyStatus(),this._onDidShowContextMenu.fire()}};t=Ie([Ce(0,b.ITelemetryService),Ce(1,w.INotificationService),Ce(2,g.IContextViewService),Ce(3,I.IKeybindingService),Ce(4,p.IThemeService)],t),e.ContextMenuService=t}),define(te[157],ie([1,0,7,345,115,348,481,480,265,4,2,586,63,40,103,16,273,9,42,36,131,14]),function(j,e,y,m,D,I,w,b,p,h,g,t,i,n,l,c,r,s,o,a,d,u){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.WorkbenchCompressibleAsyncDataTree=e.WorkbenchAsyncDataTree=e.WorkbenchDataTree=e.WorkbenchCompressibleObjectTree=e.WorkbenchObjectTree=e.WorkbenchTable=e.WorkbenchPagedList=e.WorkbenchList=e.WorkbenchListAutomaticKeyboardNavigationKey=e.WorkbenchTreeElementHasChild=e.WorkbenchTreeElementCanExpand=e.WorkbenchTreeElementHasParent=e.WorkbenchTreeElementCanCollapse=e.WorkbenchListSelectionNavigation=e.WorkbenchListMultiSelection=e.WorkbenchListDoubleSelection=e.WorkbenchListHasSelectionOrFocus=e.WorkbenchListFocusContextKey=e.WorkbenchListSupportsMultiSelectContextKey=e.ListService=e.IListService=void 0,e.IListService=(0,s.createDecorator)("listService");let f=class{constructor(V){this._themeService=V,this.disposables=new g.DisposableStore,this.lists=[],this._lastFocusedWidget=void 0,this._hasCreatedStyleController=!1}get lastFocusedList(){return this._lastFocusedWidget}setLastFocusedList(V){var $,K;V!==this._lastFocusedWidget&&(($=this._lastFocusedWidget)===null||$===void 0||$.getHTMLElement().classList.remove("last-focused"),this._lastFocusedWidget=V,(K=this._lastFocusedWidget)===null||K===void 0||K.getHTMLElement().classList.add("last-focused"))}register(V,$){if(!this._hasCreatedStyleController){this._hasCreatedStyleController=!0;const J=new D.DefaultStyleController((0,y.createStyleSheet)(),"");this.disposables.add((0,d.attachListStyler)(J,this._themeService))}if(this.lists.some(J=>J.widget===V))throw new Error("Cannot register the same widget multiple times");const K={widget:V,extraContextKeys:$};return this.lists.push(K),V.getHTMLElement()===document.activeElement&&this.setLastFocusedList(V),(0,g.combinedDisposable)(V.onDidFocus(()=>this.setLastFocusedList(V)),(0,g.toDisposable)(()=>this.lists.splice(this.lists.indexOf(K),1)),V.onDidDispose(()=>{this.lists=this.lists.filter(J=>J!==K),this._lastFocusedWidget===V&&this.setLastFocusedList(void 0)}))}dispose(){this.disposables.dispose()}};f=Ie([Ce(0,u.IThemeService)],f),e.ListService=f;const S=new c.RawContextKey("listFocus",!0);e.WorkbenchListSupportsMultiSelectContextKey=new c.RawContextKey("listSupportsMultiselect",!0),e.WorkbenchListFocusContextKey=c.ContextKeyExpr.and(S,c.ContextKeyExpr.not(r.InputFocusedContextKey)),e.WorkbenchListHasSelectionOrFocus=new c.RawContextKey("listHasSelectionOrFocus",!1),e.WorkbenchListDoubleSelection=new c.RawContextKey("listDoubleSelection",!1),e.WorkbenchListMultiSelection=new c.RawContextKey("listMultiSelection",!1),e.WorkbenchListSelectionNavigation=new c.RawContextKey("listSelectionNavigation",!1),e.WorkbenchTreeElementCanCollapse=new c.RawContextKey("treeElementCanCollapse",!1),e.WorkbenchTreeElementHasParent=new c.RawContextKey("treeElementHasParent",!1),e.WorkbenchTreeElementCanExpand=new c.RawContextKey("treeElementCanExpand",!1),e.WorkbenchTreeElementHasChild=new c.RawContextKey("treeElementHasChild",!1),e.WorkbenchListAutomaticKeyboardNavigationKey="listAutomaticKeyboardNavigation";function v(z,V){const $=z.createScoped(V.getHTMLElement());return S.bindTo($),$}const C="workbench.list.multiSelectModifier",_="workbench.list.openMode",L="workbench.list.horizontalScrolling",E="workbench.list.keyboardNavigation",N="workbench.list.automaticKeyboardNavigation",k="workbench.tree.indent",M="workbench.tree.renderIndentGuides",O="workbench.list.smoothScrolling",B="workbench.list.mouseWheelScrollSensitivity",T="workbench.list.fastScrollSensitivity",R="workbench.tree.expandMode";function P(z){return z.getValue(C)==="alt"}class F extends g.Disposable{constructor(V){super();this.configurationService=V,this.useAltAsMultipleSelectionModifier=P(V),this.registerListeners()}registerListeners(){this._register(this.configurationService.onDidChangeConfiguration(V=>{V.affectsConfiguration(C)&&(this.useAltAsMultipleSelectionModifier=P(this.configurationService))}))}isSelectionSingleChangeEvent(V){return this.useAltAsMultipleSelectionModifier?V.browserEvent.altKey:(0,D.isSelectionSingleChangeEvent)(V)}isSelectionRangeChangeEvent(V){return(0,D.isSelectionRangeChangeEvent)(V)}}function W(z,V,$){var K;const J=new g.DisposableStore;return[Object.assign(Object.assign({},z),{keyboardNavigationDelegate:{mightProducePrintableCharacter(se){return $.mightProducePrintableCharacter(se)}},smoothScrolling:Boolean(V.getValue(O)),mouseWheelScrollSensitivity:V.getValue(B),fastScrollSensitivity:V.getValue(T),multipleSelectionController:(K=z.multipleSelectionController)!==null&&K!==void 0?K:J.add(new F(V))}),J]}let A=class extends D.List{constructor(V,$,K,J,Y,se,ge,me,le,he){const ve=typeof Y.horizontalScrolling!="undefined"?Y.horizontalScrolling:Boolean(le.getValue(L)),[pe,be]=W(Y,le,he);super(V,$,K,J,Object.assign(Object.assign(Object.assign({keyboardSupport:!1},(0,d.computeStyles)(me.getColorTheme(),d.defaultListStyles)),pe),{horizontalScrolling:ve}));this.disposables.add(be),this.contextKeyService=v(se,this),this.themeService=me,this.listSupportsMultiSelect=e.WorkbenchListSupportsMultiSelectContextKey.bindTo(this.contextKeyService),this.listSupportsMultiSelect.set(Y.multipleSelectionSupport!==!1),e.WorkbenchListSelectionNavigation.bindTo(this.contextKeyService).set(Boolean(Y.selectionNavigation)),this.listHasSelectionOrFocus=e.WorkbenchListHasSelectionOrFocus.bindTo(this.contextKeyService),this.listDoubleSelection=e.WorkbenchListDoubleSelection.bindTo(this.contextKeyService),this.listMultiSelection=e.WorkbenchListMultiSelection.bindTo(this.contextKeyService),this.horizontalScrolling=Y.horizontalScrolling,this._useAltAsMultipleSelectionModifier=P(le),this.disposables.add(this.contextKeyService),this.disposables.add(ge.register(this)),Y.overrideStyles&&this.updateStyles(Y.overrideStyles),this.disposables.add(this.onDidChangeSelection(()=>{const fe=this.getSelection(),_e=this.getFocus();this.contextKeyService.bufferChangeEvents(()=>{this.listHasSelectionOrFocus.set(fe.length>0||_e.length>0),this.listMultiSelection.set(fe.length>1),this.listDoubleSelection.set(fe.length===2)})})),this.disposables.add(this.onDidChangeFocus(()=>{const fe=this.getSelection(),_e=this.getFocus();this.listHasSelectionOrFocus.set(fe.length>0||_e.length>0)})),this.disposables.add(le.onDidChangeConfiguration(fe=>{fe.affectsConfiguration(C)&&(this._useAltAsMultipleSelectionModifier=P(le));let _e={};if(fe.affectsConfiguration(L)&&this.horizontalScrolling===void 0){const Le=Boolean(le.getValue(L));_e=Object.assign(Object.assign({},_e),{horizontalScrolling:Le})}if(fe.affectsConfiguration(O)){const Le=Boolean(le.getValue(O));_e=Object.assign(Object.assign({},_e),{smoothScrolling:Le})}if(fe.affectsConfiguration(B)){const Le=le.getValue(B);_e=Object.assign(Object.assign({},_e),{mouseWheelScrollSensitivity:Le})}if(fe.affectsConfiguration(T)){const Le=le.getValue(T);_e=Object.assign(Object.assign({},_e),{fastScrollSensitivity:Le})}Object.keys(_e).length>0&&this.updateOptions(_e)})),this.navigator=new G(this,Object.assign({configurationService:le},Y)),this.disposables.add(this.navigator)}updateOptions(V){super.updateOptions(V),V.overrideStyles&&this.updateStyles(V.overrideStyles),V.multipleSelectionSupport!==void 0&&this.listSupportsMultiSelect.set(!!V.multipleSelectionSupport)}updateStyles(V){var $;($=this._styler)===null||$===void 0||$.dispose(),this._styler=(0,d.attachListStyler)(this,this.themeService,V)}dispose(){var V;(V=this._styler)===null||V===void 0||V.dispose(),super.dispose()}};A=Ie([Ce(5,c.IContextKeyService),Ce(6,e.IListService),Ce(7,u.IThemeService),Ce(8,n.IConfigurationService),Ce(9,o.IKeybindingService)],A),e.WorkbenchList=A;let H=class extends m.PagedList{constructor(V,$,K,J,Y,se,ge,me,le,he){const ve=typeof Y.horizontalScrolling!="undefined"?Y.horizontalScrolling:Boolean(le.getValue(L)),[pe,be]=W(Y,le,he);super(V,$,K,J,Object.assign(Object.assign(Object.assign({keyboardSupport:!1},(0,d.computeStyles)(me.getColorTheme(),d.defaultListStyles)),pe),{horizontalScrolling:ve}));this.disposables=new g.DisposableStore,this.disposables.add(be),this.contextKeyService=v(se,this),this.themeService=me,this.horizontalScrolling=Y.horizontalScrolling,this.listSupportsMultiSelect=e.WorkbenchListSupportsMultiSelectContextKey.bindTo(this.contextKeyService),this.listSupportsMultiSelect.set(Y.multipleSelectionSupport!==!1),e.WorkbenchListSelectionNavigation.bindTo(this.contextKeyService).set(Boolean(Y.selectionNavigation)),this._useAltAsMultipleSelectionModifier=P(le),this.disposables.add(this.contextKeyService),this.disposables.add(ge.register(this)),Y.overrideStyles&&this.updateStyles(Y.overrideStyles),Y.overrideStyles&&this.disposables.add((0,d.attachListStyler)(this,me,Y.overrideStyles)),this.disposables.add(le.onDidChangeConfiguration(fe=>{fe.affectsConfiguration(C)&&(this._useAltAsMultipleSelectionModifier=P(le));let _e={};if(fe.affectsConfiguration(L)&&this.horizontalScrolling===void 0){const Le=Boolean(le.getValue(L));_e=Object.assign(Object.assign({},_e),{horizontalScrolling:Le})}if(fe.affectsConfiguration(O)){const Le=Boolean(le.getValue(O));_e=Object.assign(Object.assign({},_e),{smoothScrolling:Le})}if(fe.affectsConfiguration(B)){const Le=le.getValue(B);_e=Object.assign(Object.assign({},_e),{mouseWheelScrollSensitivity:Le})}if(fe.affectsConfiguration(T)){const Le=le.getValue(T);_e=Object.assign(Object.assign({},_e),{fastScrollSensitivity:Le})}Object.keys(_e).length>0&&this.updateOptions(_e)})),this.navigator=new G(this,Object.assign({configurationService:le},Y)),this.disposables.add(this.navigator)}updateOptions(V){super.updateOptions(V),V.overrideStyles&&this.updateStyles(V.overrideStyles),V.multipleSelectionSupport!==void 0&&this.listSupportsMultiSelect.set(!!V.multipleSelectionSupport)}updateStyles(V){var $;($=this._styler)===null||$===void 0||$.dispose(),this._styler=(0,d.attachListStyler)(this,this.themeService,V)}dispose(){var V;(V=this._styler)===null||V===void 0||V.dispose(),this.disposables.dispose(),super.dispose()}};H=Ie([Ce(5,c.IContextKeyService),Ce(6,e.IListService),Ce(7,u.IThemeService),Ce(8,n.IConfigurationService),Ce(9,o.IKeybindingService)],H),e.WorkbenchPagedList=H;let q=class extends I.Table{constructor(V,$,K,J,Y,se,ge,me,le,he,ve){const pe=typeof se.horizontalScrolling!="undefined"?se.horizontalScrolling:Boolean(he.getValue(L)),[be,de]=W(se,he,ve);super(V,$,K,J,Y,Object.assign(Object.assign(Object.assign({keyboardSupport:!1},(0,d.computeStyles)(le.getColorTheme(),d.defaultListStyles)),be),{horizontalScrolling:pe}));this.disposables.add(de),this.contextKeyService=v(ge,this),this.themeService=le,this.listSupportsMultiSelect=e.WorkbenchListSupportsMultiSelectContextKey.bindTo(this.contextKeyService),this.listSupportsMultiSelect.set(se.multipleSelectionSupport!==!1),e.WorkbenchListSelectionNavigation.bindTo(this.contextKeyService).set(Boolean(se.selectionNavigation)),this.listHasSelectionOrFocus=e.WorkbenchListHasSelectionOrFocus.bindTo(this.contextKeyService),this.listDoubleSelection=e.WorkbenchListDoubleSelection.bindTo(this.contextKeyService),this.listMultiSelection=e.WorkbenchListMultiSelection.bindTo(this.contextKeyService),this.horizontalScrolling=se.horizontalScrolling,this._useAltAsMultipleSelectionModifier=P(he),this.disposables.add(this.contextKeyService),this.disposables.add(me.register(this)),se.overrideStyles&&this.updateStyles(se.overrideStyles),this.disposables.add(this.onDidChangeSelection(()=>{const _e=this.getSelection(),Le=this.getFocus();this.contextKeyService.bufferChangeEvents(()=>{this.listHasSelectionOrFocus.set(_e.length>0||Le.length>0),this.listMultiSelection.set(_e.length>1),this.listDoubleSelection.set(_e.length===2)})})),this.disposables.add(this.onDidChangeFocus(()=>{const _e=this.getSelection(),Le=this.getFocus();this.listHasSelectionOrFocus.set(_e.length>0||Le.length>0)})),this.disposables.add(he.onDidChangeConfiguration(_e=>{_e.affectsConfiguration(C)&&(this._useAltAsMultipleSelectionModifier=P(he));let Le={};if(_e.affectsConfiguration(L)&&this.horizontalScrolling===void 0){const Te=Boolean(he.getValue(L));Le=Object.assign(Object.assign({},Le),{horizontalScrolling:Te})}if(_e.affectsConfiguration(O)){const Te=Boolean(he.getValue(O));Le=Object.assign(Object.assign({},Le),{smoothScrolling:Te})}if(_e.affectsConfiguration(B)){const Te=he.getValue(B);Le=Object.assign(Object.assign({},Le),{mouseWheelScrollSensitivity:Te})}if(_e.affectsConfiguration(T)){const Te=he.getValue(T);Le=Object.assign(Object.assign({},Le),{fastScrollSensitivity:Te})}Object.keys(Le).length>0&&this.updateOptions(Le)})),this.navigator=new re(this,Object.assign({configurationService:he},se)),this.disposables.add(this.navigator)}updateOptions(V){super.updateOptions(V),V.overrideStyles&&this.updateStyles(V.overrideStyles),V.multipleSelectionSupport!==void 0&&this.listSupportsMultiSelect.set(!!V.multipleSelectionSupport)}updateStyles(V){var $;($=this._styler)===null||$===void 0||$.dispose(),this._styler=(0,d.attachListStyler)(this,this.themeService,V)}dispose(){var V;(V=this._styler)===null||V===void 0||V.dispose(),this.disposables.dispose(),super.dispose()}};q=Ie([Ce(6,c.IContextKeyService),Ce(7,e.IListService),Ce(8,u.IThemeService),Ce(9,n.IConfigurationService),Ce(10,o.IKeybindingService)],q),e.WorkbenchTable=q;class X extends g.Disposable{constructor(V,$){var K;super();this.widget=V,this._onDidOpen=this._register(new h.Emitter),this.onDidOpen=this._onDidOpen.event,this._register(h.Event.filter(this.widget.onDidChangeSelection,J=>J.browserEvent instanceof KeyboardEvent)(J=>this.onSelectionFromKeyboard(J))),this._register(this.widget.onPointer(J=>this.onPointer(J.element,J.browserEvent))),this._register(this.widget.onMouseDblClick(J=>this.onMouseDblClick(J.element,J.browserEvent))),typeof($==null?void 0:$.openOnSingleClick)!="boolean"&&($==null?void 0:$.configurationService)?(this.openOnSingleClick=($==null?void 0:$.configurationService.getValue(_))!=="doubleClick",this._register($==null?void 0:$.configurationService.onDidChangeConfiguration(()=>{this.openOnSingleClick=($==null?void 0:$.configurationService.getValue(_))!=="doubleClick"}))):this.openOnSingleClick=(K=$==null?void 0:$.openOnSingleClick)!==null&&K!==void 0?K:!0}onSelectionFromKeyboard(V){if(V.elements.length!==1)return;const $=V.browserEvent,K=typeof $.preserveFocus=="boolean"?$.preserveFocus:!0,J=typeof $.pinned=="boolean"?$.pinned:!K,Y=!1;this._open(this.getSelectedElement(),K,J,Y,V.browserEvent)}onPointer(V,$){if(!this.openOnSingleClick||$.detail===2)return;const J=$.button===1,Y=!0,se=J,ge=$.ctrlKey||$.metaKey||$.altKey;this._open(V,Y,se,ge,$)}onMouseDblClick(V,$){if(!$)return;const K=$.target;if(K.classList.contains("monaco-tl-twistie")||K.classList.contains("monaco-icon-label")&&K.classList.contains("folder-icon")&&$.offsetX<16)return;const Y=!1,se=!0,ge=$.ctrlKey||$.metaKey||$.altKey;this._open(V,Y,se,ge,$)}_open(V,$,K,J,Y){!V||this._onDidOpen.fire({editorOptions:{preserveFocus:$,pinned:K,revealIfVisible:!0},sideBySide:J,element:V,browserEvent:Y})}}class G extends X{constructor(V,$){super(V,$);this.widget=V}getSelectedElement(){return this.widget.getSelectedElements()[0]}}class re extends X{constructor(V,$){super(V,$)}getSelectedElement(){return this.widget.getSelectedElements()[0]}}class ae extends X{constructor(V,$){super(V,$)}getSelectedElement(){var V;return(V=this.widget.getSelection()[0])!==null&&V!==void 0?V:void 0}}function oe(z,V){let $=!1;return K=>{if(K.toKeybinding().isModifierKey())return!1;if($)return $=!1,!1;const J=V.softDispatch(K,z);return J&&J.enterChord?($=!0,!1):($=!1,!0)}}let Z=class extends p.ObjectTree{constructor(V,$,K,J,Y,se,ge,me,le,he,ve){const{options:pe,getAutomaticKeyboardNavigation:be,disposable:de}=ce($,Y,se,le,he,ve);super(V,$,K,J,pe);this.disposables.add(de),this.internals=new ee(this,Y,be,Y.overrideStyles,se,ge,me,le,ve),this.disposables.add(this.internals)}updateOptions(V){super.updateOptions(V),this.internals.updateOptions(V)}};Z=Ie([Ce(5,c.IContextKeyService),Ce(6,e.IListService),Ce(7,u.IThemeService),Ce(8,n.IConfigurationService),Ce(9,o.IKeybindingService),Ce(10,i.IAccessibilityService)],Z),e.WorkbenchObjectTree=Z;let x=class extends p.CompressibleObjectTree{constructor(V,$,K,J,Y,se,ge,me,le,he,ve){const{options:pe,getAutomaticKeyboardNavigation:be,disposable:de}=ce($,Y,se,le,he,ve);super(V,$,K,J,pe);this.disposables.add(de),this.internals=new ee(this,Y,be,Y.overrideStyles,se,ge,me,le,ve),this.disposables.add(this.internals)}updateOptions(V={}){super.updateOptions(V),V.overrideStyles&&this.internals.updateStyleOverrides(V.overrideStyles),this.internals.updateOptions(V)}};x=Ie([Ce(5,c.IContextKeyService),Ce(6,e.IListService),Ce(7,u.IThemeService),Ce(8,n.IConfigurationService),Ce(9,o.IKeybindingService),Ce(10,i.IAccessibilityService)],x),e.WorkbenchCompressibleObjectTree=x;let U=class extends b.DataTree{constructor(V,$,K,J,Y,se,ge,me,le,he,ve,pe){const{options:be,getAutomaticKeyboardNavigation:de,disposable:fe}=ce($,se,ge,he,ve,pe);super(V,$,K,J,Y,be);this.disposables.add(fe),this.internals=new ee(this,se,de,se.overrideStyles,ge,me,le,he,pe),this.disposables.add(this.internals)}updateOptions(V={}){super.updateOptions(V),V.overrideStyles&&this.internals.updateStyleOverrides(V.overrideStyles),this.internals.updateOptions(V)}};U=Ie([Ce(6,c.IContextKeyService),Ce(7,e.IListService),Ce(8,u.IThemeService),Ce(9,n.IConfigurationService),Ce(10,o.IKeybindingService),Ce(11,i.IAccessibilityService)],U),e.WorkbenchDataTree=U;let Q=class extends w.AsyncDataTree{constructor(V,$,K,J,Y,se,ge,me,le,he,ve,pe){const{options:be,getAutomaticKeyboardNavigation:de,disposable:fe}=ce($,se,ge,he,ve,pe);super(V,$,K,J,Y,be);this.disposables.add(fe),this.internals=new ee(this,se,de,se.overrideStyles,ge,me,le,he,pe),this.disposables.add(this.internals)}get onDidOpen(){return this.internals.onDidOpen}updateOptions(V={}){super.updateOptions(V),V.overrideStyles&&this.internals.updateStyleOverrides(V.overrideStyles),this.internals.updateOptions(V)}};Q=Ie([Ce(6,c.IContextKeyService),Ce(7,e.IListService),Ce(8,u.IThemeService),Ce(9,n.IConfigurationService),Ce(10,o.IKeybindingService),Ce(11,i.IAccessibilityService)],Q),e.WorkbenchAsyncDataTree=Q;let ne=class extends w.CompressibleAsyncDataTree{constructor(V,$,K,J,Y,se,ge,me,le,he,ve,pe,be){const{options:de,getAutomaticKeyboardNavigation:fe,disposable:_e}=ce($,ge,me,ve,pe,be);super(V,$,K,J,Y,se,de);this.disposables.add(_e),this.internals=new ee(this,ge,fe,ge.overrideStyles,me,le,he,ve,be),this.disposables.add(this.internals)}updateOptions(V){super.updateOptions(V),this.internals.updateOptions(V)}};ne=Ie([Ce(7,c.IContextKeyService),Ce(8,e.IListService),Ce(9,u.IThemeService),Ce(10,n.IConfigurationService),Ce(11,o.IKeybindingService),Ce(12,i.IAccessibilityService)],ne),e.WorkbenchCompressibleAsyncDataTree=ne;function ce(z,V,$,K,J,Y){var se;const ge=()=>{let de=Boolean($.getContextKeyValue(e.WorkbenchListAutomaticKeyboardNavigationKey));return de&&(de=Boolean(K.getValue(N))),de},me=Y.isScreenReaderOptimized(),le=V.simpleKeyboardNavigation||me?"simple":K.getValue(E),he=V.horizontalScrolling!==void 0?V.horizontalScrolling:Boolean(K.getValue(L)),[ve,pe]=W(V,K,J),be=V.additionalScrollHeight;return{getAutomaticKeyboardNavigation:ge,disposable:pe,options:Object.assign(Object.assign({keyboardSupport:!1},ve),{indent:typeof K.getValue(k)=="number"?K.getValue(k):void 0,renderIndentGuides:K.getValue(M),smoothScrolling:Boolean(K.getValue(O)),automaticKeyboardNavigation:ge(),simpleKeyboardNavigation:le==="simple",filterOnType:le==="filter",horizontalScrolling:he,keyboardNavigationEventFilter:oe(z,J),additionalScrollHeight:be,hideTwistiesOfChildlessElements:V.hideTwistiesOfChildlessElements,expandOnlyOnTwistieClick:(se=V.expandOnlyOnTwistieClick)!==null&&se!==void 0?se:K.getValue(R)==="doubleClick"})}}let ee=class{constructor(V,$,K,J,Y,se,ge,me,le){this.tree=V,this.themeService=ge,this.disposables=[],this.contextKeyService=v(Y,V),this.listSupportsMultiSelect=e.WorkbenchListSupportsMultiSelectContextKey.bindTo(this.contextKeyService),this.listSupportsMultiSelect.set($.multipleSelectionSupport!==!1),e.WorkbenchListSelectionNavigation.bindTo(this.contextKeyService).set(Boolean($.selectionNavigation)),this.hasSelectionOrFocus=e.WorkbenchListHasSelectionOrFocus.bindTo(this.contextKeyService),this.hasDoubleSelection=e.WorkbenchListDoubleSelection.bindTo(this.contextKeyService),this.hasMultiSelection=e.WorkbenchListMultiSelection.bindTo(this.contextKeyService),this.treeElementCanCollapse=e.WorkbenchTreeElementCanCollapse.bindTo(this.contextKeyService),this.treeElementHasParent=e.WorkbenchTreeElementHasParent.bindTo(this.contextKeyService),this.treeElementCanExpand=e.WorkbenchTreeElementCanExpand.bindTo(this.contextKeyService),this.treeElementHasChild=e.WorkbenchTreeElementHasChild.bindTo(this.contextKeyService),this._useAltAsMultipleSelectionModifier=P(me);const ve=new Set;ve.add(e.WorkbenchListAutomaticKeyboardNavigationKey);const pe=()=>{const fe=le.isScreenReaderOptimized()?"simple":me.getValue(E);V.updateOptions({simpleKeyboardNavigation:fe==="simple",filterOnType:fe==="filter"})};this.updateStyleOverrides(J);const be=()=>{const de=V.getFocus()[0];if(!de)return;const fe=V.getNode(de);this.treeElementCanCollapse.set(fe.collapsible&&!fe.collapsed),this.treeElementHasParent.set(!!V.getParentElement(de)),this.treeElementCanExpand.set(fe.collapsible&&fe.collapsed),this.treeElementHasChild.set(!!V.getFirstElementChild(de))};this.disposables.push(this.contextKeyService,se.register(V),V.onDidChangeSelection(()=>{const de=V.getSelection(),fe=V.getFocus();this.contextKeyService.bufferChangeEvents(()=>{this.hasSelectionOrFocus.set(de.length>0||fe.length>0),this.hasMultiSelection.set(de.length>1),this.hasDoubleSelection.set(de.length===2)})}),V.onDidChangeFocus(()=>{const de=V.getSelection(),fe=V.getFocus();this.hasSelectionOrFocus.set(de.length>0||fe.length>0),be()}),V.onDidChangeCollapseState(be),V.onDidChangeModel(be),me.onDidChangeConfiguration(de=>{let fe={};if(de.affectsConfiguration(C)&&(this._useAltAsMultipleSelectionModifier=P(me)),de.affectsConfiguration(k)){const _e=me.getValue(k);fe=Object.assign(Object.assign({},fe),{indent:_e})}if(de.affectsConfiguration(M)){const _e=me.getValue(M);fe=Object.assign(Object.assign({},fe),{renderIndentGuides:_e})}if(de.affectsConfiguration(O)){const _e=Boolean(me.getValue(O));fe=Object.assign(Object.assign({},fe),{smoothScrolling:_e})}if(de.affectsConfiguration(E)&&pe(),de.affectsConfiguration(N)&&(fe=Object.assign(Object.assign({},fe),{automaticKeyboardNavigation:K()})),de.affectsConfiguration(L)&&$.horizontalScrolling===void 0){const _e=Boolean(me.getValue(L));fe=Object.assign(Object.assign({},fe),{horizontalScrolling:_e})}if(de.affectsConfiguration(R)&&$.expandOnlyOnTwistieClick===void 0&&(fe=Object.assign(Object.assign({},fe),{expandOnlyOnTwistieClick:me.getValue(R)==="doubleClick"})),de.affectsConfiguration(B)){const _e=me.getValue(B);fe=Object.assign(Object.assign({},fe),{mouseWheelScrollSensitivity:_e})}if(de.affectsConfiguration(T)){const _e=me.getValue(T);fe=Object.assign(Object.assign({},fe),{fastScrollSensitivity:_e})}Object.keys(fe).length>0&&V.updateOptions(fe)}),this.contextKeyService.onDidChangeContext(de=>{de.affectsSome(ve)&&V.updateOptions({automaticKeyboardNavigation:K()})}),le.onDidChangeScreenReaderOptimized(()=>pe())),this.navigator=new ae(V,Object.assign({configurationService:me},$)),this.disposables.push(this.navigator)}get onDidOpen(){return this.navigator.onDidOpen}updateOptions(V){V.multipleSelectionSupport!==void 0&&this.listSupportsMultiSelect.set(!!V.multipleSelectionSupport)}updateStyleOverrides(V){(0,g.dispose)(this.styler),this.styler=V?(0,d.attachListStyler)(this.tree,this.themeService,V):g.Disposable.None}dispose(){this.disposables=(0,g.dispose)(this.disposables),(0,g.dispose)(this.styler),this.styler=void 0}};ee=Ie([Ce(4,c.IContextKeyService),Ce(5,e.IListService),Ce(6,u.IThemeService),Ce(7,n.IConfigurationService),Ce(8,i.IAccessibilityService)],ee),a.Registry.as(l.Extensions.Configuration).registerConfiguration({id:"workbench",order:7,title:(0,t.localize)(0,null),type:"object",properties:{[C]:{type:"string",enum:["ctrlCmd","alt"],enumDescriptions:[(0,t.localize)(1,null),(0,t.localize)(2,null)],default:"ctrlCmd",description:(0,t.localize)(3,null)},[_]:{type:"string",enum:["singleClick","doubleClick"],default:"singleClick",description:(0,t.localize)(4,null)},[L]:{type:"boolean",default:!1,description:(0,t.localize)(5,null)},[k]:{type:"number",default:8,minimum:4,maximum:40,description:(0,t.localize)(6,null)},[M]:{type:"string",enum:["none","onHover","always"],default:"onHover",description:(0,t.localize)(7,null)},[O]:{type:"boolean",default:!1,description:(0,t.localize)(8,null)},[B]:{type:"number",default:1,description:(0,t.localize)(9,null)},[T]:{type:"number",default:5,description:(0,t.localize)(10,null)},[E]:{type:"string",enum:["simple","highlight","filter"],enumDescriptions:[(0,t.localize)(11,null),(0,t.localize)(12,null),(0,t.localize)(13,null)],default:"highlight",description:(0,t.localize)(14,null)},[N]:{type:"boolean",default:!0,markdownDescription:(0,t.localize)(15,null)},[R]:{type:"string",enum:["singleClick","doubleClick"],default:"singleClick",description:(0,t.localize)(16,null)}}})}),define(te[688],ie([1,0,7,89,46,57,4,2,51,23,14]),function(j,e,y,m,D,I,w,b,p,h,g){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Link=void 0;let t=class extends b.Disposable{constructor(n,l,c={},r){var s;super();this._link=l,this._enabled=!0,this.el=(0,y.append)(n,(0,y.$)("a.monaco-link",{tabIndex:(s=l.tabIndex)!==null&&s!==void 0?s:0,href:l.href,title:l.title},l.label)),this.el.setAttribute("role","button");const o=this._register(new m.DomEmitter(this.el,"click")),a=this._register(new m.DomEmitter(this.el,"keypress")),d=w.Event.chain(a.event).map(S=>new D.StandardKeyboardEvent(S)).filter(S=>S.keyCode===3).event,u=this._register(new m.DomEmitter(this.el,I.EventType.Tap)).event;this._register(I.Gesture.addTarget(this.el));const f=w.Event.any(o.event,d,u);this._register(f(S=>{!this.enabled||(y.EventHelper.stop(S,!0),(c==null?void 0:c.opener)?c.opener(this._link.href):r.open(this._link.href,{allowCommands:!0}))})),this.enabled=!0}get enabled(){return this._enabled}set enabled(n){n?(this.el.setAttribute("aria-disabled","false"),this.el.tabIndex=0,this.el.style.pointerEvents="auto",this.el.style.opacity="1",this.el.style.cursor="pointer",this._enabled=!1):(this.el.setAttribute("aria-disabled","true"),this.el.tabIndex=-1,this.el.style.pointerEvents="none",this.el.style.opacity="0.4",this.el.style.cursor="default",this._enabled=!0),this._enabled=n}};t=Ie([Ce(3,p.IOpenerService)],t),e.Link=t,(0,g.registerThemingParticipant)((i,n)=>{const l=i.getColor(h.textLinkForeground);l&&n.addRule(`.monaco-link { color: ${l}; }`);const c=i.getColor(h.textLinkActiveForeground);c&&n.addRule(`.monaco-link:hover { color: ${c}; }`)})}),define(te[689],ie([1,0,21,496,63,16,9,129,157,629,23,131,14]),function(j,e,y,m,D,I,w,b,p,h,g,t,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.QuickInputService=void 0;let n=class extends i.Themable{constructor(c,r,s,o,a){super(s);this.instantiationService=c,this.contextKeyService=r,this.accessibilityService=o,this.layoutService=a,this.contexts=new Map}get controller(){return this._controller||(this._controller=this._register(this.createController())),this._controller}get quickAccess(){return this._quickAccess||(this._quickAccess=this._register(this.instantiationService.createInstance(h.QuickAccessController))),this._quickAccess}createController(c=this.layoutService,r){var s,o;const a={idPrefix:"quickInput_",container:c.container,ignoreFocusOut:()=>!1,isScreenReaderOptimized:()=>this.accessibilityService.isScreenReaderOptimized(),backKeybindingLabel:()=>{},setContextKey:u=>this.setContextKey(u),returnFocus:()=>c.focus(),createList:(u,f,S,v,C)=>this.instantiationService.createInstance(p.WorkbenchList,u,f,S,v,C),styles:this.computeStyles()},d=this._register(new m.QuickInputController(Object.assign(Object.assign({},a),r)));return d.layout(c.dimension,(o=(s=c.offset)===null||s===void 0?void 0:s.top)!==null&&o!==void 0?o:0),this._register(c.onDidLayout(u=>{var f,S;return d.layout(u,(S=(f=c.offset)===null||f===void 0?void 0:f.top)!==null&&S!==void 0?S:0)})),this._register(d.onShow(()=>this.resetContextKeys())),this._register(d.onHide(()=>this.resetContextKeys())),d}setContextKey(c){let r;c&&(r=this.contexts.get(c),r||(r=new I.RawContextKey(c,!1).bindTo(this.contextKeyService),this.contexts.set(c,r))),!(r&&r.get())&&(this.resetContextKeys(),r&&r.set(!0))}resetContextKeys(){this.contexts.forEach(c=>{c.get()&&c.reset()})}pick(c,r={},s=y.CancellationToken.None){return this.controller.pick(c,r,s)}createQuickPick(){return this.controller.createQuickPick()}updateStyles(){this.controller.applyStyles(this.computeStyles())}computeStyles(){return{widget:Object.assign({},(0,t.computeStyles)(this.theme,{quickInputBackground:g.quickInputBackground,quickInputForeground:g.quickInputForeground,quickInputTitleBackground:g.quickInputTitleBackground,contrastBorder:g.contrastBorder,widgetShadow:g.widgetShadow})),inputBox:(0,t.computeStyles)(this.theme,{inputForeground:g.inputForeground,inputBackground:g.inputBackground,inputBorder:g.inputBorder,inputValidationInfoBackground:g.inputValidationInfoBackground,inputValidationInfoForeground:g.inputValidationInfoForeground,inputValidationInfoBorder:g.inputValidationInfoBorder,inputValidationWarningBackground:g.inputValidationWarningBackground,inputValidationWarningForeground:g.inputValidationWarningForeground,inputValidationWarningBorder:g.inputValidationWarningBorder,inputValidationErrorBackground:g.inputValidationErrorBackground,inputValidationErrorForeground:g.inputValidationErrorForeground,inputValidationErrorBorder:g.inputValidationErrorBorder}),countBadge:(0,t.computeStyles)(this.theme,{badgeBackground:g.badgeBackground,badgeForeground:g.badgeForeground,badgeBorder:g.contrastBorder}),button:(0,t.computeStyles)(this.theme,{buttonForeground:g.buttonForeground,buttonBackground:g.buttonBackground,buttonHoverBackground:g.buttonHoverBackground,buttonBorder:g.contrastBorder}),progressBar:(0,t.computeStyles)(this.theme,{progressBarBackground:g.progressBarBackground}),keybindingLabel:(0,t.computeStyles)(this.theme,{keybindingLabelBackground:g.keybindingLabelBackground,keybindingLabelForeground:g.keybindingLabelForeground,keybindingLabelBorder:g.keybindingLabelBorder,keybindingLabelBottomBorder:g.keybindingLabelBottomBorder,keybindingLabelShadow:g.widgetShadow}),list:(0,t.computeStyles)(this.theme,{listBackground:g.quickInputBackground,listInactiveFocusForeground:g.quickInputListFocusForeground,listInactiveSelectionIconForeground:g.quickInputListFocusIconForeground,listInactiveFocusBackground:g.quickInputListFocusBackground,listFocusOutline:g.activeContrastBorder,listInactiveFocusOutline:g.activeContrastBorder,pickerGroupBorder:g.pickerGroupBorder,pickerGroupForeground:g.pickerGroupForeground})}}};n=Ie([Ce(0,w.IInstantiationService),Ce(1,I.IContextKeyService),Ce(2,i.IThemeService),Ce(3,D.IAccessibilityService),Ce(4,b.ILayoutService)],n),e.QuickInputService=n}),define(te[690],ie([1,0,15,14,21,9,16,63,275,28,689,88,393]),function(j,e,y,m,D,I,w,b,p,h,g,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.QuickInputEditorWidget=e.QuickInputEditorContribution=e.StandaloneQuickInputService=e.EditorScopedQuickInputService=void 0;let i=class extends g.QuickInputService{constructor(s,o,a,d,u,f){super(o,a,d,u,new p.EditorScopedLayoutService(s.getContainerDomNode(),f));this.host=void 0;const S=l.get(s);if(S){const v=S.widget;this.host={_serviceBrand:void 0,get hasContainer(){return!0},get container(){return v.getDomNode()},get dimension(){return s.getLayoutInfo()},get onDidLayout(){return s.onDidLayoutChange},focus:()=>s.focus()}}else this.host=void 0}createController(){return super.createController(this.host)}};i=Ie([Ce(1,I.IInstantiationService),Ce(2,w.IContextKeyService),Ce(3,m.IThemeService),Ce(4,b.IAccessibilityService),Ce(5,h.ICodeEditorService)],i),e.EditorScopedQuickInputService=i;let n=class{constructor(s,o){this.instantiationService=s,this.codeEditorService=o,this.mapEditorToService=new Map}get activeService(){const s=this.codeEditorService.getFocusedCodeEditor();if(!s)throw new Error("Quick input service needs a focused editor to work.");let o=this.mapEditorToService.get(s);if(!o){const a=o=this.instantiationService.createInstance(i,s);this.mapEditorToService.set(s,o),(0,t.once)(s.onDidDispose)(()=>{a.dispose(),this.mapEditorToService.delete(s)})}return o}get quickAccess(){return this.activeService.quickAccess}pick(s,o={},a=D.CancellationToken.None){return this.activeService.pick(s,o,a)}createQuickPick(){return this.activeService.createQuickPick()}};n=Ie([Ce(0,I.IInstantiationService),Ce(1,h.ICodeEditorService)],n),e.StandaloneQuickInputService=n;class l{constructor(s){this.editor=s,this.widget=new c(this.editor)}static get(s){return s.getContribution(l.ID)}dispose(){this.widget.dispose()}}e.QuickInputEditorContribution=l,l.ID="editor.controller.quickInput";class c{constructor(s){this.codeEditor=s,this.domNode=document.createElement("div"),this.codeEditor.addOverlayWidget(this)}getId(){return c.ID}getDomNode(){return this.domNode}getPosition(){return{preference:2}}dispose(){this.codeEditor.removeOverlayWidget(this)}}e.QuickInputEditorWidget=c,c.ID="editor.contrib.quickInputWidget",(0,y.registerEditorContribution)(l.ID,l)}),define(te[691],ie([1,0,27,74,23,14]),function(j,e,y,m,D,I){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SeverityIcon=void 0;var w;(function(b){function p(h){switch(h){case m.default.Ignore:return"severity-ignore "+y.Codicon.info.classNames;case m.default.Info:return y.Codicon.info.classNames;case m.default.Warning:return y.Codicon.warning.classNames;case m.default.Error:return y.Codicon.error.classNames;default:return""}}b.className=p})(w=e.SeverityIcon||(e.SeverityIcon={})),(0,I.registerThemingParticipant)((b,p)=>{const h=b.getColor(D.problemsErrorIconForeground);if(h){const i=y.Codicon.error.cssSelector;p.addRule(`
|
||
.monaco-editor .zone-widget ${i},
|
||
.markers-panel .marker-icon${i},
|
||
.text-search-provider-messages .providerMessage ${i},
|
||
.extensions-viewlet > .extensions ${i} {
|
||
color: ${h};
|
||
}
|
||
`)}const g=b.getColor(D.problemsWarningIconForeground);if(g){const i=y.Codicon.warning.cssSelector;p.addRule(`
|
||
.monaco-editor .zone-widget ${i},
|
||
.markers-panel .marker-icon${i},
|
||
.extensions-viewlet > .extensions ${i},
|
||
.extension-editor ${i},
|
||
.text-search-provider-messages .providerMessage ${i},
|
||
.preferences-editor ${i} {
|
||
color: ${g};
|
||
}
|
||
`)}const t=b.getColor(D.problemsInfoIconForeground);if(t){const i=y.Codicon.info.cssSelector;p.addRule(`
|
||
.monaco-editor .zone-widget ${i},
|
||
.markers-panel .marker-icon${i},
|
||
.extensions-viewlet > .extensions ${i},
|
||
.text-search-provider-messages .providerMessage ${i},
|
||
.extension-editor ${i} {
|
||
color: ${t};
|
||
}
|
||
`)}})}),define(te[72],ie([1,0,10,27,4,591,200,36,14]),function(j,e,y,m,D,I,w,b,p){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.spinningLoading=e.syncing=e.gotoNextLocation=e.gotoPreviousLocation=e.widgetClose=e.iconsSchemaId=e.getIconRegistry=e.registerIcon=e.IconContribution=e.Extensions=void 0,e.Extensions={IconContribution:"base.contributions.icons"};var h;(function(s){function o(a,d){let u=a.defaults;for(;p.ThemeIcon.isThemeIcon(u);){const f=t.getIcon(u.id);if(!f)return;u=f.defaults}return u}s.getDefinition=o})(h=e.IconContribution||(e.IconContribution={}));class g{constructor(){this._onDidChange=new D.Emitter,this.onDidChange=this._onDidChange.event,this.iconSchema={definitions:{icons:{type:"object",properties:{fontId:{type:"string",description:(0,I.localize)(0,null)},fontCharacter:{type:"string",description:(0,I.localize)(1,null)}},additionalProperties:!1,defaultSnippets:[{body:{fontCharacter:"\\\\e030"}}]}},type:"object",properties:{}},this.iconReferenceSchema={type:"string",pattern:`^${m.CSSIcon.iconNameExpression}$`,enum:[],enumDescriptions:[]},this.iconsById={},this.iconFontsById={}}registerIcon(o,a,d,u){const f=this.iconsById[o];if(f){if(d&&!f.description){f.description=d,this.iconSchema.properties[o].markdownDescription=`${d} $(${o})`;const C=this.iconReferenceSchema.enum.indexOf(o);C!==-1&&(this.iconReferenceSchema.enumDescriptions[C]=d),this._onDidChange.fire()}return f}let S={id:o,description:d,defaults:a,deprecationMessage:u};this.iconsById[o]=S;let v={$ref:"#/definitions/icons"};return u&&(v.deprecationMessage=u),d&&(v.markdownDescription=`${d}: $(${o})`),this.iconSchema.properties[o]=v,this.iconReferenceSchema.enum.push(o),this.iconReferenceSchema.enumDescriptions.push(d||""),this._onDidChange.fire(),{id:o}}getIcons(){return Object.keys(this.iconsById).map(o=>this.iconsById[o])}getIcon(o){return this.iconsById[o]}getIconSchema(){return this.iconSchema}toString(){const o=(f,S)=>f.id.localeCompare(S.id),a=f=>{for(;p.ThemeIcon.isThemeIcon(f.defaults);)f=this.iconsById[f.defaults.id];return`codicon codicon-${f?f.id:""}`};let d=[];d.push("| preview | identifier | default codicon ID | description"),d.push("| ----------- | --------------------------------- | --------------------------------- | --------------------------------- |");const u=Object.keys(this.iconsById).map(f=>this.iconsById[f]);for(const f of u.filter(S=>!!S.description).sort(o))d.push(`|<i class="${a(f)}"></i>|${f.id}|${p.ThemeIcon.isThemeIcon(f.defaults)?f.defaults.id:f.id}|${f.description||""}|`);d.push("| preview | identifier "),d.push("| ----------- | --------------------------------- |");for(const f of u.filter(S=>!p.ThemeIcon.isThemeIcon(S.defaults)).sort(o))d.push(`|<i class="${a(f)}"></i>|${f.id}|`);return d.join(`
|
||
`)}}const t=new g;b.Registry.add(e.Extensions.IconContribution,t);function i(s,o,a,d){return t.registerIcon(s,o,a,d)}e.registerIcon=i;function n(){return t}e.getIconRegistry=n;function l(){for(const s of m.Codicon.getAll())t.registerIcon(s.id,s.definition,s.description)}l(),e.iconsSchemaId="vscode://schemas/icons";let c=b.Registry.as(w.Extensions.JSONContribution);c.registerSchema(e.iconsSchemaId,t.getIconSchema());const r=new y.RunOnceScheduler(()=>c.notifySchemaChanged(e.iconsSchemaId),200);t.onDidChange(()=>{r.isScheduled()||r.schedule()}),e.widgetClose=i("widget-close",m.Codicon.close,(0,I.localize)(2,null)),e.gotoPreviousLocation=i("goto-previous-location",m.Codicon.arrowUp,(0,I.localize)(3,null)),e.gotoNextLocation=i("goto-next-location",m.Codicon.arrowDown,(0,I.localize)(4,null)),e.syncing=p.ThemeIcon.modify(m.Codicon.sync,"spin"),e.spinningLoading=p.ThemeIcon.modify(m.Codicon.loading,"spin")}),define(te[692],ie([1,0,502,7,30,84,67,44,2,62,15,28,31,75,11,52,122,69,16,23,14,27,72,35,366]),function(j,e,y,m,D,I,w,b,p,h,g,t,i,n,l,c,r,s,o,a,d,u,f,S){"use strict";var v;Object.defineProperty(e,"__esModule",{value:!0}),e.DiffReview=void 0;const C=3;class _{constructor(P,F,W,A){this.originalLineStart=P,this.originalLineEnd=F,this.modifiedLineStart=W,this.modifiedLineEnd=A}getType(){return this.originalLineStart===0?1:this.modifiedLineStart===0?2:0}}class L{constructor(P){this.entries=P}}const E=(0,f.registerIcon)("diff-review-insert",u.Codicon.add,y.localize(0,null)),N=(0,f.registerIcon)("diff-review-remove",u.Codicon.remove,y.localize(1,null)),k=(0,f.registerIcon)("diff-review-close",u.Codicon.close,y.localize(2,null));let M=class yt extends p.Disposable{constructor(P,F){super();this._languageService=F,this._width=0,this._diffEditor=P,this._isVisible=!1,this.shadow=(0,D.createFastDomNode)(document.createElement("div")),this.shadow.setClassName("diff-review-shadow"),this.actionBarContainer=(0,D.createFastDomNode)(document.createElement("div")),this.actionBarContainer.setClassName("diff-review-actions"),this._actionBar=this._register(new I.ActionBar(this.actionBarContainer.domNode)),this._actionBar.push(new b.Action("diffreview.close",y.localize(3,null),"close-diff-review "+d.ThemeIcon.asClassName(k),!0,()=>ye(this,void 0,void 0,function*(){return this.hide()})),{label:!1,icon:!0}),this.domNode=(0,D.createFastDomNode)(document.createElement("div")),this.domNode.setClassName("diff-review monaco-editor-background"),this._content=(0,D.createFastDomNode)(document.createElement("div")),this._content.setClassName("diff-review-content"),this._content.setAttribute("role","code"),this.scrollbar=this._register(new w.DomScrollableElement(this._content.domNode,{})),this.domNode.domNode.appendChild(this.scrollbar.getDomNode()),this._register(P.onDidUpdateDiff(()=>{!this._isVisible||(this._diffs=this._compute(),this._render())})),this._register(P.getModifiedEditor().onDidChangeCursorPosition(()=>{!this._isVisible||this._render()})),this._register(m.addStandardDisposableListener(this.domNode.domNode,"click",W=>{W.preventDefault();const A=m.findParentWithClass(W.target,"diff-review-row");A&&this._goToRow(A)})),this._register(m.addStandardDisposableListener(this.domNode.domNode,"keydown",W=>{(W.equals(18)||W.equals(2048|18)||W.equals(512|18))&&(W.preventDefault(),this._goToRow(this._getNextRow())),(W.equals(16)||W.equals(2048|16)||W.equals(512|16))&&(W.preventDefault(),this._goToRow(this._getPrevRow())),(W.equals(9)||W.equals(2048|9)||W.equals(512|9)||W.equals(1024|9))&&(W.preventDefault(),this.hide()),(W.equals(10)||W.equals(3))&&(W.preventDefault(),this.accept())})),this._diffs=[],this._currentDiff=null}prev(){let P=0;if(this._isVisible||(this._diffs=this._compute()),this._isVisible){let W=-1;for(let A=0,H=this._diffs.length;A<H;A++)if(this._diffs[A]===this._currentDiff){W=A;break}P=this._diffs.length+W-1}else P=this._findDiffIndex(this._diffEditor.getPosition());if(this._diffs.length===0)return;P=P%this._diffs.length;const F=this._diffs[P].entries;this._diffEditor.setPosition(new l.Position(F[0].modifiedLineStart,1)),this._diffEditor.setSelection({startColumn:1,startLineNumber:F[0].modifiedLineStart,endColumn:1073741824,endLineNumber:F[F.length-1].modifiedLineEnd}),this._isVisible=!0,this._diffEditor.doLayout(),this._render(),this._goToRow(this._getNextRow())}next(){let P=0;if(this._isVisible||(this._diffs=this._compute()),this._isVisible){let W=-1;for(let A=0,H=this._diffs.length;A<H;A++)if(this._diffs[A]===this._currentDiff){W=A;break}P=W+1}else P=this._findDiffIndex(this._diffEditor.getPosition());if(this._diffs.length===0)return;P=P%this._diffs.length;const F=this._diffs[P].entries;this._diffEditor.setPosition(new l.Position(F[0].modifiedLineStart,1)),this._diffEditor.setSelection({startColumn:1,startLineNumber:F[0].modifiedLineStart,endColumn:1073741824,endLineNumber:F[F.length-1].modifiedLineEnd}),this._isVisible=!0,this._diffEditor.doLayout(),this._render(),this._goToRow(this._getNextRow())}accept(){let P=-1;const F=this._getCurrentFocusedRow();if(F){const W=parseInt(F.getAttribute("data-line"),10);isNaN(W)||(P=W)}this.hide(),P!==-1&&(this._diffEditor.setPosition(new l.Position(P,1)),this._diffEditor.revealPosition(new l.Position(P,1),1))}hide(){this._isVisible=!1,this._diffEditor.updateOptions({readOnly:!1}),this._diffEditor.focus(),this._diffEditor.doLayout(),this._render()}_getPrevRow(){const P=this._getCurrentFocusedRow();return P?P.previousElementSibling?P.previousElementSibling:P:this._getFirstRow()}_getNextRow(){const P=this._getCurrentFocusedRow();return P?P.nextElementSibling?P.nextElementSibling:P:this._getFirstRow()}_getFirstRow(){return this.domNode.domNode.querySelector(".diff-review-row")}_getCurrentFocusedRow(){const P=document.activeElement;return P&&/diff-review-row/.test(P.className)?P:null}_goToRow(P){const F=this._getCurrentFocusedRow();P.tabIndex=0,P.focus(),F&&F!==P&&(F.tabIndex=-1),this.scrollbar.scanDomNode()}isVisible(){return this._isVisible}layout(P,F,W){this._width=F,this.shadow.setTop(P-6),this.shadow.setWidth(F),this.shadow.setHeight(this._isVisible?6:0),this.domNode.setTop(P),this.domNode.setWidth(F),this.domNode.setHeight(W),this._content.setHeight(W),this._content.setWidth(F),this._isVisible?(this.actionBarContainer.setAttribute("aria-hidden","false"),this.actionBarContainer.setDisplay("block")):(this.actionBarContainer.setAttribute("aria-hidden","true"),this.actionBarContainer.setDisplay("none"))}_compute(){const P=this._diffEditor.getLineChanges();if(!P||P.length===0)return[];const F=this._diffEditor.getOriginalEditor().getModel(),W=this._diffEditor.getModifiedEditor().getModel();return!F||!W?[]:yt._mergeAdjacent(P,F.getLineCount(),W.getLineCount())}static _mergeAdjacent(P,F,W){if(!P||P.length===0)return[];const A=[];let H=0;for(let re=0,ae=P.length;re<ae;re++){const oe=P[re],Z=oe.originalStartLineNumber,x=oe.originalEndLineNumber,U=oe.modifiedStartLineNumber,Q=oe.modifiedEndLineNumber,ne=[];let ce=0;{const ee=x===0?Z:Z-1,ue=Q===0?U:U-1;let z=1,V=1;if(re>0){const J=P[re-1];J.originalEndLineNumber===0?z=J.originalStartLineNumber+1:z=J.originalEndLineNumber+1,J.modifiedEndLineNumber===0?V=J.modifiedStartLineNumber+1:V=J.modifiedEndLineNumber+1}let $=ee-C+1,K=ue-C+1;if($<z){const J=z-$;$=$+J,K=K+J}if(K<V){const J=V-K;$=$+J,K=K+J}ne[ce++]=new _($,ee,K,ue)}x!==0&&(ne[ce++]=new _(Z,x,0,0)),Q!==0&&(ne[ce++]=new _(0,0,U,Q));{const ee=x===0?Z+1:x+1,ue=Q===0?U+1:Q+1;let z=F,V=W;if(re+1<ae){const J=P[re+1];J.originalEndLineNumber===0?z=J.originalStartLineNumber:z=J.originalStartLineNumber-1,J.modifiedEndLineNumber===0?V=J.modifiedStartLineNumber:V=J.modifiedStartLineNumber-1}let $=ee+C-1,K=ue+C-1;if($>z){const J=z-$;$=$+J,K=K+J}if(K>V){const J=V-K;$=$+J,K=K+J}ne[ce++]=new _(ee,$,ue,K)}A[H++]=new L(ne)}let q=A[0].entries;const X=[];let G=0;for(let re=1,ae=A.length;re<ae;re++){const oe=A[re].entries,Z=q[q.length-1],x=oe[0];if(Z.getType()===0&&x.getType()===0&&x.originalLineStart<=Z.originalLineEnd){q[q.length-1]=new _(Z.originalLineStart,x.originalLineEnd,Z.modifiedLineStart,x.modifiedLineEnd),q=q.concat(oe.slice(1));continue}X[G++]=new L(q),q=oe}return X[G++]=new L(q),X}_findDiffIndex(P){const F=P.lineNumber;for(let W=0,A=this._diffs.length;W<A;W++){const H=this._diffs[W].entries,q=H[H.length-1].modifiedLineEnd;if(F<=q)return W}return 0}_render(){const P=this._diffEditor.getOriginalEditor().getOptions(),F=this._diffEditor.getModifiedEditor().getOptions(),W=this._diffEditor.getOriginalEditor().getModel(),A=this._diffEditor.getModifiedEditor().getModel(),H=W.getOptions(),q=A.getOptions();if(!this._isVisible||!W||!A){m.clearNode(this._content.domNode),this._currentDiff=null,this.scrollbar.scanDomNode();return}this._diffEditor.updateOptions({readOnly:!0});const X=this._findDiffIndex(this._diffEditor.getPosition());if(this._diffs[X]===this._currentDiff)return;this._currentDiff=this._diffs[X];const G=this._diffs[X].entries,re=document.createElement("div");re.className="diff-review-table",re.setAttribute("role","list"),re.setAttribute("aria-label",'Difference review. Use "Stage | Unstage | Revert Selected Ranges" commands'),(0,h.applyFontInfo)(re,F.get(44));let ae=0,oe=0,Z=0,x=0;for(let K=0,J=G.length;K<J;K++){const Y=G[K],se=Y.originalLineStart,ge=Y.originalLineEnd,me=Y.modifiedLineStart,le=Y.modifiedLineEnd;se!==0&&(ae===0||se<ae)&&(ae=se),ge!==0&&(oe===0||ge>oe)&&(oe=ge),me!==0&&(Z===0||me<Z)&&(Z=me),le!==0&&(x===0||le>x)&&(x=le)}const U=document.createElement("div");U.className="diff-review-row";const Q=document.createElement("div");Q.className="diff-review-cell diff-review-summary";const ne=oe-ae+1,ce=x-Z+1;Q.appendChild(document.createTextNode(`${X+1}/${this._diffs.length}: @@ -${ae},${ne} +${Z},${ce} @@`)),U.setAttribute("data-line",String(Z));const ee=K=>K===0?y.localize(4,null):K===1?y.localize(5,null):y.localize(6,null,K),ue=ee(ne),z=ee(ce);U.setAttribute("aria-label",y.localize(7,null,X+1,this._diffs.length,ae,ue,Z,z)),U.appendChild(Q),U.setAttribute("role","listitem"),re.appendChild(U);const V=F.get(59);let $=Z;for(let K=0,J=G.length;K<J;K++){const Y=G[K];yt._renderSection(re,Y,$,V,this._width,P,W,H,F,A,q,this._languageService.languageIdCodec),Y.modifiedLineStart!==0&&($=Y.modifiedLineEnd)}m.clearNode(this._content.domNode),this._content.domNode.appendChild(re),this.scrollbar.scanDomNode()}static _renderSection(P,F,W,A,H,q,X,G,re,ae,oe,Z){const x=F.getType();let U="diff-review-row",Q="";const ne="diff-review-spacer";let ce=null;switch(x){case 1:U="diff-review-row line-insert",Q=" char-insert",ce=E;break;case 2:U="diff-review-row line-delete",Q=" char-delete",ce=N;break}const ee=F.originalLineStart,ue=F.originalLineEnd,z=F.modifiedLineStart,V=F.modifiedLineEnd,$=Math.max(V-z,ue-ee),K=q.get(131),J=K.glyphMarginWidth+K.lineNumbersWidth,Y=re.get(131),se=10+Y.glyphMarginWidth+Y.lineNumbersWidth;for(let ge=0;ge<=$;ge++){const me=ee===0?0:ee+ge,le=z===0?0:z+ge,he=document.createElement("div");he.style.minWidth=H+"px",he.className=U,he.setAttribute("role","listitem"),le!==0&&(W=le),he.setAttribute("data-line",String(W));const ve=document.createElement("div");ve.className="diff-review-cell",ve.style.height=`${A}px`,he.appendChild(ve);const pe=document.createElement("span");pe.style.width=J+"px",pe.style.minWidth=J+"px",pe.className="diff-review-line-number"+Q,me!==0?pe.appendChild(document.createTextNode(String(me))):pe.innerText="\xA0",ve.appendChild(pe);const be=document.createElement("span");be.style.width=se+"px",be.style.minWidth=se+"px",be.style.paddingRight="10px",be.className="diff-review-line-number"+Q,le!==0?be.appendChild(document.createTextNode(String(le))):be.innerText="\xA0",ve.appendChild(be);const de=document.createElement("span");if(de.className=ne,ce){const Le=document.createElement("span");Le.className=d.ThemeIcon.asClassName(ce),Le.innerText="\xA0\xA0",de.appendChild(Le)}else de.innerText="\xA0\xA0";ve.appendChild(de);let fe;if(le!==0){let Le=this._renderLine(ae,re,oe.tabSize,le,Z);yt._ttPolicy&&(Le=yt._ttPolicy.createHTML(Le)),ve.insertAdjacentHTML("beforeend",Le),fe=ae.getLineContent(le)}else{let Le=this._renderLine(X,q,G.tabSize,me,Z);yt._ttPolicy&&(Le=yt._ttPolicy.createHTML(Le)),ve.insertAdjacentHTML("beforeend",Le),fe=X.getLineContent(me)}fe.length===0&&(fe=y.localize(8,null));let _e="";switch(x){case 0:me===le?_e=y.localize(9,null,fe,me):_e=y.localize(10,null,fe,me,le);break;case 1:_e=y.localize(11,null,fe,le);break;case 2:_e=y.localize(12,null,fe,me);break}he.setAttribute("aria-label",_e),P.appendChild(he)}}static _renderLine(P,F,W,A,H){const q=P.getLineContent(A),X=F.get(44),G=n.LineTokens.createEmpty(q,H),re=s.ViewLineRenderingData.isBasicASCII(q,P.mightContainNonBasicASCII()),ae=s.ViewLineRenderingData.containsRTL(q,re,P.mightContainRTL());return(0,r.renderViewLine2)(new r.RenderLineInput(X.isMonospace&&!F.get(29),X.canUseHalfwidthRightwardsArrow,q,!1,re,ae,0,G,[],W,0,X.spaceWidth,X.middotWidth,X.wsmiddotWidth,F.get(105),F.get(88),F.get(83),F.get(45)!==i.EditorFontLigatures.OFF,null)).html}};M._ttPolicy=(v=window.trustedTypes)===null||v===void 0?void 0:v.createPolicy("diffReview",{createHTML:R=>R}),M=Ie([Ce(1,S.ILanguageService)],M),e.DiffReview=M,(0,d.registerThemingParticipant)((R,P)=>{const F=R.getColor(c.editorLineNumbers);F&&P.addRule(`.monaco-diff-editor .diff-review-line-number { color: ${F}; }`);const W=R.getColor(a.scrollbarShadow);W&&P.addRule(`.monaco-diff-editor .diff-review-shadow { box-shadow: ${W} 0 -6px 6px -6px inset; }`)});class O extends g.EditorAction{constructor(){super({id:"editor.action.diffReview.next",label:y.localize(13,null),alias:"Go to Next Difference",precondition:o.ContextKeyExpr.has("isInDiffEditor"),kbOpts:{kbExpr:null,primary:65,weight:100}})}run(P,F){const W=T(P);W&&W.diffReviewNext()}}class B extends g.EditorAction{constructor(){super({id:"editor.action.diffReview.prev",label:y.localize(14,null),alias:"Go to Previous Difference",precondition:o.ContextKeyExpr.has("isInDiffEditor"),kbOpts:{kbExpr:null,primary:1024|65,weight:100}})}run(P,F){const W=T(P);W&&W.diffReviewPrev()}}function T(R){const P=R.get(t.ICodeEditorService),F=P.listDiffEditors(),W=P.getActiveCodeEditor();if(!W)return null;for(let A=0,H=F.length;A<H;A++){const q=F[A];if(q.getModifiedEditor().getId()===W.getId()||q.getOriginalEditor().getId()===W.getId())return q}return null}(0,g.registerEditorAction)(O),(0,g.registerEditorAction)(B)}),define(te[693],ie([1,0,7,43,67,27,4,2,8,20,104,35,601,198,559,16,51,23,72,132,14,382]),function(j,e,y,m,D,I,w,b,p,h,g,t,i,n,l,c,r,s,o,a,d){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.editorHoverWidgetHighlightForeground=e.ParameterHintsWidget=void 0;const u=y.$,f=(0,o.registerIcon)("parameter-hints-next",I.Codicon.chevronDown,l.localize(0,null)),S=(0,o.registerIcon)("parameter-hints-previous",I.Codicon.chevronUp,l.localize(1,null));let v=class Mi extends b.Disposable{constructor(_,L,E,N){super();this.editor=_,this.renderDisposeables=this._register(new b.DisposableStore),this.visible=!1,this.announcedLabel=null,this.allowEditorOverflow=!0,this.markdownRenderer=this._register(new g.MarkdownRenderer({editor:_},N,E)),this.model=this._register(new i.ParameterHintsModel(_)),this.keyVisible=n.Context.Visible.bindTo(L),this.keyMultipleSignatures=n.Context.MultipleSignatures.bindTo(L),this._register(this.model.onChangedHints(k=>{k?(this.show(),this.render(k)):this.hide()}))}createParameterHintDOMNodes(){const _=u(".editor-widget.parameter-hints-widget"),L=y.append(_,u(".phwrapper"));L.tabIndex=-1;const E=y.append(L,u(".controls")),N=y.append(E,u(".button"+d.ThemeIcon.asCSSSelector(S))),k=y.append(E,u(".overloads")),M=y.append(E,u(".button"+d.ThemeIcon.asCSSSelector(f)));this._register(y.addDisposableListener(N,"click",F=>{y.EventHelper.stop(F),this.previous()})),this._register(y.addDisposableListener(M,"click",F=>{y.EventHelper.stop(F),this.next()}));const O=u(".body"),B=new D.DomScrollableElement(O,{});this._register(B),L.appendChild(B.getDomNode());const T=y.append(O,u(".signature")),R=y.append(O,u(".docs"));_.style.userSelect="text",this.domNodes={element:_,signature:T,overloads:k,docs:R,scrollbar:B},this.editor.addContentWidget(this),this.hide(),this._register(this.editor.onDidChangeCursorSelection(F=>{this.visible&&this.editor.layoutContentWidget(this)}));const P=()=>{if(!this.domNodes)return;const F=this.editor.getOption(44);this.domNodes.element.style.fontSize=`${F.fontSize}px`,this.domNodes.element.style.lineHeight=`${F.lineHeight/F.fontSize}`};P(),this._register(w.Event.chain(this.editor.onDidChangeConfiguration.bind(this.editor)).filter(F=>F.hasChanged(44)).on(P,null)),this._register(this.editor.onDidLayoutChange(F=>this.updateMaxHeight())),this.updateMaxHeight()}show(){this.visible||(this.domNodes||this.createParameterHintDOMNodes(),this.keyVisible.set(!0),this.visible=!0,setTimeout(()=>{this.domNodes&&this.domNodes.element.classList.add("visible")},100),this.editor.layoutContentWidget(this))}hide(){this.renderDisposeables.clear(),!!this.visible&&(this.keyVisible.reset(),this.visible=!1,this.announcedLabel=null,this.domNodes&&this.domNodes.element.classList.remove("visible"),this.editor.layoutContentWidget(this))}getPosition(){return this.visible?{position:this.editor.getPosition(),preference:[1,2]}:null}render(_){var L;if(this.renderDisposeables.clear(),!this.domNodes)return;const E=_.signatures.length>1;this.domNodes.element.classList.toggle("multiple",E),this.keyMultipleSignatures.set(E),this.domNodes.signature.innerText="",this.domNodes.docs.innerText="";const N=_.signatures[_.activeSignature];if(!N)return;const k=y.append(this.domNodes.signature,u(".code")),M=this.editor.getOption(44);k.style.fontSize=`${M.fontSize}px`,k.style.fontFamily=M.fontFamily;const O=N.parameters.length>0,B=(L=N.activeParameter)!==null&&L!==void 0?L:_.activeParameter;if(O)this.renderParameters(k,N,B);else{const P=y.append(k,u("span"));P.textContent=N.label}const T=N.parameters[B];if(T==null?void 0:T.documentation){const P=u("span.documentation");if(typeof T.documentation=="string")P.textContent=T.documentation;else{const F=this.renderMarkdownDocs(T.documentation);P.appendChild(F.element)}y.append(this.domNodes.docs,u("p",{},P))}if(N.documentation!==void 0)if(typeof N.documentation=="string")y.append(this.domNodes.docs,u("p",{},N.documentation));else{const P=this.renderMarkdownDocs(N.documentation);y.append(this.domNodes.docs,P.element)}const R=this.hasDocs(N,T);if(this.domNodes.signature.classList.toggle("has-docs",R),this.domNodes.docs.classList.toggle("empty",!R),this.domNodes.overloads.textContent=String(_.activeSignature+1).padStart(_.signatures.length.toString().length,"0")+"/"+_.signatures.length,T){let P="";const F=N.parameters[B];Array.isArray(F.label)?P=N.label.substring(F.label[0],F.label[1]):P=F.label,F.documentation&&(P+=typeof F.documentation=="string"?`, ${F.documentation}`:`, ${F.documentation.value}`),N.documentation&&(P+=typeof N.documentation=="string"?`, ${N.documentation}`:`, ${N.documentation.value}`),this.announcedLabel!==P&&(m.alert(l.localize(2,null,P)),this.announcedLabel=P)}this.editor.layoutContentWidget(this),this.domNodes.scrollbar.scanDomNode()}renderMarkdownDocs(_){const L=this.renderDisposeables.add(this.markdownRenderer.render(_,{asyncRenderCallback:()=>{var E;(E=this.domNodes)===null||E===void 0||E.scrollbar.scanDomNode()}}));return L.element.classList.add("markdown-docs"),L}hasDocs(_,L){return!!(L&&typeof L.documentation=="string"&&(0,h.assertIsDefined)(L.documentation).length>0||L&&typeof L.documentation=="object"&&(0,h.assertIsDefined)(L.documentation).value.length>0||_.documentation&&typeof _.documentation=="string"&&(0,h.assertIsDefined)(_.documentation).length>0||_.documentation&&typeof _.documentation=="object"&&(0,h.assertIsDefined)(_.documentation.value).length>0)}renderParameters(_,L,E){const[N,k]=this.getParameterLabelOffsets(L,E),M=document.createElement("span");M.textContent=L.label.substring(0,N);const O=document.createElement("span");O.textContent=L.label.substring(N,k),O.className="parameter active";const B=document.createElement("span");B.textContent=L.label.substring(k),y.append(_,M,O,B)}getParameterLabelOffsets(_,L){const E=_.parameters[L];if(E){if(Array.isArray(E.label))return E.label;if(E.label.length){const N=new RegExp(`(\\W|^)${(0,p.escapeRegExpCharacters)(E.label)}(?=\\W|$)`,"g");N.test(_.label);const k=N.lastIndex-E.label.length;return k>=0?[k,N.lastIndex]:[0,0]}else return[0,0]}else return[0,0]}next(){this.editor.focus(),this.model.next()}previous(){this.editor.focus(),this.model.previous()}cancel(){this.model.cancel()}getDomNode(){return this.domNodes||this.createParameterHintDOMNodes(),this.domNodes.element}getId(){return Mi.ID}trigger(_){this.model.trigger(_,0)}updateMaxHeight(){if(!this.domNodes)return;const L=`${Math.max(this.editor.getLayoutInfo().height/4,250)}px`;this.domNodes.element.style.maxHeight=L;const E=this.domNodes.element.getElementsByClassName("phwrapper");E.length&&(E[0].style.maxHeight=L)}};v.ID="editor.widget.parameterHintsWidget",v=Ie([Ce(1,c.IContextKeyService),Ce(2,r.IOpenerService),Ce(3,t.ILanguageService)],v),e.ParameterHintsWidget=v,e.editorHoverWidgetHighlightForeground=(0,s.registerColor)("editorHoverWidget.highlightForeground",{dark:s.listHighlightForeground,light:s.listHighlightForeground,hc:s.listHighlightForeground},l.localize(3,null)),(0,d.registerThemingParticipant)((C,_)=>{const L=C.getColor(s.editorHoverBorder);if(L){const T=C.type===a.ColorScheme.HIGH_CONTRAST?2:1;_.addRule(`.monaco-editor .parameter-hints-widget { border: ${T}px solid ${L}; }`),_.addRule(`.monaco-editor .parameter-hints-widget.multiple .body { border-left: 1px solid ${L.transparent(.5)}; }`),_.addRule(`.monaco-editor .parameter-hints-widget .signature.has-docs { border-bottom: 1px solid ${L.transparent(.5)}; }`)}const E=C.getColor(s.editorHoverBackground);E&&_.addRule(`.monaco-editor .parameter-hints-widget { background-color: ${E}; }`);const N=C.getColor(s.textLinkForeground);N&&_.addRule(`.monaco-editor .parameter-hints-widget a { color: ${N}; }`);const k=C.getColor(s.textLinkActiveForeground);k&&_.addRule(`.monaco-editor .parameter-hints-widget a:hover { color: ${k}; }`);const M=C.getColor(s.editorHoverForeground);M&&_.addRule(`.monaco-editor .parameter-hints-widget { color: ${M}; }`);const O=C.getColor(s.textCodeBlockBackground);O&&_.addRule(`.monaco-editor .parameter-hints-widget code { background-color: ${O}; }`);const B=C.getColor(e.editorHoverWidgetHighlightForeground);B&&_.addRule(`.monaco-editor .parameter-hints-widget .parameter.active { color: ${B}}`)})}),define(te[694],ie([1,0,2,15,24,18,198,558,16,9,693]),function(j,e,y,m,D,I,w,b,p,h,g){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TriggerParameterHintsAction=void 0;let t=class Ai extends y.Disposable{constructor(r,s){super();this.editor=r,this.widget=this._register(s.createInstance(g.ParameterHintsWidget,this.editor))}static get(r){return r.getContribution(Ai.ID)}cancel(){this.widget.cancel()}previous(){this.widget.previous()}next(){this.widget.next()}trigger(r){this.widget.trigger(r)}};t.ID="editor.controller.parameterHints",t=Ie([Ce(1,h.IInstantiationService)],t);class i extends m.EditorAction{constructor(){super({id:"editor.action.triggerParameterHints",label:b.localize(0,null),alias:"Trigger Parameter Hints",precondition:D.EditorContextKeys.hasSignatureHelpProvider,kbOpts:{kbExpr:D.EditorContextKeys.editorTextFocus,primary:2048|1024|10,weight:100}})}run(r,s){const o=t.get(s);o&&o.trigger({triggerKind:I.SignatureHelpTriggerKind.Invoke})}}e.TriggerParameterHintsAction=i,(0,m.registerEditorContribution)(t.ID,t),(0,m.registerEditorAction)(i);const n=100+75,l=m.EditorCommand.bindToContribution(t.get);(0,m.registerEditorCommand)(new l({id:"closeParameterHints",precondition:w.Context.Visible,handler:c=>c.cancel(),kbOpts:{weight:n,kbExpr:D.EditorContextKeys.focus,primary:9,secondary:[1024|9]}})),(0,m.registerEditorCommand)(new l({id:"showPrevParameterHint",precondition:p.ContextKeyExpr.and(w.Context.Visible,w.Context.MultipleSignatures),handler:c=>c.previous(),kbOpts:{weight:n,kbExpr:D.EditorContextKeys.focus,primary:16,secondary:[512|16],mac:{primary:16,secondary:[512|16,256|46]}}})),(0,m.registerEditorCommand)(new l({id:"showNextParameterHint",precondition:p.ContextKeyExpr.and(w.Context.Visible,w.Context.MultipleSignatures),handler:c=>c.next(),kbOpts:{weight:n,kbExpr:D.EditorContextKeys.focus,primary:18,secondary:[512|18],mac:{primary:18,secondary:[512|18,256|44]}}}))}),define(te[695],ie([1,0,34,7,190,19,27,4,73,2,25,31,18,621,45,35,572,269,72,14,277]),function(j,e,y,m,D,I,w,b,p,h,g,t,i,n,l,c,r,s,o,a,d){"use strict";var u;Object.defineProperty(e,"__esModule",{value:!0}),e.ItemRenderer=e.suggestMoreInfoIcon=e.getAriaId=void 0;function f(_){return`suggest-aria-id:${_}`}e.getAriaId=f,e.suggestMoreInfoIcon=(0,o.registerIcon)("suggest-more-info",w.Codicon.chevronRight,r.localize(0,null));const S=new(u=class Vt{extract(L,E){if(L.textLabel.match(Vt._regexStrict))return E[0]=L.textLabel,!0;if(L.completion.detail&&L.completion.detail.match(Vt._regexStrict))return E[0]=L.completion.detail,!0;if(typeof L.completion.documentation=="string"){const N=Vt._regexRelaxed.exec(L.completion.documentation);if(N&&(N.index===0||N.index+N[0].length===L.completion.documentation.length))return E[0]=N[0],!0}return!1}},u._regexRelaxed=/(#([\da-fA-F]{3}){1,2}|(rgb|hsl)a\(\s*(\d{1,3}%?\s*,\s*){3}(1|0?\.\d+)\)|(rgb|hsl)\(\s*\d{1,3}%?(\s*,\s*\d{1,3}%?){2}\s*\))/,u._regexStrict=new RegExp(`^${u._regexRelaxed.source}$`,"i"),u);let v=class{constructor(L,E,N,k){this._editor=L,this._modelService=E,this._languageService=N,this._themeService=k,this._onDidToggleDetails=new b.Emitter,this.onDidToggleDetails=this._onDidToggleDetails.event,this.templateId="suggestion"}dispose(){this._onDidToggleDetails.dispose()}renderTemplate(L){const E=Object.create(null);E.disposables=new h.DisposableStore,E.root=L,E.root.classList.add("show-file-icons"),E.icon=(0,m.append)(L,(0,m.$)(".icon")),E.colorspan=(0,m.append)(E.icon,(0,m.$)("span.colorspan"));const N=(0,m.append)(L,(0,m.$)(".contents")),k=(0,m.append)(N,(0,m.$)(".main"));E.iconContainer=(0,m.append)(k,(0,m.$)(".icon-label.codicon")),E.left=(0,m.append)(k,(0,m.$)("span.left")),E.right=(0,m.append)(k,(0,m.$)("span.right")),E.iconLabel=new D.IconLabel(E.left,{supportHighlights:!0,supportIcons:!0}),E.disposables.add(E.iconLabel),E.parametersLabel=(0,m.append)(E.left,(0,m.$)("span.signature-label")),E.qualifierLabel=(0,m.append)(E.left,(0,m.$)("span.qualifier-label")),E.detailsLabel=(0,m.append)(E.right,(0,m.$)("span.details-label")),E.readMore=(0,m.append)(E.right,(0,m.$)("span.readMore"+a.ThemeIcon.asCSSSelector(e.suggestMoreInfoIcon))),E.readMore.title=r.localize(1,null);const M=()=>{const O=this._editor.getOptions(),B=O.get(44),T=B.getMassagedFontFamily(y.isSafari?t.EDITOR_FONT_DEFAULTS.fontFamily:null),R=B.fontFeatureSettings,P=O.get(107)||B.fontSize,F=O.get(108)||B.lineHeight,W=B.fontWeight,A=`${P}px`,H=`${F}px`;E.root.style.fontSize=A,E.root.style.fontWeight=W,k.style.fontFamily=T,k.style.fontFeatureSettings=R,k.style.lineHeight=H,E.icon.style.height=H,E.icon.style.width=H,E.readMore.style.height=H,E.readMore.style.width=H};return M(),E.disposables.add(this._editor.onDidChangeConfiguration(O=>{(O.hasChanged(44)||O.hasChanged(107)||O.hasChanged(108))&&M()})),E}renderElement(L,E,N){const{completion:k}=L;N.root.id=f(E),N.colorspan.style.backgroundColor="";const M={labelEscapeNewLines:!0,matches:(0,p.createMatches)(L.score)};let O=[];if(k.kind===19&&S.extract(L,O))N.icon.className="icon customcolor",N.iconContainer.className="icon hide",N.colorspan.style.backgroundColor=O[0];else if(k.kind===20&&this._themeService.getFileIconTheme().hasFileIcons){N.icon.className="icon hide",N.iconContainer.className="icon hide";const B=(0,n.getIconClasses)(this._modelService,this._languageService,g.URI.from({scheme:"fake",path:L.textLabel}),s.FileKind.FILE),T=(0,n.getIconClasses)(this._modelService,this._languageService,g.URI.from({scheme:"fake",path:k.detail}),s.FileKind.FILE);M.extraClasses=B.length>T.length?B:T}else k.kind===23&&this._themeService.getFileIconTheme().hasFolderIcons?(N.icon.className="icon hide",N.iconContainer.className="icon hide",M.extraClasses=(0,I.flatten)([(0,n.getIconClasses)(this._modelService,this._languageService,g.URI.from({scheme:"fake",path:L.textLabel}),s.FileKind.FOLDER),(0,n.getIconClasses)(this._modelService,this._languageService,g.URI.from({scheme:"fake",path:k.detail}),s.FileKind.FOLDER)])):(N.icon.className="icon hide",N.iconContainer.className="",N.iconContainer.classList.add("suggest-icon",...w.CSSIcon.asClassNameArray(i.CompletionItemKinds.toIcon(k.kind))));k.tags&&k.tags.indexOf(1)>=0&&(M.extraClasses=(M.extraClasses||[]).concat(["deprecated"]),M.matches=[]),N.iconLabel.setLabel(L.textLabel,void 0,M),typeof k.label=="string"?(N.parametersLabel.textContent="",N.detailsLabel.textContent=C(k.detail||""),N.root.classList.add("string-label")):(N.parametersLabel.textContent=C(k.label.detail||""),N.detailsLabel.textContent=C(k.label.description||""),N.root.classList.remove("string-label")),this._editor.getOption(106).showInlineDetails?(0,m.show)(N.detailsLabel):(0,m.hide)(N.detailsLabel),(0,d.canExpandCompletionItem)(L)?(N.right.classList.add("can-expand-details"),(0,m.show)(N.readMore),N.readMore.onmousedown=B=>{B.stopPropagation(),B.preventDefault()},N.readMore.onclick=B=>{B.stopPropagation(),B.preventDefault(),this._onDidToggleDetails.fire()}):(N.right.classList.remove("can-expand-details"),(0,m.hide)(N.readMore),N.readMore.onmousedown=null,N.readMore.onclick=null)}disposeTemplate(L){L.disposables.dispose()}};v=Ie([Ce(1,l.IModelService),Ce(2,c.ILanguageService),Ce(3,a.IThemeService)],v),e.ItemRenderer=v;function C(_){return _.replace(/\r\n|\r|\n/g,"")}}),define(te[696],ie([1,0,7,84,44,2,104,9,688,72,14,387]),function(j,e,y,m,D,I,w,b,p,h,g){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BannerController=void 0;const t=26;let i=class extends I.Disposable{constructor(c,r){super();this._editor=c,this.instantiationService=r,this.banner=this._register(this.instantiationService.createInstance(n))}hide(){this._editor.setBanner(null,0),this.banner.clear()}show(c){this.banner.show(Object.assign(Object.assign({},c),{onClose:()=>{this.hide(),c.onClose&&c.onClose()}})),this._editor.setBanner(this.banner.element,t)}};i=Ie([Ce(1,b.IInstantiationService)],i),e.BannerController=i;let n=class extends I.Disposable{constructor(c){super();this.instantiationService=c,this.markdownRenderer=this.instantiationService.createInstance(w.MarkdownRenderer,{}),this.element=(0,y.$)("div.editor-banner"),this.element.tabIndex=0}getAriaLabel(c){if(c.ariaLabel)return c.ariaLabel;if(typeof c.message=="string")return c.message}getBannerMessage(c){if(typeof c=="string"){const r=(0,y.$)("span");return r.innerText=c,r}return this.markdownRenderer.render(c).element}clear(){(0,y.clearNode)(this.element)}show(c){(0,y.clearNode)(this.element);const r=this.getAriaLabel(c);r&&this.element.setAttribute("aria-label",r);const s=(0,y.append)(this.element,(0,y.$)("div.icon-container"));s.setAttribute("aria-hidden","true"),c.icon&&s.appendChild((0,y.$)(`div${g.ThemeIcon.asCSSSelector(c.icon)}`));const o=(0,y.append)(this.element,(0,y.$)("div.message-container"));if(o.setAttribute("aria-hidden","true"),o.appendChild(this.getBannerMessage(c.message)),this.messageActionsContainer=(0,y.append)(this.element,(0,y.$)("div.message-actions-container")),c.actions)for(const d of c.actions)this._register(this.instantiationService.createInstance(p.Link,this.messageActionsContainer,Object.assign(Object.assign({},d),{tabIndex:-1}),{}));const a=(0,y.append)(this.element,(0,y.$)("div.action-container"));this.actionBar=this._register(new m.ActionBar(a)),this.actionBar.push(this._register(new D.Action("banner.close","Close Banner",g.ThemeIcon.asClassName(h.widgetClose),!0,()=>{typeof c.onClose=="function"&&c.onClose()})),{icon:!0,label:!1}),this.actionBar.setFocusable(!1)}};n=Ie([Ce(0,b.IInstantiationService)],n)}),define(te[697],ie([1,0,7,4,72,14]),function(j,e,y,m,D,I){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.UnthemedProductIconTheme=e.getIconsStyleSheet=void 0;function w(p){const h=new m.Emitter,g=(0,D.getIconRegistry)();return g.onDidChange(()=>h.fire()),p==null||p.onDidProductIconThemeChange(()=>h.fire()),{onDidChange:h.event,getCSS(){const t=p?p.getProductIconTheme():new b,i={},n=c=>{const r=t.getIcon(c);if(!r)return;const s=r.font;return s?(i[s.id]=s.getDefinition(),`.codicon-${c.id}:before { content: '${r.fontCharacter}'; font-family: ${(0,y.asCSSPropertyValue)(s.id)}; }`):`.codicon-${c.id}:before { content: '${r.fontCharacter}'; }`},l=[];for(let c of g.getIcons()){const r=n(c);r&&l.push(r)}for(let c in i){const r=i[c];if(r){const s=r.weight?`font-weight: ${r.weight};`:"",o=r.style?`font-style: ${r.style};`:"",a=r.src.map(d=>`${(0,y.asCSSUrl)(d.location)} format('${d.format}')`).join(", ");l.push(`@font-face { src: ${a}; font-family: ${(0,y.asCSSPropertyValue)(c)};${s}${o} font-display: block; }`)}}return l.join(`
|
||
`)}}}e.getIconsStyleSheet=w;class b{getIcon(h){const g=(0,D.getIconRegistry)();let t=h.defaults;for(;I.ThemeIcon.isThemeIcon(t);){const i=g.getIcon(t.id);if(!i)return;t=i.defaults}return t}}e.UnthemedProductIconTheme=b}),define(te[698],ie([1,0,7,29,4,18,412,658,36,23,14,2,132,697]),function(j,e,y,m,D,I,w,b,p,h,g,t,i,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.StandaloneThemeService=void 0;const l="vs",c="vs-dark",r="hc-black",s=p.Registry.as(h.Extensions.ColorContribution),o=p.Registry.as(g.Extensions.ThemingContribution);class a{constructor(C,_){this.semanticHighlighting=!1,this.themeData=_;const L=_.base;C.length>0?(d(C)?this.id=C:this.id=L+" "+C,this.themeName=C):(this.id=L,this.themeName=L),this.colors=null,this.defaultColors=Object.create(null),this._tokenTheme=null}get base(){return this.themeData.base}notifyBaseUpdated(){this.themeData.inherit&&(this.colors=null,this._tokenTheme=null)}getColors(){if(!this.colors){const C=new Map;for(let _ in this.themeData.colors)C.set(_,m.Color.fromHex(this.themeData.colors[_]));if(this.themeData.inherit){const _=u(this.themeData.base);for(let L in _.colors)C.has(L)||C.set(L,m.Color.fromHex(_.colors[L]))}this.colors=C}return this.colors}getColor(C,_){const L=this.getColors().get(C);if(L)return L;if(_!==!1)return this.getDefault(C)}getDefault(C){let _=this.defaultColors[C];return _||(_=s.resolveDefaultColor(C,this),this.defaultColors[C]=_,_)}defines(C){return Object.prototype.hasOwnProperty.call(this.getColors(),C)}get type(){switch(this.base){case l:return i.ColorScheme.LIGHT;case r:return i.ColorScheme.HIGH_CONTRAST;default:return i.ColorScheme.DARK}}get tokenTheme(){if(!this._tokenTheme){let C=[],_=[];if(this.themeData.inherit){const N=u(this.themeData.base);C=N.rules,N.encodedTokensColors&&(_=N.encodedTokensColors)}const L=this.themeData.colors["editor.foreground"],E=this.themeData.colors["editor.background"];if(L||E){const N={token:""};L&&(N.foreground=L),E&&(N.background=E),C.push(N)}C=C.concat(this.themeData.rules),this.themeData.encodedTokensColors&&(_=this.themeData.encodedTokensColors),this._tokenTheme=w.TokenTheme.createFromRawTokenTheme(C,_)}return this._tokenTheme}getTokenStyleMetadata(C,_,L){const N=this.tokenTheme._match([C].concat(_).join(".")).metadata,k=I.TokenMetadata.getForeground(N),M=I.TokenMetadata.getFontStyle(N);return{foreground:k,italic:Boolean(M&1),bold:Boolean(M&2),underline:Boolean(M&4),strikethrough:Boolean(M&8)}}}function d(v){return v===l||v===c||v===r}function u(v){switch(v){case l:return b.vs;case c:return b.vs_dark;case r:return b.hc_black}}function f(v){const C=u(v);return new a(v,C)}class S extends t.Disposable{constructor(){super();this._onColorThemeChange=this._register(new D.Emitter),this.onDidColorThemeChange=this._onColorThemeChange.event,this._onProductIconThemeChange=this._register(new D.Emitter),this.onDidProductIconThemeChange=this._onProductIconThemeChange.event,this._environment=Object.create(null),this._builtInProductIconTheme=new n.UnthemedProductIconTheme,this._autoDetectHighContrast=!0,this._knownThemes=new Map,this._knownThemes.set(l,f(l)),this._knownThemes.set(c,f(c)),this._knownThemes.set(r,f(r));const C=(0,n.getIconsStyleSheet)(this);this._codiconCSS=C.getCSS(),this._themeCSS="",this._allCSS=`${this._codiconCSS}
|
||
${this._themeCSS}`,this._globalStyleElement=null,this._styleElements=[],this._colorMapOverride=null,this.setTheme(l),C.onDidChange(()=>{this._codiconCSS=C.getCSS(),this._updateCSS()}),y.addMatchMediaChangeListener("(forced-colors: active)",()=>{this._updateActualTheme()})}registerEditorContainer(C){return y.isInShadowDOM(C)?this._registerShadowDomContainer(C):this._registerRegularEditorContainer()}_registerRegularEditorContainer(){return this._globalStyleElement||(this._globalStyleElement=y.createStyleSheet(),this._globalStyleElement.className="monaco-colors",this._globalStyleElement.textContent=this._allCSS,this._styleElements.push(this._globalStyleElement)),t.Disposable.None}_registerShadowDomContainer(C){const _=y.createStyleSheet(C);return _.className="monaco-colors",_.textContent=this._allCSS,this._styleElements.push(_),{dispose:()=>{for(let L=0;L<this._styleElements.length;L++)if(this._styleElements[L]===_){this._styleElements.splice(L,1);return}}}}defineTheme(C,_){if(!/^[a-z0-9\-]+$/i.test(C))throw new Error("Illegal theme name!");if(!d(_.base)&&!d(C))throw new Error("Illegal theme base!");this._knownThemes.set(C,new a(C,_)),d(C)&&this._knownThemes.forEach(L=>{L.base===C&&L.notifyBaseUpdated()}),this._theme.themeName===C&&this.setTheme(C)}getColorTheme(){return this._theme}setColorMapOverride(C){this._colorMapOverride=C,this._updateThemeOrColorMap()}setTheme(C){let _;this._knownThemes.has(C)?_=this._knownThemes.get(C):_=this._knownThemes.get(l),this._desiredTheme=_,this._updateActualTheme()}_updateActualTheme(){const C=this._autoDetectHighContrast&&window.matchMedia("(forced-colors: active)").matches?this._knownThemes.get(r):this._desiredTheme;this._theme!==C&&(this._theme=C,this._updateThemeOrColorMap())}setAutoDetectHighContrast(C){this._autoDetectHighContrast=C,this._updateActualTheme()}_updateThemeOrColorMap(){const C=[],_={},L={addRule:k=>{_[k]||(C.push(k),_[k]=!0)}};o.getThemingParticipants().forEach(k=>k(this._theme,L,this._environment));const E=[];for(const k of s.getColors()){const M=this._theme.getColor(k.id,!0);M&&E.push(`${(0,h.asCssVariableName)(k.id)}: ${M.toString()};`)}L.addRule(`.monaco-editor { ${E.join(`
|
||
`)} }`);const N=this._colorMapOverride||this._theme.tokenTheme.getColorMap();L.addRule((0,w.generateTokensCSSForColorMap)(N)),this._themeCSS=C.join(`
|
||
`),this._updateCSS(),I.TokenizationRegistry.setColorMap(N),this._onColorThemeChange.fire(this._theme)}_updateCSS(){this._allCSS=`${this._codiconCSS}
|
||
${this._themeCSS}`,this._styleElements.forEach(C=>C.textContent=this._allCSS)}getFileIconTheme(){return{hasFileIcons:!1,hasFolderIcons:!1,hidesExplorerArrows:!1}}getProductIconTheme(){return this._builtInProductIconTheme}}e.StandaloneThemeService=S}),define(te[158],ie([1,0,9]),function(j,e,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.UndoRedoSource=e.UndoRedoGroup=e.ResourceEditStackSnapshot=e.IUndoRedoService=void 0,e.IUndoRedoService=(0,y.createDecorator)("undoRedoService");class m{constructor(b,p){this.resource=b,this.elements=p}}e.ResourceEditStackSnapshot=m;class D{constructor(){this.id=D._ID++,this.order=1}nextOrder(){return this.id===0?0:this.order++}}e.UndoRedoGroup=D,D._ID=0,D.None=new D;class I{constructor(){this.id=I._ID++,this.order=1}nextOrder(){return this.id===0?0:this.order++}}e.UndoRedoSource=I,I._ID=0,I.None=new I}),define(te[33],ie([1,0,19,29,13,4,2,8,25,11,3,22,49,427,649,268,246,416,417,245,421,91,150,432,117,434,436,146,32,35,158,145]),function(j,e,y,m,D,I,w,b,p,h,g,t,i,n,l,c,r,s,o,a,d,u,f,S,v,C,_,L,E,N,k,M){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DidChangeContentEmitter=e.DidChangeDecorationsEmitter=e.ModelDecorationOptions=e.ModelDecorationInjectedTextOptions=e.ModelDecorationMinimapOptions=e.ModelDecorationOverviewRulerOptions=e.TextModel=e.LONG_LINE_BOUNDARY=e.createTextBuffer=e.createTextBufferFactory=void 0;function O(){return new d.PieceTreeTextBufferBuilder}function B(ue){const z=O();return z.acceptChunk(ue),z.finish()}e.createTextBufferFactory=B;function T(ue,z){return(typeof ue=="string"?B(ue):ue).create(z)}e.createTextBuffer=T;let R=0;const P=999;e.LONG_LINE_BOUNDARY=1e4;class F{constructor(z){this._source=z,this._eos=!1}read(){if(this._eos)return null;const z=[];let V=0,$=0;do{const K=this._source.read();if(K===null)return this._eos=!0,V===0?null:z.join("");if(K.length>0&&(z[V++]=K,$+=K.length),$>=64*1024)return z.join("")}while(!0)}}const W=()=>{throw new Error("Invalid change accessor")};let A=class vt extends w.Disposable{constructor(z,V,$,K=null,J,Y,se){super();this._undoRedoService=J,this._languageService=Y,this._languageConfigurationService=se,this._onWillDispose=this._register(new I.Emitter),this.onWillDispose=this._onWillDispose.event,this._onDidChangeDecorations=this._register(new ce(ve=>this.handleBeforeFireDecorationsChangedEvent(ve))),this.onDidChangeDecorations=this._onDidChangeDecorations.event,this._onDidChangeLanguage=this._register(new I.Emitter),this.onDidChangeLanguage=this._onDidChangeLanguage.event,this._onDidChangeLanguageConfiguration=this._register(new I.Emitter),this.onDidChangeLanguageConfiguration=this._onDidChangeLanguageConfiguration.event,this._onDidChangeTokens=this._register(new I.Emitter),this.onDidChangeTokens=this._onDidChangeTokens.event,this._onDidChangeOptions=this._register(new I.Emitter),this.onDidChangeOptions=this._onDidChangeOptions.event,this._onDidChangeAttached=this._register(new I.Emitter),this.onDidChangeAttached=this._onDidChangeAttached.event,this._onDidChangeContentOrInjectedText=this._register(new I.Emitter),this.onDidChangeContentOrInjectedText=this._onDidChangeContentOrInjectedText.event,this._eventEmitter=this._register(new ee),this._backgroundTokenizationState=0,this._onBackgroundTokenizationStateChanged=this._register(new I.Emitter),this.onBackgroundTokenizationStateChanged=this._onBackgroundTokenizationStateChanged.event,this._register(this._eventEmitter.fastEvent(ve=>{this._onDidChangeContentOrInjectedText.fire(ve.rawContentChangedEvent)})),R++,this.id="$model"+R,this.isForSimpleWidget=$.isForSimpleWidget,typeof K=="undefined"||K===null?this._associatedResource=p.URI.parse("inmemory://model/"+R):this._associatedResource=K,this._attachedEditorCount=0;const{textBuffer:ge,disposable:me}=T(z,$.defaultEOL);this._buffer=ge,this._bufferDisposable=me,this._options=vt.resolveOptions(this._buffer,$);const le=this._buffer.getLineCount(),he=this._buffer.getValueLengthInRange(new g.Range(1,1,le,this._buffer.getLineLength(le)+1),0);$.largeFileOptimizations?this._isTooLargeForTokenization=he>vt.LARGE_FILE_SIZE_THRESHOLD||le>vt.LARGE_FILE_LINE_COUNT_THRESHOLD:this._isTooLargeForTokenization=!1,this._isTooLargeForSyncing=he>vt.MODEL_SYNC_LIMIT,this._versionId=1,this._alternativeVersionId=1,this._initialUndoRedoSnapshot=null,this._isDisposed=!1,this._isDisposing=!1,this._languageId=V,this._languageRegistryListener=this._languageConfigurationService.onDidChange(ve=>{ve.affects(this._languageId)&&this._onDidChangeLanguageConfiguration.fire({})}),this._instanceId=b.singleLetterHash(R),this._lastDecorationId=0,this._decorations=Object.create(null),this._decorationsTree=new G,this._commandManager=new c.EditStack(this,this._undoRedoService),this._isUndoing=!1,this._isRedoing=!1,this._trimAutoWhitespaceLines=null,this._tokens=new C.ContiguousTokensStore(this._languageService.languageIdCodec),this._semanticTokens=new _.SparseTokensStore(this._languageService.languageIdCodec),this._tokenization=new S.TextModelTokenization(this,this._languageService.languageIdCodec),this._bracketPairColorizer=this._register(new n.BracketPairsTextModelPart(this,this._languageConfigurationService)),this._guidesTextModelPart=this._register(new r.GuidesTextModelPart(this,this._languageConfigurationService)),this._decorationProvider=this._register(new l.ColorizedBracketPairsDecorationProvider(this)),this._register(this._decorationProvider.onDidChange(()=>{this._onDidChangeDecorations.beginDeferredEmit(),this._onDidChangeDecorations.fire(),this._onDidChangeDecorations.endDeferredEmit()}))}static resolveOptions(z,V){if(V.detectIndentation){const $=(0,s.guessIndentation)(z,V.tabSize,V.insertSpaces);return new i.TextModelResolvedOptions({tabSize:$.tabSize,indentSize:$.tabSize,insertSpaces:$.insertSpaces,trimAutoWhitespace:V.trimAutoWhitespace,defaultEOL:V.defaultEOL,bracketPairColorizationOptions:V.bracketPairColorizationOptions})}return new i.TextModelResolvedOptions({tabSize:V.tabSize,indentSize:V.indentSize,insertSpaces:V.insertSpaces,trimAutoWhitespace:V.trimAutoWhitespace,defaultEOL:V.defaultEOL,bracketPairColorizationOptions:V.bracketPairColorizationOptions})}onDidChangeContentFast(z){return this._eventEmitter.fastEvent(V=>z(V.contentChangedEvent))}onDidChangeContent(z){return this._eventEmitter.slowEvent(V=>z(V.contentChangedEvent))}get bracketPairs(){return this._bracketPairColorizer}get guides(){return this._guidesTextModelPart}get backgroundTokenizationState(){return this._backgroundTokenizationState}handleTokenizationProgress(z){if(this._backgroundTokenizationState===2)return;const V=z?2:1;this._backgroundTokenizationState!==V&&(this._backgroundTokenizationState=V,this._onBackgroundTokenizationStateChanged.fire())}dispose(){this._isDisposing=!0,this._onWillDispose.fire(),this._languageRegistryListener.dispose(),this._tokenization.dispose(),this._isDisposed=!0,super.dispose(),this._bufferDisposable.dispose(),this._isDisposing=!1;const z=new a.PieceTreeTextBuffer([],"",`
|
||
`,!1,!1,!0,!0);z.dispose(),this._buffer=z}_assertNotDisposed(){if(this._isDisposed)throw new Error("Model is disposed!")}_emitContentChangedEvent(z,V){this._bracketPairColorizer.handleContentChanged(V),!this._isDisposing&&this._eventEmitter.fire(new u.InternalModelContentChangeEvent(z,V))}setValue(z){if(this._assertNotDisposed(),z===null)return;const{textBuffer:V,disposable:$}=T(z,this._options.defaultEOL);this._setValueFromTextBuffer(V,$)}_createContentChanged2(z,V,$,K,J,Y,se){return{changes:[{range:z,rangeOffset:V,rangeLength:$,text:K}],eol:this._buffer.getEOL(),versionId:this.getVersionId(),isUndoing:J,isRedoing:Y,isFlush:se}}_setValueFromTextBuffer(z,V){this._assertNotDisposed();const $=this.getFullModelRange(),K=this.getValueLengthInRange($),J=this.getLineCount(),Y=this.getLineMaxColumn(J);this._buffer=z,this._bufferDisposable.dispose(),this._bufferDisposable=V,this._increaseVersionId(),this._tokens.flush(),this._semanticTokens.flush(),this._decorations=Object.create(null),this._decorationsTree=new G,this._commandManager.clear(),this._trimAutoWhitespaceLines=null,this._emitContentChangedEvent(new u.ModelRawContentChangedEvent([new u.ModelRawFlush],this._versionId,!1,!1),this._createContentChanged2(new g.Range(1,1,J,Y),0,K,this.getValue(),!1,!1,!0))}setEOL(z){this._assertNotDisposed();const V=z===1?`\r
|
||
`:`
|
||
`;if(this._buffer.getEOL()===V)return;const $=this.getFullModelRange(),K=this.getValueLengthInRange($),J=this.getLineCount(),Y=this.getLineMaxColumn(J);this._onBeforeEOLChange(),this._buffer.setEOL(V),this._increaseVersionId(),this._onAfterEOLChange(),this._emitContentChangedEvent(new u.ModelRawContentChangedEvent([new u.ModelRawEOLChanged],this._versionId,!1,!1),this._createContentChanged2(new g.Range(1,1,J,Y),0,K,this.getValue(),!1,!1,!1))}_onBeforeEOLChange(){this._decorationsTree.ensureAllNodesHaveRanges(this)}_onAfterEOLChange(){const z=this.getVersionId(),V=this._decorationsTree.collectNodesPostOrder();for(let $=0,K=V.length;$<K;$++){const J=V[$],Y=J.range,se=J.cachedAbsoluteStart-J.start,ge=this._buffer.getOffsetAt(Y.startLineNumber,Y.startColumn),me=this._buffer.getOffsetAt(Y.endLineNumber,Y.endColumn);J.cachedAbsoluteStart=ge,J.cachedAbsoluteEnd=me,J.cachedVersionId=z,J.start=ge-se,J.end=me-se,(0,o.recomputeMaxEnd)(J)}}onBeforeAttached(){this._attachedEditorCount++,this._attachedEditorCount===1&&this._onDidChangeAttached.fire(void 0)}onBeforeDetached(){this._attachedEditorCount--,this._attachedEditorCount===0&&this._onDidChangeAttached.fire(void 0)}isAttachedToEditor(){return this._attachedEditorCount>0}getAttachedEditorCount(){return this._attachedEditorCount}isTooLargeForSyncing(){return this._isTooLargeForSyncing}isTooLargeForTokenization(){return this._isTooLargeForTokenization}isDisposed(){return this._isDisposed}isDominatedByLongLines(){if(this._assertNotDisposed(),this.isTooLargeForTokenization())return!1;let z=0,V=0;const $=this._buffer.getLineCount();for(let K=1;K<=$;K++){const J=this._buffer.getLineLength(K);J>=e.LONG_LINE_BOUNDARY?V+=J:z+=J}return V>z}get uri(){return this._associatedResource}getOptions(){return this._assertNotDisposed(),this._options}getFormattingOptions(){return{tabSize:this._options.indentSize,insertSpaces:this._options.insertSpaces}}updateOptions(z){this._assertNotDisposed();const V=typeof z.tabSize!="undefined"?z.tabSize:this._options.tabSize,$=typeof z.indentSize!="undefined"?z.indentSize:this._options.indentSize,K=typeof z.insertSpaces!="undefined"?z.insertSpaces:this._options.insertSpaces,J=typeof z.trimAutoWhitespace!="undefined"?z.trimAutoWhitespace:this._options.trimAutoWhitespace,Y=typeof z.bracketColorizationOptions!="undefined"?z.bracketColorizationOptions:this._options.bracketPairColorizationOptions,se=new i.TextModelResolvedOptions({tabSize:V,indentSize:$,insertSpaces:K,defaultEOL:this._options.defaultEOL,trimAutoWhitespace:J,bracketPairColorizationOptions:Y});if(this._options.equals(se))return;const ge=this._options.createChangeEvent(se);this._options=se,this._onDidChangeOptions.fire(ge)}detectIndentation(z,V){this._assertNotDisposed();const $=(0,s.guessIndentation)(this._buffer,V,z);this.updateOptions({insertSpaces:$.insertSpaces,tabSize:$.tabSize,indentSize:$.tabSize})}static _normalizeIndentationFromWhitespace(z,V,$){let K=0;for(let Y=0;Y<z.length;Y++)z.charAt(Y)===" "?K+=V:K++;let J="";if(!$){const Y=Math.floor(K/V);K=K%V;for(let se=0;se<Y;se++)J+=" "}for(let Y=0;Y<K;Y++)J+=" ";return J}static normalizeIndentation(z,V,$){let K=b.firstNonWhitespaceIndex(z);return K===-1&&(K=z.length),vt._normalizeIndentationFromWhitespace(z.substring(0,K),V,$)+z.substring(K)}normalizeIndentation(z){return this._assertNotDisposed(),vt.normalizeIndentation(z,this._options.indentSize,this._options.insertSpaces)}getVersionId(){return this._assertNotDisposed(),this._versionId}mightContainRTL(){return this._buffer.mightContainRTL()}mightContainUnusualLineTerminators(){return this._buffer.mightContainUnusualLineTerminators()}removeUnusualLineTerminators(z=null){const V=this.findMatches(b.UNUSUAL_LINE_TERMINATORS.source,!1,!0,!1,null,!1,1073741824);this._buffer.resetMightContainUnusualLineTerminators(),this.pushEditOperations(z,V.map($=>({range:$.range,text:null})),()=>null)}mightContainNonBasicASCII(){return this._buffer.mightContainNonBasicASCII()}getAlternativeVersionId(){return this._assertNotDisposed(),this._alternativeVersionId}getInitialUndoRedoSnapshot(){return this._assertNotDisposed(),this._initialUndoRedoSnapshot}getOffsetAt(z){this._assertNotDisposed();const V=this._validatePosition(z.lineNumber,z.column,0);return this._buffer.getOffsetAt(V.lineNumber,V.column)}getPositionAt(z){this._assertNotDisposed();const V=Math.min(this._buffer.getLength(),Math.max(0,z));return this._buffer.getPositionAt(V)}_increaseVersionId(){this._versionId=this._versionId+1,this._alternativeVersionId=this._versionId}_overwriteVersionId(z){this._versionId=z}_overwriteAlternativeVersionId(z){this._alternativeVersionId=z}_overwriteInitialUndoRedoSnapshot(z){this._initialUndoRedoSnapshot=z}getValue(z,V=!1){this._assertNotDisposed();const $=this.getFullModelRange(),K=this.getValueInRange($,z);return V?this._buffer.getBOM()+K:K}createSnapshot(z=!1){return new F(this._buffer.createSnapshot(z))}getValueLength(z,V=!1){this._assertNotDisposed();const $=this.getFullModelRange(),K=this.getValueLengthInRange($,z);return V?this._buffer.getBOM().length+K:K}getValueInRange(z,V=0){return this._assertNotDisposed(),this._buffer.getValueInRange(this.validateRange(z),V)}getValueLengthInRange(z,V=0){return this._assertNotDisposed(),this._buffer.getValueLengthInRange(this.validateRange(z),V)}getCharacterCountInRange(z,V=0){return this._assertNotDisposed(),this._buffer.getCharacterCountInRange(this.validateRange(z),V)}getLineCount(){return this._assertNotDisposed(),this._buffer.getLineCount()}getLineContent(z){if(this._assertNotDisposed(),z<1||z>this.getLineCount())throw new Error("Illegal value for lineNumber");return this._buffer.getLineContent(z)}getLineLength(z){if(this._assertNotDisposed(),z<1||z>this.getLineCount())throw new Error("Illegal value for lineNumber");return this._buffer.getLineLength(z)}getLinesContent(){return this._assertNotDisposed(),this._buffer.getLinesContent()}getEOL(){return this._assertNotDisposed(),this._buffer.getEOL()}getEndOfLineSequence(){return this._assertNotDisposed(),this._buffer.getEOL()===`
|
||
`?0:1}getLineMinColumn(z){return this._assertNotDisposed(),1}getLineMaxColumn(z){if(this._assertNotDisposed(),z<1||z>this.getLineCount())throw new Error("Illegal value for lineNumber");return this._buffer.getLineLength(z)+1}getLineFirstNonWhitespaceColumn(z){if(this._assertNotDisposed(),z<1||z>this.getLineCount())throw new Error("Illegal value for lineNumber");return this._buffer.getLineFirstNonWhitespaceColumn(z)}getLineLastNonWhitespaceColumn(z){if(this._assertNotDisposed(),z<1||z>this.getLineCount())throw new Error("Illegal value for lineNumber");return this._buffer.getLineLastNonWhitespaceColumn(z)}_validateRangeRelaxedNoAllocations(z){const V=this._buffer.getLineCount(),$=z.startLineNumber,K=z.startColumn;let J=Math.floor(typeof $=="number"&&!isNaN($)?$:1),Y=Math.floor(typeof K=="number"&&!isNaN(K)?K:1);if(J<1)J=1,Y=1;else if(J>V)J=V,Y=this.getLineMaxColumn(J);else if(Y<=1)Y=1;else{const he=this.getLineMaxColumn(J);Y>=he&&(Y=he)}const se=z.endLineNumber,ge=z.endColumn;let me=Math.floor(typeof se=="number"&&!isNaN(se)?se:1),le=Math.floor(typeof ge=="number"&&!isNaN(ge)?ge:1);if(me<1)me=1,le=1;else if(me>V)me=V,le=this.getLineMaxColumn(me);else if(le<=1)le=1;else{const he=this.getLineMaxColumn(me);le>=he&&(le=he)}return $===J&&K===Y&&se===me&&ge===le&&z instanceof g.Range&&!(z instanceof t.Selection)?z:new g.Range(J,Y,me,le)}_isValidPosition(z,V,$){if(typeof z!="number"||typeof V!="number"||isNaN(z)||isNaN(V)||z<1||V<1||(z|0)!==z||(V|0)!==V)return!1;const K=this._buffer.getLineCount();if(z>K)return!1;if(V===1)return!0;const J=this.getLineMaxColumn(z);if(V>J)return!1;if($===1){const Y=this._buffer.getLineCharCode(z,V-2);if(b.isHighSurrogate(Y))return!1}return!0}_validatePosition(z,V,$){const K=Math.floor(typeof z=="number"&&!isNaN(z)?z:1),J=Math.floor(typeof V=="number"&&!isNaN(V)?V:1),Y=this._buffer.getLineCount();if(K<1)return new h.Position(1,1);if(K>Y)return new h.Position(Y,this.getLineMaxColumn(Y));if(J<=1)return new h.Position(K,1);const se=this.getLineMaxColumn(K);if(J>=se)return new h.Position(K,se);if($===1){const ge=this._buffer.getLineCharCode(K,J-2);if(b.isHighSurrogate(ge))return new h.Position(K,J-1)}return new h.Position(K,J)}validatePosition(z){const V=1;return this._assertNotDisposed(),z instanceof h.Position&&this._isValidPosition(z.lineNumber,z.column,V)?z:this._validatePosition(z.lineNumber,z.column,V)}_isValidRange(z,V){const $=z.startLineNumber,K=z.startColumn,J=z.endLineNumber,Y=z.endColumn;if(!this._isValidPosition($,K,0)||!this._isValidPosition(J,Y,0))return!1;if(V===1){const se=K>1?this._buffer.getLineCharCode($,K-2):0,ge=Y>1&&Y<=this._buffer.getLineLength(J)?this._buffer.getLineCharCode(J,Y-2):0,me=b.isHighSurrogate(se),le=b.isHighSurrogate(ge);return!me&&!le}return!0}validateRange(z){const V=1;if(this._assertNotDisposed(),z instanceof g.Range&&!(z instanceof t.Selection)&&this._isValidRange(z,V))return z;const $=this._validatePosition(z.startLineNumber,z.startColumn,0),K=this._validatePosition(z.endLineNumber,z.endColumn,0),J=$.lineNumber,Y=$.column,se=K.lineNumber,ge=K.column;if(V===1){const me=Y>1?this._buffer.getLineCharCode(J,Y-2):0,le=ge>1&&ge<=this._buffer.getLineLength(se)?this._buffer.getLineCharCode(se,ge-2):0,he=b.isHighSurrogate(me),ve=b.isHighSurrogate(le);return!he&&!ve?new g.Range(J,Y,se,ge):J===se&&Y===ge?new g.Range(J,Y-1,se,ge-1):he&&ve?new g.Range(J,Y-1,se,ge+1):he?new g.Range(J,Y-1,se,ge):new g.Range(J,Y,se,ge+1)}return new g.Range(J,Y,se,ge)}modifyPosition(z,V){this._assertNotDisposed();const $=this.getOffsetAt(z)+V;return this.getPositionAt(Math.min(this._buffer.getLength(),Math.max(0,$)))}getFullModelRange(){this._assertNotDisposed();const z=this.getLineCount();return new g.Range(1,1,z,this.getLineMaxColumn(z))}findMatchesLineByLine(z,V,$,K){return this._buffer.findMatchesLineByLine(z,V,$,K)}findMatches(z,V,$,K,J,Y,se=P){this._assertNotDisposed();let ge=null;V!==null&&(Array.isArray(V)||(V=[V]),V.every(he=>g.Range.isIRange(he))&&(ge=V.map(he=>this.validateRange(he)))),ge===null&&(ge=[this.getFullModelRange()]),ge=ge.sort((he,ve)=>he.startLineNumber-ve.startLineNumber||he.startColumn-ve.startColumn);const me=[];me.push(ge.reduce((he,ve)=>g.Range.areIntersecting(he,ve)?he.plusRange(ve):(me.push(he),ve)));let le;if(!$&&z.indexOf(`
|
||
`)<0){const ve=new f.SearchParams(z,$,K,J).parseSearchRequest();if(!ve)return[];le=pe=>this.findMatchesLineByLine(pe,ve,Y,se)}else le=he=>f.TextModelSearch.findMatches(this,new f.SearchParams(z,$,K,J),he,Y,se);return me.map(le).reduce((he,ve)=>he.concat(ve),[])}findNextMatch(z,V,$,K,J,Y){this._assertNotDisposed();const se=this.validatePosition(V);if(!$&&z.indexOf(`
|
||
`)<0){const me=new f.SearchParams(z,$,K,J).parseSearchRequest();if(!me)return null;const le=this.getLineCount();let he=new g.Range(se.lineNumber,se.column,le,this.getLineMaxColumn(le)),ve=this.findMatchesLineByLine(he,me,Y,1);return f.TextModelSearch.findNextMatch(this,new f.SearchParams(z,$,K,J),se,Y),ve.length>0||(he=new g.Range(1,1,se.lineNumber,this.getLineMaxColumn(se.lineNumber)),ve=this.findMatchesLineByLine(he,me,Y,1),ve.length>0)?ve[0]:null}return f.TextModelSearch.findNextMatch(this,new f.SearchParams(z,$,K,J),se,Y)}findPreviousMatch(z,V,$,K,J,Y){this._assertNotDisposed();const se=this.validatePosition(V);return f.TextModelSearch.findPreviousMatch(this,new f.SearchParams(z,$,K,J),se,Y)}pushStackElement(){this._commandManager.pushStackElement()}popStackElement(){this._commandManager.popStackElement()}pushEOL(z){if((this.getEOL()===`
|
||
`?0:1)!==z)try{this._onDidChangeDecorations.beginDeferredEmit(),this._eventEmitter.beginDeferredEmit(),this._initialUndoRedoSnapshot===null&&(this._initialUndoRedoSnapshot=this._undoRedoService.createSnapshot(this.uri)),this._commandManager.pushEOL(z)}finally{this._eventEmitter.endDeferredEmit(),this._onDidChangeDecorations.endDeferredEmit()}}_validateEditOperation(z){return z instanceof i.ValidAnnotatedEditOperation?z:new i.ValidAnnotatedEditOperation(z.identifier||null,this.validateRange(z.range),z.text,z.forceMoveMarkers||!1,z.isAutoWhitespaceEdit||!1,z._isTracked||!1)}_validateEditOperations(z){const V=[];for(let $=0,K=z.length;$<K;$++)V[$]=this._validateEditOperation(z[$]);return V}pushEditOperations(z,V,$){try{return this._onDidChangeDecorations.beginDeferredEmit(),this._eventEmitter.beginDeferredEmit(),this._pushEditOperations(z,this._validateEditOperations(V),$)}finally{this._eventEmitter.endDeferredEmit(),this._onDidChangeDecorations.endDeferredEmit()}}_pushEditOperations(z,V,$){if(this._options.trimAutoWhitespace&&this._trimAutoWhitespaceLines){const K=V.map(Y=>({range:this.validateRange(Y.range),text:Y.text}));let J=!0;if(z)for(let Y=0,se=z.length;Y<se;Y++){const ge=z[Y];let me=!1;for(let le=0,he=K.length;le<he;le++){const ve=K[le].range,pe=ve.startLineNumber>ge.endLineNumber,be=ge.startLineNumber>ve.endLineNumber;if(!pe&&!be){me=!0;break}}if(!me){J=!1;break}}if(J)for(let Y=0,se=this._trimAutoWhitespaceLines.length;Y<se;Y++){const ge=this._trimAutoWhitespaceLines[Y],me=this.getLineMaxColumn(ge);let le=!0;for(let he=0,ve=K.length;he<ve;he++){const pe=K[he].range,be=K[he].text;if(!(ge<pe.startLineNumber||ge>pe.endLineNumber)&&!(ge===pe.startLineNumber&&pe.startColumn===me&&pe.isEmpty()&&be&&be.length>0&&be.charAt(0)===`
|
||
`)&&!(ge===pe.startLineNumber&&pe.startColumn===1&&pe.isEmpty()&&be&&be.length>0&&be.charAt(be.length-1)===`
|
||
`)){le=!1;break}}if(le){const he=new g.Range(ge,1,ge,me);V.push(new i.ValidAnnotatedEditOperation(null,he,null,!1,!1,!1))}}this._trimAutoWhitespaceLines=null}return this._initialUndoRedoSnapshot===null&&(this._initialUndoRedoSnapshot=this._undoRedoService.createSnapshot(this.uri)),this._commandManager.pushEditOperation(z,V,$)}_applyUndo(z,V,$,K){const J=z.map(Y=>{const se=this.getPositionAt(Y.newPosition),ge=this.getPositionAt(Y.newEnd);return{range:new g.Range(se.lineNumber,se.column,ge.lineNumber,ge.column),text:Y.oldText}});this._applyUndoRedoEdits(J,V,!0,!1,$,K)}_applyRedo(z,V,$,K){const J=z.map(Y=>{const se=this.getPositionAt(Y.oldPosition),ge=this.getPositionAt(Y.oldEnd);return{range:new g.Range(se.lineNumber,se.column,ge.lineNumber,ge.column),text:Y.newText}});this._applyUndoRedoEdits(J,V,!1,!0,$,K)}_applyUndoRedoEdits(z,V,$,K,J,Y){try{this._onDidChangeDecorations.beginDeferredEmit(),this._eventEmitter.beginDeferredEmit(),this._isUndoing=$,this._isRedoing=K,this.applyEdits(z,!1),this.setEOL(V),this._overwriteAlternativeVersionId(J)}finally{this._isUndoing=!1,this._isRedoing=!1,this._eventEmitter.endDeferredEmit(Y),this._onDidChangeDecorations.endDeferredEmit()}}applyEdits(z,V=!1){try{this._onDidChangeDecorations.beginDeferredEmit(),this._eventEmitter.beginDeferredEmit();const $=this._validateEditOperations(z);return this._doApplyEdits($,V)}finally{this._eventEmitter.endDeferredEmit(),this._onDidChangeDecorations.endDeferredEmit()}}_doApplyEdits(z,V){const $=this._buffer.getLineCount(),K=this._buffer.applyEdits(z,this._options.trimAutoWhitespace,V),J=this._buffer.getLineCount(),Y=K.changes;if(this._trimAutoWhitespaceLines=K.trimAutoWhitespaceLineNumbers,Y.length!==0){for(let me=0,le=Y.length;me<le;me++){const he=Y[me],[ve,pe,be]=(0,v.countEOL)(he.text);this._tokens.acceptEdit(he.range,ve,pe),this._semanticTokens.acceptEdit(he.range,ve,pe,be,he.text.length>0?he.text.charCodeAt(0):0),this._decorationsTree.acceptReplace(he.rangeOffset,he.rangeLength,he.text.length,he.forceMoveMarkers)}const se=[];this._increaseVersionId();let ge=$;for(let me=0,le=Y.length;me<le;me++){const he=Y[me],[ve]=(0,v.countEOL)(he.text);this._onDidChangeDecorations.fire();const pe=he.range.startLineNumber,be=he.range.endLineNumber,de=be-pe,fe=ve,_e=Math.min(de,fe),Le=fe-de,Te=J-ge-Le+pe,ke=Te,Me=Te+fe,$e=this._decorationsTree.getInjectedTextInInterval(this,this.getOffsetAt(new h.Position(ke,1)),this.getOffsetAt(new h.Position(Me,this.getLineMaxColumn(Me))),0),He=u.LineInjectedText.fromDecorations($e),Ge=new y.ArrayQueue(He);for(let we=_e;we>=0;we--){const Se=pe+we,De=Te+we;Ge.takeFromEndWhile(Fe=>Fe.lineNumber>De);const Pe=Ge.takeFromEndWhile(Fe=>Fe.lineNumber===De);se.push(new u.ModelRawLineChanged(Se,this.getLineContent(De),Pe))}if(_e<de){const we=pe+_e;se.push(new u.ModelRawLinesDeleted(we+1,be))}if(_e<fe){const we=new y.ArrayQueue(He),Se=pe+_e,De=fe-_e,Pe=J-ge-De+Se+1,Fe=[],xe=[];for(let Ve=0;Ve<De;Ve++){const qe=Pe+Ve;xe[Ve]=this.getLineContent(qe),we.takeWhile(We=>We.lineNumber<qe),Fe[Ve]=we.takeWhile(We=>We.lineNumber===qe)}se.push(new u.ModelRawLinesInserted(Se+1,pe+fe,xe,Fe))}ge+=Le}this._emitContentChangedEvent(new u.ModelRawContentChangedEvent(se,this.getVersionId(),this._isUndoing,this._isRedoing),{changes:Y,eol:this._buffer.getEOL(),versionId:this.getVersionId(),isUndoing:this._isUndoing,isRedoing:this._isRedoing,isFlush:!1})}return K.reverseEdits===null?void 0:K.reverseEdits}undo(){return this._undoRedoService.undo(this.uri)}canUndo(){return this._undoRedoService.canUndo(this.uri)}redo(){return this._undoRedoService.redo(this.uri)}canRedo(){return this._undoRedoService.canRedo(this.uri)}handleBeforeFireDecorationsChangedEvent(z){if(z===null||z.size===0)return;const $=[...z].map(K=>new u.ModelRawLineChanged(K,this.getLineContent(K),this._getInjectedTextInLine(K)));this._onDidChangeContentOrInjectedText.fire(new u.ModelInjectedTextChangedEvent($))}changeDecorations(z,V=0){this._assertNotDisposed();try{return this._onDidChangeDecorations.beginDeferredEmit(),this._changeDecorations(V,z)}finally{this._onDidChangeDecorations.endDeferredEmit()}}_changeDecorations(z,V){const $={addDecoration:(J,Y)=>this._deltaDecorationsImpl(z,[],[{range:J,options:Y}])[0],changeDecoration:(J,Y)=>{this._changeDecorationImpl(J,Y)},changeDecorationOptions:(J,Y)=>{this._changeDecorationOptionsImpl(J,ne(Y))},removeDecoration:J=>{this._deltaDecorationsImpl(z,[J],[])},deltaDecorations:(J,Y)=>J.length===0&&Y.length===0?[]:this._deltaDecorationsImpl(z,J,Y)};let K=null;try{K=V($)}catch(J){(0,D.onUnexpectedError)(J)}return $.addDecoration=W,$.changeDecoration=W,$.changeDecorationOptions=W,$.removeDecoration=W,$.deltaDecorations=W,K}deltaDecorations(z,V,$=0){if(this._assertNotDisposed(),z||(z=[]),z.length===0&&V.length===0)return[];try{return this._onDidChangeDecorations.beginDeferredEmit(),this._deltaDecorationsImpl($,z,V)}finally{this._onDidChangeDecorations.endDeferredEmit()}}_getTrackedRange(z){return this.getDecorationRange(z)}_setTrackedRange(z,V,$){const K=z?this._decorations[z]:null;if(!K)return V?this._deltaDecorationsImpl(0,[],[{range:V,options:Q[$]}])[0]:null;if(!V)return this._decorationsTree.delete(K),delete this._decorations[K.id],null;const J=this._validateRangeRelaxedNoAllocations(V),Y=this._buffer.getOffsetAt(J.startLineNumber,J.startColumn),se=this._buffer.getOffsetAt(J.endLineNumber,J.endColumn);return this._decorationsTree.delete(K),K.reset(this.getVersionId(),Y,se,J),K.setOptions(Q[$]),this._decorationsTree.insert(K),K.id}removeAllDecorationsWithOwnerId(z){if(this._isDisposed)return;const V=this._decorationsTree.collectNodesFromOwner(z);for(let $=0,K=V.length;$<K;$++){const J=V[$];this._decorationsTree.delete(J),delete this._decorations[J.id]}}getDecorationOptions(z){const V=this._decorations[z];return V?V.options:null}getDecorationRange(z){const V=this._decorations[z];return V?this._decorationsTree.getNodeRange(this,V):null}getLineDecorations(z,V=0,$=!1){return z<1||z>this.getLineCount()?[]:this.getLinesDecorations(z,z,V,$)}getLinesDecorations(z,V,$=0,K=!1){const J=this.getLineCount(),Y=Math.min(J,Math.max(1,z)),se=Math.min(J,Math.max(1,V)),ge=this.getLineMaxColumn(se),me=new g.Range(Y,1,se,ge),le=this._getDecorationsInRange(me,$,K);return le.push(...this._decorationProvider.getDecorationsInRange(me,$,K)),le}getDecorationsInRange(z,V=0,$=!1){const K=this.validateRange(z),J=this._getDecorationsInRange(K,V,$);return J.push(...this._decorationProvider.getDecorationsInRange(K,V,$)),J}getOverviewRulerDecorations(z=0,V=!1){return this._decorationsTree.getAll(this,z,V,!0)}getInjectedTextDecorations(z=0){return this._decorationsTree.getAllInjectedText(this,z)}_getInjectedTextInLine(z){const V=this._buffer.getOffsetAt(z,1),$=V+this._buffer.getLineLength(z),K=this._decorationsTree.getInjectedTextInInterval(this,V,$,0);return u.LineInjectedText.fromDecorations(K).filter(J=>J.lineNumber===z)}getAllDecorations(z=0,V=!1){let $=this._decorationsTree.getAll(this,z,V,!1);return $=$.concat(this._decorationProvider.getAllDecorations(z,V)),$}_getDecorationsInRange(z,V,$){const K=this._buffer.getOffsetAt(z.startLineNumber,z.startColumn),J=this._buffer.getOffsetAt(z.endLineNumber,z.endColumn);return this._decorationsTree.getAllInInterval(this,K,J,V,$)}getRangeAt(z,V){return this._buffer.getRangeAt(z,V-z)}_changeDecorationImpl(z,V){const $=this._decorations[z];if(!$)return;if($.options.after){const se=this.getDecorationRange(z);this._onDidChangeDecorations.recordLineAffectedByInjectedText(se.endLineNumber)}if($.options.before){const se=this.getDecorationRange(z);this._onDidChangeDecorations.recordLineAffectedByInjectedText(se.startLineNumber)}const K=this._validateRangeRelaxedNoAllocations(V),J=this._buffer.getOffsetAt(K.startLineNumber,K.startColumn),Y=this._buffer.getOffsetAt(K.endLineNumber,K.endColumn);this._decorationsTree.delete($),$.reset(this.getVersionId(),J,Y,K),this._decorationsTree.insert($),this._onDidChangeDecorations.checkAffectedAndFire($.options),$.options.after&&this._onDidChangeDecorations.recordLineAffectedByInjectedText(K.endLineNumber),$.options.before&&this._onDidChangeDecorations.recordLineAffectedByInjectedText(K.startLineNumber)}_changeDecorationOptionsImpl(z,V){const $=this._decorations[z];if(!$)return;const K=!!($.options.overviewRuler&&$.options.overviewRuler.color),J=!!(V.overviewRuler&&V.overviewRuler.color);if(this._onDidChangeDecorations.checkAffectedAndFire($.options),this._onDidChangeDecorations.checkAffectedAndFire(V),$.options.after||V.after){const Y=this._decorationsTree.getNodeRange(this,$);this._onDidChangeDecorations.recordLineAffectedByInjectedText(Y.endLineNumber)}if($.options.before||V.before){const Y=this._decorationsTree.getNodeRange(this,$);this._onDidChangeDecorations.recordLineAffectedByInjectedText(Y.startLineNumber)}K!==J?(this._decorationsTree.delete($),$.setOptions(V),this._decorationsTree.insert($)):$.setOptions(V)}_deltaDecorationsImpl(z,V,$){const K=this.getVersionId(),J=V.length;let Y=0;const se=$.length;let ge=0;const me=new Array(se);for(;Y<J||ge<se;){let le=null;if(Y<J){do le=this._decorations[V[Y++]];while(!le&&Y<J);if(le){if(le.options.after){const he=this._decorationsTree.getNodeRange(this,le);this._onDidChangeDecorations.recordLineAffectedByInjectedText(he.endLineNumber)}if(le.options.before){const he=this._decorationsTree.getNodeRange(this,le);this._onDidChangeDecorations.recordLineAffectedByInjectedText(he.startLineNumber)}this._decorationsTree.delete(le),this._onDidChangeDecorations.checkAffectedAndFire(le.options)}}if(ge<se){if(!le){const fe=++this._lastDecorationId,_e=`${this._instanceId};${fe}`;le=new o.IntervalNode(_e,0,0),this._decorations[_e]=le}const he=$[ge],ve=this._validateRangeRelaxedNoAllocations(he.range),pe=ne(he.options),be=this._buffer.getOffsetAt(ve.startLineNumber,ve.startColumn),de=this._buffer.getOffsetAt(ve.endLineNumber,ve.endColumn);le.ownerId=z,le.reset(K,be,de,ve),le.setOptions(pe),le.options.after&&this._onDidChangeDecorations.recordLineAffectedByInjectedText(ve.endLineNumber),le.options.before&&this._onDidChangeDecorations.recordLineAffectedByInjectedText(ve.startLineNumber),this._onDidChangeDecorations.checkAffectedAndFire(pe),this._decorationsTree.insert(le),me[ge]=le.id,ge++}else le&&delete this._decorations[le.id]}return me}setTokens(z,V=!1){if(z.length!==0){const $=[];for(let K=0,J=z.length;K<J;K++){const Y=z[K];let se=0,ge=0,me=!1;for(let le=Y.startLineNumber;le<=Y.endLineNumber;le++)me?(this._tokens.setTokens(this._languageId,le-1,this._buffer.getLineLength(le),Y.getLineTokens(le),!1),ge=le):this._tokens.setTokens(this._languageId,le-1,this._buffer.getLineLength(le),Y.getLineTokens(le),!0)&&(me=!0,se=le,ge=le);me&&$.push({fromLineNumber:se,toLineNumber:ge})}$.length>0&&this._emitModelTokensChangedEvent({tokenizationSupportChanged:!1,semanticTokensApplied:!1,ranges:$})}this.handleTokenizationProgress(V)}setSemanticTokens(z,V){this._semanticTokens.set(z,V),this._emitModelTokensChangedEvent({tokenizationSupportChanged:!1,semanticTokensApplied:z!==null,ranges:[{fromLineNumber:1,toLineNumber:this.getLineCount()}]})}hasCompleteSemanticTokens(){return this._semanticTokens.isComplete()}hasSomeSemanticTokens(){return!this._semanticTokens.isEmpty()}setPartialSemanticTokens(z,V){if(this.hasCompleteSemanticTokens())return;const $=this.validateRange(this._semanticTokens.setPartial(z,V));this._emitModelTokensChangedEvent({tokenizationSupportChanged:!1,semanticTokensApplied:!0,ranges:[{fromLineNumber:$.startLineNumber,toLineNumber:$.endLineNumber}]})}tokenizeViewport(z,V){z=Math.max(1,z),V=Math.min(this._buffer.getLineCount(),V),this._tokenization.tokenizeViewport(z,V)}clearTokens(){this._tokens.flush(),this._emitModelTokensChangedEvent({tokenizationSupportChanged:!0,semanticTokensApplied:!1,ranges:[{fromLineNumber:1,toLineNumber:this._buffer.getLineCount()}]})}_emitModelTokensChangedEvent(z){this._isDisposing||this._onDidChangeTokens.fire(z)}resetTokenization(){this._tokenization.reset()}forceTokenization(z){if(z<1||z>this.getLineCount())throw new Error("Illegal value for lineNumber");this._tokenization.forceTokenization(z)}isCheapToTokenize(z){return this._tokenization.isCheapToTokenize(z)}tokenizeIfCheap(z){this.isCheapToTokenize(z)&&this.forceTokenization(z)}getLineTokens(z){if(z<1||z>this.getLineCount())throw new Error("Illegal value for lineNumber");return this._getLineTokens(z)}_getLineTokens(z){const V=this.getLineContent(z),$=this._tokens.getTokens(this._languageId,z-1,V);return this._semanticTokens.addSparseTokens(z,$)}getLanguageId(){return this._languageId}setMode(z){if(this._languageId===z)return;const V={oldLanguage:this._languageId,newLanguage:z};this._languageId=z,this._onDidChangeLanguage.fire(V),this._onDidChangeLanguageConfiguration.fire({})}getLanguageIdAtPosition(z,V){const $=this.validatePosition(new h.Position(z,V)),K=this.getLineTokens($.lineNumber);return K.getLanguageId(K.findTokenIndexAtOffset($.column-1))}getTokenTypeIfInsertingCharacter(z,V,$){const K=this.validatePosition(new h.Position(z,V));return this._tokenization.getTokenTypeIfInsertingCharacter(K,$)}tokenizeLineWithEdit(z,V,$){const K=this.validatePosition(z);return this._tokenization.tokenizeLineWithEdit(K,V,$)}getLanguageConfiguration(z){return this._languageConfigurationService.getLanguageConfiguration(z)}getWordAtPosition(z){this._assertNotDisposed();const V=this.validatePosition(z),$=this.getLineContent(V.lineNumber),K=this._getLineTokens(V.lineNumber),J=K.findTokenIndexAtOffset(V.column-1),[Y,se]=vt._findLanguageBoundaries(K,J),ge=(0,L.getWordAtText)(V.column,this.getLanguageConfiguration(K.getLanguageId(J)).getWordDefinition(),$.substring(Y,se),Y);if(ge&&ge.startColumn<=z.column&&z.column<=ge.endColumn)return ge;if(J>0&&Y===V.column-1){const[me,le]=vt._findLanguageBoundaries(K,J-1),he=(0,L.getWordAtText)(V.column,this.getLanguageConfiguration(K.getLanguageId(J-1)).getWordDefinition(),$.substring(me,le),me);if(he&&he.startColumn<=z.column&&z.column<=he.endColumn)return he}return null}static _findLanguageBoundaries(z,V){const $=z.getLanguageId(V);let K=0;for(let Y=V;Y>=0&&z.getLanguageId(Y)===$;Y--)K=z.getStartOffset(Y);let J=z.getLineContent().length;for(let Y=V,se=z.getCount();Y<se&&z.getLanguageId(Y)===$;Y++)J=z.getEndOffset(Y);return[K,J]}getWordUntilPosition(z){const V=this.getWordAtPosition(z);return V?{word:V.word.substr(0,z.column-V.startColumn),startColumn:V.startColumn,endColumn:z.column}:{word:"",startColumn:z.column,endColumn:z.column}}normalizePosition(z,V){return z}getLineIndentColumn(z){return H(this.getLineContent(z))+1}};A.MODEL_SYNC_LIMIT=50*1024*1024,A.LARGE_FILE_SIZE_THRESHOLD=20*1024*1024,A.LARGE_FILE_LINE_COUNT_THRESHOLD=300*1e3,A.DEFAULT_CREATION_OPTIONS={isForSimpleWidget:!1,tabSize:M.EDITOR_MODEL_DEFAULTS.tabSize,indentSize:M.EDITOR_MODEL_DEFAULTS.indentSize,insertSpaces:M.EDITOR_MODEL_DEFAULTS.insertSpaces,detectIndentation:!1,defaultEOL:1,trimAutoWhitespace:M.EDITOR_MODEL_DEFAULTS.trimAutoWhitespace,largeFileOptimizations:M.EDITOR_MODEL_DEFAULTS.largeFileOptimizations,bracketPairColorizationOptions:M.EDITOR_MODEL_DEFAULTS.bracketPairColorizationOptions},A=Ie([Ce(4,k.IUndoRedoService),Ce(5,N.ILanguageService),Ce(6,E.ILanguageConfigurationService)],A),e.TextModel=A;function H(ue){let z=0;for(const V of ue)if(V===" "||V===" ")z++;else break;return z}function q(ue){return!!(ue.options.overviewRuler&&ue.options.overviewRuler.color)}function X(ue){return!!ue.options.after||!!ue.options.before}class G{constructor(){this._decorationsTree0=new o.IntervalTree,this._decorationsTree1=new o.IntervalTree,this._injectedTextDecorationsTree=new o.IntervalTree}ensureAllNodesHaveRanges(z){this.getAll(z,0,!1,!1)}_ensureNodesHaveRanges(z,V){for(const $ of V)$.range===null&&($.range=z.getRangeAt($.cachedAbsoluteStart,$.cachedAbsoluteEnd));return V}getAllInInterval(z,V,$,K,J){const Y=z.getVersionId(),se=this._intervalSearch(V,$,K,J,Y);return this._ensureNodesHaveRanges(z,se)}_intervalSearch(z,V,$,K,J){const Y=this._decorationsTree0.intervalSearch(z,V,$,K,J),se=this._decorationsTree1.intervalSearch(z,V,$,K,J),ge=this._injectedTextDecorationsTree.intervalSearch(z,V,$,K,J);return Y.concat(se).concat(ge)}getInjectedTextInInterval(z,V,$,K){const J=z.getVersionId(),Y=this._injectedTextDecorationsTree.intervalSearch(V,$,K,!1,J);return this._ensureNodesHaveRanges(z,Y).filter(se=>se.options.showIfCollapsed||!se.range.isEmpty())}getAllInjectedText(z,V){const $=z.getVersionId(),K=this._injectedTextDecorationsTree.search(V,!1,$);return this._ensureNodesHaveRanges(z,K).filter(J=>J.options.showIfCollapsed||!J.range.isEmpty())}getAll(z,V,$,K){const J=z.getVersionId(),Y=this._search(V,$,K,J);return this._ensureNodesHaveRanges(z,Y)}_search(z,V,$,K){if($)return this._decorationsTree1.search(z,V,K);{const J=this._decorationsTree0.search(z,V,K),Y=this._decorationsTree1.search(z,V,K),se=this._injectedTextDecorationsTree.search(z,V,K);return J.concat(Y).concat(se)}}collectNodesFromOwner(z){const V=this._decorationsTree0.collectNodesFromOwner(z),$=this._decorationsTree1.collectNodesFromOwner(z),K=this._injectedTextDecorationsTree.collectNodesFromOwner(z);return V.concat($).concat(K)}collectNodesPostOrder(){const z=this._decorationsTree0.collectNodesPostOrder(),V=this._decorationsTree1.collectNodesPostOrder(),$=this._injectedTextDecorationsTree.collectNodesPostOrder();return z.concat(V).concat($)}insert(z){X(z)?this._injectedTextDecorationsTree.insert(z):q(z)?this._decorationsTree1.insert(z):this._decorationsTree0.insert(z)}delete(z){X(z)?this._injectedTextDecorationsTree.delete(z):q(z)?this._decorationsTree1.delete(z):this._decorationsTree0.delete(z)}getNodeRange(z,V){const $=z.getVersionId();return V.cachedVersionId!==$&&this._resolveNode(V,$),V.range===null&&(V.range=z.getRangeAt(V.cachedAbsoluteStart,V.cachedAbsoluteEnd)),V.range}_resolveNode(z,V){X(z)?this._injectedTextDecorationsTree.resolveNode(z,V):q(z)?this._decorationsTree1.resolveNode(z,V):this._decorationsTree0.resolveNode(z,V)}acceptReplace(z,V,$,K){this._decorationsTree0.acceptReplace(z,V,$,K),this._decorationsTree1.acceptReplace(z,V,$,K),this._injectedTextDecorationsTree.acceptReplace(z,V,$,K)}}function re(ue){return ue.replace(/[^a-z0-9\-_]/gi," ")}class ae{constructor(z){this.color=z.color||"",this.darkColor=z.darkColor||""}}class oe extends ae{constructor(z){super(z);this._resolvedColor=null,this.position=typeof z.position=="number"?z.position:i.OverviewRulerLane.Center}getColor(z){return this._resolvedColor||(z.type!=="light"&&this.darkColor?this._resolvedColor=this._resolveColor(this.darkColor,z):this._resolvedColor=this._resolveColor(this.color,z)),this._resolvedColor}invalidateCachedColor(){this._resolvedColor=null}_resolveColor(z,V){if(typeof z=="string")return z;const $=z?V.getColor(z.id):null;return $?$.toString():""}}e.ModelDecorationOverviewRulerOptions=oe;class Z extends ae{constructor(z){super(z);this.position=z.position}getColor(z){return this._resolvedColor||(z.type!=="light"&&this.darkColor?this._resolvedColor=this._resolveColor(this.darkColor,z):this._resolvedColor=this._resolveColor(this.color,z)),this._resolvedColor}invalidateCachedColor(){this._resolvedColor=void 0}_resolveColor(z,V){return typeof z=="string"?m.Color.fromHex(z):V.getColor(z.id)}}e.ModelDecorationMinimapOptions=Z;class x{constructor(z){this.content=z.content||"",this.inlineClassName=z.inlineClassName||null,this.inlineClassNameAffectsLetterSpacing=z.inlineClassNameAffectsLetterSpacing||!1,this.attachedData=z.attachedData||null,this.cursorStops=z.cursorStops||null}static from(z){return z instanceof x?z:new x(z)}}e.ModelDecorationInjectedTextOptions=x;class U{constructor(z){var V,$;this.description=z.description,this.stickiness=z.stickiness||0,this.zIndex=z.zIndex||0,this.className=z.className?re(z.className):null,this.hoverMessage=z.hoverMessage||null,this.glyphMarginHoverMessage=z.glyphMarginHoverMessage||null,this.isWholeLine=z.isWholeLine||!1,this.showIfCollapsed=z.showIfCollapsed||!1,this.collapseOnReplaceEdit=z.collapseOnReplaceEdit||!1,this.overviewRuler=z.overviewRuler?new oe(z.overviewRuler):null,this.minimap=z.minimap?new Z(z.minimap):null,this.glyphMarginClassName=z.glyphMarginClassName?re(z.glyphMarginClassName):null,this.linesDecorationsClassName=z.linesDecorationsClassName?re(z.linesDecorationsClassName):null,this.firstLineDecorationClassName=z.firstLineDecorationClassName?re(z.firstLineDecorationClassName):null,this.marginClassName=z.marginClassName?re(z.marginClassName):null,this.inlineClassName=z.inlineClassName?re(z.inlineClassName):null,this.inlineClassNameAffectsLetterSpacing=z.inlineClassNameAffectsLetterSpacing||!1,this.beforeContentClassName=z.beforeContentClassName?re(z.beforeContentClassName):null,this.afterContentClassName=z.afterContentClassName?re(z.afterContentClassName):null,this.after=z.after?x.from(z.after):null,this.before=z.before?x.from(z.before):null,this.hideInCommentTokens=(V=z.hideInCommentTokens)!==null&&V!==void 0?V:!1,this.hideInStringTokens=($=z.hideInStringTokens)!==null&&$!==void 0?$:!1}static register(z){return new U(z)}static createDynamic(z){return new U(z)}}e.ModelDecorationOptions=U,U.EMPTY=U.register({description:"empty"});const Q=[U.register({description:"tracked-range-always-grows-when-typing-at-edges",stickiness:0}),U.register({description:"tracked-range-never-grows-when-typing-at-edges",stickiness:1}),U.register({description:"tracked-range-grows-only-when-typing-before",stickiness:2}),U.register({description:"tracked-range-grows-only-when-typing-after",stickiness:3})];function ne(ue){return ue instanceof U?ue:U.createDynamic(ue)}class ce extends w.Disposable{constructor(z){super();this.handleBeforeFire=z,this._actual=this._register(new I.Emitter),this.event=this._actual.event,this._affectedInjectedTextLines=null,this._deferredCnt=0,this._shouldFire=!1,this._affectsMinimap=!1,this._affectsOverviewRuler=!1}beginDeferredEmit(){this._deferredCnt++}endDeferredEmit(){var z;if(this._deferredCnt--,this._deferredCnt===0){if(this._shouldFire){this.handleBeforeFire(this._affectedInjectedTextLines);const V={affectsMinimap:this._affectsMinimap,affectsOverviewRuler:this._affectsOverviewRuler};this._shouldFire=!1,this._affectsMinimap=!1,this._affectsOverviewRuler=!1,this._actual.fire(V)}(z=this._affectedInjectedTextLines)===null||z===void 0||z.clear(),this._affectedInjectedTextLines=null}}recordLineAffectedByInjectedText(z){this._affectedInjectedTextLines||(this._affectedInjectedTextLines=new Set),this._affectedInjectedTextLines.add(z)}checkAffectedAndFire(z){this._affectsMinimap||(this._affectsMinimap=!!(z.minimap&&z.minimap.position)),this._affectsOverviewRuler||(this._affectsOverviewRuler=!!(z.overviewRuler&&z.overviewRuler.color)),this._shouldFire=!0}fire(){this._affectsMinimap=!0,this._affectsOverviewRuler=!0,this._shouldFire=!0}}e.DidChangeDecorationsEmitter=ce;class ee extends w.Disposable{constructor(){super();this._fastEmitter=this._register(new I.Emitter),this.fastEvent=this._fastEmitter.event,this._slowEmitter=this._register(new I.Emitter),this.slowEvent=this._slowEmitter.event,this._deferredCnt=0,this._deferredEvent=null}beginDeferredEmit(){this._deferredCnt++}endDeferredEmit(z=null){if(this._deferredCnt--,this._deferredCnt===0&&this._deferredEvent!==null){this._deferredEvent.rawContentChangedEvent.resultingSelection=z;const V=this._deferredEvent;this._deferredEvent=null,this._fastEmitter.fire(V),this._slowEmitter.fire(V)}}fire(z){if(this._deferredCnt>0){this._deferredEvent?this._deferredEvent=this._deferredEvent.merge(z):this._deferredEvent=z;return}this._fastEmitter.fire(z),this._slowEmitter.fire(z)}}e.DidChangeContentEmitter=ee}),define(te[59],ie([1,0,11,3,22,33,120,68]),function(j,e,y,m,D,I,w,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.isQuote=e.EditOperationResult=e.SingleCursorState=e.PartialViewCursorState=e.PartialModelCursorState=e.CursorState=e.CursorContext=e.CursorConfiguration=void 0;const p=()=>!0,h=()=>!1,g=a=>a===" "||a===" ";class t{constructor(d,u,f,S){this.languageConfigurationService=S,this._cursorMoveConfigurationBrand=void 0,this._languageId=d;const v=f.options,C=v.get(131);this.readOnly=v.get(81),this.tabSize=u.tabSize,this.indentSize=u.indentSize,this.insertSpaces=u.insertSpaces,this.stickyTabStops=v.get(104),this.lineHeight=v.get(59),this.pageSize=Math.max(1,Math.floor(C.height/this.lineHeight)-2),this.useTabStops=v.get(116),this.wordSeparators=v.get(117),this.emptySelectionClipboard=v.get(32),this.copyWithSyntaxHighlighting=v.get(21),this.multiCursorMergeOverlapping=v.get(69),this.multiCursorPaste=v.get(71),this.autoClosingBrackets=v.get(5),this.autoClosingQuotes=v.get(8),this.autoClosingDelete=v.get(6),this.autoClosingOvertype=v.get(7),this.autoSurround=v.get(11),this.autoIndent=v.get(9),this.surroundingPairs={},this._electricChars=null,this.shouldAutoCloseBefore={quote:this._getShouldAutoClose(d,this.autoClosingQuotes),bracket:this._getShouldAutoClose(d,this.autoClosingBrackets)},this.autoClosingPairs=this.languageConfigurationService.getLanguageConfiguration(d).getAutoClosingPairs();const _=this.languageConfigurationService.getLanguageConfiguration(d).getSurroundingPairs();if(_)for(const L of _)this.surroundingPairs[L.open]=L.close}static shouldRecreate(d){return d.hasChanged(131)||d.hasChanged(117)||d.hasChanged(32)||d.hasChanged(69)||d.hasChanged(71)||d.hasChanged(5)||d.hasChanged(8)||d.hasChanged(6)||d.hasChanged(7)||d.hasChanged(11)||d.hasChanged(116)||d.hasChanged(59)||d.hasChanged(81)}get electricChars(){var d;if(!this._electricChars){this._electricChars={};const u=(d=this.languageConfigurationService.getLanguageConfiguration(this._languageId).electricCharacter)===null||d===void 0?void 0:d.getElectricCharacters();if(u)for(const f of u)this._electricChars[f]=!0}return this._electricChars}onElectricCharacter(d,u,f){const S=(0,w.createScopedLineTokens)(u,f-1),v=this.languageConfigurationService.getLanguageConfiguration(S.languageId).electricCharacter;return v?v.onElectricCharacter(d,S,f-S.firstCharOffset):null}normalizeIndentation(d){return I.TextModel.normalizeIndentation(d,this.indentSize,this.insertSpaces)}_getShouldAutoClose(d,u){switch(u){case"beforeWhitespace":return g;case"languageDefined":return this._getLanguageDefinedShouldAutoClose(d);case"always":return p;case"never":return h}}_getLanguageDefinedShouldAutoClose(d){const u=this.languageConfigurationService.getLanguageConfiguration(d).getAutoCloseBeforeSet();return f=>u.indexOf(f)!==-1}visibleColumnFromColumn(d,u){return b.CursorColumns.visibleColumnFromColumn(d.getLineContent(u.lineNumber),u.column,this.tabSize)}columnFromVisibleColumn(d,u,f){const S=b.CursorColumns.columnFromVisibleColumn(d.getLineContent(u),f,this.tabSize),v=d.getLineMinColumn(u);if(S<v)return v;const C=d.getLineMaxColumn(u);return S>C?C:S}}e.CursorConfiguration=t;class i{constructor(d,u,f,S){this._cursorContextBrand=void 0,this.model=d,this.viewModel=u,this.coordinatesConverter=f,this.cursorConfig=S}}e.CursorContext=i;class n{constructor(d,u){this._cursorStateBrand=void 0,this.modelState=d,this.viewState=u}static fromModelState(d){return new l(d)}static fromViewState(d){return new c(d)}static fromModelSelection(d){const u=D.Selection.liftSelection(d),f=new r(m.Range.fromPositions(u.getSelectionStart()),0,u.getPosition(),0);return n.fromModelState(f)}static fromModelSelections(d){const u=[];for(let f=0,S=d.length;f<S;f++)u[f]=this.fromModelSelection(d[f]);return u}equals(d){return this.viewState.equals(d.viewState)&&this.modelState.equals(d.modelState)}}e.CursorState=n;class l{constructor(d){this.modelState=d,this.viewState=null}}e.PartialModelCursorState=l;class c{constructor(d){this.modelState=null,this.viewState=d}}e.PartialViewCursorState=c;class r{constructor(d,u,f,S){this._singleCursorStateBrand=void 0,this.selectionStart=d,this.selectionStartLeftoverVisibleColumns=u,this.position=f,this.leftoverVisibleColumns=S,this.selection=r._computeSelection(this.selectionStart,this.position)}equals(d){return this.selectionStartLeftoverVisibleColumns===d.selectionStartLeftoverVisibleColumns&&this.leftoverVisibleColumns===d.leftoverVisibleColumns&&this.position.equals(d.position)&&this.selectionStart.equalsRange(d.selectionStart)}hasSelection(){return!this.selection.isEmpty()||!this.selectionStart.isEmpty()}move(d,u,f,S){return d?new r(this.selectionStart,this.selectionStartLeftoverVisibleColumns,new y.Position(u,f),S):new r(new m.Range(u,f,u,f),S,new y.Position(u,f),S)}static _computeSelection(d,u){return d.isEmpty()||!u.isBeforeOrEqual(d.getStartPosition())?D.Selection.fromPositions(d.getStartPosition(),u):D.Selection.fromPositions(d.getEndPosition(),u)}}e.SingleCursorState=r;class s{constructor(d,u,f){this._editOperationResultBrand=void 0,this.type=d,this.commands=u,this.shouldPushStackElementBefore=f.shouldPushStackElementBefore,this.shouldPushStackElementAfter=f.shouldPushStackElementAfter}}e.EditOperationResult=s;function o(a){return a==="'"||a==='"'||a==="`"}e.isQuote=o}),define(te[699],ie([1,0,59,11,3]),function(j,e,y,m,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ColumnSelection=void 0;class I{static columnSelect(b,p,h,g,t,i){const n=Math.abs(t-h)+1,l=h>t,c=g>i,r=g<i,s=[];for(let o=0;o<n;o++){const a=h+(l?-o:o),d=b.columnFromVisibleColumn(p,a,g),u=b.columnFromVisibleColumn(p,a,i),f=b.visibleColumnFromColumn(p,new m.Position(a,d)),S=b.visibleColumnFromColumn(p,new m.Position(a,u));r&&(f>i||S<g)||c&&(S>g||f<i)||s.push(new y.SingleCursorState(new D.Range(a,d,a,d),0,new m.Position(a,u),0))}if(s.length===0)for(let o=0;o<n;o++){const a=h+(l?-o:o),d=p.getLineMaxColumn(a);s.push(new y.SingleCursorState(new D.Range(a,d,a,d),0,new m.Position(a,d),0))}return{viewStates:s,reversed:l,fromLineNumber:h,fromVisualColumn:g,toLineNumber:t,toVisualColumn:i}}static columnSelectLeft(b,p,h){let g=h.toViewVisualColumn;return g>0&&g--,I.columnSelect(b,p,h.fromViewLineNumber,h.fromViewVisualColumn,h.toViewLineNumber,g)}static columnSelectRight(b,p,h){let g=0;const t=Math.min(h.fromViewLineNumber,h.toViewLineNumber),i=Math.max(h.fromViewLineNumber,h.toViewLineNumber);for(let l=t;l<=i;l++){const c=p.getLineMaxColumn(l),r=b.visibleColumnFromColumn(p,new m.Position(l,c));g=Math.max(g,r)}let n=h.toViewVisualColumn;return n<g&&n++,this.columnSelect(b,p,h.fromViewLineNumber,h.fromViewVisualColumn,h.toViewLineNumber,n)}static columnSelectUp(b,p,h,g){const t=g?b.pageSize:1,i=Math.max(1,h.toViewLineNumber-t);return this.columnSelect(b,p,h.fromViewLineNumber,h.fromViewVisualColumn,i,h.toViewVisualColumn)}static columnSelectDown(b,p,h,g){const t=g?b.pageSize:1,i=Math.min(p.getLineCount(),h.toViewLineNumber+t);return this.columnSelect(b,p,h.fromViewLineNumber,h.fromViewVisualColumn,i,h.toViewVisualColumn)}}e.ColumnSelection=I}),define(te[203],ie([1,0,59,68,11,3,8,238]),function(j,e,y,m,D,I,w,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MoveOperations=e.CursorPosition=void 0;class p{constructor(t,i,n){this._cursorPositionBrand=void 0,this.lineNumber=t,this.column=i,this.leftoverVisibleColumns=n}}e.CursorPosition=p;class h{static leftPosition(t,i){if(i.column>t.getLineMinColumn(i.lineNumber))return i.delta(void 0,-w.prevCharLength(t.getLineContent(i.lineNumber),i.column-1));if(i.lineNumber>1){const n=i.lineNumber-1;return new D.Position(n,t.getLineMaxColumn(n))}else return i}static leftPositionAtomicSoftTabs(t,i,n){if(i.column<=t.getLineIndentColumn(i.lineNumber)){const l=t.getLineMinColumn(i.lineNumber),c=t.getLineContent(i.lineNumber),r=b.AtomicTabMoveOperations.atomicPosition(c,i.column-1,n,0);if(r!==-1&&r+1>=l)return new D.Position(i.lineNumber,r+1)}return this.leftPosition(t,i)}static left(t,i,n){const l=t.stickyTabStops?h.leftPositionAtomicSoftTabs(i,n,t.tabSize):h.leftPosition(i,n);return new p(l.lineNumber,l.column,0)}static moveLeft(t,i,n,l,c){let r,s;if(n.hasSelection()&&!l)r=n.selection.startLineNumber,s=n.selection.startColumn;else{const o=n.position.delta(void 0,-(c-1)),a=i.normalizePosition(h.clipPositionColumn(o,i),0),d=h.left(t,i,a);r=d.lineNumber,s=d.column}return n.move(l,r,s,0)}static clipPositionColumn(t,i){return new D.Position(t.lineNumber,h.clipRange(t.column,i.getLineMinColumn(t.lineNumber),i.getLineMaxColumn(t.lineNumber)))}static clipRange(t,i,n){return t<i?i:t>n?n:t}static rightPosition(t,i,n){return n<t.getLineMaxColumn(i)?n=n+w.nextCharLength(t.getLineContent(i),n-1):i<t.getLineCount()&&(i=i+1,n=t.getLineMinColumn(i)),new D.Position(i,n)}static rightPositionAtomicSoftTabs(t,i,n,l,c){if(n<t.getLineIndentColumn(i)){const r=t.getLineContent(i),s=b.AtomicTabMoveOperations.atomicPosition(r,n-1,l,1);if(s!==-1)return new D.Position(i,s+1)}return this.rightPosition(t,i,n)}static right(t,i,n){const l=t.stickyTabStops?h.rightPositionAtomicSoftTabs(i,n.lineNumber,n.column,t.tabSize,t.indentSize):h.rightPosition(i,n.lineNumber,n.column);return new p(l.lineNumber,l.column,0)}static moveRight(t,i,n,l,c){let r,s;if(n.hasSelection()&&!l)r=n.selection.endLineNumber,s=n.selection.endColumn;else{const o=n.position.delta(void 0,c-1),a=i.normalizePosition(h.clipPositionColumn(o,i),1),d=h.right(t,i,a);r=d.lineNumber,s=d.column}return n.move(l,r,s,0)}static vertical(t,i,n,l,c,r,s,o){const a=m.CursorColumns.visibleColumnFromColumn(i.getLineContent(n),l,t.tabSize)+c,d=i.getLineCount(),u=n===1&&l===1,f=n===d&&l===i.getLineMaxColumn(n),S=r<n?u:f;if(n=r,n<1?(n=1,s?l=i.getLineMinColumn(n):l=Math.min(i.getLineMaxColumn(n),l)):n>d?(n=d,s?l=i.getLineMaxColumn(n):l=Math.min(i.getLineMaxColumn(n),l)):l=t.columnFromVisibleColumn(i,n,a),S?c=0:c=a-m.CursorColumns.visibleColumnFromColumn(i.getLineContent(n),l,t.tabSize),o!==void 0){const v=new D.Position(n,l),C=i.normalizePosition(v,o);c=c+(l-C.column),n=C.lineNumber,l=C.column}return new p(n,l,c)}static down(t,i,n,l,c,r,s){return this.vertical(t,i,n,l,c,n+r,s,1)}static moveDown(t,i,n,l,c){let r,s;n.hasSelection()&&!l?(r=n.selection.endLineNumber,s=n.selection.endColumn):(r=n.position.lineNumber,s=n.position.column);const o=h.down(t,i,r,s,n.leftoverVisibleColumns,c,!0);return n.move(l,o.lineNumber,o.column,o.leftoverVisibleColumns)}static translateDown(t,i,n){const l=n.selection,c=h.down(t,i,l.selectionStartLineNumber,l.selectionStartColumn,n.selectionStartLeftoverVisibleColumns,1,!1),r=h.down(t,i,l.positionLineNumber,l.positionColumn,n.leftoverVisibleColumns,1,!1);return new y.SingleCursorState(new I.Range(c.lineNumber,c.column,c.lineNumber,c.column),c.leftoverVisibleColumns,new D.Position(r.lineNumber,r.column),r.leftoverVisibleColumns)}static up(t,i,n,l,c,r,s){return this.vertical(t,i,n,l,c,n-r,s,0)}static moveUp(t,i,n,l,c){let r,s;n.hasSelection()&&!l?(r=n.selection.startLineNumber,s=n.selection.startColumn):(r=n.position.lineNumber,s=n.position.column);const o=h.up(t,i,r,s,n.leftoverVisibleColumns,c,!0);return n.move(l,o.lineNumber,o.column,o.leftoverVisibleColumns)}static translateUp(t,i,n){const l=n.selection,c=h.up(t,i,l.selectionStartLineNumber,l.selectionStartColumn,n.selectionStartLeftoverVisibleColumns,1,!1),r=h.up(t,i,l.positionLineNumber,l.positionColumn,n.leftoverVisibleColumns,1,!1);return new y.SingleCursorState(new I.Range(c.lineNumber,c.column,c.lineNumber,c.column),c.leftoverVisibleColumns,new D.Position(r.lineNumber,r.column),r.leftoverVisibleColumns)}static _isBlankLine(t,i){return t.getLineFirstNonWhitespaceColumn(i)===0}static moveToPrevBlankLine(t,i,n,l){let c=n.position.lineNumber;for(;c>1&&this._isBlankLine(i,c);)c--;for(;c>1&&!this._isBlankLine(i,c);)c--;return n.move(l,c,i.getLineMinColumn(c),0)}static moveToNextBlankLine(t,i,n,l){const c=i.getLineCount();let r=n.position.lineNumber;for(;r<c&&this._isBlankLine(i,r);)r++;for(;r<c&&!this._isBlankLine(i,r);)r++;return n.move(l,r,i.getLineMinColumn(r),0)}static moveToBeginningOfLine(t,i,n,l){const c=n.position.lineNumber,r=i.getLineMinColumn(c),s=i.getLineFirstNonWhitespaceColumn(c)||r;let o;return n.position.column===s?o=r:o=s,n.move(l,c,o,0)}static moveToEndOfLine(t,i,n,l,c){const r=n.position.lineNumber,s=i.getLineMaxColumn(r);return n.move(l,r,s,c?1073741824-s:0)}static moveToBeginningOfBuffer(t,i,n,l){return n.move(l,1,1,0)}static moveToEndOfBuffer(t,i,n,l){const c=i.getLineCount(),r=i.getLineMaxColumn(c);return n.move(l,c,r,0)}}e.MoveOperations=h}),define(te[204],ie([1,0,8,98,59,68,203,3,11]),function(j,e,y,m,D,I,w,b,p){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DeleteOperations=void 0;class h{static deleteRight(t,i,n,l){const c=[];let r=t!==3;for(let s=0,o=l.length;s<o;s++){const a=l[s];let d=a;if(d.isEmpty()){const u=a.getPosition(),f=w.MoveOperations.right(i,n,u);d=new b.Range(f.lineNumber,f.column,u.lineNumber,u.column)}if(d.isEmpty()){c[s]=null;continue}d.startLineNumber!==d.endLineNumber&&(r=!0),c[s]=new m.ReplaceCommand(d,"")}return[r,c]}static isAutoClosingPairDelete(t,i,n,l,c,r,s){if(i==="never"&&n==="never"||t==="never")return!1;for(let o=0,a=r.length;o<a;o++){const d=r[o],u=d.getPosition();if(!d.isEmpty())return!1;const f=c.getLineContent(u.lineNumber);if(u.column<2||u.column>=f.length+1)return!1;const S=f.charAt(u.column-2),v=l.get(S);if(!v)return!1;if((0,D.isQuote)(S)){if(n==="never")return!1}else if(i==="never")return!1;const C=f.charAt(u.column-1);let _=!1;for(const L of v)L.open===S&&L.close===C&&(_=!0);if(!_)return!1;if(t==="auto"){let L=!1;for(let E=0,N=s.length;E<N;E++){const k=s[E];if(u.lineNumber===k.startLineNumber&&u.column===k.startColumn){L=!0;break}}if(!L)return!1}}return!0}static _runAutoClosingPairDelete(t,i,n){const l=[];for(let c=0,r=n.length;c<r;c++){const s=n[c].getPosition(),o=new b.Range(s.lineNumber,s.column-1,s.lineNumber,s.column+1);l[c]=new m.ReplaceCommand(o,"")}return[!0,l]}static deleteLeft(t,i,n,l,c){if(this.isAutoClosingPairDelete(i.autoClosingDelete,i.autoClosingBrackets,i.autoClosingQuotes,i.autoClosingPairs.autoClosingPairsOpenByEnd,n,l,c))return this._runAutoClosingPairDelete(i,n,l);const r=[];let s=t!==2;for(let o=0,a=l.length;o<a;o++){const d=h.getDeleteRange(l[o],n,i);if(d.isEmpty()){r[o]=null;continue}d.startLineNumber!==d.endLineNumber&&(s=!0),r[o]=new m.ReplaceCommand(d,"")}return[s,r]}static getDeleteRange(t,i,n){if(!t.isEmpty())return t;const l=t.getPosition();if(n.useTabStops&&l.column>1){const c=i.getLineContent(l.lineNumber),r=y.firstNonWhitespaceIndex(c),s=r===-1?c.length+1:r+1;if(l.column<=s){const o=n.visibleColumnFromColumn(i,l),a=I.CursorColumns.prevIndentTabStop(o,n.indentSize),d=n.columnFromVisibleColumn(i,l.lineNumber,a);return new b.Range(l.lineNumber,d,l.lineNumber,l.column)}}return b.Range.fromPositions(h.getPositionAfterDeleteLeft(l,i),l)}static getPositionAfterDeleteLeft(t,i){if(t.column>1){const n=y.getLeftDeleteOffset(t.column-1,i.getLineContent(t.lineNumber));return t.with(void 0,n+1)}else if(t.lineNumber>1){const n=t.lineNumber-1;return new p.Position(n,i.getLineMaxColumn(n))}else return t}static cut(t,i,n){const l=[];let c=null;n.sort((r,s)=>p.Position.compare(r.getStartPosition(),s.getEndPosition()));for(let r=0,s=n.length;r<s;r++){const o=n[r];if(o.isEmpty())if(t.emptySelectionClipboard){const a=o.getPosition();let d,u,f,S;a.lineNumber<i.getLineCount()?(d=a.lineNumber,u=1,f=a.lineNumber+1,S=1):a.lineNumber>1&&(c==null?void 0:c.endLineNumber)!==a.lineNumber?(d=a.lineNumber-1,u=i.getLineMaxColumn(a.lineNumber-1),f=a.lineNumber,S=i.getLineMaxColumn(a.lineNumber)):(d=a.lineNumber,u=1,f=a.lineNumber,S=i.getLineMaxColumn(a.lineNumber));const v=new b.Range(d,u,f,S);c=v,v.isEmpty()?l[r]=null:l[r]=new m.ReplaceCommand(v,"")}else l[r]=null;else l[r]=new m.ReplaceCommand(o,"")}return new D.EditOperationResult(0,l,{shouldPushStackElementBefore:!0,shouldPushStackElementAfter:!0})}}e.DeleteOperations=h}),define(te[205],ie([1,0,13,8,98,197,403,59,118,3,22,11,119,32,120]),function(j,e,y,m,D,I,w,b,p,h,g,t,i,n,l){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TypeWithAutoClosingCommand=e.TypeOperations=void 0;class c{static indent(f,S,v){if(S===null||v===null)return[];const C=[];for(let _=0,L=v.length;_<L;_++)C[_]=new I.ShiftCommand(v[_],{isUnshift:!1,tabSize:f.tabSize,indentSize:f.indentSize,insertSpaces:f.insertSpaces,useTabStops:f.useTabStops,autoIndent:f.autoIndent});return C}static outdent(f,S,v){const C=[];for(let _=0,L=v.length;_<L;_++)C[_]=new I.ShiftCommand(v[_],{isUnshift:!0,tabSize:f.tabSize,indentSize:f.indentSize,insertSpaces:f.insertSpaces,useTabStops:f.useTabStops,autoIndent:f.autoIndent});return C}static shiftIndent(f,S,v){return v=v||1,I.ShiftCommand.shiftIndent(S,S.length+v,f.tabSize,f.indentSize,f.insertSpaces)}static unshiftIndent(f,S,v){return v=v||1,I.ShiftCommand.unshiftIndent(S,S.length+v,f.tabSize,f.indentSize,f.insertSpaces)}static _distributedPaste(f,S,v,C){const _=[];for(let L=0,E=v.length;L<E;L++)_[L]=new D.ReplaceCommand(v[L],C[L]);return new b.EditOperationResult(0,_,{shouldPushStackElementBefore:!0,shouldPushStackElementAfter:!0})}static _simplePaste(f,S,v,C,_){const L=[];for(let E=0,N=v.length;E<N;E++){const k=v[E],M=k.getPosition();if(_&&!k.isEmpty()&&(_=!1),_&&C.indexOf(`
|
||
`)!==C.length-1&&(_=!1),_){const O=new h.Range(M.lineNumber,1,M.lineNumber,1);L[E]=new D.ReplaceCommandThatPreservesSelection(O,C,k,!0)}else L[E]=new D.ReplaceCommand(k,C)}return new b.EditOperationResult(0,L,{shouldPushStackElementBefore:!0,shouldPushStackElementAfter:!0})}static _distributePasteToCursors(f,S,v,C,_){if(C||S.length===1)return null;if(_&&_.length===S.length)return _;if(f.multiCursorPaste==="spread"){v.charCodeAt(v.length-1)===10&&(v=v.substr(0,v.length-1)),v.charCodeAt(v.length-1)===13&&(v=v.substr(0,v.length-1));const L=m.splitLines(v);if(L.length===S.length)return L}return null}static paste(f,S,v,C,_,L){const E=this._distributePasteToCursors(f,v,C,_,L);return E?(v=v.sort(h.Range.compareRangesUsingStarts),this._distributedPaste(f,S,v,E)):this._simplePaste(f,S,v,C,_)}static _goodIndentForLine(f,S,v){let C=null,_="";const L=n.LanguageConfigurationRegistry.getInheritIndentForLine(f.autoIndent,S,v,!1);if(L)C=L.action,_=L.indentation;else if(v>1){let E;for(E=v-1;E>=1;E--){const M=S.getLineContent(E);if(m.lastNonWhitespaceIndex(M)>=0)break}if(E<1)return null;const N=S.getLineMaxColumn(E),k=n.LanguageConfigurationRegistry.getEnterAction(f.autoIndent,S,new h.Range(E,N,E,N));k&&(_=k.indentation+k.appendText)}return C&&(C===i.IndentAction.Indent&&(_=c.shiftIndent(f,_)),C===i.IndentAction.Outdent&&(_=c.unshiftIndent(f,_)),_=f.normalizeIndentation(_)),_||null}static _replaceJumpToNextIndent(f,S,v,C){let _="";const L=v.getStartPosition();if(f.insertSpaces){const E=f.visibleColumnFromColumn(S,L),N=f.indentSize,k=N-E%N;for(let M=0;M<k;M++)_+=" "}else _=" ";return new D.ReplaceCommand(v,_,C)}static tab(f,S,v){const C=[];for(let _=0,L=v.length;_<L;_++){const E=v[_];if(E.isEmpty()){const N=S.getLineContent(E.startLineNumber);if(/^\s*$/.test(N)&&S.isCheapToTokenize(E.startLineNumber)){let k=this._goodIndentForLine(f,S,E.startLineNumber);k=k||" ";const M=f.normalizeIndentation(k);if(!N.startsWith(M)){C[_]=new D.ReplaceCommand(new h.Range(E.startLineNumber,1,E.startLineNumber,N.length+1),M,!0);continue}}C[_]=this._replaceJumpToNextIndent(f,S,E,!0)}else{if(E.startLineNumber===E.endLineNumber){const N=S.getLineMaxColumn(E.startLineNumber);if(E.startColumn!==1||E.endColumn!==N){C[_]=this._replaceJumpToNextIndent(f,S,E,!1);continue}}C[_]=new I.ShiftCommand(E,{isUnshift:!1,tabSize:f.tabSize,indentSize:f.indentSize,insertSpaces:f.insertSpaces,useTabStops:f.useTabStops,autoIndent:f.autoIndent})}}return C}static compositionType(f,S,v,C,_,L,E,N){const k=C.map(M=>this._compositionType(v,M,_,L,E,N));return new b.EditOperationResult(4,k,{shouldPushStackElementBefore:o(f,4),shouldPushStackElementAfter:!1})}static _compositionType(f,S,v,C,_,L){if(!S.isEmpty())return null;const E=S.getPosition(),N=Math.max(1,E.column-C),k=Math.min(f.getLineMaxColumn(E.lineNumber),E.column+_),M=new h.Range(E.lineNumber,N,E.lineNumber,k);return f.getValueInRange(M)===v&&L===0?null:new D.ReplaceCommandWithOffsetCursorState(M,v,0,L)}static _typeCommand(f,S,v){return v?new D.ReplaceCommandWithoutChangingPosition(f,S,!0):new D.ReplaceCommand(f,S,!0)}static _enter(f,S,v,C){if(f.autoIndent===0)return c._typeCommand(C,`
|
||
`,v);if(!S.isCheapToTokenize(C.getStartPosition().lineNumber)||f.autoIndent===1){const N=S.getLineContent(C.startLineNumber),k=m.getLeadingWhitespace(N).substring(0,C.startColumn-1);return c._typeCommand(C,`
|
||
`+f.normalizeIndentation(k),v)}const _=n.LanguageConfigurationRegistry.getEnterAction(f.autoIndent,S,C);if(_){if(_.indentAction===i.IndentAction.None)return c._typeCommand(C,`
|
||
`+f.normalizeIndentation(_.indentation+_.appendText),v);if(_.indentAction===i.IndentAction.Indent)return c._typeCommand(C,`
|
||
`+f.normalizeIndentation(_.indentation+_.appendText),v);if(_.indentAction===i.IndentAction.IndentOutdent){const N=f.normalizeIndentation(_.indentation),k=f.normalizeIndentation(_.indentation+_.appendText),M=`
|
||
`+k+`
|
||
`+N;return v?new D.ReplaceCommandWithoutChangingPosition(C,M,!0):new D.ReplaceCommandWithOffsetCursorState(C,M,-1,k.length-N.length,!0)}else if(_.indentAction===i.IndentAction.Outdent){const N=c.unshiftIndent(f,_.indentation);return c._typeCommand(C,`
|
||
`+f.normalizeIndentation(N+_.appendText),v)}}const L=S.getLineContent(C.startLineNumber),E=m.getLeadingWhitespace(L).substring(0,C.startColumn-1);if(f.autoIndent>=4){const N=n.LanguageConfigurationRegistry.getIndentForEnter(f.autoIndent,S,C,{unshiftIndent:k=>c.unshiftIndent(f,k),shiftIndent:k=>c.shiftIndent(f,k),normalizeIndentation:k=>f.normalizeIndentation(k)});if(N){let k=f.visibleColumnFromColumn(S,C.getEndPosition());const M=C.endColumn,O=S.getLineContent(C.endLineNumber),B=m.firstNonWhitespaceIndex(O);if(B>=0?C=C.setEndPosition(C.endLineNumber,Math.max(C.endColumn,B+1)):C=C.setEndPosition(C.endLineNumber,S.getLineMaxColumn(C.endLineNumber)),v)return new D.ReplaceCommandWithoutChangingPosition(C,`
|
||
`+f.normalizeIndentation(N.afterEnter),!0);{let T=0;return M<=B+1&&(f.insertSpaces||(k=Math.ceil(k/f.indentSize)),T=Math.min(k+1-f.normalizeIndentation(N.afterEnter).length-1,0)),new D.ReplaceCommandWithOffsetCursorState(C,`
|
||
`+f.normalizeIndentation(N.afterEnter),0,T,!0)}}}return c._typeCommand(C,`
|
||
`+f.normalizeIndentation(E),v)}static _isAutoIndentType(f,S,v){if(f.autoIndent<4)return!1;for(let C=0,_=v.length;C<_;C++)if(!S.isCheapToTokenize(v[C].getEndPosition().lineNumber))return!1;return!0}static _runAutoIndentType(f,S,v,C){const _=n.LanguageConfigurationRegistry.getIndentationAtPosition(S,v.startLineNumber,v.startColumn),L=n.LanguageConfigurationRegistry.getIndentActionForType(f.autoIndent,S,v,C,{shiftIndent:E=>c.shiftIndent(f,E),unshiftIndent:E=>c.unshiftIndent(f,E)});if(L===null)return null;if(L!==f.normalizeIndentation(_)){const E=S.getLineFirstNonWhitespaceColumn(v.startLineNumber);return E===0?c._typeCommand(new h.Range(v.startLineNumber,1,v.endLineNumber,v.endColumn),f.normalizeIndentation(L)+C,!1):c._typeCommand(new h.Range(v.startLineNumber,1,v.endLineNumber,v.endColumn),f.normalizeIndentation(L)+S.getLineContent(v.startLineNumber).substring(E-1,v.startColumn-1)+C,!1)}return null}static _isAutoClosingOvertype(f,S,v,C,_){if(f.autoClosingOvertype==="never"||!f.autoClosingPairs.autoClosingPairsCloseSingleChar.has(_))return!1;for(let L=0,E=v.length;L<E;L++){const N=v[L];if(!N.isEmpty())return!1;const k=N.getPosition(),M=S.getLineContent(k.lineNumber);if(M.charAt(k.column-1)!==_)return!1;const B=(0,b.isQuote)(_);if((k.column>2?M.charCodeAt(k.column-2):0)===92&&B)return!1;if(f.autoClosingOvertype==="auto"){let R=!1;for(let P=0,F=C.length;P<F;P++){const W=C[P];if(k.lineNumber===W.startLineNumber&&k.column===W.startColumn){R=!0;break}}if(!R)return!1}}return!0}static _runAutoClosingOvertype(f,S,v,C,_){const L=[];for(let E=0,N=C.length;E<N;E++){const M=C[E].getPosition(),O=new h.Range(M.lineNumber,M.column,M.lineNumber,M.column+1);L[E]=new D.ReplaceCommand(O,_)}return new b.EditOperationResult(4,L,{shouldPushStackElementBefore:o(f,4),shouldPushStackElementAfter:!1})}static _isBeforeClosingBrace(f,S){const v=S.charAt(0),C=f.autoClosingPairs.autoClosingPairsOpenByStart.get(v)||[],_=f.autoClosingPairs.autoClosingPairsCloseByStart.get(v)||[],L=C.some(N=>S.startsWith(N.open)),E=_.some(N=>S.startsWith(N.close));return!L&&E}static _findAutoClosingPairOpen(f,S,v,C){const _=f.autoClosingPairs.autoClosingPairsOpenByEnd.get(C);if(!_)return null;let L=null;for(const E of _)if(L===null||E.open.length>L.open.length){let N=!0;for(const k of v)if(S.getValueInRange(new h.Range(k.lineNumber,k.column-E.open.length+1,k.lineNumber,k.column))+C!==E.open){N=!1;break}N&&(L=E)}return L}static _findContainedAutoClosingPair(f,S){if(S.open.length<=1)return null;const v=S.close.charAt(S.close.length-1),C=f.autoClosingPairs.autoClosingPairsCloseByEnd.get(v)||[];let _=null;for(const L of C)L.open!==S.open&&S.open.includes(L.open)&&S.close.endsWith(L.close)&&(!_||L.open.length>_.open.length)&&(_=L);return _}static _getAutoClosingPairClose(f,S,v,C,_){const L=(0,b.isQuote)(C),E=L?f.autoClosingQuotes:f.autoClosingBrackets,N=L?f.shouldAutoCloseBefore.quote:f.shouldAutoCloseBefore.bracket;if(E==="never")return null;for(const R of v)if(!R.isEmpty())return null;const k=v.map(R=>{const P=R.getPosition();return _?{lineNumber:P.lineNumber,beforeColumn:P.column-C.length,afterColumn:P.column}:{lineNumber:P.lineNumber,beforeColumn:P.column,afterColumn:P.column}}),M=this._findAutoClosingPairOpen(f,S,k.map(R=>new t.Position(R.lineNumber,R.beforeColumn)),C);if(!M)return null;const O=this._findContainedAutoClosingPair(f,M),B=O?O.close:"";let T=!0;for(const R of k){const{lineNumber:P,beforeColumn:F,afterColumn:W}=R,A=S.getLineContent(P),H=A.substring(0,F-1),q=A.substring(W-1);if(q.startsWith(B)||(T=!1),q.length>0){const ae=q.charAt(0);if(!c._isBeforeClosingBrace(f,q)&&!N(ae))return null}if(M.open.length===1&&(C==="'"||C==='"')&&E!=="always"){const ae=(0,p.getMapForWordSeparators)(f.wordSeparators);if(H.length>0){const oe=H.charCodeAt(H.length-1);if(ae.get(oe)===0)return null}}if(!S.isCheapToTokenize(P))return null;S.forceTokenization(P);const X=S.getLineTokens(P),G=(0,l.createScopedLineTokens)(X,F-1);if(!M.shouldAutoClose(G,F-G.firstCharOffset))return null;const re=M.findNeutralCharacter();if(re){const ae=S.getTokenTypeIfInsertingCharacter(P,F,re);if(!M.isOK(ae))return null}}return T?M.close.substring(0,M.close.length-B.length):M.close}static _runAutoClosingOpenCharType(f,S,v,C,_,L,E){const N=[];for(let k=0,M=C.length;k<M;k++){const O=C[k];N[k]=new r(O,_,!L,E)}return new b.EditOperationResult(4,N,{shouldPushStackElementBefore:!0,shouldPushStackElementAfter:!1})}static _shouldSurroundChar(f,S){return(0,b.isQuote)(S)?f.autoSurround==="quotes"||f.autoSurround==="languageDefined":f.autoSurround==="brackets"||f.autoSurround==="languageDefined"}static _isSurroundSelectionType(f,S,v,C){if(!c._shouldSurroundChar(f,C)||!f.surroundingPairs.hasOwnProperty(C))return!1;const _=(0,b.isQuote)(C);for(let L=0,E=v.length;L<E;L++){const N=v[L];if(N.isEmpty())return!1;let k=!0;for(let M=N.startLineNumber;M<=N.endLineNumber;M++){const O=S.getLineContent(M),B=M===N.startLineNumber?N.startColumn-1:0,T=M===N.endLineNumber?N.endColumn-1:O.length,R=O.substring(B,T);if(/[^ \t]/.test(R)){k=!1;break}}if(k)return!1;if(_&&N.startLineNumber===N.endLineNumber&&N.startColumn+1===N.endColumn){const M=S.getValueInRange(N);if((0,b.isQuote)(M))return!1}}return!0}static _runSurroundSelectionType(f,S,v,C,_){const L=[];for(let E=0,N=C.length;E<N;E++){const k=C[E],M=S.surroundingPairs[_];L[E]=new w.SurroundSelectionCommand(k,_,M)}return new b.EditOperationResult(0,L,{shouldPushStackElementBefore:!0,shouldPushStackElementAfter:!0})}static _isTypeInterceptorElectricChar(f,S,v){return!!(v.length===1&&S.isCheapToTokenize(v[0].getEndPosition().lineNumber))}static _typeInterceptorElectricChar(f,S,v,C,_){if(!S.electricChars.hasOwnProperty(_)||!C.isEmpty())return null;const L=C.getPosition();v.forceTokenization(L.lineNumber);const E=v.getLineTokens(L.lineNumber);let N;try{N=S.onElectricCharacter(_,E,L.column)}catch(k){return(0,y.onUnexpectedError)(k),null}if(!N)return null;if(N.matchOpenBracket){const k=(E.getLineContent()+_).lastIndexOf(N.matchOpenBracket)+1,M=v.bracketPairs.findMatchingBracketUp(N.matchOpenBracket,{lineNumber:L.lineNumber,column:k});if(M){if(M.startLineNumber===L.lineNumber)return null;const O=v.getLineContent(M.startLineNumber),B=m.getLeadingWhitespace(O),T=S.normalizeIndentation(B),R=v.getLineContent(L.lineNumber),P=v.getLineFirstNonWhitespaceColumn(L.lineNumber)||L.column,F=R.substring(P-1,L.column-1),W=T+F+_,A=new h.Range(L.lineNumber,1,L.lineNumber,L.column),H=new D.ReplaceCommand(A,W);return new b.EditOperationResult(s(W,f),[H],{shouldPushStackElementBefore:!1,shouldPushStackElementAfter:!0})}}return null}static compositionEndWithInterceptors(f,S,v,C,_,L){if(!C||g.Selection.selectionsArrEqual(C,_))return null;let E=null;for(const k of _){if(!k.isEmpty())return null;const M=k.getPosition(),O=v.getValueInRange(new h.Range(M.lineNumber,M.column-1,M.lineNumber,M.column));if(E===null)E=O;else if(E!==O)return null}if(!E)return null;if(this._isAutoClosingOvertype(S,v,_,L,E)){const k=_.map(M=>new D.ReplaceCommand(new h.Range(M.positionLineNumber,M.positionColumn,M.positionLineNumber,M.positionColumn+1),"",!1));return new b.EditOperationResult(4,k,{shouldPushStackElementBefore:!0,shouldPushStackElementAfter:!1})}const N=this._getAutoClosingPairClose(S,v,_,E,!0);return N!==null?this._runAutoClosingOpenCharType(f,S,v,_,E,!0,N):null}static typeWithInterceptors(f,S,v,C,_,L,E){if(!f&&E===`
|
||
`){const M=[];for(let O=0,B=_.length;O<B;O++)M[O]=c._enter(v,C,!1,_[O]);return new b.EditOperationResult(4,M,{shouldPushStackElementBefore:!0,shouldPushStackElementAfter:!1})}if(!f&&this._isAutoIndentType(v,C,_)){const M=[];let O=!1;for(let B=0,T=_.length;B<T;B++)if(M[B]=this._runAutoIndentType(v,C,_[B],E),!M[B]){O=!0;break}if(!O)return new b.EditOperationResult(4,M,{shouldPushStackElementBefore:!0,shouldPushStackElementAfter:!1})}if(!f&&this._isAutoClosingOvertype(v,C,_,L,E))return this._runAutoClosingOvertype(S,v,C,_,E);if(!f){const M=this._getAutoClosingPairClose(v,C,_,E,!1);if(M)return this._runAutoClosingOpenCharType(S,v,C,_,E,!1,M)}if(this._isSurroundSelectionType(v,C,_,E))return this._runSurroundSelectionType(S,v,C,_,E);if(!f&&this._isTypeInterceptorElectricChar(v,C,_)){const M=this._typeInterceptorElectricChar(S,v,C,_[0],E);if(M)return M}const N=[];for(let M=0,O=_.length;M<O;M++)N[M]=new D.ReplaceCommand(_[M],E);const k=s(E,S);return new b.EditOperationResult(k,N,{shouldPushStackElementBefore:o(S,k),shouldPushStackElementAfter:!1})}static typeWithoutInterceptors(f,S,v,C,_){const L=[];for(let N=0,k=C.length;N<k;N++)L[N]=new D.ReplaceCommand(C[N],_);const E=s(_,f);return new b.EditOperationResult(E,L,{shouldPushStackElementBefore:o(f,E),shouldPushStackElementAfter:!1})}static lineInsertBefore(f,S,v){if(S===null||v===null)return[];const C=[];for(let _=0,L=v.length;_<L;_++){let E=v[_].positionLineNumber;if(E===1)C[_]=new D.ReplaceCommandWithoutChangingPosition(new h.Range(1,1,1,1),`
|
||
`);else{E--;const N=S.getLineMaxColumn(E);C[_]=this._enter(f,S,!1,new h.Range(E,N,E,N))}}return C}static lineInsertAfter(f,S,v){if(S===null||v===null)return[];const C=[];for(let _=0,L=v.length;_<L;_++){const E=v[_].positionLineNumber,N=S.getLineMaxColumn(E);C[_]=this._enter(f,S,!1,new h.Range(E,N,E,N))}return C}static lineBreakInsert(f,S,v){const C=[];for(let _=0,L=v.length;_<L;_++)C[_]=this._enter(f,S,!0,v[_]);return C}}e.TypeOperations=c;class r extends D.ReplaceCommandWithOffsetCursorState{constructor(f,S,v,C){super(f,(v?S:"")+C,0,-C.length);this._openCharacter=S,this._closeCharacter=C,this.closeCharacterRange=null,this.enclosingRange=null}computeCursorState(f,S){const C=S.getInverseEditOperations()[0].range;return this.closeCharacterRange=new h.Range(C.startLineNumber,C.endColumn-this._closeCharacter.length,C.endLineNumber,C.endColumn),this.enclosingRange=new h.Range(C.startLineNumber,C.endColumn-this._openCharacter.length-this._closeCharacter.length,C.endLineNumber,C.endColumn),super.computeCursorState(f,S)}}e.TypeWithAutoClosingCommand=r;function s(u,f){return u===" "?f===5||f===6?6:5:4}function o(u,f){return d(u)&&!d(f)?!0:u===5?!1:a(u)!==a(f)}function a(u){return u===6||u===5?"space":u}function d(u){return u===4||u===5||u===6}}),define(te[159],ie([1,0,8,59,204,118,11,3]),function(j,e,y,m,D,I,w,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.WordPartOperations=e.WordOperations=void 0;class p{static _createWord(i,n,l,c,r){return{start:c,end:r,wordType:n,nextCharClass:l}}static _findPreviousWordOnLine(i,n,l){const c=n.getLineContent(l.lineNumber);return this._doFindPreviousWordOnLine(c,i,l)}static _doFindPreviousWordOnLine(i,n,l){let c=0;for(let r=l.column-2;r>=0;r--){const s=i.charCodeAt(r),o=n.get(s);if(o===0){if(c===2)return this._createWord(i,c,o,r+1,this._findEndOfWord(i,n,c,r+1));c=1}else if(o===2){if(c===1)return this._createWord(i,c,o,r+1,this._findEndOfWord(i,n,c,r+1));c=2}else if(o===1&&c!==0)return this._createWord(i,c,o,r+1,this._findEndOfWord(i,n,c,r+1))}return c!==0?this._createWord(i,c,1,0,this._findEndOfWord(i,n,c,0)):null}static _findEndOfWord(i,n,l,c){const r=i.length;for(let s=c;s<r;s++){const o=i.charCodeAt(s),a=n.get(o);if(a===1||l===1&&a===2||l===2&&a===0)return s}return r}static _findNextWordOnLine(i,n,l){const c=n.getLineContent(l.lineNumber);return this._doFindNextWordOnLine(c,i,l)}static _doFindNextWordOnLine(i,n,l){let c=0;const r=i.length;for(let s=l.column-1;s<r;s++){const o=i.charCodeAt(s),a=n.get(o);if(a===0){if(c===2)return this._createWord(i,c,a,this._findStartOfWord(i,n,c,s-1),s);c=1}else if(a===2){if(c===1)return this._createWord(i,c,a,this._findStartOfWord(i,n,c,s-1),s);c=2}else if(a===1&&c!==0)return this._createWord(i,c,a,this._findStartOfWord(i,n,c,s-1),s)}return c!==0?this._createWord(i,c,1,this._findStartOfWord(i,n,c,r-1),r):null}static _findStartOfWord(i,n,l,c){for(let r=c;r>=0;r--){const s=i.charCodeAt(r),o=n.get(s);if(o===1||l===1&&o===2||l===2&&o===0)return r+1}return 0}static moveWordLeft(i,n,l,c){let r=l.lineNumber,s=l.column;s===1&&r>1&&(r=r-1,s=n.getLineMaxColumn(r));let o=p._findPreviousWordOnLine(i,n,new w.Position(r,s));if(c===0)return new w.Position(r,o?o.start+1:1);if(c===1)return o&&o.wordType===2&&o.end-o.start==1&&o.nextCharClass===0&&(o=p._findPreviousWordOnLine(i,n,new w.Position(r,o.start+1))),new w.Position(r,o?o.start+1:1);if(c===3){for(;o&&o.wordType===2;)o=p._findPreviousWordOnLine(i,n,new w.Position(r,o.start+1));return new w.Position(r,o?o.start+1:1)}return o&&s<=o.end+1&&(o=p._findPreviousWordOnLine(i,n,new w.Position(r,o.start+1))),new w.Position(r,o?o.end+1:1)}static _moveWordPartLeft(i,n){const l=n.lineNumber,c=i.getLineMaxColumn(l);if(n.column===1)return l>1?new w.Position(l-1,i.getLineMaxColumn(l-1)):n;const r=i.getLineContent(l);for(let s=n.column-1;s>1;s--){const o=r.charCodeAt(s-2),a=r.charCodeAt(s-1);if(o===95&&a!==95)return new w.Position(l,s);if(y.isLowerAsciiLetter(o)&&y.isUpperAsciiLetter(a))return new w.Position(l,s);if(y.isUpperAsciiLetter(o)&&y.isUpperAsciiLetter(a)&&s+1<c){const d=r.charCodeAt(s);if(y.isLowerAsciiLetter(d))return new w.Position(l,s)}}return new w.Position(l,1)}static moveWordRight(i,n,l,c){let r=l.lineNumber,s=l.column,o=!1;s===n.getLineMaxColumn(r)&&r<n.getLineCount()&&(o=!0,r=r+1,s=1);let a=p._findNextWordOnLine(i,n,new w.Position(r,s));if(c===2)a&&a.wordType===2&&a.end-a.start==1&&a.nextCharClass===0&&(a=p._findNextWordOnLine(i,n,new w.Position(r,a.end+1))),a?s=a.end+1:s=n.getLineMaxColumn(r);else if(c===3){for(o&&(s=0);a&&(a.wordType===2||a.start+1<=s);)a=p._findNextWordOnLine(i,n,new w.Position(r,a.end+1));a?s=a.start+1:s=n.getLineMaxColumn(r)}else a&&!o&&s>=a.start+1&&(a=p._findNextWordOnLine(i,n,new w.Position(r,a.end+1))),a?s=a.start+1:s=n.getLineMaxColumn(r);return new w.Position(r,s)}static _moveWordPartRight(i,n){const l=n.lineNumber,c=i.getLineMaxColumn(l);if(n.column===c)return l<i.getLineCount()?new w.Position(l+1,1):n;const r=i.getLineContent(l);for(let s=n.column+1;s<c;s++){const o=r.charCodeAt(s-2),a=r.charCodeAt(s-1);if(o!==95&&a===95)return new w.Position(l,s);if(y.isLowerAsciiLetter(o)&&y.isUpperAsciiLetter(a))return new w.Position(l,s);if(y.isUpperAsciiLetter(o)&&y.isUpperAsciiLetter(a)&&s+1<c){const d=r.charCodeAt(s);if(y.isLowerAsciiLetter(d))return new w.Position(l,s)}}return new w.Position(l,c)}static _deleteWordLeftWhitespace(i,n){const l=i.getLineContent(n.lineNumber),c=n.column-2,r=y.lastNonWhitespaceIndex(l,c);return r+1<c?new b.Range(n.lineNumber,r+2,n.lineNumber,n.column):null}static deleteWordLeft(i,n){const l=i.wordSeparators,c=i.model,r=i.selection,s=i.whitespaceHeuristics;if(!r.isEmpty())return r;if(D.DeleteOperations.isAutoClosingPairDelete(i.autoClosingDelete,i.autoClosingBrackets,i.autoClosingQuotes,i.autoClosingPairs.autoClosingPairsOpenByEnd,i.model,[i.selection],i.autoClosedCharacters)){const f=i.selection.getPosition();return new b.Range(f.lineNumber,f.column-1,f.lineNumber,f.column+1)}const o=new w.Position(r.positionLineNumber,r.positionColumn);let a=o.lineNumber,d=o.column;if(a===1&&d===1)return null;if(s){const f=this._deleteWordLeftWhitespace(c,o);if(f)return f}let u=p._findPreviousWordOnLine(l,c,o);return n===0?u?d=u.start+1:d>1?d=1:(a--,d=c.getLineMaxColumn(a)):(u&&d<=u.end+1&&(u=p._findPreviousWordOnLine(l,c,new w.Position(a,u.start+1))),u?d=u.end+1:d>1?d=1:(a--,d=c.getLineMaxColumn(a))),new b.Range(a,d,o.lineNumber,o.column)}static deleteInsideWord(i,n,l){if(!l.isEmpty())return l;const c=new w.Position(l.positionLineNumber,l.positionColumn),r=this._deleteInsideWordWhitespace(n,c);return r||this._deleteInsideWordDetermineDeleteRange(i,n,c)}static _charAtIsWhitespace(i,n){const l=i.charCodeAt(n);return l===32||l===9}static _deleteInsideWordWhitespace(i,n){const l=i.getLineContent(n.lineNumber),c=l.length;if(c===0)return null;let r=Math.max(n.column-2,0);if(!this._charAtIsWhitespace(l,r))return null;let s=Math.min(n.column-1,c-1);if(!this._charAtIsWhitespace(l,s))return null;for(;r>0&&this._charAtIsWhitespace(l,r-1);)r--;for(;s+1<c&&this._charAtIsWhitespace(l,s+1);)s++;return new b.Range(n.lineNumber,r+1,n.lineNumber,s+2)}static _deleteInsideWordDetermineDeleteRange(i,n,l){const c=n.getLineContent(l.lineNumber),r=c.length;if(r===0)return l.lineNumber>1?new b.Range(l.lineNumber-1,n.getLineMaxColumn(l.lineNumber-1),l.lineNumber,1):l.lineNumber<n.getLineCount()?new b.Range(l.lineNumber,1,l.lineNumber+1,1):new b.Range(l.lineNumber,1,l.lineNumber,1);const s=f=>f.start+1<=l.column&&l.column<=f.end+1,o=(f,S)=>(f=Math.min(f,l.column),S=Math.max(S,l.column),new b.Range(l.lineNumber,f,l.lineNumber,S)),a=f=>{let S=f.start+1,v=f.end+1,C=!1;for(;v-1<r&&this._charAtIsWhitespace(c,v-1);)C=!0,v++;if(!C)for(;S>1&&this._charAtIsWhitespace(c,S-2);)S--;return o(S,v)},d=p._findPreviousWordOnLine(i,n,l);if(d&&s(d))return a(d);const u=p._findNextWordOnLine(i,n,l);return u&&s(u)?a(u):d&&u?o(d.end+1,u.start+1):d?o(d.start+1,d.end+1):u?o(u.start+1,u.end+1):o(1,r+1)}static _deleteWordPartLeft(i,n){if(!n.isEmpty())return n;const l=n.getPosition(),c=p._moveWordPartLeft(i,l);return new b.Range(l.lineNumber,l.column,c.lineNumber,c.column)}static _findFirstNonWhitespaceChar(i,n){const l=i.length;for(let c=n;c<l;c++){const r=i.charAt(c);if(r!==" "&&r!==" ")return c}return l}static _deleteWordRightWhitespace(i,n){const l=i.getLineContent(n.lineNumber),c=n.column-1,r=this._findFirstNonWhitespaceChar(l,c);return c+1<r?new b.Range(n.lineNumber,n.column,n.lineNumber,r+1):null}static deleteWordRight(i,n){const l=i.wordSeparators,c=i.model,r=i.selection,s=i.whitespaceHeuristics;if(!r.isEmpty())return r;const o=new w.Position(r.positionLineNumber,r.positionColumn);let a=o.lineNumber,d=o.column;const u=c.getLineCount(),f=c.getLineMaxColumn(a);if(a===u&&d===f)return null;if(s){const v=this._deleteWordRightWhitespace(c,o);if(v)return v}let S=p._findNextWordOnLine(l,c,o);return n===2?S?d=S.end+1:d<f||a===u?d=f:(a++,S=p._findNextWordOnLine(l,c,new w.Position(a,1)),S?d=S.start+1:d=c.getLineMaxColumn(a)):(S&&d>=S.start+1&&(S=p._findNextWordOnLine(l,c,new w.Position(a,S.end+1))),S?d=S.start+1:d<f||a===u?d=f:(a++,S=p._findNextWordOnLine(l,c,new w.Position(a,1)),S?d=S.start+1:d=c.getLineMaxColumn(a))),new b.Range(a,d,o.lineNumber,o.column)}static _deleteWordPartRight(i,n){if(!n.isEmpty())return n;const l=n.getPosition(),c=p._moveWordPartRight(i,l);return new b.Range(l.lineNumber,l.column,c.lineNumber,c.column)}static _createWordAtPosition(i,n,l){const c=new b.Range(n,l.start+1,n,l.end+1);return{word:i.getValueInRange(c),startColumn:c.startColumn,endColumn:c.endColumn}}static getWordAtPosition(i,n,l){const c=(0,I.getMapForWordSeparators)(n),r=p._findPreviousWordOnLine(c,i,l);if(r&&r.wordType===1&&r.start<=l.column-1&&l.column-1<=r.end)return p._createWordAtPosition(i,l.lineNumber,r);const s=p._findNextWordOnLine(c,i,l);return s&&s.wordType===1&&s.start<=l.column-1&&l.column-1<=s.end?p._createWordAtPosition(i,l.lineNumber,s):null}static word(i,n,l,c,r){const s=(0,I.getMapForWordSeparators)(i.wordSeparators),o=p._findPreviousWordOnLine(s,n,r),a=p._findNextWordOnLine(s,n,r);if(!c){let v,C;return o&&o.wordType===1&&o.start<=r.column-1&&r.column-1<=o.end?(v=o.start+1,C=o.end+1):a&&a.wordType===1&&a.start<=r.column-1&&r.column-1<=a.end?(v=a.start+1,C=a.end+1):(o?v=o.end+1:v=1,a?C=a.start+1:C=n.getLineMaxColumn(r.lineNumber)),new m.SingleCursorState(new b.Range(r.lineNumber,v,r.lineNumber,C),0,new w.Position(r.lineNumber,C),0)}let d,u;o&&o.wordType===1&&o.start<r.column-1&&r.column-1<o.end?(d=o.start+1,u=o.end+1):a&&a.wordType===1&&a.start<r.column-1&&r.column-1<a.end?(d=a.start+1,u=a.end+1):(d=r.column,u=r.column);const f=r.lineNumber;let S;if(l.selectionStart.containsPosition(r))S=l.selectionStart.endColumn;else if(r.isBeforeOrEqual(l.selectionStart.getStartPosition())){S=d;const v=new w.Position(f,S);l.selectionStart.containsPosition(v)&&(S=l.selectionStart.endColumn)}else{S=u;const v=new w.Position(f,S);l.selectionStart.containsPosition(v)&&(S=l.selectionStart.startColumn)}return l.move(!0,f,S,0)}}e.WordOperations=p;class h extends p{static deleteWordPartLeft(i){const n=g([p.deleteWordLeft(i,0),p.deleteWordLeft(i,2),p._deleteWordPartLeft(i.model,i.selection)]);return n.sort(b.Range.compareRangesUsingEnds),n[2]}static deleteWordPartRight(i){const n=g([p.deleteWordRight(i,0),p.deleteWordRight(i,2),p._deleteWordPartRight(i.model,i.selection)]);return n.sort(b.Range.compareRangesUsingStarts),n[0]}static moveWordPartLeft(i,n,l){const c=g([p.moveWordLeft(i,n,l,0),p.moveWordLeft(i,n,l,2),p._moveWordPartLeft(n,l)]);return c.sort(w.Position.compare),c[2]}static moveWordPartRight(i,n,l){const c=g([p.moveWordRight(i,n,l,0),p.moveWordRight(i,n,l,2),p._moveWordPartRight(n,l)]);return c.sort(w.Position.compare),c[0]}}e.WordPartOperations=h;function g(t){return t.filter(i=>Boolean(i))}}),define(te[206],ie([1,0,20,59,203,159,11,3]),function(j,e,y,m,D,I,w,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CursorMove=e.CursorMoveCommands=void 0;class p{static addCursorDown(t,i,n){const l=[];let c=0;for(let r=0,s=i.length;r<s;r++){const o=i[r];l[c++]=new m.CursorState(o.modelState,o.viewState),n?l[c++]=m.CursorState.fromModelState(D.MoveOperations.translateDown(t.cursorConfig,t.model,o.modelState)):l[c++]=m.CursorState.fromViewState(D.MoveOperations.translateDown(t.cursorConfig,t,o.viewState))}return l}static addCursorUp(t,i,n){const l=[];let c=0;for(let r=0,s=i.length;r<s;r++){const o=i[r];l[c++]=new m.CursorState(o.modelState,o.viewState),n?l[c++]=m.CursorState.fromModelState(D.MoveOperations.translateUp(t.cursorConfig,t.model,o.modelState)):l[c++]=m.CursorState.fromViewState(D.MoveOperations.translateUp(t.cursorConfig,t,o.viewState))}return l}static moveToBeginningOfLine(t,i,n){let l=[];for(let c=0,r=i.length;c<r;c++){const s=i[c];l[c]=this._moveToLineStart(t,s,n)}return l}static _moveToLineStart(t,i,n){const l=i.viewState.position.column,c=i.modelState.position.column,r=l===c,s=i.viewState.position.lineNumber,o=t.getLineFirstNonWhitespaceColumn(s);return!r&&!(l===o)?this._moveToLineStartByView(t,i,n):this._moveToLineStartByModel(t,i,n)}static _moveToLineStartByView(t,i,n){return m.CursorState.fromViewState(D.MoveOperations.moveToBeginningOfLine(t.cursorConfig,t,i.viewState,n))}static _moveToLineStartByModel(t,i,n){return m.CursorState.fromModelState(D.MoveOperations.moveToBeginningOfLine(t.cursorConfig,t.model,i.modelState,n))}static moveToEndOfLine(t,i,n,l){const c=[];for(let r=0,s=i.length;r<s;r++){const o=i[r];c[r]=this._moveToLineEnd(t,o,n,l)}return c}static _moveToLineEnd(t,i,n,l){const c=i.viewState.position,r=t.getLineMaxColumn(c.lineNumber),s=c.column===r,o=i.modelState.position,a=t.model.getLineMaxColumn(o.lineNumber),d=r-c.column==a-o.column;return s||d?this._moveToLineEndByModel(t,i,n,l):this._moveToLineEndByView(t,i,n,l)}static _moveToLineEndByView(t,i,n,l){return m.CursorState.fromViewState(D.MoveOperations.moveToEndOfLine(t.cursorConfig,t,i.viewState,n,l))}static _moveToLineEndByModel(t,i,n,l){return m.CursorState.fromModelState(D.MoveOperations.moveToEndOfLine(t.cursorConfig,t.model,i.modelState,n,l))}static expandLineSelection(t,i){const n=[];for(let l=0,c=i.length;l<c;l++){const r=i[l],s=r.modelState.selection.startLineNumber,o=t.model.getLineCount();let a=r.modelState.selection.endLineNumber,d;a===o?d=t.model.getLineMaxColumn(o):(a++,d=1),n[l]=m.CursorState.fromModelState(new m.SingleCursorState(new b.Range(s,1,s,1),0,new w.Position(a,d),0))}return n}static moveToBeginningOfBuffer(t,i,n){const l=[];for(let c=0,r=i.length;c<r;c++){const s=i[c];l[c]=m.CursorState.fromModelState(D.MoveOperations.moveToBeginningOfBuffer(t.cursorConfig,t.model,s.modelState,n))}return l}static moveToEndOfBuffer(t,i,n){const l=[];for(let c=0,r=i.length;c<r;c++){const s=i[c];l[c]=m.CursorState.fromModelState(D.MoveOperations.moveToEndOfBuffer(t.cursorConfig,t.model,s.modelState,n))}return l}static selectAll(t,i){const n=t.model.getLineCount(),l=t.model.getLineMaxColumn(n);return m.CursorState.fromModelState(new m.SingleCursorState(new b.Range(1,1,1,1),0,new w.Position(n,l),0))}static line(t,i,n,l,c){const r=t.model.validatePosition(l),s=c?t.coordinatesConverter.validateViewPosition(new w.Position(c.lineNumber,c.column),r):t.coordinatesConverter.convertModelPositionToViewPosition(r);if(!n||!i.modelState.hasSelection()){const a=t.model.getLineCount();let d=r.lineNumber+1,u=1;return d>a&&(d=a,u=t.model.getLineMaxColumn(d)),m.CursorState.fromModelState(new m.SingleCursorState(new b.Range(r.lineNumber,1,d,u),0,new w.Position(d,u),0))}const o=i.modelState.selectionStart.getStartPosition().lineNumber;if(r.lineNumber<o)return m.CursorState.fromViewState(i.viewState.move(i.modelState.hasSelection(),s.lineNumber,1,0));if(r.lineNumber>o){const a=t.getLineCount();let d=s.lineNumber+1,u=1;return d>a&&(d=a,u=t.getLineMaxColumn(d)),m.CursorState.fromViewState(i.viewState.move(i.modelState.hasSelection(),d,u,0))}else{const a=i.modelState.selectionStart.getEndPosition();return m.CursorState.fromModelState(i.modelState.move(i.modelState.hasSelection(),a.lineNumber,a.column,0))}}static word(t,i,n,l){const c=t.model.validatePosition(l);return m.CursorState.fromModelState(I.WordOperations.word(t.cursorConfig,t.model,i.modelState,n,c))}static cancelSelection(t,i){if(!i.modelState.hasSelection())return new m.CursorState(i.modelState,i.viewState);const n=i.viewState.position.lineNumber,l=i.viewState.position.column;return m.CursorState.fromViewState(new m.SingleCursorState(new b.Range(n,l,n,l),0,new w.Position(n,l),0))}static moveTo(t,i,n,l,c){const r=t.model.validatePosition(l),s=c?t.coordinatesConverter.validateViewPosition(new w.Position(c.lineNumber,c.column),r):t.coordinatesConverter.convertModelPositionToViewPosition(r);return m.CursorState.fromViewState(i.viewState.move(n,s.lineNumber,s.column,0))}static simpleMove(t,i,n,l,c,r){switch(n){case 0:return r===4?this._moveHalfLineLeft(t,i,l):this._moveLeft(t,i,l,c);case 1:return r===4?this._moveHalfLineRight(t,i,l):this._moveRight(t,i,l,c);case 2:return r===2?this._moveUpByViewLines(t,i,l,c):this._moveUpByModelLines(t,i,l,c);case 3:return r===2?this._moveDownByViewLines(t,i,l,c):this._moveDownByModelLines(t,i,l,c);case 4:return r===2?i.map(s=>m.CursorState.fromViewState(D.MoveOperations.moveToPrevBlankLine(t.cursorConfig,t,s.viewState,l))):i.map(s=>m.CursorState.fromModelState(D.MoveOperations.moveToPrevBlankLine(t.cursorConfig,t.model,s.modelState,l)));case 5:return r===2?i.map(s=>m.CursorState.fromViewState(D.MoveOperations.moveToNextBlankLine(t.cursorConfig,t,s.viewState,l))):i.map(s=>m.CursorState.fromModelState(D.MoveOperations.moveToNextBlankLine(t.cursorConfig,t.model,s.modelState,l)));case 6:return this._moveToViewMinColumn(t,i,l);case 7:return this._moveToViewFirstNonWhitespaceColumn(t,i,l);case 8:return this._moveToViewCenterColumn(t,i,l);case 9:return this._moveToViewMaxColumn(t,i,l);case 10:return this._moveToViewLastNonWhitespaceColumn(t,i,l);default:return null}}static viewportMove(t,i,n,l,c){const r=t.getCompletelyVisibleViewRange(),s=t.coordinatesConverter.convertViewRangeToModelRange(r);switch(n){case 11:{const o=this._firstLineNumberInRange(t.model,s,c),a=t.model.getLineFirstNonWhitespaceColumn(o);return[this._moveToModelPosition(t,i[0],l,o,a)]}case 13:{const o=this._lastLineNumberInRange(t.model,s,c),a=t.model.getLineFirstNonWhitespaceColumn(o);return[this._moveToModelPosition(t,i[0],l,o,a)]}case 12:{const o=Math.round((s.startLineNumber+s.endLineNumber)/2),a=t.model.getLineFirstNonWhitespaceColumn(o);return[this._moveToModelPosition(t,i[0],l,o,a)]}case 14:{const o=[];for(let a=0,d=i.length;a<d;a++){const u=i[a];o[a]=this.findPositionInViewportIfOutside(t,u,r,l)}return o}default:return null}}static findPositionInViewportIfOutside(t,i,n,l){const c=i.viewState.position.lineNumber;if(n.startLineNumber<=c&&c<=n.endLineNumber-1)return new m.CursorState(i.modelState,i.viewState);{let r;c>n.endLineNumber-1?r=n.endLineNumber-1:c<n.startLineNumber?r=n.startLineNumber:r=c;const s=D.MoveOperations.vertical(t.cursorConfig,t,c,i.viewState.position.column,i.viewState.leftoverVisibleColumns,r,!1);return m.CursorState.fromViewState(i.viewState.move(l,s.lineNumber,s.column,s.leftoverVisibleColumns))}}static _firstLineNumberInRange(t,i,n){let l=i.startLineNumber;return i.startColumn!==t.getLineMinColumn(l)&&l++,Math.min(i.endLineNumber,l+n-1)}static _lastLineNumberInRange(t,i,n){let l=i.startLineNumber;return i.startColumn!==t.getLineMinColumn(l)&&l++,Math.max(l,i.endLineNumber-n+1)}static _moveLeft(t,i,n,l){return i.map(c=>m.CursorState.fromViewState(D.MoveOperations.moveLeft(t.cursorConfig,t,c.viewState,n,l)))}static _moveHalfLineLeft(t,i,n){const l=[];for(let c=0,r=i.length;c<r;c++){const s=i[c],o=s.viewState.position.lineNumber,a=Math.round(t.getLineContent(o).length/2);l[c]=m.CursorState.fromViewState(D.MoveOperations.moveLeft(t.cursorConfig,t,s.viewState,n,a))}return l}static _moveRight(t,i,n,l){return i.map(c=>m.CursorState.fromViewState(D.MoveOperations.moveRight(t.cursorConfig,t,c.viewState,n,l)))}static _moveHalfLineRight(t,i,n){const l=[];for(let c=0,r=i.length;c<r;c++){const s=i[c],o=s.viewState.position.lineNumber,a=Math.round(t.getLineContent(o).length/2);l[c]=m.CursorState.fromViewState(D.MoveOperations.moveRight(t.cursorConfig,t,s.viewState,n,a))}return l}static _moveDownByViewLines(t,i,n,l){const c=[];for(let r=0,s=i.length;r<s;r++){const o=i[r];c[r]=m.CursorState.fromViewState(D.MoveOperations.moveDown(t.cursorConfig,t,o.viewState,n,l))}return c}static _moveDownByModelLines(t,i,n,l){const c=[];for(let r=0,s=i.length;r<s;r++){const o=i[r];c[r]=m.CursorState.fromModelState(D.MoveOperations.moveDown(t.cursorConfig,t.model,o.modelState,n,l))}return c}static _moveUpByViewLines(t,i,n,l){const c=[];for(let r=0,s=i.length;r<s;r++){const o=i[r];c[r]=m.CursorState.fromViewState(D.MoveOperations.moveUp(t.cursorConfig,t,o.viewState,n,l))}return c}static _moveUpByModelLines(t,i,n,l){const c=[];for(let r=0,s=i.length;r<s;r++){const o=i[r];c[r]=m.CursorState.fromModelState(D.MoveOperations.moveUp(t.cursorConfig,t.model,o.modelState,n,l))}return c}static _moveToViewPosition(t,i,n,l,c){return m.CursorState.fromViewState(i.viewState.move(n,l,c,0))}static _moveToModelPosition(t,i,n,l,c){return m.CursorState.fromModelState(i.modelState.move(n,l,c,0))}static _moveToViewMinColumn(t,i,n){const l=[];for(let c=0,r=i.length;c<r;c++){const s=i[c],o=s.viewState.position.lineNumber,a=t.getLineMinColumn(o);l[c]=this._moveToViewPosition(t,s,n,o,a)}return l}static _moveToViewFirstNonWhitespaceColumn(t,i,n){const l=[];for(let c=0,r=i.length;c<r;c++){const s=i[c],o=s.viewState.position.lineNumber,a=t.getLineFirstNonWhitespaceColumn(o);l[c]=this._moveToViewPosition(t,s,n,o,a)}return l}static _moveToViewCenterColumn(t,i,n){const l=[];for(let c=0,r=i.length;c<r;c++){const s=i[c],o=s.viewState.position.lineNumber,a=Math.round((t.getLineMaxColumn(o)+t.getLineMinColumn(o))/2);l[c]=this._moveToViewPosition(t,s,n,o,a)}return l}static _moveToViewMaxColumn(t,i,n){const l=[];for(let c=0,r=i.length;c<r;c++){const s=i[c],o=s.viewState.position.lineNumber,a=t.getLineMaxColumn(o);l[c]=this._moveToViewPosition(t,s,n,o,a)}return l}static _moveToViewLastNonWhitespaceColumn(t,i,n){const l=[];for(let c=0,r=i.length;c<r;c++){const s=i[c],o=s.viewState.position.lineNumber,a=t.getLineLastNonWhitespaceColumn(o);l[c]=this._moveToViewPosition(t,s,n,o,a)}return l}}e.CursorMoveCommands=p;var h;(function(g){const t=function(n){if(!y.isObject(n))return!1;const l=n;return!(!y.isString(l.to)||!y.isUndefined(l.select)&&!y.isBoolean(l.select)||!y.isUndefined(l.by)&&!y.isString(l.by)||!y.isUndefined(l.value)&&!y.isNumber(l.value))};g.description={description:"Move cursor to a logical position in the view",args:[{name:"Cursor move argument object",description:`Property-value pairs that can be passed through this argument:
|
||
* 'to': A mandatory logical position value providing where to move the cursor.
|
||
\`\`\`
|
||
'left', 'right', 'up', 'down', 'prevBlankLine', 'nextBlankLine',
|
||
'wrappedLineStart', 'wrappedLineEnd', 'wrappedLineColumnCenter'
|
||
'wrappedLineFirstNonWhitespaceCharacter', 'wrappedLineLastNonWhitespaceCharacter'
|
||
'viewPortTop', 'viewPortCenter', 'viewPortBottom', 'viewPortIfOutside'
|
||
\`\`\`
|
||
* 'by': Unit to move. Default is computed based on 'to' value.
|
||
\`\`\`
|
||
'line', 'wrappedLine', 'character', 'halfLine'
|
||
\`\`\`
|
||
* 'value': Number of units to move. Default is '1'.
|
||
* 'select': If 'true' makes the selection. Default is 'false'.
|
||
`,constraint:t,schema:{type:"object",required:["to"],properties:{to:{type:"string",enum:["left","right","up","down","prevBlankLine","nextBlankLine","wrappedLineStart","wrappedLineEnd","wrappedLineColumnCenter","wrappedLineFirstNonWhitespaceCharacter","wrappedLineLastNonWhitespaceCharacter","viewPortTop","viewPortCenter","viewPortBottom","viewPortIfOutside"]},by:{type:"string",enum:["line","wrappedLine","character","halfLine"]},value:{type:"number",default:1},select:{type:"boolean",default:!1}}}}]},g.RawDirection={Left:"left",Right:"right",Up:"up",Down:"down",PrevBlankLine:"prevBlankLine",NextBlankLine:"nextBlankLine",WrappedLineStart:"wrappedLineStart",WrappedLineFirstNonWhitespaceCharacter:"wrappedLineFirstNonWhitespaceCharacter",WrappedLineColumnCenter:"wrappedLineColumnCenter",WrappedLineEnd:"wrappedLineEnd",WrappedLineLastNonWhitespaceCharacter:"wrappedLineLastNonWhitespaceCharacter",ViewPortTop:"viewPortTop",ViewPortCenter:"viewPortCenter",ViewPortBottom:"viewPortBottom",ViewPortIfOutside:"viewPortIfOutside"},g.RawUnit={Line:"line",WrappedLine:"wrappedLine",Character:"character",HalfLine:"halfLine"};function i(n){if(!n.to)return null;let l;switch(n.to){case g.RawDirection.Left:l=0;break;case g.RawDirection.Right:l=1;break;case g.RawDirection.Up:l=2;break;case g.RawDirection.Down:l=3;break;case g.RawDirection.PrevBlankLine:l=4;break;case g.RawDirection.NextBlankLine:l=5;break;case g.RawDirection.WrappedLineStart:l=6;break;case g.RawDirection.WrappedLineFirstNonWhitespaceCharacter:l=7;break;case g.RawDirection.WrappedLineColumnCenter:l=8;break;case g.RawDirection.WrappedLineEnd:l=9;break;case g.RawDirection.WrappedLineLastNonWhitespaceCharacter:l=10;break;case g.RawDirection.ViewPortTop:l=11;break;case g.RawDirection.ViewPortBottom:l=13;break;case g.RawDirection.ViewPortCenter:l=12;break;case g.RawDirection.ViewPortIfOutside:l=14;break;default:return null}let c=0;switch(n.by){case g.RawUnit.Line:c=1;break;case g.RawUnit.WrappedLine:c=2;break;case g.RawUnit.Character:c=3;break;case g.RawUnit.HalfLine:c=4;break}return{direction:l,unit:c,select:!!n.select,value:n.value||1}}g.parse=i})(h=e.CursorMove||(e.CursorMove={}))}),define(te[160],ie([1,0,497,34,20,43,15,28,699,59,204,206,205,11,3,24,16,86]),function(j,e,y,m,D,I,w,b,p,h,g,t,i,n,l,c,r,s){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CoreEditingCommands=e.CoreNavigationCommands=e.RevealLine_=e.EditorScroll_=e.CoreEditorCommand=void 0;const o=0;class a extends w.EditorCommand{runEditorCommand(M,O,B){const T=O._getViewModel();!T||this.runCoreEditorCommand(T,B||{})}}e.CoreEditorCommand=a;var d;(function(k){const M=function(B){if(!D.isObject(B))return!1;const T=B;return!(!D.isString(T.to)||!D.isUndefined(T.by)&&!D.isString(T.by)||!D.isUndefined(T.value)&&!D.isNumber(T.value)||!D.isUndefined(T.revealCursor)&&!D.isBoolean(T.revealCursor))};k.description={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'\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:M,schema:{type:"object",required:["to"],properties:{to:{type:"string",enum:["up","down"]},by:{type:"string",enum:["line","wrappedLine","page","halfPage"]},value:{type:"number",default:1},revealCursor:{type:"boolean"}}}}]},k.RawDirection={Up:"up",Down:"down"},k.RawUnit={Line:"line",WrappedLine:"wrappedLine",Page:"page",HalfPage:"halfPage"};function O(B){let T;switch(B.to){case k.RawDirection.Up:T=1;break;case k.RawDirection.Down:T=2;break;default:return null}let R;switch(B.by){case k.RawUnit.Line:R=1;break;case k.RawUnit.WrappedLine:R=2;break;case k.RawUnit.Page:R=3;break;case k.RawUnit.HalfPage:R=4;break;default:R=2}const P=Math.floor(B.value||1),F=!!B.revealCursor;return{direction:T,unit:R,value:P,revealCursor:F,select:!!B.select}}k.parse=O})(d=e.EditorScroll_||(e.EditorScroll_={}));var u;(function(k){const M=function(O){if(!D.isObject(O))return!1;const B=O;return!(!D.isNumber(B.lineNumber)&&!D.isString(B.lineNumber)||!D.isUndefined(B.at)&&!D.isString(B.at))};k.description={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:M,schema:{type:"object",required:["lineNumber"],properties:{lineNumber:{type:["number","string"]},at:{type:"string",enum:["top","center","bottom"]}}}}]},k.RawAtArgument={Top:"top",Center:"center",Bottom:"bottom"}})(u=e.RevealLine_||(e.RevealLine_={}));class f{constructor(M){M.addImplementation(1e4,"code-editor",(O,B)=>{const T=O.get(b.ICodeEditorService).getFocusedCodeEditor();return T&&T.hasTextFocus()?this._runEditorCommand(O,T,B):!1}),M.addImplementation(1e3,"generic-dom-input-textarea",(O,B)=>{const T=document.activeElement;return T&&["input","textarea"].indexOf(T.tagName.toLowerCase())>=0?(this.runDOMCommand(),!0):!1}),M.addImplementation(0,"generic-dom",(O,B)=>{const T=O.get(b.ICodeEditorService).getActiveCodeEditor();return T?(T.focus(),this._runEditorCommand(O,T,B)):!1})}_runEditorCommand(M,O,B){const T=this.runEditorCommand(M,O,B);return T||!0}}var S;(function(k){class M extends a{constructor(x){super(x);this._minimalReveal=x.minimalReveal,this._inSelectionMode=x.inSelectionMode}runCoreEditorCommand(x,U){x.model.pushStackElement(),x.setCursorStates(U.source,3,[t.CursorMoveCommands.moveTo(x,x.getPrimaryCursorState(),this._inSelectionMode,U.position,U.viewPosition)])&&x.revealPrimaryCursor(U.source,!0,this._minimalReveal)}}k.MoveTo=(0,w.registerEditorCommand)(new M({id:"_moveTo",minimalReveal:!0,inSelectionMode:!1,precondition:void 0})),k.MoveToSelect=(0,w.registerEditorCommand)(new M({id:"_moveToSelect",minimalReveal:!1,inSelectionMode:!0,precondition:void 0}));class O extends a{runCoreEditorCommand(x,U){x.model.pushStackElement();const Q=this._getColumnSelectResult(x,x.getPrimaryCursorState(),x.getCursorColumnSelectData(),U);x.setCursorStates(U.source,3,Q.viewStates.map(ne=>h.CursorState.fromViewState(ne))),x.setCursorColumnSelectData({isReal:!0,fromViewLineNumber:Q.fromLineNumber,fromViewVisualColumn:Q.fromVisualColumn,toViewLineNumber:Q.toLineNumber,toViewVisualColumn:Q.toVisualColumn}),Q.reversed?x.revealTopMostCursor(U.source):x.revealBottomMostCursor(U.source)}}k.ColumnSelect=(0,w.registerEditorCommand)(new class extends O{constructor(){super({id:"columnSelect",precondition:void 0})}_getColumnSelectResult(Z,x,U,Q){const ne=Z.model.validatePosition(Q.position),ce=Z.coordinatesConverter.validateViewPosition(new n.Position(Q.viewPosition.lineNumber,Q.viewPosition.column),ne),ee=Q.doColumnSelect?U.fromViewLineNumber:ce.lineNumber,ue=Q.doColumnSelect?U.fromViewVisualColumn:Q.mouseColumn-1;return p.ColumnSelection.columnSelect(Z.cursorConfig,Z,ee,ue,ce.lineNumber,Q.mouseColumn-1)}}),k.CursorColumnSelectLeft=(0,w.registerEditorCommand)(new class extends O{constructor(){super({id:"cursorColumnSelectLeft",precondition:void 0,kbOpts:{weight:o,kbExpr:c.EditorContextKeys.textInputFocus,primary:2048|1024|512|15,linux:{primary:0}}})}_getColumnSelectResult(Z,x,U,Q){return p.ColumnSelection.columnSelectLeft(Z.cursorConfig,Z,U)}}),k.CursorColumnSelectRight=(0,w.registerEditorCommand)(new class extends O{constructor(){super({id:"cursorColumnSelectRight",precondition:void 0,kbOpts:{weight:o,kbExpr:c.EditorContextKeys.textInputFocus,primary:2048|1024|512|17,linux:{primary:0}}})}_getColumnSelectResult(Z,x,U,Q){return p.ColumnSelection.columnSelectRight(Z.cursorConfig,Z,U)}});class B extends O{constructor(x){super(x);this._isPaged=x.isPaged}_getColumnSelectResult(x,U,Q,ne){return p.ColumnSelection.columnSelectUp(x.cursorConfig,x,Q,this._isPaged)}}k.CursorColumnSelectUp=(0,w.registerEditorCommand)(new B({isPaged:!1,id:"cursorColumnSelectUp",precondition:void 0,kbOpts:{weight:o,kbExpr:c.EditorContextKeys.textInputFocus,primary:2048|1024|512|16,linux:{primary:0}}})),k.CursorColumnSelectPageUp=(0,w.registerEditorCommand)(new B({isPaged:!0,id:"cursorColumnSelectPageUp",precondition:void 0,kbOpts:{weight:o,kbExpr:c.EditorContextKeys.textInputFocus,primary:2048|1024|512|11,linux:{primary:0}}}));class T extends O{constructor(x){super(x);this._isPaged=x.isPaged}_getColumnSelectResult(x,U,Q,ne){return p.ColumnSelection.columnSelectDown(x.cursorConfig,x,Q,this._isPaged)}}k.CursorColumnSelectDown=(0,w.registerEditorCommand)(new T({isPaged:!1,id:"cursorColumnSelectDown",precondition:void 0,kbOpts:{weight:o,kbExpr:c.EditorContextKeys.textInputFocus,primary:2048|1024|512|18,linux:{primary:0}}})),k.CursorColumnSelectPageDown=(0,w.registerEditorCommand)(new T({isPaged:!0,id:"cursorColumnSelectPageDown",precondition:void 0,kbOpts:{weight:o,kbExpr:c.EditorContextKeys.textInputFocus,primary:2048|1024|512|12,linux:{primary:0}}}));class R extends a{constructor(){super({id:"cursorMove",precondition:void 0,description:t.CursorMove.description})}runCoreEditorCommand(x,U){const Q=t.CursorMove.parse(U);!Q||this._runCursorMove(x,U.source,Q)}_runCursorMove(x,U,Q){x.model.pushStackElement(),x.setCursorStates(U,3,R._move(x,x.getCursorStates(),Q)),x.revealPrimaryCursor(U,!0)}static _move(x,U,Q){const ne=Q.select,ce=Q.value;switch(Q.direction){case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:case 8:case 9:case 10:return t.CursorMoveCommands.simpleMove(x,U,Q.direction,ne,ce,Q.unit);case 11:case 13:case 12:case 14:return t.CursorMoveCommands.viewportMove(x,U,Q.direction,ne,ce);default:return null}}}k.CursorMoveImpl=R,k.CursorMove=(0,w.registerEditorCommand)(new R);class P extends a{constructor(x){super(x);this._staticArgs=x.args}runCoreEditorCommand(x,U){let Q=this._staticArgs;this._staticArgs.value===-1&&(Q={direction:this._staticArgs.direction,unit:this._staticArgs.unit,select:this._staticArgs.select,value:U.pageSize||x.cursorConfig.pageSize}),x.model.pushStackElement(),x.setCursorStates(U.source,3,t.CursorMoveCommands.simpleMove(x,x.getCursorStates(),Q.direction,Q.select,Q.value,Q.unit)),x.revealPrimaryCursor(U.source,!0)}}k.CursorLeft=(0,w.registerEditorCommand)(new P({args:{direction:0,unit:0,select:!1,value:1},id:"cursorLeft",precondition:void 0,kbOpts:{weight:o,kbExpr:c.EditorContextKeys.textInputFocus,primary:15,mac:{primary:15,secondary:[256|32]}}})),k.CursorLeftSelect=(0,w.registerEditorCommand)(new P({args:{direction:0,unit:0,select:!0,value:1},id:"cursorLeftSelect",precondition:void 0,kbOpts:{weight:o,kbExpr:c.EditorContextKeys.textInputFocus,primary:1024|15}})),k.CursorRight=(0,w.registerEditorCommand)(new P({args:{direction:1,unit:0,select:!1,value:1},id:"cursorRight",precondition:void 0,kbOpts:{weight:o,kbExpr:c.EditorContextKeys.textInputFocus,primary:17,mac:{primary:17,secondary:[256|36]}}})),k.CursorRightSelect=(0,w.registerEditorCommand)(new P({args:{direction:1,unit:0,select:!0,value:1},id:"cursorRightSelect",precondition:void 0,kbOpts:{weight:o,kbExpr:c.EditorContextKeys.textInputFocus,primary:1024|17}})),k.CursorUp=(0,w.registerEditorCommand)(new P({args:{direction:2,unit:2,select:!1,value:1},id:"cursorUp",precondition:void 0,kbOpts:{weight:o,kbExpr:c.EditorContextKeys.textInputFocus,primary:16,mac:{primary:16,secondary:[256|46]}}})),k.CursorUpSelect=(0,w.registerEditorCommand)(new P({args:{direction:2,unit:2,select:!0,value:1},id:"cursorUpSelect",precondition:void 0,kbOpts:{weight:o,kbExpr:c.EditorContextKeys.textInputFocus,primary:1024|16,secondary:[2048|1024|16],mac:{primary:1024|16},linux:{primary:1024|16}}})),k.CursorPageUp=(0,w.registerEditorCommand)(new P({args:{direction:2,unit:2,select:!1,value:-1},id:"cursorPageUp",precondition:void 0,kbOpts:{weight:o,kbExpr:c.EditorContextKeys.textInputFocus,primary:11}})),k.CursorPageUpSelect=(0,w.registerEditorCommand)(new P({args:{direction:2,unit:2,select:!0,value:-1},id:"cursorPageUpSelect",precondition:void 0,kbOpts:{weight:o,kbExpr:c.EditorContextKeys.textInputFocus,primary:1024|11}})),k.CursorDown=(0,w.registerEditorCommand)(new P({args:{direction:3,unit:2,select:!1,value:1},id:"cursorDown",precondition:void 0,kbOpts:{weight:o,kbExpr:c.EditorContextKeys.textInputFocus,primary:18,mac:{primary:18,secondary:[256|44]}}})),k.CursorDownSelect=(0,w.registerEditorCommand)(new P({args:{direction:3,unit:2,select:!0,value:1},id:"cursorDownSelect",precondition:void 0,kbOpts:{weight:o,kbExpr:c.EditorContextKeys.textInputFocus,primary:1024|18,secondary:[2048|1024|18],mac:{primary:1024|18},linux:{primary:1024|18}}})),k.CursorPageDown=(0,w.registerEditorCommand)(new P({args:{direction:3,unit:2,select:!1,value:-1},id:"cursorPageDown",precondition:void 0,kbOpts:{weight:o,kbExpr:c.EditorContextKeys.textInputFocus,primary:12}})),k.CursorPageDownSelect=(0,w.registerEditorCommand)(new P({args:{direction:3,unit:2,select:!0,value:-1},id:"cursorPageDownSelect",precondition:void 0,kbOpts:{weight:o,kbExpr:c.EditorContextKeys.textInputFocus,primary:1024|12}})),k.CreateCursor=(0,w.registerEditorCommand)(new class extends a{constructor(){super({id:"createCursor",precondition:void 0})}runCoreEditorCommand(Z,x){let U;x.wholeLine?U=t.CursorMoveCommands.line(Z,Z.getPrimaryCursorState(),!1,x.position,x.viewPosition):U=t.CursorMoveCommands.moveTo(Z,Z.getPrimaryCursorState(),!1,x.position,x.viewPosition);const Q=Z.getCursorStates();if(Q.length>1){const ne=U.modelState?U.modelState.position:null,ce=U.viewState?U.viewState.position:null;for(let ee=0,ue=Q.length;ee<ue;ee++){const z=Q[ee];if(!(ne&&!z.modelState.selection.containsPosition(ne))&&!(ce&&!z.viewState.selection.containsPosition(ce))){Q.splice(ee,1),Z.model.pushStackElement(),Z.setCursorStates(x.source,3,Q);return}}}Q.push(U),Z.model.pushStackElement(),Z.setCursorStates(x.source,3,Q)}}),k.LastCursorMoveToSelect=(0,w.registerEditorCommand)(new class extends a{constructor(){super({id:"_lastCursorMoveToSelect",precondition:void 0})}runCoreEditorCommand(Z,x){const U=Z.getLastAddedCursorIndex(),Q=Z.getCursorStates(),ne=Q.slice(0);ne[U]=t.CursorMoveCommands.moveTo(Z,Q[U],!0,x.position,x.viewPosition),Z.model.pushStackElement(),Z.setCursorStates(x.source,3,ne)}});class F extends a{constructor(x){super(x);this._inSelectionMode=x.inSelectionMode}runCoreEditorCommand(x,U){x.model.pushStackElement(),x.setCursorStates(U.source,3,t.CursorMoveCommands.moveToBeginningOfLine(x,x.getCursorStates(),this._inSelectionMode)),x.revealPrimaryCursor(U.source,!0)}}k.CursorHome=(0,w.registerEditorCommand)(new F({inSelectionMode:!1,id:"cursorHome",precondition:void 0,kbOpts:{weight:o,kbExpr:c.EditorContextKeys.textInputFocus,primary:14,mac:{primary:14,secondary:[2048|15]}}})),k.CursorHomeSelect=(0,w.registerEditorCommand)(new F({inSelectionMode:!0,id:"cursorHomeSelect",precondition:void 0,kbOpts:{weight:o,kbExpr:c.EditorContextKeys.textInputFocus,primary:1024|14,mac:{primary:1024|14,secondary:[2048|1024|15]}}}));class W extends a{constructor(x){super(x);this._inSelectionMode=x.inSelectionMode}runCoreEditorCommand(x,U){x.model.pushStackElement(),x.setCursorStates(U.source,3,this._exec(x.getCursorStates())),x.revealPrimaryCursor(U.source,!0)}_exec(x){const U=[];for(let Q=0,ne=x.length;Q<ne;Q++){const ce=x[Q],ee=ce.modelState.position.lineNumber;U[Q]=h.CursorState.fromModelState(ce.modelState.move(this._inSelectionMode,ee,1,0))}return U}}k.CursorLineStart=(0,w.registerEditorCommand)(new W({inSelectionMode:!1,id:"cursorLineStart",precondition:void 0,kbOpts:{weight:o,kbExpr:c.EditorContextKeys.textInputFocus,primary:0,mac:{primary:256|31}}})),k.CursorLineStartSelect=(0,w.registerEditorCommand)(new W({inSelectionMode:!0,id:"cursorLineStartSelect",precondition:void 0,kbOpts:{weight:o,kbExpr:c.EditorContextKeys.textInputFocus,primary:0,mac:{primary:256|1024|31}}}));class A extends a{constructor(x){super(x);this._inSelectionMode=x.inSelectionMode}runCoreEditorCommand(x,U){x.model.pushStackElement(),x.setCursorStates(U.source,3,t.CursorMoveCommands.moveToEndOfLine(x,x.getCursorStates(),this._inSelectionMode,U.sticky||!1)),x.revealPrimaryCursor(U.source,!0)}}k.CursorEnd=(0,w.registerEditorCommand)(new A({inSelectionMode:!1,id:"cursorEnd",precondition:void 0,kbOpts:{args:{sticky:!1},weight:o,kbExpr:c.EditorContextKeys.textInputFocus,primary:13,mac:{primary:13,secondary:[2048|17]}},description:{description:"Go to End",args:[{name:"args",schema:{type:"object",properties:{sticky:{description:y.localize(0,null),type:"boolean",default:!1}}}}]}})),k.CursorEndSelect=(0,w.registerEditorCommand)(new A({inSelectionMode:!0,id:"cursorEndSelect",precondition:void 0,kbOpts:{args:{sticky:!1},weight:o,kbExpr:c.EditorContextKeys.textInputFocus,primary:1024|13,mac:{primary:1024|13,secondary:[2048|1024|17]}},description:{description:"Select to End",args:[{name:"args",schema:{type:"object",properties:{sticky:{description:y.localize(1,null),type:"boolean",default:!1}}}}]}}));class H extends a{constructor(x){super(x);this._inSelectionMode=x.inSelectionMode}runCoreEditorCommand(x,U){x.model.pushStackElement(),x.setCursorStates(U.source,3,this._exec(x,x.getCursorStates())),x.revealPrimaryCursor(U.source,!0)}_exec(x,U){const Q=[];for(let ne=0,ce=U.length;ne<ce;ne++){const ee=U[ne],ue=ee.modelState.position.lineNumber,z=x.model.getLineMaxColumn(ue);Q[ne]=h.CursorState.fromModelState(ee.modelState.move(this._inSelectionMode,ue,z,0))}return Q}}k.CursorLineEnd=(0,w.registerEditorCommand)(new H({inSelectionMode:!1,id:"cursorLineEnd",precondition:void 0,kbOpts:{weight:o,kbExpr:c.EditorContextKeys.textInputFocus,primary:0,mac:{primary:256|35}}})),k.CursorLineEndSelect=(0,w.registerEditorCommand)(new H({inSelectionMode:!0,id:"cursorLineEndSelect",precondition:void 0,kbOpts:{weight:o,kbExpr:c.EditorContextKeys.textInputFocus,primary:0,mac:{primary:256|1024|35}}}));class q extends a{constructor(x){super(x);this._inSelectionMode=x.inSelectionMode}runCoreEditorCommand(x,U){x.model.pushStackElement(),x.setCursorStates(U.source,3,t.CursorMoveCommands.moveToBeginningOfBuffer(x,x.getCursorStates(),this._inSelectionMode)),x.revealPrimaryCursor(U.source,!0)}}k.CursorTop=(0,w.registerEditorCommand)(new q({inSelectionMode:!1,id:"cursorTop",precondition:void 0,kbOpts:{weight:o,kbExpr:c.EditorContextKeys.textInputFocus,primary:2048|14,mac:{primary:2048|16}}})),k.CursorTopSelect=(0,w.registerEditorCommand)(new q({inSelectionMode:!0,id:"cursorTopSelect",precondition:void 0,kbOpts:{weight:o,kbExpr:c.EditorContextKeys.textInputFocus,primary:2048|1024|14,mac:{primary:2048|1024|16}}}));class X extends a{constructor(x){super(x);this._inSelectionMode=x.inSelectionMode}runCoreEditorCommand(x,U){x.model.pushStackElement(),x.setCursorStates(U.source,3,t.CursorMoveCommands.moveToEndOfBuffer(x,x.getCursorStates(),this._inSelectionMode)),x.revealPrimaryCursor(U.source,!0)}}k.CursorBottom=(0,w.registerEditorCommand)(new X({inSelectionMode:!1,id:"cursorBottom",precondition:void 0,kbOpts:{weight:o,kbExpr:c.EditorContextKeys.textInputFocus,primary:2048|13,mac:{primary:2048|18}}})),k.CursorBottomSelect=(0,w.registerEditorCommand)(new X({inSelectionMode:!0,id:"cursorBottomSelect",precondition:void 0,kbOpts:{weight:o,kbExpr:c.EditorContextKeys.textInputFocus,primary:2048|1024|13,mac:{primary:2048|1024|18}}}));class G extends a{constructor(){super({id:"editorScroll",precondition:void 0,description:d.description})}runCoreEditorCommand(x,U){const Q=d.parse(U);!Q||this._runEditorScroll(x,U.source,Q)}_runEditorScroll(x,U,Q){const ne=this._computeDesiredScrollTop(x,Q);if(Q.revealCursor){const ce=x.getCompletelyVisibleViewRangeAtScrollTop(ne);x.setCursorStates(U,3,[t.CursorMoveCommands.findPositionInViewportIfOutside(x,x.getPrimaryCursorState(),ce,Q.select)])}x.setScrollTop(ne,0)}_computeDesiredScrollTop(x,U){if(U.unit===1){const ce=x.getCompletelyVisibleViewRange(),ee=x.coordinatesConverter.convertViewRangeToModelRange(ce);let ue;U.direction===1?ue=Math.max(1,ee.startLineNumber-U.value):ue=Math.min(x.model.getLineCount(),ee.startLineNumber+U.value);const z=x.coordinatesConverter.convertModelPositionToViewPosition(new n.Position(ue,1));return x.getVerticalOffsetForLineNumber(z.lineNumber)}let Q;U.unit===3?Q=x.cursorConfig.pageSize*U.value:U.unit===4?Q=Math.round(x.cursorConfig.pageSize/2)*U.value:Q=U.value;const ne=(U.direction===1?-1:1)*Q;return x.getScrollTop()+ne*x.cursorConfig.lineHeight}}k.EditorScrollImpl=G,k.EditorScroll=(0,w.registerEditorCommand)(new G),k.ScrollLineUp=(0,w.registerEditorCommand)(new class extends a{constructor(){super({id:"scrollLineUp",precondition:void 0,kbOpts:{weight:o,kbExpr:c.EditorContextKeys.textInputFocus,primary:2048|16,mac:{primary:256|11}}})}runCoreEditorCommand(Z,x){k.EditorScroll._runEditorScroll(Z,x.source,{direction:1,unit:2,value:1,revealCursor:!1,select:!1})}}),k.ScrollPageUp=(0,w.registerEditorCommand)(new class extends a{constructor(){super({id:"scrollPageUp",precondition:void 0,kbOpts:{weight:o,kbExpr:c.EditorContextKeys.textInputFocus,primary:2048|11,win:{primary:512|11},linux:{primary:512|11}}})}runCoreEditorCommand(Z,x){k.EditorScroll._runEditorScroll(Z,x.source,{direction:1,unit:3,value:1,revealCursor:!1,select:!1})}}),k.ScrollLineDown=(0,w.registerEditorCommand)(new class extends a{constructor(){super({id:"scrollLineDown",precondition:void 0,kbOpts:{weight:o,kbExpr:c.EditorContextKeys.textInputFocus,primary:2048|18,mac:{primary:256|12}}})}runCoreEditorCommand(Z,x){k.EditorScroll._runEditorScroll(Z,x.source,{direction:2,unit:2,value:1,revealCursor:!1,select:!1})}}),k.ScrollPageDown=(0,w.registerEditorCommand)(new class extends a{constructor(){super({id:"scrollPageDown",precondition:void 0,kbOpts:{weight:o,kbExpr:c.EditorContextKeys.textInputFocus,primary:2048|12,win:{primary:512|12},linux:{primary:512|12}}})}runCoreEditorCommand(Z,x){k.EditorScroll._runEditorScroll(Z,x.source,{direction:2,unit:3,value:1,revealCursor:!1,select:!1})}});class re extends a{constructor(x){super(x);this._inSelectionMode=x.inSelectionMode}runCoreEditorCommand(x,U){x.model.pushStackElement(),x.setCursorStates(U.source,3,[t.CursorMoveCommands.word(x,x.getPrimaryCursorState(),this._inSelectionMode,U.position)]),x.revealPrimaryCursor(U.source,!0)}}k.WordSelect=(0,w.registerEditorCommand)(new re({inSelectionMode:!1,id:"_wordSelect",precondition:void 0})),k.WordSelectDrag=(0,w.registerEditorCommand)(new re({inSelectionMode:!0,id:"_wordSelectDrag",precondition:void 0})),k.LastCursorWordSelect=(0,w.registerEditorCommand)(new class extends a{constructor(){super({id:"lastCursorWordSelect",precondition:void 0})}runCoreEditorCommand(Z,x){const U=Z.getLastAddedCursorIndex(),Q=Z.getCursorStates(),ne=Q.slice(0),ce=Q[U];ne[U]=t.CursorMoveCommands.word(Z,ce,ce.modelState.hasSelection(),x.position),Z.model.pushStackElement(),Z.setCursorStates(x.source,3,ne)}});class ae extends a{constructor(x){super(x);this._inSelectionMode=x.inSelectionMode}runCoreEditorCommand(x,U){x.model.pushStackElement(),x.setCursorStates(U.source,3,[t.CursorMoveCommands.line(x,x.getPrimaryCursorState(),this._inSelectionMode,U.position,U.viewPosition)]),x.revealPrimaryCursor(U.source,!1)}}k.LineSelect=(0,w.registerEditorCommand)(new ae({inSelectionMode:!1,id:"_lineSelect",precondition:void 0})),k.LineSelectDrag=(0,w.registerEditorCommand)(new ae({inSelectionMode:!0,id:"_lineSelectDrag",precondition:void 0}));class oe extends a{constructor(x){super(x);this._inSelectionMode=x.inSelectionMode}runCoreEditorCommand(x,U){const Q=x.getLastAddedCursorIndex(),ne=x.getCursorStates(),ce=ne.slice(0);ce[Q]=t.CursorMoveCommands.line(x,ne[Q],this._inSelectionMode,U.position,U.viewPosition),x.model.pushStackElement(),x.setCursorStates(U.source,3,ce)}}k.LastCursorLineSelect=(0,w.registerEditorCommand)(new oe({inSelectionMode:!1,id:"lastCursorLineSelect",precondition:void 0})),k.LastCursorLineSelectDrag=(0,w.registerEditorCommand)(new oe({inSelectionMode:!0,id:"lastCursorLineSelectDrag",precondition:void 0})),k.CancelSelection=(0,w.registerEditorCommand)(new class extends a{constructor(){super({id:"cancelSelection",precondition:c.EditorContextKeys.hasNonEmptySelection,kbOpts:{weight:o,kbExpr:c.EditorContextKeys.textInputFocus,primary:9,secondary:[1024|9]}})}runCoreEditorCommand(Z,x){Z.model.pushStackElement(),Z.setCursorStates(x.source,3,[t.CursorMoveCommands.cancelSelection(Z,Z.getPrimaryCursorState())]),Z.revealPrimaryCursor(x.source,!0)}}),k.RemoveSecondaryCursors=(0,w.registerEditorCommand)(new class extends a{constructor(){super({id:"removeSecondaryCursors",precondition:c.EditorContextKeys.hasMultipleSelections,kbOpts:{weight:o+1,kbExpr:c.EditorContextKeys.textInputFocus,primary:9,secondary:[1024|9]}})}runCoreEditorCommand(Z,x){Z.model.pushStackElement(),Z.setCursorStates(x.source,3,[Z.getPrimaryCursorState()]),Z.revealPrimaryCursor(x.source,!0),(0,I.status)(y.localize(2,null))}}),k.RevealLine=(0,w.registerEditorCommand)(new class extends a{constructor(){super({id:"revealLine",precondition:void 0,description:u.description})}runCoreEditorCommand(Z,x){const U=x,Q=U.lineNumber||0;let ne=typeof Q=="number"?Q+1:parseInt(Q)+1;ne<1&&(ne=1);const ce=Z.model.getLineCount();ne>ce&&(ne=ce);const ee=new l.Range(ne,1,ne,Z.model.getLineMaxColumn(ne));let ue=0;if(U.at)switch(U.at){case u.RawAtArgument.Top:ue=3;break;case u.RawAtArgument.Center:ue=1;break;case u.RawAtArgument.Bottom:ue=4;break;default:break}const z=Z.coordinatesConverter.convertModelRangeToViewRange(ee);Z.revealRange(x.source,!1,z,ue,0)}}),k.SelectAll=new class extends f{constructor(){super(w.SelectAllCommand)}runDOMCommand(){m.isFirefox&&(document.activeElement.focus(),document.activeElement.select()),document.execCommand("selectAll")}runEditorCommand(Z,x,U){const Q=x._getViewModel();!Q||this.runCoreEditorCommand(Q,U)}runCoreEditorCommand(Z,x){Z.model.pushStackElement(),Z.setCursorStates("keyboard",3,[t.CursorMoveCommands.selectAll(Z,Z.getPrimaryCursorState())])}},k.SetSelection=(0,w.registerEditorCommand)(new class extends a{constructor(){super({id:"setSelection",precondition:void 0})}runCoreEditorCommand(Z,x){Z.model.pushStackElement(),Z.setCursorStates(x.source,3,[h.CursorState.fromModelSelection(x.selection)])}})})(S=e.CoreNavigationCommands||(e.CoreNavigationCommands={}));const v=r.ContextKeyExpr.and(c.EditorContextKeys.textInputFocus,c.EditorContextKeys.columnSelection);function C(k,M){s.KeybindingsRegistry.registerKeybindingRule({id:k,primary:M,when:v,weight:o+1})}C(S.CursorColumnSelectLeft.id,1024|15),C(S.CursorColumnSelectRight.id,1024|17),C(S.CursorColumnSelectUp.id,1024|16),C(S.CursorColumnSelectPageUp.id,1024|11),C(S.CursorColumnSelectDown.id,1024|18),C(S.CursorColumnSelectPageDown.id,1024|12);function _(k){return k.register(),k}var L;(function(k){class M extends w.EditorCommand{runEditorCommand(B,T,R){const P=T._getViewModel();!P||this.runCoreEditingCommand(T,P,R||{})}}k.CoreEditingCommand=M,k.LineBreakInsert=(0,w.registerEditorCommand)(new class extends M{constructor(){super({id:"lineBreakInsert",precondition:c.EditorContextKeys.writable,kbOpts:{weight:o,kbExpr:c.EditorContextKeys.textInputFocus,primary:0,mac:{primary:256|45}}})}runCoreEditingCommand(O,B,T){O.pushUndoStop(),O.executeCommands(this.id,i.TypeOperations.lineBreakInsert(B.cursorConfig,B.model,B.getCursorStates().map(R=>R.modelState.selection)))}}),k.Outdent=(0,w.registerEditorCommand)(new class extends M{constructor(){super({id:"outdent",precondition:c.EditorContextKeys.writable,kbOpts:{weight:o,kbExpr:r.ContextKeyExpr.and(c.EditorContextKeys.editorTextFocus,c.EditorContextKeys.tabDoesNotMoveFocus),primary:1024|2}})}runCoreEditingCommand(O,B,T){O.pushUndoStop(),O.executeCommands(this.id,i.TypeOperations.outdent(B.cursorConfig,B.model,B.getCursorStates().map(R=>R.modelState.selection))),O.pushUndoStop()}}),k.Tab=(0,w.registerEditorCommand)(new class extends M{constructor(){super({id:"tab",precondition:c.EditorContextKeys.writable,kbOpts:{weight:o,kbExpr:r.ContextKeyExpr.and(c.EditorContextKeys.editorTextFocus,c.EditorContextKeys.tabDoesNotMoveFocus),primary:2}})}runCoreEditingCommand(O,B,T){O.pushUndoStop(),O.executeCommands(this.id,i.TypeOperations.tab(B.cursorConfig,B.model,B.getCursorStates().map(R=>R.modelState.selection))),O.pushUndoStop()}}),k.DeleteLeft=(0,w.registerEditorCommand)(new class extends M{constructor(){super({id:"deleteLeft",precondition:void 0,kbOpts:{weight:o,kbExpr:c.EditorContextKeys.textInputFocus,primary:1,secondary:[1024|1],mac:{primary:1,secondary:[1024|1,256|38,256|1]}}})}runCoreEditingCommand(O,B,T){const[R,P]=g.DeleteOperations.deleteLeft(B.getPrevEditOperationType(),B.cursorConfig,B.model,B.getCursorStates().map(F=>F.modelState.selection),B.getCursorAutoClosedCharacters());R&&O.pushUndoStop(),O.executeCommands(this.id,P),B.setPrevEditOperationType(2)}}),k.DeleteRight=(0,w.registerEditorCommand)(new class extends M{constructor(){super({id:"deleteRight",precondition:void 0,kbOpts:{weight:o,kbExpr:c.EditorContextKeys.textInputFocus,primary:20,mac:{primary:20,secondary:[256|34,256|20]}}})}runCoreEditingCommand(O,B,T){const[R,P]=g.DeleteOperations.deleteRight(B.getPrevEditOperationType(),B.cursorConfig,B.model,B.getCursorStates().map(F=>F.modelState.selection));R&&O.pushUndoStop(),O.executeCommands(this.id,P),B.setPrevEditOperationType(3)}}),k.Undo=new class extends f{constructor(){super(w.UndoCommand)}runDOMCommand(){document.execCommand("undo")}runEditorCommand(O,B,T){if(!(!B.hasModel()||B.getOption(81)===!0))return B.getModel().undo()}},k.Redo=new class extends f{constructor(){super(w.RedoCommand)}runDOMCommand(){document.execCommand("redo")}runEditorCommand(O,B,T){if(!(!B.hasModel()||B.getOption(81)===!0))return B.getModel().redo()}}})(L=e.CoreEditingCommands||(e.CoreEditingCommands={}));class E extends w.Command{constructor(M,O,B){super({id:M,precondition:void 0,description:B});this._handlerId=O}runCommand(M,O){const B=M.get(b.ICodeEditorService).getFocusedCodeEditor();!B||B.trigger("keyboard",this._handlerId,O)}}function N(k,M){_(new E("default:"+k,k)),_(new E(k,k,M))}N("type",{description:"Type",args:[{name:"args",schema:{type:"object",required:["text"],properties:{text:{type:"string"}}}}]}),N("replacePreviousChar"),N("compositionType"),N("compositionStart"),N("compositionEnd"),N("paste"),N("cut")}),define(te[700],ie([1,0,160,11,17]),function(j,e,y,m,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ViewController=void 0;class I{constructor(b,p,h,g){this.configuration=b,this.viewModel=p,this.userInputEvents=h,this.commandDelegate=g}paste(b,p,h,g){this.commandDelegate.paste(b,p,h,g)}type(b){this.commandDelegate.type(b)}compositionType(b,p,h,g){this.commandDelegate.compositionType(b,p,h,g)}compositionStart(){this.commandDelegate.startComposition()}compositionEnd(){this.commandDelegate.endComposition()}cut(){this.commandDelegate.cut()}setSelection(b){y.CoreNavigationCommands.SetSelection.runCoreEditorCommand(this.viewModel,{source:"keyboard",selection:b})}_validateViewColumn(b){const p=this.viewModel.getLineMinColumn(b.lineNumber);return b.column<p?new m.Position(b.lineNumber,p):b}_hasMulticursorModifier(b){switch(this.configuration.options.get(70)){case"altKey":return b.altKey;case"ctrlKey":return b.ctrlKey;case"metaKey":return b.metaKey;default:return!1}}_hasNonMulticursorModifier(b){switch(this.configuration.options.get(70)){case"altKey":return b.ctrlKey||b.metaKey;case"ctrlKey":return b.altKey||b.metaKey;case"metaKey":return b.ctrlKey||b.altKey;default:return!1}}dispatchMouse(b){const p=this.configuration.options,h=D.isLinux&&p.get(96),g=p.get(18);b.middleButton&&!h?this._columnSelect(b.position,b.mouseColumn,b.inSelectionMode):b.startedOnLineNumbers?this._hasMulticursorModifier(b)?b.inSelectionMode?this._lastCursorLineSelect(b.position):this._createCursor(b.position,!0):b.inSelectionMode?this._lineSelectDrag(b.position):this._lineSelect(b.position):b.mouseDownCount>=4?this._selectAll():b.mouseDownCount===3?this._hasMulticursorModifier(b)?b.inSelectionMode?this._lastCursorLineSelectDrag(b.position):this._lastCursorLineSelect(b.position):b.inSelectionMode?this._lineSelectDrag(b.position):this._lineSelect(b.position):b.mouseDownCount===2?this._hasMulticursorModifier(b)?this._lastCursorWordSelect(b.position):b.inSelectionMode?this._wordSelectDrag(b.position):this._wordSelect(b.position):this._hasMulticursorModifier(b)?this._hasNonMulticursorModifier(b)||(b.shiftKey?this._columnSelect(b.position,b.mouseColumn,!0):b.inSelectionMode?this._lastCursorMoveToSelect(b.position):this._createCursor(b.position,!1)):b.inSelectionMode?b.altKey?this._columnSelect(b.position,b.mouseColumn,!0):g?this._columnSelect(b.position,b.mouseColumn,!0):this._moveToSelect(b.position):this.moveTo(b.position)}_usualArgs(b){return b=this._validateViewColumn(b),{source:"mouse",position:this._convertViewToModelPosition(b),viewPosition:b}}moveTo(b){y.CoreNavigationCommands.MoveTo.runCoreEditorCommand(this.viewModel,this._usualArgs(b))}_moveToSelect(b){y.CoreNavigationCommands.MoveToSelect.runCoreEditorCommand(this.viewModel,this._usualArgs(b))}_columnSelect(b,p,h){b=this._validateViewColumn(b),y.CoreNavigationCommands.ColumnSelect.runCoreEditorCommand(this.viewModel,{source:"mouse",position:this._convertViewToModelPosition(b),viewPosition:b,mouseColumn:p,doColumnSelect:h})}_createCursor(b,p){b=this._validateViewColumn(b),y.CoreNavigationCommands.CreateCursor.runCoreEditorCommand(this.viewModel,{source:"mouse",position:this._convertViewToModelPosition(b),viewPosition:b,wholeLine:p})}_lastCursorMoveToSelect(b){y.CoreNavigationCommands.LastCursorMoveToSelect.runCoreEditorCommand(this.viewModel,this._usualArgs(b))}_wordSelect(b){y.CoreNavigationCommands.WordSelect.runCoreEditorCommand(this.viewModel,this._usualArgs(b))}_wordSelectDrag(b){y.CoreNavigationCommands.WordSelectDrag.runCoreEditorCommand(this.viewModel,this._usualArgs(b))}_lastCursorWordSelect(b){y.CoreNavigationCommands.LastCursorWordSelect.runCoreEditorCommand(this.viewModel,this._usualArgs(b))}_lineSelect(b){y.CoreNavigationCommands.LineSelect.runCoreEditorCommand(this.viewModel,this._usualArgs(b))}_lineSelectDrag(b){y.CoreNavigationCommands.LineSelectDrag.runCoreEditorCommand(this.viewModel,this._usualArgs(b))}_lastCursorLineSelect(b){y.CoreNavigationCommands.LastCursorLineSelect.runCoreEditorCommand(this.viewModel,this._usualArgs(b))}_lastCursorLineSelectDrag(b){y.CoreNavigationCommands.LastCursorLineSelectDrag.runCoreEditorCommand(this.viewModel,this._usualArgs(b))}_selectAll(){y.CoreNavigationCommands.SelectAll.runCoreEditorCommand(this.viewModel,{source:"mouse"})}_convertViewToModelPosition(b){return this.viewModel.coordinatesConverter.convertViewPositionToModelPosition(b)}emitKeyDown(b){this.userInputEvents.emitKeyDown(b)}emitKeyUp(b){this.userInputEvents.emitKeyUp(b)}emitContextMenu(b){this.userInputEvents.emitContextMenu(b)}emitMouseMove(b){this.userInputEvents.emitMouseMove(b)}emitMouseLeave(b){this.userInputEvents.emitMouseLeave(b)}emitMouseUp(b){this.userInputEvents.emitMouseUp(b)}emitMouseDown(b){this.userInputEvents.emitMouseDown(b)}emitMouseDrag(b){this.userInputEvents.emitMouseDrag(b)}emitMouseDrop(b){this.userInputEvents.emitMouseDrop(b)}emitMouseDropCanceled(){this.userInputEvents.emitMouseDropCanceled()}emitMouseWheel(b){this.userInputEvents.emitMouseWheel(b)}}e.ViewController=I}),define(te[701],ie([1,0,7,22,30,13,636,645,700,232,509,50,441,643,442,639,182,644,280,637,443,253,444,640,445,646,446,647,641,642,648,447,11,3,116,440,438,123,14,279]),function(j,e,y,m,D,I,w,b,p,h,g,t,i,n,l,c,r,s,o,a,d,u,f,S,v,C,_,L,E,N,k,M,O,B,T,R,P,F,W,A){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.View=void 0;class H extends F.ViewEventHandler{constructor(G,re,ae,oe,Z,x){super();this._selections=[new m.Selection(1,1,1,1)],this._renderAnimationFrame=null;const U=new p.ViewController(re,oe,Z,G);this._context=new R.ViewContext(re,ae.getColorTheme(),oe),this._context.addEventHandler(this),this._register(ae.onDidColorThemeChange($=>{this._context.theme.update($),this._context.model.onDidColorThemeChange(),this.render(!0,!1)})),this._viewParts=[],this._textAreaHandler=new b.TextAreaHandler(this._context,U,this._createTextAreaHandlerHelper()),this._viewParts.push(this._textAreaHandler),this._linesContent=(0,D.createFastDomNode)(document.createElement("div")),this._linesContent.setClassName("lines-content monaco-editor-background"),this._linesContent.setPosition("absolute"),this.domNode=(0,D.createFastDomNode)(document.createElement("div")),this.domNode.setClassName(this._getEditorClassName()),this.domNode.setAttribute("role","code"),this._overflowGuardContainer=(0,D.createFastDomNode)(document.createElement("div")),t.PartFingerprints.write(this._overflowGuardContainer,3),this._overflowGuardContainer.setClassName("overflow-guard"),this._scrollbar=new c.EditorScrollbar(this._context,this._linesContent,this.domNode,this._overflowGuardContainer),this._viewParts.push(this._scrollbar),this._viewLines=new a.ViewLines(this._context,this._linesContent),this._viewZones=new M.ViewZones(this._context),this._viewParts.push(this._viewZones);const Q=new C.DecorationsOverviewRuler(this._context);this._viewParts.push(Q);const ne=new E.ScrollDecorationViewPart(this._context);this._viewParts.push(ne);const ce=new g.ContentViewOverlays(this._context);this._viewParts.push(ce),ce.addDynamicOverlay(new n.CurrentLineHighlightOverlay(this._context)),ce.addDynamicOverlay(new N.SelectionsOverlay(this._context)),ce.addDynamicOverlay(new s.IndentGuidesOverlay(this._context)),ce.addDynamicOverlay(new l.DecorationsOverlay(this._context));const ee=new g.MarginViewOverlays(this._context);this._viewParts.push(ee),ee.addDynamicOverlay(new n.CurrentLineMarginHighlightOverlay(this._context)),ee.addDynamicOverlay(new r.GlyphMarginOverlay(this._context)),ee.addDynamicOverlay(new f.MarginViewLineDecorationsOverlay(this._context)),ee.addDynamicOverlay(new d.LinesDecorationsOverlay(this._context)),ee.addDynamicOverlay(new o.LineNumbersOverlay(this._context));const ue=new u.Margin(this._context);ue.getDomNode().appendChild(this._viewZones.marginDomNode),ue.getDomNode().appendChild(ee.getDomNode()),this._viewParts.push(ue),this._contentWidgets=new i.ViewContentWidgets(this._context,this.domNode),this._viewParts.push(this._contentWidgets),this._viewCursors=new k.ViewCursors(this._context),this._viewParts.push(this._viewCursors),this._overlayWidgets=new v.ViewOverlayWidgets(this._context),this._viewParts.push(this._overlayWidgets);const z=new L.Rulers(this._context);this._viewParts.push(z);const V=new S.Minimap(this._context);if(this._viewParts.push(V),Q){const $=this._scrollbar.getOverviewRulerLayoutInfo();$.parent.insertBefore(Q.getDomNode(),$.insertBefore)}this._linesContent.appendChild(ce.getDomNode()),this._linesContent.appendChild(z.domNode),this._linesContent.appendChild(this._viewZones.domNode),this._linesContent.appendChild(this._viewLines.getDomNode()),this._linesContent.appendChild(this._contentWidgets.domNode),this._linesContent.appendChild(this._viewCursors.getDomNode()),this._overflowGuardContainer.appendChild(ue.getDomNode()),this._overflowGuardContainer.appendChild(this._scrollbar.getDomNode()),this._overflowGuardContainer.appendChild(ne.getDomNode()),this._overflowGuardContainer.appendChild(this._textAreaHandler.textArea),this._overflowGuardContainer.appendChild(this._textAreaHandler.textAreaCover),this._overflowGuardContainer.appendChild(this._overlayWidgets.getDomNode()),this._overflowGuardContainer.appendChild(V.getDomNode()),this.domNode.appendChild(this._overflowGuardContainer),x?x.appendChild(this._contentWidgets.overflowingContentWidgetsDomNode.domNode):this.domNode.appendChild(this._contentWidgets.overflowingContentWidgetsDomNode),this._applyLayout(),this._pointerHandler=this._register(new w.PointerHandler(this._context,U,this._createPointerHandlerHelper()))}_flushAccumulatedAndRenderNow(){this._renderNow()}_createPointerHandlerHelper(){return{viewDomNode:this.domNode.domNode,linesContentDomNode:this._linesContent.domNode,focusTextArea:()=>{this.focus()},dispatchTextAreaEvent:G=>{this._textAreaHandler.textArea.domNode.dispatchEvent(G)},getLastRenderData:()=>{const G=this._viewCursors.getLastRenderData()||[],re=this._textAreaHandler.getLastRenderData();return new A.PointerHandlerLastRenderData(G,re)},shouldSuppressMouseDownOnViewZone:G=>this._viewZones.shouldSuppressMouseDownOnViewZone(G),shouldSuppressMouseDownOnWidget:G=>this._contentWidgets.shouldSuppressMouseDownOnWidget(G),getPositionFromDOMInfo:(G,re)=>(this._flushAccumulatedAndRenderNow(),this._viewLines.getPositionFromDOMInfo(G,re)),visibleRangeForPosition:(G,re)=>(this._flushAccumulatedAndRenderNow(),this._viewLines.visibleRangeForPosition(new O.Position(G,re))),getLineWidth:G=>(this._flushAccumulatedAndRenderNow(),this._viewLines.getLineWidth(G))}}_createTextAreaHandlerHelper(){return{visibleRangeForPosition:G=>(this._flushAccumulatedAndRenderNow(),this._viewLines.visibleRangeForPosition(G))}}_applyLayout(){const re=this._context.configuration.options.get(131);this.domNode.setWidth(re.width),this.domNode.setHeight(re.height),this._overflowGuardContainer.setWidth(re.width),this._overflowGuardContainer.setHeight(re.height),this._linesContent.setWidth(1e6),this._linesContent.setHeight(1e6)}_getEditorClassName(){const G=this._textAreaHandler.isFocused()?" focused":"";return this._context.configuration.options.get(128)+" "+(0,W.getThemeTypeSelector)(this._context.theme.type)+G}handleEvents(G){super.handleEvents(G),this._scheduleRender()}onConfigurationChanged(G){return this.domNode.setClassName(this._getEditorClassName()),this._applyLayout(),!1}onCursorStateChanged(G){return this._selections=G.selections,!1}onFocusChanged(G){return this.domNode.setClassName(this._getEditorClassName()),!1}onThemeChanged(G){return this.domNode.setClassName(this._getEditorClassName()),!1}dispose(){this._renderAnimationFrame!==null&&(this._renderAnimationFrame.dispose(),this._renderAnimationFrame=null),this._contentWidgets.overflowingContentWidgetsDomNode.domNode.remove(),this._context.removeEventHandler(this),this._viewLines.dispose();for(const G of this._viewParts)G.dispose();super.dispose()}_scheduleRender(){this._renderAnimationFrame===null&&(this._renderAnimationFrame=y.runAtThisOrScheduleAtNextAnimationFrame(this._onRenderScheduled.bind(this),100))}_onRenderScheduled(){this._renderAnimationFrame=null,this._flushAccumulatedAndRenderNow()}_renderNow(){q(()=>this._actualRender())}_getViewPartsToRender(){const G=[];let re=0;for(const ae of this._viewParts)ae.shouldRender()&&(G[re++]=ae);return G}_actualRender(){if(!y.isInDOM(this.domNode.domNode))return;let G=this._getViewPartsToRender();if(!this._viewLines.shouldRender()&&G.length===0)return;const re=this._context.viewLayout.getLinesViewportData();this._context.model.setViewport(re.startLineNumber,re.endLineNumber,re.centeredLineNumber);const ae=new P.ViewportData(this._selections,re,this._context.viewLayout.getWhitespaceViewportData(),this._context.model);this._contentWidgets.shouldRender()&&this._contentWidgets.onBeforeRender(ae),this._viewLines.shouldRender()&&(this._viewLines.renderText(ae),this._viewLines.onDidRender(),G=this._getViewPartsToRender());const oe=new T.RenderingContext(this._context.viewLayout,ae,this._viewLines);for(const Z of G)Z.prepareRender(oe);for(const Z of G)Z.render(oe),Z.onDidRender()}delegateVerticalScrollbarMouseDown(G){this._scrollbar.delegateVerticalScrollbarMouseDown(G)}restoreState(G){this._context.model.setScrollPosition({scrollTop:G.scrollTop},1),this._context.model.tokenizeViewport(),this._renderNow(),this._viewLines.updateLineWidths(),this._context.model.setScrollPosition({scrollLeft:G.scrollLeft},1)}getOffsetForColumn(G,re){const ae=this._context.model.validateModelPosition({lineNumber:G,column:re}),oe=this._context.model.coordinatesConverter.convertModelPositionToViewPosition(ae);this._flushAccumulatedAndRenderNow();const Z=this._viewLines.visibleRangeForPosition(new O.Position(oe.lineNumber,oe.column));return Z?Z.left:-1}getTargetAtClientPoint(G,re){const ae=this._pointerHandler.getTargetAtClientPoint(G,re);return ae?h.ViewUserInputEvents.convertViewToModelMouseTarget(ae,this._context.model.coordinatesConverter):null}createOverviewRuler(G){return new _.OverviewRuler(this._context,G)}change(G){this._viewZones.changeViewZones(G),this._scheduleRender()}render(G,re){if(re){this._viewLines.forceShouldRender();for(const ae of this._viewParts)ae.forceShouldRender()}G?this._flushAccumulatedAndRenderNow():this._scheduleRender()}focus(){this._textAreaHandler.focusTextArea()}isFocused(){return this._textAreaHandler.isFocused()}setAriaOptions(G){this._textAreaHandler.setAriaOptions(G)}addContentWidget(G){this._contentWidgets.addWidget(G.widget),this.layoutContentWidget(G),this._scheduleRender()}layoutContentWidget(G){let re=G.position&&G.position.range||null;if(re===null){const oe=G.position?G.position.position:null;oe!==null&&(re=new B.Range(oe.lineNumber,oe.column,oe.lineNumber,oe.column))}const ae=G.position?G.position.preference:null;this._contentWidgets.setWidgetPosition(G.widget,re,ae),this._scheduleRender()}removeContentWidget(G){this._contentWidgets.removeWidget(G.widget),this._scheduleRender()}addOverlayWidget(G){this._overlayWidgets.addWidget(G.widget),this.layoutOverlayWidget(G),this._scheduleRender()}layoutOverlayWidget(G){const re=G.position?G.position.preference:null;this._overlayWidgets.setWidgetPosition(G.widget,re)&&this._scheduleRender()}removeOverlayWidget(G){this._overlayWidgets.removeWidget(G.widget),this._scheduleRender()}}e.View=H;function q(X){try{return X()}catch(G){(0,I.onUnexpectedError)(G)}}}),define(te[702],ie([1,0,59,11,3,22]),function(j,e,y,m,D,I){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Cursor=void 0;class w{constructor(p){this._selTrackedRange=null,this._trackSelection=!0,this._setState(p,new y.SingleCursorState(new D.Range(1,1,1,1),0,new m.Position(1,1),0),new y.SingleCursorState(new D.Range(1,1,1,1),0,new m.Position(1,1),0))}dispose(p){this._removeTrackedRange(p)}startTrackingSelection(p){this._trackSelection=!0,this._updateTrackedRange(p)}stopTrackingSelection(p){this._trackSelection=!1,this._removeTrackedRange(p)}_updateTrackedRange(p){!this._trackSelection||(this._selTrackedRange=p.model._setTrackedRange(this._selTrackedRange,this.modelState.selection,0))}_removeTrackedRange(p){this._selTrackedRange=p.model._setTrackedRange(this._selTrackedRange,null,0)}asCursorState(){return new y.CursorState(this.modelState,this.viewState)}readSelectionFromMarkers(p){const h=p.model._getTrackedRange(this._selTrackedRange);return I.Selection.fromRange(h,this.modelState.selection.getDirection())}ensureValidState(p){this._setState(p,this.modelState,this.viewState)}setState(p,h,g){this._setState(p,h,g)}static _validatePositionWithCache(p,h,g,t){return h.equals(g)?t:p.normalizePosition(h,2)}static _validateViewState(p,h){const g=h.position,t=h.selectionStart.getStartPosition(),i=h.selectionStart.getEndPosition(),n=p.normalizePosition(g,2),l=this._validatePositionWithCache(p,t,g,n),c=this._validatePositionWithCache(p,i,t,l);return g.equals(n)&&t.equals(l)&&i.equals(c)?h:new y.SingleCursorState(D.Range.fromPositions(l,c),h.selectionStartLeftoverVisibleColumns+t.column-l.column,n,h.leftoverVisibleColumns+g.column-n.column)}_setState(p,h,g){if(g&&(g=w._validateViewState(p.viewModel,g)),h){const t=p.model.validateRange(h.selectionStart),i=h.selectionStart.equalsRange(t)?h.selectionStartLeftoverVisibleColumns:0,n=p.model.validatePosition(h.position),l=h.position.equals(n)?h.leftoverVisibleColumns:0;h=new y.SingleCursorState(t,i,n,l)}else{if(!g)return;const t=p.model.validateRange(p.coordinatesConverter.convertViewRangeToModelRange(g.selectionStart)),i=p.model.validatePosition(p.coordinatesConverter.convertViewPositionToModelPosition(g.position));h=new y.SingleCursorState(t,g.selectionStartLeftoverVisibleColumns,i,g.leftoverVisibleColumns)}if(g){const t=p.coordinatesConverter.validateViewRange(g.selectionStart,h.selectionStart),i=p.coordinatesConverter.validateViewPosition(g.position,h.position);g=new y.SingleCursorState(t,h.selectionStartLeftoverVisibleColumns,i,h.leftoverVisibleColumns)}else{const t=p.coordinatesConverter.convertModelPositionToViewPosition(new m.Position(h.selectionStart.startLineNumber,h.selectionStart.startColumn)),i=p.coordinatesConverter.convertModelPositionToViewPosition(new m.Position(h.selectionStart.endLineNumber,h.selectionStart.endColumn)),n=new D.Range(t.lineNumber,t.column,i.lineNumber,i.column),l=p.coordinatesConverter.convertModelPositionToViewPosition(h.position);g=new y.SingleCursorState(n,h.selectionStartLeftoverVisibleColumns,l,h.leftoverVisibleColumns)}this.modelState=h,this.viewState=g,this._updateTrackedRange(p)}}e.Cursor=w}),define(te[703],ie([1,0,19,59,702,11,3,22]),function(j,e,y,m,D,I,w,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CursorCollection=void 0;class p{constructor(g){this.context=g,this.cursors=[new D.Cursor(g)],this.lastAddedCursorIndex=0}dispose(){for(const g of this.cursors)g.dispose(this.context)}startTrackingSelections(){for(const g of this.cursors)g.startTrackingSelection(this.context)}stopTrackingSelections(){for(const g of this.cursors)g.stopTrackingSelection(this.context)}updateContext(g){this.context=g}ensureValidState(){for(const g of this.cursors)g.ensureValidState(this.context)}readSelectionFromMarkers(){return this.cursors.map(g=>g.readSelectionFromMarkers(this.context))}getAll(){return this.cursors.map(g=>g.asCursorState())}getViewPositions(){return this.cursors.map(g=>g.viewState.position)}getTopMostViewPosition(){return(0,y.findMinBy)(this.cursors,(0,y.compareBy)(g=>g.viewState.position,I.Position.compare)).viewState.position}getBottomMostViewPosition(){return(0,y.findLastMaxBy)(this.cursors,(0,y.compareBy)(g=>g.viewState.position,I.Position.compare)).viewState.position}getSelections(){return this.cursors.map(g=>g.modelState.selection)}getViewSelections(){return this.cursors.map(g=>g.viewState.selection)}setSelections(g){this.setStates(m.CursorState.fromModelSelections(g))}getPrimaryCursor(){return this.cursors[0].asCursorState()}setStates(g){g!==null&&(this.cursors[0].setState(this.context,g[0].modelState,g[0].viewState),this._setSecondaryStates(g.slice(1)))}_setSecondaryStates(g){const t=this.cursors.length-1,i=g.length;if(t<i){const n=i-t;for(let l=0;l<n;l++)this._addSecondaryCursor()}else if(t>i){const n=t-i;for(let l=0;l<n;l++)this._removeSecondaryCursor(this.cursors.length-2)}for(let n=0;n<i;n++)this.cursors[n+1].setState(this.context,g[n].modelState,g[n].viewState)}killSecondaryCursors(){this._setSecondaryStates([])}_addSecondaryCursor(){this.cursors.push(new D.Cursor(this.context)),this.lastAddedCursorIndex=this.cursors.length-1}getLastAddedCursorIndex(){return this.cursors.length===1||this.lastAddedCursorIndex===0?0:this.lastAddedCursorIndex}_removeSecondaryCursor(g){this.lastAddedCursorIndex>=g+1&&this.lastAddedCursorIndex--,this.cursors[g+1].dispose(this.context),this.cursors.splice(g+1,1)}normalize(){if(this.cursors.length===1)return;const g=this.cursors.slice(0),t=[];for(let i=0,n=g.length;i<n;i++)t.push({index:i,selection:g[i].modelState.selection});t.sort((0,y.compareBy)(i=>i.selection,w.Range.compareRangesUsingStarts));for(let i=0;i<t.length-1;i++){const n=t[i],l=t[i+1],c=n.selection,r=l.selection;if(!this.context.cursorConfig.multiCursorMergeOverlapping)continue;let s;if(r.isEmpty()||c.isEmpty()?s=r.getStartPosition().isBeforeOrEqual(c.getEndPosition()):s=r.getStartPosition().isBefore(c.getEndPosition()),s){const o=n.index<l.index?i:i+1,a=n.index<l.index?i+1:i,d=t[a].index,u=t[o].index,f=t[a].selection,S=t[o].selection;if(!f.equalsSelection(S)){const v=f.plusRange(S),C=f.selectionStartLineNumber===f.startLineNumber&&f.selectionStartColumn===f.startColumn,_=S.selectionStartLineNumber===S.startLineNumber&&S.selectionStartColumn===S.startColumn;let L;d===this.lastAddedCursorIndex?(L=C,this.lastAddedCursorIndex=u):L=_;let E;L?E=new b.Selection(v.startLineNumber,v.startColumn,v.endLineNumber,v.endColumn):E=new b.Selection(v.endLineNumber,v.endColumn,v.startLineNumber,v.startColumn),t[o].selection=E;const N=m.CursorState.fromModelSelection(E);g[u].setState(this.context,N.modelState,N.viewState)}for(const v of t)v.index>d&&v.index--;g.splice(d,1),t.splice(a,1),this._removeSecondaryCursor(d-1),i--}}}}e.CursorCollection=p}),define(te[290],ie([1,0,13,8,703,59,204,205,3,22,91,183,2,184]),function(j,e,y,m,D,I,w,b,p,h,g,t,i,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CursorsController=void 0;class l extends i.Disposable{constructor(a,d,u,f){super();this._model=a,this._knownModelVersionId=this._model.getVersionId(),this._viewModel=d,this._coordinatesConverter=u,this.context=new I.CursorContext(this._model,this._viewModel,this._coordinatesConverter,f),this._cursors=new D.CursorCollection(this.context),this._hasFocus=!1,this._isHandling=!1,this._isDoingComposition=!1,this._selectionsWhenCompositionStarted=null,this._columnSelectData=null,this._autoClosedActions=[],this._prevEditOperationType=0}dispose(){this._cursors.dispose(),this._autoClosedActions=(0,i.dispose)(this._autoClosedActions),super.dispose()}updateConfiguration(a){this.context=new I.CursorContext(this._model,this._viewModel,this._coordinatesConverter,a),this._cursors.updateContext(this.context)}onLineMappingChanged(a){this._knownModelVersionId===this._model.getVersionId()&&this.setStates(a,"viewModel",0,this.getCursorStates())}setHasFocus(a){this._hasFocus=a}_validateAutoClosedActions(){if(this._autoClosedActions.length>0){const a=this._cursors.getSelections();for(let d=0;d<this._autoClosedActions.length;d++){const u=this._autoClosedActions[d];u.isValid(a)||(u.dispose(),this._autoClosedActions.splice(d,1),d--)}}}getPrimaryCursorState(){return this._cursors.getPrimaryCursor()}getLastAddedCursorIndex(){return this._cursors.getLastAddedCursorIndex()}getCursorStates(){return this._cursors.getAll()}setStates(a,d,u,f){let S=!1;f!==null&&f.length>l.MAX_CURSOR_COUNT&&(f=f.slice(0,l.MAX_CURSOR_COUNT),S=!0);const v=c.from(this._model,this);return this._cursors.setStates(f),this._cursors.normalize(),this._columnSelectData=null,this._validateAutoClosedActions(),this._emitStateChangedIfNecessary(a,d,u,v,S)}setCursorColumnSelectData(a){this._columnSelectData=a}revealPrimary(a,d,u,f,S,v){const C=this._cursors.getViewPositions();let _=null,L=null;C.length>1?L=this._cursors.getViewSelections():_=p.Range.fromPositions(C[0],C[0]),a.emitViewEvent(new t.ViewRevealRangeRequestEvent(d,u,_,L,f,S,v))}saveState(){const a=[],d=this._cursors.getSelections();for(let u=0,f=d.length;u<f;u++){const S=d[u];a.push({inSelectionMode:!S.isEmpty(),selectionStart:{lineNumber:S.selectionStartLineNumber,column:S.selectionStartColumn},position:{lineNumber:S.positionLineNumber,column:S.positionColumn}})}return a}restoreState(a,d){const u=[];for(let f=0,S=d.length;f<S;f++){const v=d[f];let C=1,_=1;v.position&&v.position.lineNumber&&(C=v.position.lineNumber),v.position&&v.position.column&&(_=v.position.column);let L=C,E=_;v.selectionStart&&v.selectionStart.lineNumber&&(L=v.selectionStart.lineNumber),v.selectionStart&&v.selectionStart.column&&(E=v.selectionStart.column),u.push({selectionStartLineNumber:L,selectionStartColumn:E,positionLineNumber:C,positionColumn:_})}this.setStates(a,"restoreState",0,I.CursorState.fromModelSelections(u)),this.revealPrimary(a,"restoreState",!1,0,!0,1)}onModelContentChanged(a,d){if(d instanceof g.ModelInjectedTextChangedEvent){if(this._isHandling)return;this._isHandling=!0;try{this.setStates(a,"modelChange",0,this.getCursorStates())}finally{this._isHandling=!1}}else{if(this._knownModelVersionId=d.versionId,this._isHandling)return;const u=d.containsEvent(1);if(this._prevEditOperationType=0,u)this._cursors.dispose(),this._cursors=new D.CursorCollection(this.context),this._validateAutoClosedActions(),this._emitStateChangedIfNecessary(a,"model",1,null,!1);else if(this._hasFocus&&d.resultingSelection&&d.resultingSelection.length>0){const f=I.CursorState.fromModelSelections(d.resultingSelection);this.setStates(a,"modelChange",d.isUndoing?5:d.isRedoing?6:2,f)&&this.revealPrimary(a,"modelChange",!1,0,!0,0)}else{const f=this._cursors.readSelectionFromMarkers();this.setStates(a,"modelChange",2,I.CursorState.fromModelSelections(f))}}}getSelection(){return this._cursors.getPrimaryCursor().modelState.selection}getTopMostViewPosition(){return this._cursors.getTopMostViewPosition()}getBottomMostViewPosition(){return this._cursors.getBottomMostViewPosition()}getCursorColumnSelectData(){if(this._columnSelectData)return this._columnSelectData;const a=this._cursors.getPrimaryCursor(),d=a.viewState.selectionStart.getStartPosition(),u=a.viewState.position;return{isReal:!1,fromViewLineNumber:d.lineNumber,fromViewVisualColumn:this.context.cursorConfig.visibleColumnFromColumn(this._viewModel,d),toViewLineNumber:u.lineNumber,toViewVisualColumn:this.context.cursorConfig.visibleColumnFromColumn(this._viewModel,u)}}getSelections(){return this._cursors.getSelections()}setSelections(a,d,u,f){this.setStates(a,d,f,I.CursorState.fromModelSelections(u))}getPrevEditOperationType(){return this._prevEditOperationType}setPrevEditOperationType(a){this._prevEditOperationType=a}_pushAutoClosedAction(a,d){const u=[],f=[];for(let C=0,_=a.length;C<_;C++)u.push({range:a[C],options:{description:"auto-closed-character",inlineClassName:"auto-closed-character",stickiness:1}}),f.push({range:d[C],options:{description:"auto-closed-enclosing",stickiness:1}});const S=this._model.deltaDecorations([],u),v=this._model.deltaDecorations([],f);this._autoClosedActions.push(new r(this._model,S,v))}_executeEditOperation(a){if(!a)return;a.shouldPushStackElementBefore&&this._model.pushStackElement();const d=s.executeCommands(this._model,this._cursors.getSelections(),a.commands);if(d){this._interpretCommandResult(d);const u=[],f=[];for(let S=0;S<a.commands.length;S++){const v=a.commands[S];v instanceof b.TypeWithAutoClosingCommand&&v.enclosingRange&&v.closeCharacterRange&&(u.push(v.closeCharacterRange),f.push(v.enclosingRange))}u.length>0&&this._pushAutoClosedAction(u,f),this._prevEditOperationType=a.type}a.shouldPushStackElementAfter&&this._model.pushStackElement()}_interpretCommandResult(a){(!a||a.length===0)&&(a=this._cursors.readSelectionFromMarkers()),this._columnSelectData=null,this._cursors.setSelections(a),this._cursors.normalize()}_emitStateChangedIfNecessary(a,d,u,f,S){const v=c.from(this._model,this);if(v.equals(f))return!1;const C=this._cursors.getSelections(),_=this._cursors.getViewSelections();if(a.emitViewEvent(new t.ViewCursorStateChangedEvent(_,C)),!f||f.cursorState.length!==v.cursorState.length||v.cursorState.some((L,E)=>!L.modelState.equals(f.cursorState[E].modelState))){const L=f?f.cursorState.map(N=>N.modelState.selection):null,E=f?f.modelVersionId:0;a.emitOutgoingEvent(new n.CursorStateChangedEvent(L,C,E,v.modelVersionId,d||"keyboard",u,S))}return!0}_findAutoClosingPairs(a){if(!a.length)return null;const d=[];for(let u=0,f=a.length;u<f;u++){const S=a[u];if(!S.text||S.text.indexOf(`
|
||
`)>=0)return null;const v=S.text.match(/([)\]}>'"`])([^)\]}>'"`]*)$/);if(!v)return null;const C=v[1],_=this.context.cursorConfig.autoClosingPairs.autoClosingPairsCloseSingleChar.get(C);if(!_||_.length!==1)return null;const L=_[0].open,E=S.text.length-v[2].length-1,N=S.text.lastIndexOf(L,E-1);if(N===-1)return null;d.push([N,E])}return d}executeEdits(a,d,u,f){let S=null;d==="snippet"&&(S=this._findAutoClosingPairs(u)),S&&(u[0]._isTracked=!0);const v=[],C=[],_=this._model.pushEditOperations(this.getSelections(),u,L=>{if(S)for(let N=0,k=S.length;N<k;N++){const[M,O]=S[N],B=L[N],T=B.range.startLineNumber,R=B.range.startColumn-1+M,P=B.range.startColumn-1+O;v.push(new p.Range(T,P+1,T,P+2)),C.push(new p.Range(T,R+1,T,P+2))}const E=f(L);return E&&(this._isHandling=!0),E});_&&(this._isHandling=!1,this.setSelections(a,d,_,0)),v.length>0&&this._pushAutoClosedAction(v,C)}_executeEdit(a,d,u,f=0){if(this.context.cursorConfig.readOnly)return;const S=c.from(this._model,this);this._cursors.stopTrackingSelections(),this._isHandling=!0;try{this._cursors.ensureValidState(),a()}catch(v){(0,y.onUnexpectedError)(v)}this._isHandling=!1,this._cursors.startTrackingSelections(),this._validateAutoClosedActions(),this._emitStateChangedIfNecessary(d,u,f,S,!1)&&this.revealPrimary(d,u,!1,0,!0,0)}setIsDoingComposition(a){this._isDoingComposition=a}getAutoClosedCharacters(){return r.getAllAutoClosedCharacters(this._autoClosedActions)}startComposition(a){this._selectionsWhenCompositionStarted=this.getSelections().slice(0)}endComposition(a,d){this._executeEdit(()=>{d==="keyboard"&&(this._executeEditOperation(b.TypeOperations.compositionEndWithInterceptors(this._prevEditOperationType,this.context.cursorConfig,this._model,this._selectionsWhenCompositionStarted,this.getSelections(),this.getAutoClosedCharacters())),this._selectionsWhenCompositionStarted=null)},a,d)}type(a,d,u){this._executeEdit(()=>{if(u==="keyboard"){const f=d.length;let S=0;for(;S<f;){const v=m.nextCharLength(d,S),C=d.substr(S,v);this._executeEditOperation(b.TypeOperations.typeWithInterceptors(this._isDoingComposition,this._prevEditOperationType,this.context.cursorConfig,this._model,this.getSelections(),this.getAutoClosedCharacters(),C)),S+=v}}else this._executeEditOperation(b.TypeOperations.typeWithoutInterceptors(this._prevEditOperationType,this.context.cursorConfig,this._model,this.getSelections(),d))},a,u)}compositionType(a,d,u,f,S,v){if(d.length===0&&u===0&&f===0){if(S!==0){const C=this.getSelections().map(_=>{const L=_.getPosition();return new h.Selection(L.lineNumber,L.column+S,L.lineNumber,L.column+S)});this.setSelections(a,v,C,0)}return}this._executeEdit(()=>{this._executeEditOperation(b.TypeOperations.compositionType(this._prevEditOperationType,this.context.cursorConfig,this._model,this.getSelections(),d,u,f,S))},a,v)}paste(a,d,u,f,S){this._executeEdit(()=>{this._executeEditOperation(b.TypeOperations.paste(this.context.cursorConfig,this._model,this.getSelections(),d,u,f||[]))},a,S,4)}cut(a,d){this._executeEdit(()=>{this._executeEditOperation(w.DeleteOperations.cut(this.context.cursorConfig,this._model,this.getSelections()))},a,d)}executeCommand(a,d,u){this._executeEdit(()=>{this._cursors.killSecondaryCursors(),this._executeEditOperation(new I.EditOperationResult(0,[d],{shouldPushStackElementBefore:!1,shouldPushStackElementAfter:!1}))},a,u)}executeCommands(a,d,u){this._executeEdit(()=>{this._executeEditOperation(new I.EditOperationResult(0,d,{shouldPushStackElementBefore:!1,shouldPushStackElementAfter:!1}))},a,u)}}e.CursorsController=l,l.MAX_CURSOR_COUNT=1e4;class c{constructor(a,d){this.modelVersionId=a,this.cursorState=d}static from(a,d){return new c(a.getVersionId(),d.getCursorStates())}equals(a){if(!a||this.modelVersionId!==a.modelVersionId||this.cursorState.length!==a.cursorState.length)return!1;for(let d=0,u=this.cursorState.length;d<u;d++)if(!this.cursorState[d].equals(a.cursorState[d]))return!1;return!0}}class r{constructor(a,d,u){this._model=a,this._autoClosedCharactersDecorations=d,this._autoClosedEnclosingDecorations=u}static getAllAutoClosedCharacters(a){let d=[];for(const u of a)d=d.concat(u.getAutoClosedCharactersRanges());return d}dispose(){this._autoClosedCharactersDecorations=this._model.deltaDecorations(this._autoClosedCharactersDecorations,[]),this._autoClosedEnclosingDecorations=this._model.deltaDecorations(this._autoClosedEnclosingDecorations,[])}getAutoClosedCharactersRanges(){const a=[];for(let d=0;d<this._autoClosedCharactersDecorations.length;d++){const u=this._model.getDecorationRange(this._autoClosedCharactersDecorations[d]);u&&a.push(u)}return a}isValid(a){const d=[];for(let u=0;u<this._autoClosedEnclosingDecorations.length;u++){const f=this._model.getDecorationRange(this._autoClosedEnclosingDecorations[u]);if(f&&(d.push(f),f.startLineNumber!==f.endLineNumber))return!1}d.sort(p.Range.compareRangesUsingStarts),a.sort(p.Range.compareRangesUsingStarts);for(let u=0;u<a.length;u++)if(u>=d.length||!d[u].strictContainsRange(a[u]))return!1;return!0}}class s{static executeCommands(a,d,u){const f={model:a,selectionsBefore:d,trackedRanges:[],trackedRangesDirection:[]},S=this._innerExecuteCommands(f,u);for(let v=0,C=f.trackedRanges.length;v<C;v++)f.model._setTrackedRange(f.trackedRanges[v],null,0);return S}static _innerExecuteCommands(a,d){if(this._arrayIsEmpty(d))return null;const u=this._getEditOperations(a,d);if(u.operations.length===0)return null;const f=u.operations,S=this._getLoserCursorMap(f);if(S.hasOwnProperty("0"))return console.warn("Ignoring commands"),null;const v=[];for(let L=0,E=f.length;L<E;L++)S.hasOwnProperty(f[L].identifier.major.toString())||v.push(f[L]);u.hadTrackedEditOperation&&v.length>0&&(v[0]._isTracked=!0);let C=a.model.pushEditOperations(a.selectionsBefore,v,L=>{const E=[];for(let M=0;M<a.selectionsBefore.length;M++)E[M]=[];for(const M of L)!M.identifier||E[M.identifier.major].push(M);const N=(M,O)=>M.identifier.minor-O.identifier.minor,k=[];for(let M=0;M<a.selectionsBefore.length;M++)E[M].length>0?(E[M].sort(N),k[M]=d[M].computeCursorState(a.model,{getInverseEditOperations:()=>E[M],getTrackedSelection:O=>{const B=parseInt(O,10),T=a.model._getTrackedRange(a.trackedRanges[B]);return a.trackedRangesDirection[B]===0?new h.Selection(T.startLineNumber,T.startColumn,T.endLineNumber,T.endColumn):new h.Selection(T.endLineNumber,T.endColumn,T.startLineNumber,T.startColumn)}})):k[M]=a.selectionsBefore[M];return k});C||(C=a.selectionsBefore);const _=[];for(let L in S)S.hasOwnProperty(L)&&_.push(parseInt(L,10));_.sort((L,E)=>E-L);for(const L of _)C.splice(L,1);return C}static _arrayIsEmpty(a){for(let d=0,u=a.length;d<u;d++)if(a[d])return!1;return!0}static _getEditOperations(a,d){let u=[],f=!1;for(let S=0,v=d.length;S<v;S++){const C=d[S];if(C){const _=this._getEditOperationsFromCommand(a,S,C);u=u.concat(_.operations),f=f||_.hadTrackedEditOperation}}return{operations:u,hadTrackedEditOperation:f}}static _getEditOperationsFromCommand(a,d,u){const f=[];let S=0;const v=(N,k,M=!1)=>{p.Range.isEmpty(N)&&k===""||f.push({identifier:{major:d,minor:S++},range:N,text:k,forceMoveMarkers:M,isAutoWhitespaceEdit:u.insertsAutoWhitespace})};let C=!1;const E={addEditOperation:v,addTrackedEditOperation:(N,k,M)=>{C=!0,v(N,k,M)},trackSelection:(N,k)=>{const M=h.Selection.liftSelection(N);let O;if(M.isEmpty())if(typeof k=="boolean")k?O=2:O=3;else{const R=a.model.getLineMaxColumn(M.startLineNumber);M.startColumn===R?O=2:O=3}else O=1;const B=a.trackedRanges.length,T=a.model._setTrackedRange(null,M,O);return a.trackedRanges[B]=T,a.trackedRangesDirection[B]=M.getDirection(),B.toString()}};try{u.getEditOperations(a.model,E)}catch(N){return(0,y.onUnexpectedError)(N),{operations:[],hadTrackedEditOperation:!1}}return{operations:f,hadTrackedEditOperation:C}}static _getLoserCursorMap(a){a=a.slice(0),a.sort((u,f)=>-p.Range.compareRangesUsingEnds(u.range,f.range));const d={};for(let u=1;u<a.length;u++){const f=a[u-1],S=a[u];if(p.Range.getStartPosition(f.range).isBefore(p.Range.getEndPosition(S.range))){let v;f.identifier.major>S.identifier.major?v=f.identifier.major:v=S.identifier.major,d[v.toString()]=!0;for(let C=0;C<a.length;C++)a[C].identifier.major===v&&(a.splice(C,1),C<u&&u--,C--);u>0&&u--}}return d}}}),define(te[291],ie([1,0,4,2,17,13,33,145,18,79,35,45,153,40,10,21,14,64,158,112,268,48,281,270,39,32,92,65]),function(j,e,y,m,D,I,w,b,p,h,g,t,i,n,l,c,r,s,o,a,d,u,f,S,v,C,_,L){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ModelSemanticColoring=e.isSemanticColoringEnabled=e.SEMANTIC_HIGHLIGHTING_SETTING_ID=e.ModelService=void 0;function E(A){return A.toString()}function N(A){const H=new a.StringSHA1,q=A.createSnapshot();let X;for(;X=q.read();)H.update(X);return H.digest()}class k{constructor(H,q,X){this._modelEventListeners=new m.DisposableStore,this.model=H,this._languageSelection=null,this._languageSelectionListener=null,this._modelEventListeners.add(H.onWillDispose(()=>q(H))),this._modelEventListeners.add(H.onDidChangeLanguage(G=>X(H,G)))}_disposeLanguageSelection(){this._languageSelectionListener&&(this._languageSelectionListener.dispose(),this._languageSelectionListener=null)}dispose(){this._modelEventListeners.dispose(),this._disposeLanguageSelection()}setLanguage(H){this._disposeLanguageSelection(),this._languageSelection=H,this._languageSelectionListener=this._languageSelection.onDidChange(()=>this.model.setMode(H.languageId)),this.model.setMode(H.languageId)}}const M=D.isLinux||D.isMacintosh?1:2;class O{constructor(H,q,X,G,re,ae,oe,Z){this.uri=H,this.initialUndoRedoSnapshot=q,this.time=X,this.sharesUndoRedoStack=G,this.heapSize=re,this.sha1=ae,this.versionId=oe,this.alternativeVersionId=Z}}let B=class Nt extends m.Disposable{constructor(H,q,X,G,re,ae,oe,Z){super();this._configurationService=H,this._resourcePropertiesService=q,this._themeService=X,this._logService=G,this._undoRedoService=re,this._languageService=ae,this._languageConfigurationService=oe,this._languageFeatureDebounceService=Z,this._onModelAdded=this._register(new y.Emitter),this.onModelAdded=this._onModelAdded.event,this._onModelRemoved=this._register(new y.Emitter),this.onModelRemoved=this._onModelRemoved.event,this._onModelModeChanged=this._register(new y.Emitter),this.onModelLanguageChanged=this._onModelModeChanged.event,this._modelCreationOptionsByLanguageAndResource=Object.create(null),this._models={},this._disposedModels=new Map,this._disposedModelsHeapSize=0,this._semanticStyling=this._register(new P(this._themeService,this._languageService,this._logService)),this._register(this._configurationService.onDidChangeConfiguration(()=>this._updateModelOptions())),this._updateModelOptions(),this._register(new R(this._semanticStyling,this,this._themeService,this._configurationService,this._languageFeatureDebounceService))}static _readModelOptions(H,q){var X;let G=b.EDITOR_MODEL_DEFAULTS.tabSize;if(H.editor&&typeof H.editor.tabSize!="undefined"){const ce=parseInt(H.editor.tabSize,10);isNaN(ce)||(G=ce),G<1&&(G=1)}let re=G;if(H.editor&&typeof H.editor.indentSize!="undefined"&&H.editor.indentSize!=="tabSize"){const ce=parseInt(H.editor.indentSize,10);isNaN(ce)||(re=ce),re<1&&(re=1)}let ae=b.EDITOR_MODEL_DEFAULTS.insertSpaces;H.editor&&typeof H.editor.insertSpaces!="undefined"&&(ae=H.editor.insertSpaces==="false"?!1:Boolean(H.editor.insertSpaces));let oe=M;const Z=H.eol;Z===`\r
|
||
`?oe=2:Z===`
|
||
`&&(oe=1);let x=b.EDITOR_MODEL_DEFAULTS.trimAutoWhitespace;H.editor&&typeof H.editor.trimAutoWhitespace!="undefined"&&(x=H.editor.trimAutoWhitespace==="false"?!1:Boolean(H.editor.trimAutoWhitespace));let U=b.EDITOR_MODEL_DEFAULTS.detectIndentation;H.editor&&typeof H.editor.detectIndentation!="undefined"&&(U=H.editor.detectIndentation==="false"?!1:Boolean(H.editor.detectIndentation));let Q=b.EDITOR_MODEL_DEFAULTS.largeFileOptimizations;H.editor&&typeof H.editor.largeFileOptimizations!="undefined"&&(Q=H.editor.largeFileOptimizations==="false"?!1:Boolean(H.editor.largeFileOptimizations));let ne=b.EDITOR_MODEL_DEFAULTS.bracketPairColorizationOptions;return((X=H.editor)===null||X===void 0?void 0:X.bracketPairColorization)&&typeof H.editor.bracketPairColorization=="object"&&(ne={enabled:!!H.editor.bracketPairColorization.enabled}),{isForSimpleWidget:q,tabSize:G,indentSize:re,insertSpaces:ae,detectIndentation:U,defaultEOL:oe,trimAutoWhitespace:x,largeFileOptimizations:Q,bracketPairColorizationOptions:ne}}_getEOL(H,q){if(H)return this._resourcePropertiesService.getEOL(H,q);const X=this._configurationService.getValue("files.eol",{overrideIdentifier:q});return X&&typeof X=="string"&&X!=="auto"?X:D.OS===3||D.OS===2?`
|
||
`:`\r
|
||
`}_shouldRestoreUndoStack(){const H=this._configurationService.getValue("files.restoreUndoStack");return typeof H=="boolean"?H:!0}getCreationOptions(H,q,X){let G=this._modelCreationOptionsByLanguageAndResource[H+q];if(!G){const re=this._configurationService.getValue("editor",{overrideIdentifier:H,resource:q}),ae=this._getEOL(q,H);G=Nt._readModelOptions({editor:re,eol:ae},X),this._modelCreationOptionsByLanguageAndResource[H+q]=G}return G}_updateModelOptions(){const H=this._modelCreationOptionsByLanguageAndResource;this._modelCreationOptionsByLanguageAndResource=Object.create(null);const q=Object.keys(this._models);for(let X=0,G=q.length;X<G;X++){const re=q[X],ae=this._models[re],oe=ae.model.getLanguageId(),Z=ae.model.uri,x=H[oe+Z],U=this.getCreationOptions(oe,Z,ae.model.isForSimpleWidget);Nt._setModelOptionsForModel(ae.model,U,x)}}static _setModelOptionsForModel(H,q,X){X&&X.defaultEOL!==q.defaultEOL&&H.getLineCount()===1&&H.setEOL(q.defaultEOL===1?0:1),!(X&&X.detectIndentation===q.detectIndentation&&X.insertSpaces===q.insertSpaces&&X.tabSize===q.tabSize&&X.indentSize===q.indentSize&&X.trimAutoWhitespace===q.trimAutoWhitespace&&(0,v.equals)(X.bracketPairColorizationOptions,q.bracketPairColorizationOptions))&&(q.detectIndentation?(H.detectIndentation(q.insertSpaces,q.tabSize),H.updateOptions({trimAutoWhitespace:q.trimAutoWhitespace,bracketColorizationOptions:q.bracketPairColorizationOptions})):H.updateOptions({insertSpaces:q.insertSpaces,tabSize:q.tabSize,indentSize:q.indentSize,trimAutoWhitespace:q.trimAutoWhitespace,bracketColorizationOptions:q.bracketPairColorizationOptions}))}_insertDisposedModel(H){this._disposedModels.set(E(H.uri),H),this._disposedModelsHeapSize+=H.heapSize}_removeDisposedModel(H){const q=this._disposedModels.get(E(H));return q&&(this._disposedModelsHeapSize-=q.heapSize),this._disposedModels.delete(E(H)),q}_ensureDisposedModelsHeapSize(H){if(this._disposedModelsHeapSize>H){const q=[];for(this._disposedModels.forEach(X=>{X.sharesUndoRedoStack||q.push(X)}),q.sort((X,G)=>X.time-G.time);q.length>0&&this._disposedModelsHeapSize>H;){const X=q.shift();this._removeDisposedModel(X.uri),X.initialUndoRedoSnapshot!==null&&this._undoRedoService.restoreSnapshot(X.initialUndoRedoSnapshot)}}}_createModelData(H,q,X,G){const re=this.getCreationOptions(q,X,G),ae=new w.TextModel(H,q,re,X,this._undoRedoService,this._languageService,this._languageConfigurationService);if(X&&this._disposedModels.has(E(X))){const x=this._removeDisposedModel(X),U=this._undoRedoService.getElements(X),Q=N(ae)===x.sha1;if(Q||x.sharesUndoRedoStack){for(const ne of U.past)(0,d.isEditStackElement)(ne)&&ne.matchesResource(X)&&ne.setModel(ae);for(const ne of U.future)(0,d.isEditStackElement)(ne)&&ne.matchesResource(X)&&ne.setModel(ae);this._undoRedoService.setElementsValidFlag(X,!0,ne=>(0,d.isEditStackElement)(ne)&&ne.matchesResource(X)),Q&&(ae._overwriteVersionId(x.versionId),ae._overwriteAlternativeVersionId(x.alternativeVersionId),ae._overwriteInitialUndoRedoSnapshot(x.initialUndoRedoSnapshot))}else x.initialUndoRedoSnapshot!==null&&this._undoRedoService.restoreSnapshot(x.initialUndoRedoSnapshot)}const oe=E(ae.uri);if(this._models[oe])throw new Error("ModelService: Cannot add model because it already exists!");const Z=new k(ae,x=>this._onWillDispose(x),(x,U)=>this._onDidChangeLanguage(x,U));return this._models[oe]=Z,Z}createModel(H,q,X,G=!1){let re;return q?(re=this._createModelData(H,q.languageId,X,G),this.setMode(re.model,q)):re=this._createModelData(H,h.PLAINTEXT_LANGUAGE_ID,X,G),this._onModelAdded.fire(re.model),re.model}setMode(H,q){if(!q)return;const X=this._models[E(H.uri)];!X||X.setLanguage(q)}getModels(){const H=[],q=Object.keys(this._models);for(let X=0,G=q.length;X<G;X++){const re=q[X];H.push(this._models[re].model)}return H}getModel(H){const q=E(H),X=this._models[q];return X?X.model:null}getSemanticTokensProviderStyling(H){return this._semanticStyling.get(H)}_schemaShouldMaintainUndoRedoElements(H){return H.scheme===u.Schemas.file||H.scheme===u.Schemas.vscodeRemote||H.scheme===u.Schemas.userData||H.scheme===u.Schemas.vscodeNotebookCell||H.scheme==="fake-fs"}_onWillDispose(H){const q=E(H.uri),X=this._models[q],G=this._undoRedoService.getUriComparisonKey(H.uri)!==H.uri.toString();let re=!1,ae=0;if(G||this._shouldRestoreUndoStack()&&this._schemaShouldMaintainUndoRedoElements(H.uri)){const Z=this._undoRedoService.getElements(H.uri);if(Z.past.length>0||Z.future.length>0){for(const x of Z.past)(0,d.isEditStackElement)(x)&&x.matchesResource(H.uri)&&(re=!0,ae+=x.heapSize(H.uri),x.setModel(H.uri));for(const x of Z.future)(0,d.isEditStackElement)(x)&&x.matchesResource(H.uri)&&(re=!0,ae+=x.heapSize(H.uri),x.setModel(H.uri))}}const oe=Nt.MAX_MEMORY_FOR_CLOSED_FILES_UNDO_STACK;if(re)if(!G&&ae>oe){const Z=X.model.getInitialUndoRedoSnapshot();Z!==null&&this._undoRedoService.restoreSnapshot(Z)}else this._ensureDisposedModelsHeapSize(oe-ae),this._undoRedoService.setElementsValidFlag(H.uri,!1,Z=>(0,d.isEditStackElement)(Z)&&Z.matchesResource(H.uri)),this._insertDisposedModel(new O(H.uri,X.model.getInitialUndoRedoSnapshot(),Date.now(),G,ae,N(H),H.getVersionId(),H.getAlternativeVersionId()));else if(!G){const Z=X.model.getInitialUndoRedoSnapshot();Z!==null&&this._undoRedoService.restoreSnapshot(Z)}delete this._models[q],X.dispose(),delete this._modelCreationOptionsByLanguageAndResource[H.getLanguageId()+H.uri],this._onModelRemoved.fire(H)}_onDidChangeLanguage(H,q){const X=q.oldLanguage,G=H.getLanguageId(),re=this.getCreationOptions(X,H.uri,H.isForSimpleWidget),ae=this.getCreationOptions(G,H.uri,H.isForSimpleWidget);Nt._setModelOptionsForModel(H,ae,re),this._onModelModeChanged.fire({model:H,oldLanguageId:X})}};B.MAX_MEMORY_FOR_CLOSED_FILES_UNDO_STACK=20*1024*1024,B=Ie([Ce(0,n.IConfigurationService),Ce(1,i.ITextResourcePropertiesService),Ce(2,r.IThemeService),Ce(3,s.ILogService),Ce(4,o.IUndoRedoService),Ce(5,g.ILanguageService),Ce(6,C.ILanguageConfigurationService),Ce(7,_.ILanguageFeatureDebounceService)],B),e.ModelService=B,e.SEMANTIC_HIGHLIGHTING_SETTING_ID="editor.semanticHighlighting";function T(A,H,q){var X;const G=(X=q.getValue(e.SEMANTIC_HIGHLIGHTING_SETTING_ID,{overrideIdentifier:A.getLanguageId(),resource:A.uri}))===null||X===void 0?void 0:X.enabled;return typeof G=="boolean"?G:H.getColorTheme().semanticHighlighting}e.isSemanticColoringEnabled=T;let R=class extends m.Disposable{constructor(H,q,X,G,re){super();this._watchers=Object.create(null),this._semanticStyling=H;const ae=x=>{this._watchers[x.uri.toString()]=new W(x,this._semanticStyling,X,re)},oe=(x,U)=>{U.dispose(),delete this._watchers[x.uri.toString()]},Z=()=>{for(let x of q.getModels()){const U=this._watchers[x.uri.toString()];T(x,X,G)?U||ae(x):U&&oe(x,U)}};this._register(q.onModelAdded(x=>{T(x,X,G)&&ae(x)})),this._register(q.onModelRemoved(x=>{const U=this._watchers[x.uri.toString()];U&&oe(x,U)})),this._register(G.onDidChangeConfiguration(x=>{x.affectsConfiguration(e.SEMANTIC_HIGHLIGHTING_SETTING_ID)&&Z()})),this._register(X.onDidColorThemeChange(Z))}};R=Ie([Ce(1,t.IModelService),Ce(2,r.IThemeService),Ce(3,n.IConfigurationService),Ce(4,_.ILanguageFeatureDebounceService)],R);class P extends m.Disposable{constructor(H,q,X){super();this._themeService=H,this._languageService=q,this._logService=X,this._caches=new WeakMap,this._register(this._themeService.onDidColorThemeChange(()=>{this._caches=new WeakMap}))}get(H){return this._caches.has(H)||this._caches.set(H,new f.SemanticTokensProviderStyling(H.getLegend(),this._themeService,this._languageService,this._logService)),this._caches.get(H)}}class F{constructor(H,q,X){this.provider=H,this.resultId=q,this.data=X}dispose(){this.provider.releaseDocumentSemanticTokens(this.resultId)}}let W=class Lt extends m.Disposable{constructor(H,q,X,G){super();this._isDisposed=!1,this._model=H,this._semanticStyling=q,this._debounceInformation=G.for(p.DocumentSemanticTokensProviderRegistry,"DocumentSemanticTokens",{min:Lt.REQUEST_MIN_DELAY,max:Lt.REQUEST_MAX_DELAY}),this._fetchDocumentSemanticTokens=this._register(new l.RunOnceScheduler(()=>this._fetchDocumentSemanticTokensNow(),Lt.REQUEST_MIN_DELAY)),this._currentDocumentResponse=null,this._currentDocumentRequestCancellationTokenSource=null,this._documentProvidersChangeListeners=[],this._register(this._model.onDidChangeContent(()=>{this._fetchDocumentSemanticTokens.isScheduled()||this._fetchDocumentSemanticTokens.schedule(this._debounceInformation.get(this._model))})),this._register(this._model.onDidChangeLanguage(()=>{this._currentDocumentResponse&&(this._currentDocumentResponse.dispose(),this._currentDocumentResponse=null),this._currentDocumentRequestCancellationTokenSource&&(this._currentDocumentRequestCancellationTokenSource.cancel(),this._currentDocumentRequestCancellationTokenSource=null),this._setDocumentSemanticTokens(null,null,null,[]),this._fetchDocumentSemanticTokens.schedule(0)}));const re=()=>{(0,m.dispose)(this._documentProvidersChangeListeners),this._documentProvidersChangeListeners=[];for(const ae of p.DocumentSemanticTokensProviderRegistry.all(H))typeof ae.onDidChange=="function"&&this._documentProvidersChangeListeners.push(ae.onDidChange(()=>this._fetchDocumentSemanticTokens.schedule(0)))};re(),this._register(p.DocumentSemanticTokensProviderRegistry.onDidChange(()=>{re(),this._fetchDocumentSemanticTokens.schedule(this._debounceInformation.get(this._model))})),this._register(X.onDidColorThemeChange(ae=>{this._setDocumentSemanticTokens(null,null,null,[]),this._fetchDocumentSemanticTokens.schedule(this._debounceInformation.get(this._model))})),this._fetchDocumentSemanticTokens.schedule(0)}dispose(){this._currentDocumentResponse&&(this._currentDocumentResponse.dispose(),this._currentDocumentResponse=null),this._currentDocumentRequestCancellationTokenSource&&(this._currentDocumentRequestCancellationTokenSource.cancel(),this._currentDocumentRequestCancellationTokenSource=null),this._setDocumentSemanticTokens(null,null,null,[]),this._isDisposed=!0,super.dispose()}_fetchDocumentSemanticTokensNow(){if(this._currentDocumentRequestCancellationTokenSource)return;if(!(0,S.hasDocumentSemanticTokensProvider)(this._model)){this._currentDocumentResponse&&this._model.setSemanticTokens(null,!1);return}const H=new c.CancellationTokenSource,q=this._currentDocumentResponse?this._currentDocumentResponse.provider:null,X=this._currentDocumentResponse&&this._currentDocumentResponse.resultId||null,G=(0,S.getDocumentSemanticTokens)(this._model,q,X,H.token);this._currentDocumentRequestCancellationTokenSource=H;const re=[],ae=this._model.onDidChangeContent(Z=>{re.push(Z)}),oe=new L.StopWatch(!1);G.then(Z=>{if(this._debounceInformation.update(this._model,oe.elapsed()),this._currentDocumentRequestCancellationTokenSource=null,ae.dispose(),!Z)this._setDocumentSemanticTokens(null,null,null,re);else{const{provider:x,tokens:U}=Z,Q=this._semanticStyling.get(x);this._setDocumentSemanticTokens(x,U||null,Q,re)}},Z=>{Z&&(I.isCancellationError(Z)||typeof Z.message=="string"&&Z.message.indexOf("busy")!==-1)||I.onUnexpectedError(Z),this._currentDocumentRequestCancellationTokenSource=null,ae.dispose(),re.length>0&&(this._fetchDocumentSemanticTokens.isScheduled()||this._fetchDocumentSemanticTokens.schedule(this._debounceInformation.get(this._model)))})}static _copy(H,q,X,G,re){for(let ae=0;ae<re;ae++)X[G+ae]=H[q+ae]}_setDocumentSemanticTokens(H,q,X,G){const re=this._currentDocumentResponse,ae=()=>{G.length>0&&!this._fetchDocumentSemanticTokens.isScheduled()&&this._fetchDocumentSemanticTokens.schedule(this._debounceInformation.get(this._model))};if(this._currentDocumentResponse&&(this._currentDocumentResponse.dispose(),this._currentDocumentResponse=null),this._isDisposed){H&&q&&H.releaseDocumentSemanticTokens(q.resultId);return}if(!H||!X){this._model.setSemanticTokens(null,!1);return}if(!q){this._model.setSemanticTokens(null,!0),ae();return}if((0,S.isSemanticTokensEdits)(q)){if(!re){this._model.setSemanticTokens(null,!0);return}if(q.edits.length===0)q={resultId:q.resultId,data:re.data};else{let oe=0;for(const ne of q.edits)oe+=(ne.data?ne.data.length:0)-ne.deleteCount;const Z=re.data,x=new Uint32Array(Z.length+oe);let U=Z.length,Q=x.length;for(let ne=q.edits.length-1;ne>=0;ne--){const ce=q.edits[ne],ee=U-(ce.start+ce.deleteCount);ee>0&&(Lt._copy(Z,U-ee,x,Q-ee,ee),Q-=ee),ce.data&&(Lt._copy(ce.data,0,x,Q-ce.data.length,ce.data.length),Q-=ce.data.length),U=ce.start}U>0&&Lt._copy(Z,0,x,0,U),q={resultId:q.resultId,data:x}}}if((0,S.isSemanticTokens)(q)){this._currentDocumentResponse=new F(H,q.resultId,q.data);const oe=(0,f.toMultilineTokens2)(q,X,this._model.getLanguageId());if(G.length>0)for(const Z of G)for(const x of oe)for(const U of Z.changes)x.applyEdit(U.range,U.text);this._model.setSemanticTokens(oe,!0)}else this._model.setSemanticTokens(null,!0);ae()}};W.REQUEST_MIN_DELAY=300,W.REQUEST_MAX_DELAY=2e3,W=Ie([Ce(2,r.IThemeService),Ce(3,_.ILanguageFeatureDebounceService)],W),e.ModelSemanticColoring=W}),define(te[704],ie([1,0,19,11,3,180,33,91,183,448,242,69]),function(j,e,y,m,D,I,w,b,p,h,g,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ViewModelLinesFromModelAsIs=e.ViewModelLinesFromProjectedModel=void 0;class i{constructor(d,u,f,S,v,C,_,L,E){this._editorId=d,this.model=u,this._validModelVersionId=-1,this._domLineBreaksComputerFactory=f,this._monospaceLineBreaksComputerFactory=S,this.fontInfo=v,this.tabSize=C,this.wrappingStrategy=_,this.wrappingColumn=L,this.wrappingIndent=E,this._constructLines(!0,null)}dispose(){this.hiddenAreasDecorationIds=this.model.deltaDecorations(this.hiddenAreasDecorationIds,[])}createCoordinatesConverter(){return new r(this)}_constructLines(d,u){this.modelLineProjections=[],d&&(this.hiddenAreasDecorationIds=this.model.deltaDecorations(this.hiddenAreasDecorationIds,[]));const f=this.model.getLinesContent(),S=this.model.getInjectedTextDecorations(this._editorId),v=f.length,C=this.createLineBreaksComputer(),_=new y.ArrayQueue(b.LineInjectedText.fromDecorations(S));for(let T=0;T<v;T++){const R=_.takeWhile(P=>P.lineNumber===T+1);C.addRequest(f[T],R,u?u[T]:null)}const L=C.finalize(),E=[],N=this.hiddenAreasDecorationIds.map(T=>this.model.getDecorationRange(T)).sort(D.Range.compareRangesUsingStarts);let k=1,M=0,O=-1,B=O+1<N.length?M+1:v+2;for(let T=0;T<v;T++){const R=T+1;R===B&&(O++,k=N[O].startLineNumber,M=N[O].endLineNumber,B=O+1<N.length?M+1:v+2);const P=R>=k&&R<=M,F=(0,h.createModelLineProjection)(L[T],!P);E[T]=F.getViewLineCount(),this.modelLineProjections[T]=F}this._validModelVersionId=this.model.getVersionId(),this.projectedModelLineLineCounts=new g.ConstantTimePrefixSumComputer(E)}getHiddenAreas(){return this.hiddenAreasDecorationIds.map(d=>this.model.getDecorationRange(d))}setHiddenAreas(d){const u=d.map(M=>this.model.validateRange(M)),f=n(u),S=this.hiddenAreasDecorationIds.map(M=>this.model.getDecorationRange(M)).sort(D.Range.compareRangesUsingStarts);if(f.length===S.length){let M=!1;for(let O=0;O<f.length;O++)if(!f[O].equalsRange(S[O])){M=!0;break}if(!M)return!1}const v=f.map(M=>({range:M,options:w.ModelDecorationOptions.EMPTY}));this.hiddenAreasDecorationIds=this.model.deltaDecorations(this.hiddenAreasDecorationIds,v);const C=f;let _=1,L=0,E=-1,N=E+1<C.length?L+1:this.modelLineProjections.length+2,k=!1;for(let M=0;M<this.modelLineProjections.length;M++){const O=M+1;O===N&&(E++,_=C[E].startLineNumber,L=C[E].endLineNumber,N=E+1<C.length?L+1:this.modelLineProjections.length+2);let B=!1;if(O>=_&&O<=L?this.modelLineProjections[M].isVisible()&&(this.modelLineProjections[M]=this.modelLineProjections[M].setVisible(!1),B=!0):(k=!0,this.modelLineProjections[M].isVisible()||(this.modelLineProjections[M]=this.modelLineProjections[M].setVisible(!0),B=!0)),B){const T=this.modelLineProjections[M].getViewLineCount();this.projectedModelLineLineCounts.setValue(M,T)}}return k||this.setHiddenAreas([]),!0}modelPositionIsVisible(d,u){return d<1||d>this.modelLineProjections.length?!1:this.modelLineProjections[d-1].isVisible()}getModelLineViewLineCount(d){return d<1||d>this.modelLineProjections.length?1:this.modelLineProjections[d-1].getViewLineCount()}setTabSize(d){return this.tabSize===d?!1:(this.tabSize=d,this._constructLines(!1,null),!0)}setWrappingSettings(d,u,f,S){const v=this.fontInfo.equals(d),C=this.wrappingStrategy===u,_=this.wrappingColumn===f,L=this.wrappingIndent===S;if(v&&C&&_&&L)return!1;const E=v&&C&&!_&&L;this.fontInfo=d,this.wrappingStrategy=u,this.wrappingColumn=f,this.wrappingIndent=S;let N=null;if(E){N=[];for(let k=0,M=this.modelLineProjections.length;k<M;k++)N[k]=this.modelLineProjections[k].getProjectionData()}return this._constructLines(!1,N),!0}createLineBreaksComputer(){return(this.wrappingStrategy==="advanced"?this._domLineBreaksComputerFactory:this._monospaceLineBreaksComputerFactory).createLineBreaksComputer(this.fontInfo,this.tabSize,this.wrappingColumn,this.wrappingIndent)}onModelFlushed(){this._constructLines(!0,null)}onModelLinesDeleted(d,u,f){if(!d||d<=this._validModelVersionId)return null;const S=u===1?1:this.projectedModelLineLineCounts.getPrefixSum(u-1)+1,v=this.projectedModelLineLineCounts.getPrefixSum(f);return this.modelLineProjections.splice(u-1,f-u+1),this.projectedModelLineLineCounts.removeValues(u-1,f-u+1),new p.ViewLinesDeletedEvent(S,v)}onModelLinesInserted(d,u,f,S){if(!d||d<=this._validModelVersionId)return null;const v=u>2&&!this.modelLineProjections[u-2].isVisible(),C=u===1?1:this.projectedModelLineLineCounts.getPrefixSum(u-1)+1;let _=0;const L=[],E=[];for(let N=0,k=S.length;N<k;N++){const M=(0,h.createModelLineProjection)(S[N],!v);L.push(M);const O=M.getViewLineCount();_+=O,E[N]=O}return this.modelLineProjections=this.modelLineProjections.slice(0,u-1).concat(L).concat(this.modelLineProjections.slice(u-1)),this.projectedModelLineLineCounts.insertValues(u-1,E),new p.ViewLinesInsertedEvent(C,C+_-1)}onModelLineChanged(d,u,f){if(d!==null&&d<=this._validModelVersionId)return[!1,null,null,null];const S=u-1,v=this.modelLineProjections[S].getViewLineCount(),C=this.modelLineProjections[S].isVisible(),_=(0,h.createModelLineProjection)(f,C);this.modelLineProjections[S]=_;const L=this.modelLineProjections[S].getViewLineCount();let E=!1,N=0,k=-1,M=0,O=-1,B=0,T=-1;v>L?(N=this.projectedModelLineLineCounts.getPrefixSum(u-1)+1,k=N+L-1,B=k+1,T=B+(v-L)-1,E=!0):v<L?(N=this.projectedModelLineLineCounts.getPrefixSum(u-1)+1,k=N+v-1,M=k+1,O=M+(L-v)-1,E=!0):(N=this.projectedModelLineLineCounts.getPrefixSum(u-1)+1,k=N+L-1),this.projectedModelLineLineCounts.setValue(S,L);const R=N<=k?new p.ViewLinesChangedEvent(N,k):null,P=M<=O?new p.ViewLinesInsertedEvent(M,O):null,F=B<=T?new p.ViewLinesDeletedEvent(B,T):null;return[E,R,P,F]}acceptVersionId(d){this._validModelVersionId=d,this.modelLineProjections.length===1&&!this.modelLineProjections[0].isVisible()&&this.setHiddenAreas([])}getViewLineCount(){return this.projectedModelLineLineCounts.getTotalSum()}_toValidViewLineNumber(d){if(d<1)return 1;const u=this.getViewLineCount();return d>u?u:d|0}getActiveIndentGuide(d,u,f){d=this._toValidViewLineNumber(d),u=this._toValidViewLineNumber(u),f=this._toValidViewLineNumber(f);const S=this.convertViewPositionToModelPosition(d,this.getViewLineMinColumn(d)),v=this.convertViewPositionToModelPosition(u,this.getViewLineMinColumn(u)),C=this.convertViewPositionToModelPosition(f,this.getViewLineMinColumn(f)),_=this.model.guides.getActiveIndentGuide(S.lineNumber,v.lineNumber,C.lineNumber),L=this.convertModelPositionToViewPosition(_.startLineNumber,1),E=this.convertModelPositionToViewPosition(_.endLineNumber,this.model.getLineMaxColumn(_.endLineNumber));return{startLineNumber:L.lineNumber,endLineNumber:E.lineNumber,indent:_.indent}}getViewLineInfo(d){d=this._toValidViewLineNumber(d);const u=this.projectedModelLineLineCounts.getIndexOf(d-1),f=u.index,S=u.remainder;return new l(f+1,S)}getMinColumnOfViewLine(d){return this.modelLineProjections[d.modelLineNumber-1].getViewLineMinColumn(this.model,d.modelLineNumber,d.modelLineWrappedLineIdx)}getModelStartPositionOfViewLine(d){const u=this.modelLineProjections[d.modelLineNumber-1],f=u.getViewLineMinColumn(this.model,d.modelLineNumber,d.modelLineWrappedLineIdx),S=u.getModelColumnOfViewPosition(d.modelLineWrappedLineIdx,f);return new m.Position(d.modelLineNumber,S)}getModelEndPositionOfViewLine(d){const u=this.modelLineProjections[d.modelLineNumber-1],f=u.getViewLineMaxColumn(this.model,d.modelLineNumber,d.modelLineWrappedLineIdx),S=u.getModelColumnOfViewPosition(d.modelLineWrappedLineIdx,f);return new m.Position(d.modelLineNumber,S)}getViewLineInfosGroupedByModelRanges(d,u){const f=this.getViewLineInfo(d),S=this.getViewLineInfo(u),v=new Array;let C=this.getModelStartPositionOfViewLine(f),_=new Array;for(let L=f.modelLineNumber;L<=S.modelLineNumber;L++){const E=this.modelLineProjections[L-1];if(E.isVisible()){const N=L===f.modelLineNumber?f.modelLineWrappedLineIdx:0,k=L===S.modelLineNumber?S.modelLineWrappedLineIdx+1:E.getViewLineCount();for(let M=N;M<k;M++)_.push(new l(L,M))}if(!E.isVisible()&&C){const N=new m.Position(L-1,this.model.getLineMaxColumn(L-1)+1),k=D.Range.fromPositions(C,N);v.push(new c(k,_)),_=[],C=null}else E.isVisible()&&!C&&(C=new m.Position(L,1))}if(C){const L=D.Range.fromPositions(C,this.getModelEndPositionOfViewLine(S));v.push(new c(L,_))}return v}getViewLinesBracketGuides(d,u,f,S){const v=f?this.convertViewPositionToModelPosition(f.lineNumber,f.column):null,C=[];for(const _ of this.getViewLineInfosGroupedByModelRanges(d,u)){const L=_.modelRange.startLineNumber,E=this.model.guides.getLinesBracketGuides(L,_.modelRange.endLineNumber,v,S);for(const N of _.viewLines)if(N.isWrappedLineContinuation&&this.getMinColumnOfViewLine(N)===1)C.push([]);else{let k=E[N.modelLineNumber-L];k=k.map(M=>M.horizontalLine?new I.IndentGuide(M.visibleColumn,M.className,new I.IndentGuideHorizontalLine(M.horizontalLine.top,this.convertModelPositionToViewPosition(N.modelLineNumber,M.horizontalLine.endColumn).column)):M),C.push(k)}}return C}getViewLinesIndentGuides(d,u){d=this._toValidViewLineNumber(d),u=this._toValidViewLineNumber(u);const f=this.convertViewPositionToModelPosition(d,this.getViewLineMinColumn(d)),S=this.convertViewPositionToModelPosition(u,this.getViewLineMaxColumn(u));let v=[];const C=[],_=[],L=f.lineNumber-1,E=S.lineNumber-1;let N=null;for(let B=L;B<=E;B++){const T=this.modelLineProjections[B];if(T.isVisible()){const R=T.getViewLineNumberOfModelPosition(0,B===L?f.column:1),P=T.getViewLineNumberOfModelPosition(0,this.model.getLineMaxColumn(B+1)),F=P-R+1;let W=0;F>1&&T.getViewLineMinColumn(this.model,B+1,P)===1&&(W=R===0?1:2),C.push(F),_.push(W),N===null&&(N=new m.Position(B+1,0))}else N!==null&&(v=v.concat(this.model.guides.getLinesIndentGuides(N.lineNumber,B)),N=null)}N!==null&&(v=v.concat(this.model.guides.getLinesIndentGuides(N.lineNumber,S.lineNumber)),N=null);const k=u-d+1,M=new Array(k);let O=0;for(let B=0,T=v.length;B<T;B++){let R=v[B];const P=Math.min(k-O,C[B]),F=_[B];let W;F===2?W=0:F===1?W=1:W=P;for(let A=0;A<P;A++)A===W&&(R=0),M[O++]=R}return M}getViewLineContent(d){const u=this.getViewLineInfo(d);return this.modelLineProjections[u.modelLineNumber-1].getViewLineContent(this.model,u.modelLineNumber,u.modelLineWrappedLineIdx)}getViewLineLength(d){const u=this.getViewLineInfo(d);return this.modelLineProjections[u.modelLineNumber-1].getViewLineLength(this.model,u.modelLineNumber,u.modelLineWrappedLineIdx)}getViewLineMinColumn(d){const u=this.getViewLineInfo(d);return this.modelLineProjections[u.modelLineNumber-1].getViewLineMinColumn(this.model,u.modelLineNumber,u.modelLineWrappedLineIdx)}getViewLineMaxColumn(d){const u=this.getViewLineInfo(d);return this.modelLineProjections[u.modelLineNumber-1].getViewLineMaxColumn(this.model,u.modelLineNumber,u.modelLineWrappedLineIdx)}getViewLineData(d){const u=this.getViewLineInfo(d);return this.modelLineProjections[u.modelLineNumber-1].getViewLineData(this.model,u.modelLineNumber,u.modelLineWrappedLineIdx)}getViewLinesData(d,u,f){d=this._toValidViewLineNumber(d),u=this._toValidViewLineNumber(u);const S=this.projectedModelLineLineCounts.getIndexOf(d-1);let v=d;const C=S.index,_=S.remainder,L=[];for(let E=C,N=this.model.getLineCount();E<N;E++){const k=this.modelLineProjections[E];if(!k.isVisible())continue;const M=E===C?_:0;let O=k.getViewLineCount()-M,B=!1;if(v+O>u&&(B=!0,O=u-v+1),k.getViewLinesData(this.model,E+1,M,O,v-d,f,L),v+=O,B)break}return L}validateViewPosition(d,u,f){d=this._toValidViewLineNumber(d);const S=this.projectedModelLineLineCounts.getIndexOf(d-1),v=S.index,C=S.remainder,_=this.modelLineProjections[v],L=_.getViewLineMinColumn(this.model,v+1,C),E=_.getViewLineMaxColumn(this.model,v+1,C);u<L&&(u=L),u>E&&(u=E);const N=_.getModelColumnOfViewPosition(C,u);return this.model.validatePosition(new m.Position(v+1,N)).equals(f)?new m.Position(d,u):this.convertModelPositionToViewPosition(f.lineNumber,f.column)}validateViewRange(d,u){const f=this.validateViewPosition(d.startLineNumber,d.startColumn,u.getStartPosition()),S=this.validateViewPosition(d.endLineNumber,d.endColumn,u.getEndPosition());return new D.Range(f.lineNumber,f.column,S.lineNumber,S.column)}convertViewPositionToModelPosition(d,u){const f=this.getViewLineInfo(d),S=this.modelLineProjections[f.modelLineNumber-1].getModelColumnOfViewPosition(f.modelLineWrappedLineIdx,u);return this.model.validatePosition(new m.Position(f.modelLineNumber,S))}convertViewRangeToModelRange(d){const u=this.convertViewPositionToModelPosition(d.startLineNumber,d.startColumn),f=this.convertViewPositionToModelPosition(d.endLineNumber,d.endColumn);return new D.Range(u.lineNumber,u.column,f.lineNumber,f.column)}convertModelPositionToViewPosition(d,u,f=2){const S=this.model.validatePosition(new m.Position(d,u)),v=S.lineNumber,C=S.column;let _=v-1,L=!1;for(;_>0&&!this.modelLineProjections[_].isVisible();)_--,L=!0;if(_===0&&!this.modelLineProjections[_].isVisible())return new m.Position(1,1);const E=1+this.projectedModelLineLineCounts.getPrefixSum(_);let N;return L?N=this.modelLineProjections[_].getViewPositionOfModelPosition(E,this.model.getLineMaxColumn(_+1),f):N=this.modelLineProjections[v-1].getViewPositionOfModelPosition(E,C,f),N}convertModelRangeToViewRange(d,u=0){if(d.isEmpty()){const f=this.convertModelPositionToViewPosition(d.startLineNumber,d.startColumn,u);return D.Range.fromPositions(f)}else{const f=this.convertModelPositionToViewPosition(d.startLineNumber,d.startColumn,1),S=this.convertModelPositionToViewPosition(d.endLineNumber,d.endColumn,0);return new D.Range(f.lineNumber,f.column,S.lineNumber,S.column)}}getViewLineNumberOfModelPosition(d,u){let f=d-1;if(this.modelLineProjections[f].isVisible()){const v=1+this.projectedModelLineLineCounts.getPrefixSum(f);return this.modelLineProjections[f].getViewLineNumberOfModelPosition(v,u)}for(;f>0&&!this.modelLineProjections[f].isVisible();)f--;if(f===0&&!this.modelLineProjections[f].isVisible())return 1;const S=1+this.projectedModelLineLineCounts.getPrefixSum(f);return this.modelLineProjections[f].getViewLineNumberOfModelPosition(S,this.model.getLineMaxColumn(f+1))}getDecorationsInRange(d,u,f){const S=this.convertViewPositionToModelPosition(d.startLineNumber,d.startColumn),v=this.convertViewPositionToModelPosition(d.endLineNumber,d.endColumn);if(v.lineNumber-S.lineNumber<=d.endLineNumber-d.startLineNumber)return this.model.getDecorationsInRange(new D.Range(S.lineNumber,1,v.lineNumber,v.column),u,f);let C=[];const _=S.lineNumber-1,L=v.lineNumber-1;let E=null;for(let O=_;O<=L;O++)if(this.modelLineProjections[O].isVisible())E===null&&(E=new m.Position(O+1,O===_?S.column:1));else if(E!==null){const T=this.model.getLineMaxColumn(O);C=C.concat(this.model.getDecorationsInRange(new D.Range(E.lineNumber,E.column,O,T),u,f)),E=null}E!==null&&(C=C.concat(this.model.getDecorationsInRange(new D.Range(E.lineNumber,E.column,v.lineNumber,v.column),u,f)),E=null),C.sort((O,B)=>{const T=D.Range.compareRangesUsingStarts(O.range,B.range);return T===0?O.id<B.id?-1:O.id>B.id?1:0:T});let N=[],k=0,M=null;for(const O of C){const B=O.id;M!==B&&(M=B,N[k++]=O)}return N}getInjectedTextAt(d){const u=this.getViewLineInfo(d.lineNumber);return this.modelLineProjections[u.modelLineNumber-1].getInjectedTextAt(u.modelLineWrappedLineIdx,d.column)}normalizePosition(d,u){const f=this.getViewLineInfo(d.lineNumber);return this.modelLineProjections[f.modelLineNumber-1].normalizePosition(f.modelLineWrappedLineIdx,d,u)}getLineIndentColumn(d){const u=this.getViewLineInfo(d);return u.modelLineWrappedLineIdx===0?this.model.getLineIndentColumn(u.modelLineNumber):0}}e.ViewModelLinesFromProjectedModel=i;function n(a){if(a.length===0)return[];const d=a.slice();d.sort(D.Range.compareRangesUsingStarts);const u=[];let f=d[0].startLineNumber,S=d[0].endLineNumber;for(let v=1,C=d.length;v<C;v++){const _=d[v];_.startLineNumber>S+1?(u.push(new D.Range(f,1,S,1)),f=_.startLineNumber,S=_.endLineNumber):_.endLineNumber>S&&(S=_.endLineNumber)}return u.push(new D.Range(f,1,S,1)),u}class l{constructor(d,u){this.modelLineNumber=d,this.modelLineWrappedLineIdx=u}get isWrappedLineContinuation(){return this.modelLineWrappedLineIdx>0}}class c{constructor(d,u){this.modelRange=d,this.viewLines=u}}class r{constructor(d){this._lines=d}convertViewPositionToModelPosition(d){return this._lines.convertViewPositionToModelPosition(d.lineNumber,d.column)}convertViewRangeToModelRange(d){return this._lines.convertViewRangeToModelRange(d)}validateViewPosition(d,u){return this._lines.validateViewPosition(d.lineNumber,d.column,u)}validateViewRange(d,u){return this._lines.validateViewRange(d,u)}convertModelPositionToViewPosition(d,u){return this._lines.convertModelPositionToViewPosition(d.lineNumber,d.column,u)}convertModelRangeToViewRange(d,u){return this._lines.convertModelRangeToViewRange(d,u)}modelPositionIsVisible(d){return this._lines.modelPositionIsVisible(d.lineNumber,d.column)}getModelLineViewLineCount(d){return this._lines.getModelLineViewLineCount(d)}getViewLineNumberOfModelPosition(d,u){return this._lines.getViewLineNumberOfModelPosition(d,u)}}class s{constructor(d){this.model=d}dispose(){}createCoordinatesConverter(){return new o(this)}getHiddenAreas(){return[]}setHiddenAreas(d){return!1}setTabSize(d){return!1}setWrappingSettings(d,u,f,S){return!1}createLineBreaksComputer(){const d=[];return{addRequest:(u,f,S)=>{d.push(null)},finalize:()=>d}}onModelFlushed(){}onModelLinesDeleted(d,u,f){return new p.ViewLinesDeletedEvent(u,f)}onModelLinesInserted(d,u,f,S){return new p.ViewLinesInsertedEvent(u,f)}onModelLineChanged(d,u,f){return[!1,new p.ViewLinesChangedEvent(u,u),null,null]}acceptVersionId(d){}getViewLineCount(){return this.model.getLineCount()}getActiveIndentGuide(d,u,f){return{startLineNumber:d,endLineNumber:d,indent:0}}getViewLinesBracketGuides(d,u,f){return new Array(u-d+1).fill([])}getViewLinesIndentGuides(d,u){const f=u-d+1,S=new Array(f);for(let v=0;v<f;v++)S[v]=0;return S}getViewLineContent(d){return this.model.getLineContent(d)}getViewLineLength(d){return this.model.getLineLength(d)}getViewLineMinColumn(d){return this.model.getLineMinColumn(d)}getViewLineMaxColumn(d){return this.model.getLineMaxColumn(d)}getViewLineData(d){const u=this.model.getLineTokens(d),f=u.getLineContent();return new t.ViewLineData(f,!1,1,f.length+1,0,u.inflate(),null)}getViewLinesData(d,u,f){const S=this.model.getLineCount();d=Math.min(Math.max(1,d),S),u=Math.min(Math.max(1,u),S);const v=[];for(let C=d;C<=u;C++){const _=C-d;v[_]=f[_]?this.getViewLineData(C):null}return v}getDecorationsInRange(d,u,f){return this.model.getDecorationsInRange(d,u,f)}normalizePosition(d,u){return this.model.normalizePosition(d,u)}getLineIndentColumn(d){return this.model.getLineIndentColumn(d)}getInjectedTextAt(d){return null}}e.ViewModelLinesFromModelAsIs=s;class o{constructor(d){this._lines=d}_validPosition(d){return this._lines.model.validatePosition(d)}_validRange(d){return this._lines.model.validateRange(d)}convertViewPositionToModelPosition(d){return this._validPosition(d)}convertViewRangeToModelRange(d){return this._validRange(d)}validateViewPosition(d,u){return this._validPosition(u)}validateViewRange(d,u){return this._validRange(u)}convertModelPositionToViewPosition(d){return this._validPosition(d)}convertModelRangeToViewRange(d){return this._validRange(d)}modelPositionIsVisible(d){const u=this._lines.model.getLineCount();return!(d.lineNumber<1||d.lineNumber>u)}getModelLineViewLineCount(d){return 1}getViewLineNumberOfModelPosition(d,u){return d}}}),define(te[705],ie([1,0,19,10,29,2,17,8,31,290,59,11,3,91,18,79,249,183,449,250,69,267,184,704]),function(j,e,y,m,D,I,w,b,p,h,g,t,i,n,l,c,r,s,o,a,d,u,f,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ViewModel=void 0;const v=!0;class C extends I.Disposable{constructor(E,N,k,M,O,B,T){super();if(this.languageConfigurationService=T,this._editorId=E,this._configuration=N,this.model=k,this._eventDispatcher=new f.ViewModelEventDispatcher,this.onEvent=this._eventDispatcher.onEvent,this.cursorConfig=new g.CursorConfiguration(this.model.getLanguageId(),this.model.getOptions(),this._configuration,this.languageConfigurationService),this._tokenizeViewportSoon=this._register(new m.RunOnceScheduler(()=>this.tokenizeViewport(),50)),this._updateConfigurationViewLineCount=this._register(new m.RunOnceScheduler(()=>this._updateConfigurationViewLineCountNow(),0)),this._hasFocus=!1,this._viewportStartLine=-1,this._viewportStartLineTrackedRange=null,this._viewportStartLineDelta=0,v&&this.model.isTooLargeForTokenization())this._lines=new S.ViewModelLinesFromModelAsIs(this.model);else{const R=this._configuration.options,P=R.get(44),F=R.get(125),W=R.get(132),A=R.get(124);this._lines=new S.ViewModelLinesFromProjectedModel(this._editorId,this.model,M,O,P,this.model.getOptions().tabSize,F,W.wrappingColumn,A)}this.coordinatesConverter=this._lines.createCoordinatesConverter(),this._cursor=this._register(new h.CursorsController(k,this,this.coordinatesConverter,this.cursorConfig)),this.viewLayout=this._register(new o.ViewLayout(this._configuration,this.getLineCount(),B)),this._register(this.viewLayout.onDidScroll(R=>{R.scrollTopChanged&&this._tokenizeViewportSoon.schedule(),this._eventDispatcher.emitSingleViewEvent(new s.ViewScrollChangedEvent(R)),this._eventDispatcher.emitOutgoingEvent(new f.ScrollChangedEvent(R.oldScrollWidth,R.oldScrollLeft,R.oldScrollHeight,R.oldScrollTop,R.scrollWidth,R.scrollLeft,R.scrollHeight,R.scrollTop))})),this._register(this.viewLayout.onDidContentSizeChange(R=>{this._eventDispatcher.emitOutgoingEvent(R)})),this._decorations=new u.ViewModelDecorations(this._editorId,this.model,this._configuration,this._lines,this.coordinatesConverter),this._registerModelEvents(),this._register(this._configuration.onDidChangeFast(R=>{try{const P=this._eventDispatcher.beginEmitViewEvents();this._onConfigurationChanged(P,R)}finally{this._eventDispatcher.endEmitViewEvents()}})),this._register(a.MinimapTokensColorTracker.getInstance().onDidChange(()=>{this._eventDispatcher.emitSingleViewEvent(new s.ViewTokensColorsChangedEvent)})),this._updateConfigurationViewLineCountNow()}dispose(){super.dispose(),this._decorations.dispose(),this._lines.dispose(),this.invalidateMinimapColorCache(),this._viewportStartLineTrackedRange=this.model._setTrackedRange(this._viewportStartLineTrackedRange,null,1),this._eventDispatcher.dispose()}createLineBreaksComputer(){return this._lines.createLineBreaksComputer()}addViewEventHandler(E){this._eventDispatcher.addViewEventHandler(E)}removeViewEventHandler(E){this._eventDispatcher.removeViewEventHandler(E)}_updateConfigurationViewLineCountNow(){this._configuration.setViewLineCount(this._lines.getViewLineCount())}tokenizeViewport(){const E=this.viewLayout.getLinesViewportData(),N=new i.Range(E.startLineNumber,this.getLineMinColumn(E.startLineNumber),E.endLineNumber,this.getLineMaxColumn(E.endLineNumber)),k=this._toModelVisibleRanges(N);for(const M of k)this.model.tokenizeViewport(M.startLineNumber,M.endLineNumber)}setHasFocus(E){this._hasFocus=E,this._cursor.setHasFocus(E),this._eventDispatcher.emitSingleViewEvent(new s.ViewFocusChangedEvent(E)),this._eventDispatcher.emitOutgoingEvent(new f.FocusChangedEvent(!E,E))}onCompositionStart(){this._eventDispatcher.emitSingleViewEvent(new s.ViewCompositionStartEvent)}onCompositionEnd(){this._eventDispatcher.emitSingleViewEvent(new s.ViewCompositionEndEvent)}onDidColorThemeChange(){this._eventDispatcher.emitSingleViewEvent(new s.ViewThemeChangedEvent)}_onConfigurationChanged(E,N){let k=null;if(this._viewportStartLine!==-1){const F=new t.Position(this._viewportStartLine,this.getLineMinColumn(this._viewportStartLine));k=this.coordinatesConverter.convertViewPositionToModelPosition(F)}let M=!1;const O=this._configuration.options,B=O.get(44),T=O.get(125),R=O.get(132),P=O.get(124);if(this._lines.setWrappingSettings(B,T,R.wrappingColumn,P)&&(E.emitViewEvent(new s.ViewFlushedEvent),E.emitViewEvent(new s.ViewLineMappingChangedEvent),E.emitViewEvent(new s.ViewDecorationsChangedEvent(null)),this._cursor.onLineMappingChanged(E),this._decorations.onLineMappingChanged(),this.viewLayout.onFlushed(this.getLineCount()),this.viewLayout.getCurrentScrollTop()!==0&&(M=!0),this._updateConfigurationViewLineCount.schedule()),N.hasChanged(81)&&(this._decorations.reset(),E.emitViewEvent(new s.ViewDecorationsChangedEvent(null))),E.emitViewEvent(new s.ViewConfigurationChangedEvent(N)),this.viewLayout.onConfigurationChanged(N),M&&k){const F=this.coordinatesConverter.convertModelPositionToViewPosition(k),W=this.viewLayout.getVerticalOffsetForLineNumber(F.lineNumber);this.viewLayout.setScrollPosition({scrollTop:W+this._viewportStartLineDelta},1)}g.CursorConfiguration.shouldRecreate(N)&&(this.cursorConfig=new g.CursorConfiguration(this.model.getLanguageId(),this.model.getOptions(),this._configuration,this.languageConfigurationService),this._cursor.updateConfiguration(this.cursorConfig))}_registerModelEvents(){this._register(this.model.onDidChangeContentOrInjectedText(E=>{try{const N=this._eventDispatcher.beginEmitViewEvents();let k=!1,M=!1;const O=E.changes,B=E instanceof n.ModelRawContentChangedEvent?E.versionId:null,T=this._lines.createLineBreaksComputer();for(const F of O)switch(F.changeType){case 4:{for(let W=0;W<F.detail.length;W++){const A=F.detail[W];let H=F.injectedTexts[W];H&&(H=H.filter(q=>!q.ownerId||q.ownerId===this._editorId)),T.addRequest(A,H,null)}break}case 2:{let W=null;F.injectedText&&(W=F.injectedText.filter(A=>!A.ownerId||A.ownerId===this._editorId)),T.addRequest(F.detail,W,null);break}}const R=T.finalize(),P=new y.ArrayQueue(R);for(const F of O)switch(F.changeType){case 1:{this._lines.onModelFlushed(),N.emitViewEvent(new s.ViewFlushedEvent),this._decorations.reset(),this.viewLayout.onFlushed(this.getLineCount()),k=!0;break}case 3:{const W=this._lines.onModelLinesDeleted(B,F.fromLineNumber,F.toLineNumber);W!==null&&(N.emitViewEvent(W),this.viewLayout.onLinesDeleted(W.fromLineNumber,W.toLineNumber)),k=!0;break}case 4:{const W=P.takeCount(F.detail.length),A=this._lines.onModelLinesInserted(B,F.fromLineNumber,F.toLineNumber,W);A!==null&&(N.emitViewEvent(A),this.viewLayout.onLinesInserted(A.fromLineNumber,A.toLineNumber)),k=!0;break}case 2:{const W=P.dequeue(),[A,H,q,X]=this._lines.onModelLineChanged(B,F.lineNumber,W);M=A,H&&N.emitViewEvent(H),q&&(N.emitViewEvent(q),this.viewLayout.onLinesInserted(q.fromLineNumber,q.toLineNumber)),X&&(N.emitViewEvent(X),this.viewLayout.onLinesDeleted(X.fromLineNumber,X.toLineNumber));break}case 5:break}B!==null&&this._lines.acceptVersionId(B),this.viewLayout.onHeightMaybeChanged(),!k&&M&&(N.emitViewEvent(new s.ViewLineMappingChangedEvent),N.emitViewEvent(new s.ViewDecorationsChangedEvent(null)),this._cursor.onLineMappingChanged(N),this._decorations.onLineMappingChanged())}finally{this._eventDispatcher.endEmitViewEvents()}if(this._viewportStartLine=-1,this._configuration.setModelLineCount(this.model.getLineCount()),this._updateConfigurationViewLineCountNow(),!this._hasFocus&&this.model.getAttachedEditorCount()>=2&&this._viewportStartLineTrackedRange){const N=this.model._getTrackedRange(this._viewportStartLineTrackedRange);if(N){const k=this.coordinatesConverter.convertModelPositionToViewPosition(N.getStartPosition()),M=this.viewLayout.getVerticalOffsetForLineNumber(k.lineNumber);this.viewLayout.setScrollPosition({scrollTop:M+this._viewportStartLineDelta},1)}}try{const N=this._eventDispatcher.beginEmitViewEvents();this._cursor.onModelContentChanged(N,E)}finally{this._eventDispatcher.endEmitViewEvents()}this._tokenizeViewportSoon.schedule()})),this._register(this.model.onDidChangeTokens(E=>{const N=[];for(let k=0,M=E.ranges.length;k<M;k++){const O=E.ranges[k],B=this.coordinatesConverter.convertModelPositionToViewPosition(new t.Position(O.fromLineNumber,1)).lineNumber,T=this.coordinatesConverter.convertModelPositionToViewPosition(new t.Position(O.toLineNumber,this.model.getLineMaxColumn(O.toLineNumber))).lineNumber;N[k]={fromLineNumber:B,toLineNumber:T}}this._eventDispatcher.emitSingleViewEvent(new s.ViewTokensChangedEvent(N)),E.tokenizationSupportChanged&&this._tokenizeViewportSoon.schedule()})),this._register(this.model.onDidChangeLanguageConfiguration(E=>{this._eventDispatcher.emitSingleViewEvent(new s.ViewLanguageConfigurationEvent),this.cursorConfig=new g.CursorConfiguration(this.model.getLanguageId(),this.model.getOptions(),this._configuration,this.languageConfigurationService),this._cursor.updateConfiguration(this.cursorConfig)})),this._register(this.model.onDidChangeLanguage(E=>{this.cursorConfig=new g.CursorConfiguration(this.model.getLanguageId(),this.model.getOptions(),this._configuration,this.languageConfigurationService),this._cursor.updateConfiguration(this.cursorConfig)})),this._register(this.model.onDidChangeOptions(E=>{if(this._lines.setTabSize(this.model.getOptions().tabSize)){try{const N=this._eventDispatcher.beginEmitViewEvents();N.emitViewEvent(new s.ViewFlushedEvent),N.emitViewEvent(new s.ViewLineMappingChangedEvent),N.emitViewEvent(new s.ViewDecorationsChangedEvent(null)),this._cursor.onLineMappingChanged(N),this._decorations.onLineMappingChanged(),this.viewLayout.onFlushed(this.getLineCount())}finally{this._eventDispatcher.endEmitViewEvents()}this._updateConfigurationViewLineCount.schedule()}this.cursorConfig=new g.CursorConfiguration(this.model.getLanguageId(),this.model.getOptions(),this._configuration,this.languageConfigurationService),this._cursor.updateConfiguration(this.cursorConfig)})),this._register(this.model.onDidChangeDecorations(E=>{this._decorations.onModelDecorationsChanged(),this._eventDispatcher.emitSingleViewEvent(new s.ViewDecorationsChangedEvent(E))}))}setHiddenAreas(E){let N=!1;try{const k=this._eventDispatcher.beginEmitViewEvents();N=this._lines.setHiddenAreas(E),N&&(k.emitViewEvent(new s.ViewFlushedEvent),k.emitViewEvent(new s.ViewLineMappingChangedEvent),k.emitViewEvent(new s.ViewDecorationsChangedEvent(null)),this._cursor.onLineMappingChanged(k),this._decorations.onLineMappingChanged(),this.viewLayout.onFlushed(this.getLineCount()),this.viewLayout.onHeightMaybeChanged())}finally{this._eventDispatcher.endEmitViewEvents()}this._updateConfigurationViewLineCount.schedule(),N&&this._eventDispatcher.emitOutgoingEvent(new f.ViewZonesChangedEvent)}getVisibleRangesPlusViewportAboveBelow(){const E=this._configuration.options.get(131),N=this._configuration.options.get(59),k=Math.max(20,Math.round(E.height/N)),M=this.viewLayout.getLinesViewportData(),O=Math.max(1,M.completelyVisibleStartLineNumber-k),B=Math.min(this.getLineCount(),M.completelyVisibleEndLineNumber+k);return this._toModelVisibleRanges(new i.Range(O,this.getLineMinColumn(O),B,this.getLineMaxColumn(B)))}getVisibleRanges(){const E=this.getCompletelyVisibleViewRange();return this._toModelVisibleRanges(E)}_toModelVisibleRanges(E){const N=this.coordinatesConverter.convertViewRangeToModelRange(E),k=this._lines.getHiddenAreas();if(k.length===0)return[N];const M=[];let O=0,B=N.startLineNumber,T=N.startColumn;const R=N.endLineNumber,P=N.endColumn;for(let F=0,W=k.length;F<W;F++){const A=k[F].startLineNumber,H=k[F].endLineNumber;H<B||A>R||(B<A&&(M[O++]=new i.Range(B,T,A-1,this.model.getLineMaxColumn(A-1))),B=H+1,T=1)}return(B<R||B===R&&T<P)&&(M[O++]=new i.Range(B,T,R,P)),M}getCompletelyVisibleViewRange(){const E=this.viewLayout.getLinesViewportData(),N=E.completelyVisibleStartLineNumber,k=E.completelyVisibleEndLineNumber;return new i.Range(N,this.getLineMinColumn(N),k,this.getLineMaxColumn(k))}getCompletelyVisibleViewRangeAtScrollTop(E){const N=this.viewLayout.getLinesViewportDataAtScrollTop(E),k=N.completelyVisibleStartLineNumber,M=N.completelyVisibleEndLineNumber;return new i.Range(k,this.getLineMinColumn(k),M,this.getLineMaxColumn(M))}saveState(){const E=this.viewLayout.saveState(),N=E.scrollTop,k=this.viewLayout.getLineNumberAtVerticalOffset(N),M=this.coordinatesConverter.convertViewPositionToModelPosition(new t.Position(k,this.getLineMinColumn(k))),O=this.viewLayout.getVerticalOffsetForLineNumber(k)-N;return{scrollLeft:E.scrollLeft,firstPosition:M,firstPositionDeltaTop:O}}reduceRestoreState(E){if(typeof E.firstPosition=="undefined")return this._reduceRestoreStateCompatibility(E);const N=this.model.validatePosition(E.firstPosition),k=this.coordinatesConverter.convertModelPositionToViewPosition(N),M=this.viewLayout.getVerticalOffsetForLineNumber(k.lineNumber)-E.firstPositionDeltaTop;return{scrollLeft:E.scrollLeft,scrollTop:M}}_reduceRestoreStateCompatibility(E){return{scrollLeft:E.scrollLeft,scrollTop:E.scrollTopWithoutViewZones}}getTabSize(){return this.model.getOptions().tabSize}getTextModelOptions(){return this.model.getOptions()}getLineCount(){return this._lines.getViewLineCount()}setViewport(E,N,k){this._viewportStartLine=E;const M=this.coordinatesConverter.convertViewPositionToModelPosition(new t.Position(E,this.getLineMinColumn(E)));this._viewportStartLineTrackedRange=this.model._setTrackedRange(this._viewportStartLineTrackedRange,new i.Range(M.lineNumber,M.column,M.lineNumber,M.column),1);const O=this.viewLayout.getVerticalOffsetForLineNumber(E),B=this.viewLayout.getCurrentScrollTop();this._viewportStartLineDelta=B-O}getActiveIndentGuide(E,N,k){return this._lines.getActiveIndentGuide(E,N,k)}getLinesIndentGuides(E,N){return this._lines.getViewLinesIndentGuides(E,N)}getBracketGuidesInRangeByLine(E,N,k,M){return this._lines.getViewLinesBracketGuides(E,N,k,M)}getLineContent(E){return this._lines.getViewLineContent(E)}getLineLength(E){return this._lines.getViewLineLength(E)}getLineMinColumn(E){return this._lines.getViewLineMinColumn(E)}getLineMaxColumn(E){return this._lines.getViewLineMaxColumn(E)}getLineFirstNonWhitespaceColumn(E){const N=b.firstNonWhitespaceIndex(this.getLineContent(E));return N===-1?0:N+1}getLineLastNonWhitespaceColumn(E){const N=b.lastNonWhitespaceIndex(this.getLineContent(E));return N===-1?0:N+2}getDecorationsInViewport(E){return this._decorations.getDecorationsViewportData(E).decorations}getInjectedTextAt(E){return this._lines.getInjectedTextAt(E)}getViewLineRenderingData(E,N){const k=this.model.mightContainRTL(),M=this.model.mightContainNonBasicASCII(),O=this.getTabSize(),B=this._lines.getViewLineData(N);let R=this._decorations.getDecorationsViewportData(E).inlineDecorations[N-E.startLineNumber];return B.inlineDecorations&&(R=[...R,...B.inlineDecorations.map(P=>P.toInlineDecoration(N))]),new d.ViewLineRenderingData(B.minColumn,B.maxColumn,B.content,B.continuesWithWrappedLine,k,M,B.tokens,R,O,B.startVisibleColumn)}getViewLineData(E){return this._lines.getViewLineData(E)}getMinimapLinesRenderingData(E,N,k){const M=this._lines.getViewLinesData(E,N,k);return new d.MinimapLinesRenderingData(this.getTabSize(),M)}getAllOverviewRulerDecorations(E){const N=this.model.getOverviewRulerDecorations(this._editorId,(0,p.filterValidationDecorations)(this._configuration.options)),k=new _;for(const M of N){const O=M.options,B=O.overviewRuler;if(!B)continue;const T=B.position;if(T===0)continue;const R=B.getColor(E.value),P=this.coordinatesConverter.getViewLineNumberOfModelPosition(M.range.startLineNumber,M.range.startColumn),F=this.coordinatesConverter.getViewLineNumberOfModelPosition(M.range.endLineNumber,M.range.endColumn);k.accept(R,O.zIndex,P,F,T)}return k.asArray}invalidateOverviewRulerColorCache(){const E=this.model.getOverviewRulerDecorations();for(const N of E){const k=N.options.overviewRuler;k&&k.invalidateCachedColor()}}invalidateMinimapColorCache(){const E=this.model.getAllDecorations();for(const N of E){const k=N.options.minimap;k&&k.invalidateCachedColor()}}getValueInRange(E,N){const k=this.coordinatesConverter.convertViewRangeToModelRange(E);return this.model.getValueInRange(k,N)}getModelLineMaxColumn(E){return this.model.getLineMaxColumn(E)}validateModelPosition(E){return this.model.validatePosition(E)}validateModelRange(E){return this.model.validateRange(E)}deduceModelPositionRelativeToViewPosition(E,N,k){const M=this.coordinatesConverter.convertViewPositionToModelPosition(E);this.model.getEOL().length===2&&(N<0?N-=k:N+=k);const B=this.model.getOffsetAt(M)+N;return this.model.getPositionAt(B)}getEOL(){return this.model.getEOL()}getPlainTextToCopy(E,N,k){const M=k?`\r
|
||
`:this.model.getEOL();E=E.slice(0),E.sort(i.Range.compareRangesUsingStarts);let O=!1,B=!1;for(const R of E)R.isEmpty()?O=!0:B=!0;if(!B){if(!N)return"";const R=E.map(F=>F.startLineNumber);let P="";for(let F=0;F<R.length;F++)F>0&&R[F-1]===R[F]||(P+=this.model.getLineContent(R[F])+M);return P}if(O&&N){const R=[];let P=0;for(const F of E){const W=F.startLineNumber;F.isEmpty()?W!==P&&R.push(this.model.getLineContent(W)):R.push(this.model.getValueInRange(F,k?2:0)),P=W}return R.length===1?R[0]:R}const T=[];for(const R of E)R.isEmpty()||T.push(this.model.getValueInRange(R,k?2:0));return T.length===1?T[0]:T}getRichTextToCopy(E,N){const k=this.model.getLanguageId();if(k===c.PLAINTEXT_LANGUAGE_ID||E.length!==1)return null;let M=E[0];if(M.isEmpty()){if(!N)return null;const F=M.startLineNumber;M=new i.Range(F,this.model.getLineMinColumn(F),F,this.model.getLineMaxColumn(F))}const O=this._configuration.options.get(44),B=this._getColorMap(),R=/[:;\\\/<>]/.test(O.fontFamily)||O.fontFamily===p.EDITOR_FONT_DEFAULTS.fontFamily;let P;return R?P=p.EDITOR_FONT_DEFAULTS.fontFamily:(P=O.fontFamily,P=P.replace(/"/g,"'"),/[,']/.test(P)||/[+ ]/.test(P)&&(P=`'${P}'`),P=`${P}, ${p.EDITOR_FONT_DEFAULTS.fontFamily}`),{mode:k,html:`<div style="color: ${B[1]};background-color: ${B[2]};font-family: ${P};font-weight: ${O.fontWeight};font-size: ${O.fontSize}px;line-height: ${O.lineHeight}px;white-space: pre;">`+this._getHTMLToCopy(M,B)+"</div>"}}_getHTMLToCopy(E,N){const k=E.startLineNumber,M=E.startColumn,O=E.endLineNumber,B=E.endColumn,T=this.getTabSize();let R="";for(let P=k;P<=O;P++){const F=this.model.getLineTokens(P),W=F.getLineContent(),A=P===k?M-1:0,H=P===O?B-1:W.length;W===""?R+="<br>":R+=(0,r.tokenizeLineToHTML)(W,F.inflate(),N,A,H,T,w.isWindows)}return R}_getColorMap(){const E=l.TokenizationRegistry.getColorMap(),N=["#000000"];if(E)for(let k=1,M=E.length;k<M;k++)N[k]=D.Color.Format.CSS.formatHex(E[k]);return N}pushStackElement(){this.model.pushStackElement()}getPrimaryCursorState(){return this._cursor.getPrimaryCursorState()}getLastAddedCursorIndex(){return this._cursor.getLastAddedCursorIndex()}getCursorStates(){return this._cursor.getCursorStates()}setCursorStates(E,N,k){return this._withViewEventsCollector(M=>this._cursor.setStates(M,E,N,k))}getCursorColumnSelectData(){return this._cursor.getCursorColumnSelectData()}getCursorAutoClosedCharacters(){return this._cursor.getAutoClosedCharacters()}setCursorColumnSelectData(E){this._cursor.setCursorColumnSelectData(E)}getPrevEditOperationType(){return this._cursor.getPrevEditOperationType()}setPrevEditOperationType(E){this._cursor.setPrevEditOperationType(E)}getSelection(){return this._cursor.getSelection()}getSelections(){return this._cursor.getSelections()}getPosition(){return this._cursor.getPrimaryCursorState().modelState.position}setSelections(E,N,k=0){this._withViewEventsCollector(M=>this._cursor.setSelections(M,E,N,k))}saveCursorState(){return this._cursor.saveState()}restoreCursorState(E){this._withViewEventsCollector(N=>this._cursor.restoreState(N,E))}_executeCursorEdit(E){if(this._cursor.context.cursorConfig.readOnly){this._eventDispatcher.emitOutgoingEvent(new f.ReadOnlyEditAttemptEvent);return}this._withViewEventsCollector(E)}executeEdits(E,N,k){this._executeCursorEdit(M=>this._cursor.executeEdits(M,E,N,k))}startComposition(){this._cursor.setIsDoingComposition(!0),this._executeCursorEdit(E=>this._cursor.startComposition(E))}endComposition(E){this._cursor.setIsDoingComposition(!1),this._executeCursorEdit(N=>this._cursor.endComposition(N,E))}type(E,N){this._executeCursorEdit(k=>this._cursor.type(k,E,N))}compositionType(E,N,k,M,O){this._executeCursorEdit(B=>this._cursor.compositionType(B,E,N,k,M,O))}paste(E,N,k,M){this._executeCursorEdit(O=>this._cursor.paste(O,E,N,k,M))}cut(E){this._executeCursorEdit(N=>this._cursor.cut(N,E))}executeCommand(E,N){this._executeCursorEdit(k=>this._cursor.executeCommand(k,E,N))}executeCommands(E,N){this._executeCursorEdit(k=>this._cursor.executeCommands(k,E,N))}revealPrimaryCursor(E,N,k=!1){this._withViewEventsCollector(M=>this._cursor.revealPrimary(M,E,k,0,N,0))}revealTopMostCursor(E){const N=this._cursor.getTopMostViewPosition(),k=new i.Range(N.lineNumber,N.column,N.lineNumber,N.column);this._withViewEventsCollector(M=>M.emitViewEvent(new s.ViewRevealRangeRequestEvent(E,!1,k,null,0,!0,0)))}revealBottomMostCursor(E){const N=this._cursor.getBottomMostViewPosition(),k=new i.Range(N.lineNumber,N.column,N.lineNumber,N.column);this._withViewEventsCollector(M=>M.emitViewEvent(new s.ViewRevealRangeRequestEvent(E,!1,k,null,0,!0,0)))}revealRange(E,N,k,M,O){this._withViewEventsCollector(B=>B.emitViewEvent(new s.ViewRevealRangeRequestEvent(E,!1,k,null,M,N,O)))}getVerticalOffsetForLineNumber(E){return this.viewLayout.getVerticalOffsetForLineNumber(E)}getScrollTop(){return this.viewLayout.getCurrentScrollTop()}setScrollTop(E,N){this.viewLayout.setScrollPosition({scrollTop:E},N)}setScrollPosition(E,N){this.viewLayout.setScrollPosition(E,N)}deltaScrollNow(E,N){this.viewLayout.deltaScrollNow(E,N)}changeWhitespace(E){this.viewLayout.changeWhitespace(E)&&(this._eventDispatcher.emitSingleViewEvent(new s.ViewZonesChangedEvent),this._eventDispatcher.emitOutgoingEvent(new f.ViewZonesChangedEvent))}setMaxLineWidth(E){this.viewLayout.setMaxLineWidth(E)}_withViewEventsCollector(E){try{const N=this._eventDispatcher.beginEmitViewEvents();return E(N)}finally{this._eventDispatcher.endEmitViewEvents()}}normalizePosition(E,N){return this._lines.normalizePosition(E,N)}getLineIndentColumn(E){return this._lines.getLineIndentColumn(E)}}e.ViewModel=C;class _{constructor(){this._asMap=Object.create(null),this.asArray=[]}accept(E,N,k,M,O){const B=this._asMap[E];if(B){const T=B.data,R=T[T.length-3],P=T[T.length-1];if(R===O&&P+1>=k){M>P&&(T[T.length-1]=M);return}T.push(O,k,M)}else{const T=new d.OverviewRulerDecorationsGroup(E,N,[O,k,M]);this._asMap[E]=T,this.asArray.push(T)}}}}),define(te[161],ie([1,0,500,7,13,4,2,48,604,15,28,701,232,31,290,68,11,3,22,239,147,24,18,52,23,705,26,16,9,154,38,14,63,20,439,508,159,32,62,659,367]),function(j,e,y,m,D,I,w,b,p,h,g,t,i,n,l,c,r,s,o,a,d,u,f,S,v,C,_,L,E,N,k,M,O,B,T,R,P,F,W){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.EditorModeContext=e.BooleanEventEmitter=e.CodeEditorWidget=void 0;let A=0;class H{constructor(ee,ue,z,V,$){this.model=ee,this.viewModel=ue,this.view=z,this.hasRealView=V,this.listenersToRemove=$}dispose(){(0,w.dispose)(this.listenersToRemove),this.model.onBeforeDetached(),this.hasRealView&&this.view.dispose(),this.viewModel.dispose()}}let q=class zt extends w.Disposable{constructor(ee,ue,z,V,$,K,J,Y,se,ge,me){super();this.languageConfigurationService=me,this._onDidDispose=this._register(new I.Emitter),this.onDidDispose=this._onDidDispose.event,this._onDidChangeModelContent=this._register(new I.Emitter),this.onDidChangeModelContent=this._onDidChangeModelContent.event,this._onDidChangeModelLanguage=this._register(new I.Emitter),this.onDidChangeModelLanguage=this._onDidChangeModelLanguage.event,this._onDidChangeModelLanguageConfiguration=this._register(new I.Emitter),this.onDidChangeModelLanguageConfiguration=this._onDidChangeModelLanguageConfiguration.event,this._onDidChangeModelOptions=this._register(new I.Emitter),this.onDidChangeModelOptions=this._onDidChangeModelOptions.event,this._onDidChangeModelDecorations=this._register(new I.Emitter),this.onDidChangeModelDecorations=this._onDidChangeModelDecorations.event,this._onDidChangeConfiguration=this._register(new I.Emitter),this.onDidChangeConfiguration=this._onDidChangeConfiguration.event,this._onDidChangeModel=this._register(new I.Emitter),this.onDidChangeModel=this._onDidChangeModel.event,this._onDidChangeCursorPosition=this._register(new I.Emitter),this.onDidChangeCursorPosition=this._onDidChangeCursorPosition.event,this._onDidChangeCursorSelection=this._register(new I.Emitter),this.onDidChangeCursorSelection=this._onDidChangeCursorSelection.event,this._onDidAttemptReadOnlyEdit=this._register(new I.Emitter),this.onDidAttemptReadOnlyEdit=this._onDidAttemptReadOnlyEdit.event,this._onDidLayoutChange=this._register(new I.Emitter),this.onDidLayoutChange=this._onDidLayoutChange.event,this._editorTextFocus=this._register(new X),this.onDidFocusEditorText=this._editorTextFocus.onDidChangeToTrue,this.onDidBlurEditorText=this._editorTextFocus.onDidChangeToFalse,this._editorWidgetFocus=this._register(new X),this.onDidFocusEditorWidget=this._editorWidgetFocus.onDidChangeToTrue,this.onDidBlurEditorWidget=this._editorWidgetFocus.onDidChangeToFalse,this._onWillType=this._register(new I.Emitter),this.onWillType=this._onWillType.event,this._onDidType=this._register(new I.Emitter),this.onDidType=this._onDidType.event,this._onDidCompositionStart=this._register(new I.Emitter),this.onDidCompositionStart=this._onDidCompositionStart.event,this._onDidCompositionEnd=this._register(new I.Emitter),this.onDidCompositionEnd=this._onDidCompositionEnd.event,this._onDidPaste=this._register(new I.Emitter),this.onDidPaste=this._onDidPaste.event,this._onMouseUp=this._register(new I.Emitter),this.onMouseUp=this._onMouseUp.event,this._onMouseDown=this._register(new I.Emitter),this.onMouseDown=this._onMouseDown.event,this._onMouseDrag=this._register(new I.Emitter),this.onMouseDrag=this._onMouseDrag.event,this._onMouseDrop=this._register(new I.Emitter),this.onMouseDrop=this._onMouseDrop.event,this._onMouseDropCanceled=this._register(new I.Emitter),this.onMouseDropCanceled=this._onMouseDropCanceled.event,this._onContextMenu=this._register(new I.Emitter),this.onContextMenu=this._onContextMenu.event,this._onMouseMove=this._register(new I.Emitter),this.onMouseMove=this._onMouseMove.event,this._onMouseLeave=this._register(new I.Emitter),this.onMouseLeave=this._onMouseLeave.event,this._onMouseWheel=this._register(new I.Emitter),this.onMouseWheel=this._onMouseWheel.event,this._onKeyUp=this._register(new I.Emitter),this.onKeyUp=this._onKeyUp.event,this._onKeyDown=this._register(new I.Emitter),this.onKeyDown=this._onKeyDown.event,this._onDidContentSizeChange=this._register(new I.Emitter),this.onDidContentSizeChange=this._onDidContentSizeChange.event,this._onDidScrollChange=this._register(new I.Emitter),this.onDidScrollChange=this._onDidScrollChange.event,this._onDidChangeViewZones=this._register(new I.Emitter),this.onDidChangeViewZones=this._onDidChangeViewZones.event,this._onDidChangeHiddenAreas=this._register(new I.Emitter),this.onDidChangeHiddenAreas=this._onDidChangeHiddenAreas.event,this._bannerDomNode=null;const le=Object.assign({},ue);this._domElement=ee,this._overflowWidgetsDomNode=le.overflowWidgetsDomNode,delete le.overflowWidgetsDomNode,this._id=++A,this._decorationTypeKeysToIds={},this._decorationTypeSubtypes={},this._telemetryData=z.telemetryData,this._configuration=this._register(this._createConfiguration(z.isSimpleWidget||!1,le,ge)),this._register(this._configuration.onDidChange(ve=>{this._onDidChangeConfiguration.fire(ve);const pe=this._configuration.options;if(ve.hasChanged(131)){const be=pe.get(131);this._onDidLayoutChange.fire(be)}})),this._contextKeyService=this._register(J.createScoped(this._domElement)),this._notificationService=se,this._codeEditorService=$,this._commandService=K,this._themeService=Y,this._register(new G(this,this._contextKeyService)),this._register(new re(this,this._contextKeyService)),this._instantiationService=V.createChild(new N.ServiceCollection([L.IContextKeyService,this._contextKeyService])),this._modelData=null,this._contributions={},this._actions={},this._focusTracker=new ae(ee),this._register(this._focusTracker.onChange(()=>{this._editorWidgetFocus.setValue(this._focusTracker.hasFocus())})),this._contentWidgets={},this._overlayWidgets={};let he;Array.isArray(z.contributions)?he=z.contributions:he=h.EditorExtensionsRegistry.getEditorContributions();for(const ve of he){if(this._contributions[ve.id]){(0,D.onUnexpectedError)(new Error(`Cannot have two contributions with the same id ${ve.id}`));continue}try{const pe=this._instantiationService.createInstance(ve.ctor,this);this._contributions[ve.id]=pe}catch(pe){(0,D.onUnexpectedError)(pe)}}h.EditorExtensionsRegistry.getEditorActions().forEach(ve=>{if(this._actions[ve.id]){(0,D.onUnexpectedError)(new Error(`Cannot have two actions with the same id ${ve.id}`));return}const pe=new a.InternalEditorAction(ve.id,ve.label,ve.alias,(0,B.withNullAsUndefined)(ve.precondition),()=>this._instantiationService.invokeFunction(be=>Promise.resolve(ve.runEditorCommand(be,this,null))),this._contextKeyService);this._actions[pe.id]=pe}),this._codeEditorService.addCodeEditor(this)}get isSimpleWidget(){return this._configuration.isSimpleWidget}_createConfiguration(ee,ue,z){return new p.EditorConfiguration(ee,ue,this._domElement,z)}getId(){return this.getEditorType()+":"+this._id}getEditorType(){return d.EditorType.ICodeEditor}dispose(){this._codeEditorService.removeCodeEditor(this),this._focusTracker.dispose();const ee=Object.keys(this._contributions);for(let ue=0,z=ee.length;ue<z;ue++){const V=ee[ue];this._contributions[V].dispose()}this._contributions={},this._actions={},this._contentWidgets={},this._overlayWidgets={},this._removeDecorationTypes(),this._postDetachModelCleanup(this._detachModel()),this._onDidDispose.fire(),super.dispose()}invokeWithinContext(ee){return this._instantiationService.invokeFunction(ee)}updateOptions(ee){this._configuration.updateOptions(ee||{})}getOptions(){return this._configuration.options}getOption(ee){return this._configuration.options.get(ee)}getRawOptions(){return this._configuration.getRawOptions()}getOverflowWidgetsDomNode(){return this._overflowWidgetsDomNode}getConfiguredWordAtPosition(ee){return this._modelData?P.WordOperations.getWordAtPosition(this._modelData.model,this._configuration.options.get(117),ee):null}getValue(ee=null){if(!this._modelData)return"";const ue=!!(ee&&ee.preserveBOM);let z=0;return ee&&ee.lineEnding&&ee.lineEnding===`
|
||
`?z=1:ee&&ee.lineEnding&&ee.lineEnding===`\r
|
||
`&&(z=2),this._modelData.model.getValue(z,ue)}setValue(ee){!this._modelData||this._modelData.model.setValue(ee)}getModel(){return this._modelData?this._modelData.model:null}setModel(ee=null){const ue=ee;if(this._modelData===null&&ue===null||this._modelData&&this._modelData.model===ue)return;const z=this.hasTextFocus(),V=this._detachModel();this._attachModel(ue),z&&this.hasModel()&&this.focus();const $={oldModelUrl:V?V.uri:null,newModelUrl:ue?ue.uri:null};this._removeDecorationTypes(),this._onDidChangeModel.fire($),this._postDetachModelCleanup(V)}_removeDecorationTypes(){if(this._decorationTypeKeysToIds={},this._decorationTypeSubtypes){for(let ee in this._decorationTypeSubtypes){const ue=this._decorationTypeSubtypes[ee];for(let z in ue)this._removeDecorationType(ee+"-"+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 _getVerticalOffsetForPosition(ee,ue,z){const V=ee.model.validatePosition({lineNumber:ue,column:z}),$=ee.viewModel.coordinatesConverter.convertModelPositionToViewPosition(V);return ee.viewModel.viewLayout.getVerticalOffsetForLineNumber($.lineNumber)}getTopForLineNumber(ee){return this._modelData?zt._getVerticalOffsetForPosition(this._modelData,ee,1):-1}getTopForPosition(ee,ue){return this._modelData?zt._getVerticalOffsetForPosition(this._modelData,ee,ue):-1}setHiddenAreas(ee){this._modelData&&this._modelData.viewModel.setHiddenAreas(ee.map(ue=>s.Range.lift(ue)))}getVisibleColumnFromPosition(ee){if(!this._modelData)return ee.column;const ue=this._modelData.model.validatePosition(ee),z=this._modelData.model.getOptions().tabSize;return c.CursorColumns.visibleColumnFromColumn(this._modelData.model.getLineContent(ue.lineNumber),ue.column,z)+1}getPosition(){return this._modelData?this._modelData.viewModel.getPosition():null}setPosition(ee){if(!!this._modelData){if(!r.Position.isIPosition(ee))throw new Error("Invalid arguments");this._modelData.viewModel.setSelections("api",[{selectionStartLineNumber:ee.lineNumber,selectionStartColumn:ee.column,positionLineNumber:ee.lineNumber,positionColumn:ee.column}])}}_sendRevealRange(ee,ue,z,V){if(!this._modelData)return;if(!s.Range.isIRange(ee))throw new Error("Invalid arguments");const $=this._modelData.model.validateRange(ee),K=this._modelData.viewModel.coordinatesConverter.convertModelRangeToViewRange($);this._modelData.viewModel.revealRange("api",z,K,ue,V)}revealLine(ee,ue=0){this._revealLine(ee,0,ue)}revealLineInCenter(ee,ue=0){this._revealLine(ee,1,ue)}revealLineInCenterIfOutsideViewport(ee,ue=0){this._revealLine(ee,2,ue)}revealLineNearTop(ee,ue=0){this._revealLine(ee,5,ue)}_revealLine(ee,ue,z){if(typeof ee!="number")throw new Error("Invalid arguments");this._sendRevealRange(new s.Range(ee,1,ee,1),ue,!1,z)}revealPosition(ee,ue=0){this._revealPosition(ee,0,!0,ue)}revealPositionInCenter(ee,ue=0){this._revealPosition(ee,1,!0,ue)}revealPositionInCenterIfOutsideViewport(ee,ue=0){this._revealPosition(ee,2,!0,ue)}revealPositionNearTop(ee,ue=0){this._revealPosition(ee,5,!0,ue)}_revealPosition(ee,ue,z,V){if(!r.Position.isIPosition(ee))throw new Error("Invalid arguments");this._sendRevealRange(new s.Range(ee.lineNumber,ee.column,ee.lineNumber,ee.column),ue,z,V)}getSelection(){return this._modelData?this._modelData.viewModel.getSelection():null}getSelections(){return this._modelData?this._modelData.viewModel.getSelections():null}setSelection(ee){const ue=o.Selection.isISelection(ee),z=s.Range.isIRange(ee);if(!ue&&!z)throw new Error("Invalid arguments");if(ue)this._setSelectionImpl(ee);else if(z){const V={selectionStartLineNumber:ee.startLineNumber,selectionStartColumn:ee.startColumn,positionLineNumber:ee.endLineNumber,positionColumn:ee.endColumn};this._setSelectionImpl(V)}}_setSelectionImpl(ee){if(!this._modelData)return;const ue=new o.Selection(ee.selectionStartLineNumber,ee.selectionStartColumn,ee.positionLineNumber,ee.positionColumn);this._modelData.viewModel.setSelections("api",[ue])}revealLines(ee,ue,z=0){this._revealLines(ee,ue,0,z)}revealLinesInCenter(ee,ue,z=0){this._revealLines(ee,ue,1,z)}revealLinesInCenterIfOutsideViewport(ee,ue,z=0){this._revealLines(ee,ue,2,z)}revealLinesNearTop(ee,ue,z=0){this._revealLines(ee,ue,5,z)}_revealLines(ee,ue,z,V){if(typeof ee!="number"||typeof ue!="number")throw new Error("Invalid arguments");this._sendRevealRange(new s.Range(ee,1,ue,1),z,!1,V)}revealRange(ee,ue=0,z=!1,V=!0){this._revealRange(ee,z?1:0,V,ue)}revealRangeInCenter(ee,ue=0){this._revealRange(ee,1,!0,ue)}revealRangeInCenterIfOutsideViewport(ee,ue=0){this._revealRange(ee,2,!0,ue)}revealRangeNearTop(ee,ue=0){this._revealRange(ee,5,!0,ue)}revealRangeNearTopIfOutsideViewport(ee,ue=0){this._revealRange(ee,6,!0,ue)}revealRangeAtTop(ee,ue=0){this._revealRange(ee,3,!0,ue)}_revealRange(ee,ue,z,V){if(!s.Range.isIRange(ee))throw new Error("Invalid arguments");this._sendRevealRange(s.Range.lift(ee),ue,z,V)}setSelections(ee,ue="api",z=0){if(!!this._modelData){if(!ee||ee.length===0)throw new Error("Invalid arguments");for(let V=0,$=ee.length;V<$;V++)if(!o.Selection.isISelection(ee[V]))throw new Error("Invalid arguments");this._modelData.viewModel.setSelections(ue,ee,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(ee,ue=1){if(!!this._modelData){if(typeof ee!="number")throw new Error("Invalid arguments");this._modelData.viewModel.setScrollPosition({scrollLeft:ee},ue)}}setScrollTop(ee,ue=1){if(!!this._modelData){if(typeof ee!="number")throw new Error("Invalid arguments");this._modelData.viewModel.setScrollPosition({scrollTop:ee},ue)}}setScrollPosition(ee,ue=1){!this._modelData||this._modelData.viewModel.setScrollPosition(ee,ue)}saveViewState(){if(!this._modelData)return null;const ee={},ue=Object.keys(this._contributions);for(const $ of ue){const K=this._contributions[$];typeof K.saveViewState=="function"&&(ee[$]=K.saveViewState())}const z=this._modelData.viewModel.saveCursorState(),V=this._modelData.viewModel.saveState();return{cursorState:z,viewState:V,contributionsState:ee}}restoreViewState(ee){if(!this._modelData||!this._modelData.hasRealView)return;const ue=ee;if(ue&&ue.cursorState&&ue.viewState){const z=ue.cursorState;Array.isArray(z)?this._modelData.viewModel.restoreCursorState(z):this._modelData.viewModel.restoreCursorState([z]);const V=ue.contributionsState||{},$=Object.keys(this._contributions);for(let J=0,Y=$.length;J<Y;J++){const se=$[J],ge=this._contributions[se];typeof ge.restoreViewState=="function"&&ge.restoreViewState(V[se])}const K=this._modelData.viewModel.reduceRestoreState(ue.viewState);this._modelData.view.restoreState(K)}}getContribution(ee){return this._contributions[ee]||null}getActions(){const ee=[],ue=Object.keys(this._actions);for(let z=0,V=ue.length;z<V;z++){const $=ue[z];ee.push(this._actions[$])}return ee}getSupportedActions(){let ee=this.getActions();return ee=ee.filter(ue=>ue.isSupported()),ee}getAction(ee){return this._actions[ee]||null}trigger(ee,ue,z){switch(z=z||{},ue){case"compositionStart":this._startComposition();return;case"compositionEnd":this._endComposition(ee);return;case"type":{const $=z;this._type(ee,$.text||"");return}case"replacePreviousChar":{const $=z;this._compositionType(ee,$.text||"",$.replaceCharCnt||0,0,0);return}case"compositionType":{const $=z;this._compositionType(ee,$.text||"",$.replacePrevCharCnt||0,$.replaceNextCharCnt||0,$.positionDelta||0);return}case"paste":{const $=z;this._paste(ee,$.text||"",$.pasteOnNewLine||!1,$.multicursorText||null,$.mode||null);return}case"cut":this._cut(ee);return}const V=this.getAction(ue);if(V){Promise.resolve(V.run()).then(void 0,D.onUnexpectedError);return}!this._modelData||this._triggerEditorCommand(ee,ue,z)||this._triggerCommand(ue,z)}_triggerCommand(ee,ue){this._commandService.executeCommand(ee,ue)}_startComposition(){!this._modelData||(this._modelData.viewModel.startComposition(),this._onDidCompositionStart.fire())}_endComposition(ee){!this._modelData||(this._modelData.viewModel.endComposition(ee),this._onDidCompositionEnd.fire())}_type(ee,ue){!this._modelData||ue.length===0||(ee==="keyboard"&&this._onWillType.fire(ue),this._modelData.viewModel.type(ue,ee),ee==="keyboard"&&this._onDidType.fire(ue))}_compositionType(ee,ue,z,V,$){!this._modelData||this._modelData.viewModel.compositionType(ue,z,V,$,ee)}_paste(ee,ue,z,V,$){if(!this._modelData||ue.length===0)return;const K=this._modelData.viewModel.getSelection().getStartPosition();this._modelData.viewModel.paste(ue,z,V,ee);const J=this._modelData.viewModel.getSelection().getStartPosition();ee==="keyboard"&&this._onDidPaste.fire({range:new s.Range(K.lineNumber,K.column,J.lineNumber,J.column),languageId:$})}_cut(ee){!this._modelData||this._modelData.viewModel.cut(ee)}_triggerEditorCommand(ee,ue,z){const V=h.EditorExtensionsRegistry.getEditorCommand(ue);return V?(z=z||{},z.source=ee,this._instantiationService.invokeFunction($=>{Promise.resolve(V.runEditorCommand($,this,z)).then(void 0,D.onUnexpectedError)}),!0):!1}_getViewModel(){return this._modelData?this._modelData.viewModel:null}pushUndoStop(){return!this._modelData||this._configuration.options.get(81)?!1:(this._modelData.model.pushStackElement(),!0)}popUndoStop(){return!this._modelData||this._configuration.options.get(81)?!1:(this._modelData.model.popStackElement(),!0)}executeEdits(ee,ue,z){if(!this._modelData||this._configuration.options.get(81))return!1;let V;return z?Array.isArray(z)?V=()=>z:V=z:V=()=>null,this._modelData.viewModel.executeEdits(ee,ue,V),!0}executeCommand(ee,ue){!this._modelData||this._modelData.viewModel.executeCommand(ue,ee)}executeCommands(ee,ue){!this._modelData||this._modelData.viewModel.executeCommands(ue,ee)}changeDecorations(ee){return this._modelData?this._modelData.model.changeDecorations(ee,this._id):null}getLineDecorations(ee){return this._modelData?this._modelData.model.getLineDecorations(ee,this._id,(0,n.filterValidationDecorations)(this._configuration.options)):null}getDecorationsInRange(ee){return this._modelData?this._modelData.model.getDecorationsInRange(ee,this._id,(0,n.filterValidationDecorations)(this._configuration.options)):null}deltaDecorations(ee,ue){return this._modelData?ee.length===0&&ue.length===0?ee:this._modelData.model.deltaDecorations(ee,ue,this._id):[]}removeDecorations(ee){const ue=this._decorationTypeKeysToIds[ee];ue&&this.deltaDecorations(ue,[]),this._decorationTypeKeysToIds.hasOwnProperty(ee)&&delete this._decorationTypeKeysToIds[ee],this._decorationTypeSubtypes.hasOwnProperty(ee)&&delete this._decorationTypeSubtypes[ee]}getLayoutInfo(){return this._configuration.options.get(131)}createOverviewRuler(ee){return!this._modelData||!this._modelData.hasRealView?null:this._modelData.view.createOverviewRuler(ee)}getContainerDomNode(){return this._domElement}getDomNode(){return!this._modelData||!this._modelData.hasRealView?null:this._modelData.view.domNode.domNode}delegateVerticalScrollbarMouseDown(ee){!this._modelData||!this._modelData.hasRealView||this._modelData.view.delegateVerticalScrollbarMouseDown(ee)}layout(ee){this._configuration.observeContainer(ee),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(ee){const ue={widget:ee,position:ee.getPosition()};this._contentWidgets.hasOwnProperty(ee.getId())&&console.warn("Overwriting a content widget with the same id."),this._contentWidgets[ee.getId()]=ue,this._modelData&&this._modelData.hasRealView&&this._modelData.view.addContentWidget(ue)}layoutContentWidget(ee){const ue=ee.getId();if(this._contentWidgets.hasOwnProperty(ue)){const z=this._contentWidgets[ue];z.position=ee.getPosition(),this._modelData&&this._modelData.hasRealView&&this._modelData.view.layoutContentWidget(z)}}removeContentWidget(ee){const ue=ee.getId();if(this._contentWidgets.hasOwnProperty(ue)){const z=this._contentWidgets[ue];delete this._contentWidgets[ue],this._modelData&&this._modelData.hasRealView&&this._modelData.view.removeContentWidget(z)}}addOverlayWidget(ee){const ue={widget:ee,position:ee.getPosition()};this._overlayWidgets.hasOwnProperty(ee.getId())&&console.warn("Overwriting an overlay widget with the same id."),this._overlayWidgets[ee.getId()]=ue,this._modelData&&this._modelData.hasRealView&&this._modelData.view.addOverlayWidget(ue)}layoutOverlayWidget(ee){const ue=ee.getId();if(this._overlayWidgets.hasOwnProperty(ue)){const z=this._overlayWidgets[ue];z.position=ee.getPosition(),this._modelData&&this._modelData.hasRealView&&this._modelData.view.layoutOverlayWidget(z)}}removeOverlayWidget(ee){const ue=ee.getId();if(this._overlayWidgets.hasOwnProperty(ue)){const z=this._overlayWidgets[ue];delete this._overlayWidgets[ue],this._modelData&&this._modelData.hasRealView&&this._modelData.view.removeOverlayWidget(z)}}changeViewZones(ee){!this._modelData||!this._modelData.hasRealView||this._modelData.view.change(ee)}getTargetAtClientPoint(ee,ue){return!this._modelData||!this._modelData.hasRealView?null:this._modelData.view.getTargetAtClientPoint(ee,ue)}getScrolledVisiblePosition(ee){if(!this._modelData||!this._modelData.hasRealView)return null;const ue=this._modelData.model.validatePosition(ee),z=this._configuration.options,V=z.get(131),$=zt._getVerticalOffsetForPosition(this._modelData,ue.lineNumber,ue.column)-this.getScrollTop(),K=this._modelData.view.getOffsetForColumn(ue.lineNumber,ue.column)+V.glyphMarginWidth+V.lineNumbersWidth+V.decorationsWidth-this.getScrollLeft();return{top:$,left:K,height:z.get(59)}}getOffsetForColumn(ee,ue){return!this._modelData||!this._modelData.hasRealView?-1:this._modelData.view.getOffsetForColumn(ee,ue)}render(ee=!1){!this._modelData||!this._modelData.hasRealView||this._modelData.view.render(!0,ee)}setAriaOptions(ee){!this._modelData||!this._modelData.hasRealView||this._modelData.view.setAriaOptions(ee)}applyFontInfo(ee){(0,W.applyFontInfo)(ee,this._configuration.options.get(44))}setBanner(ee,ue){this._bannerDomNode&&this._domElement.contains(this._bannerDomNode)&&this._domElement.removeChild(this._bannerDomNode),this._bannerDomNode=ee,this._configuration.setReservedHeight(ee?ue:0),this._bannerDomNode&&this._domElement.prepend(this._bannerDomNode)}_attachModel(ee){if(!ee){this._modelData=null;return}const ue=[];this._domElement.setAttribute("data-mode-id",ee.getLanguageId()),this._configuration.setIsDominatedByLongLines(ee.isDominatedByLongLines()),this._configuration.setModelLineCount(ee.getLineCount()),ee.onBeforeAttached();const z=new C.ViewModel(this._id,this._configuration,ee,R.DOMLineBreaksComputerFactory.create(),T.MonospaceLineBreaksComputerFactory.create(this._configuration.options),K=>m.scheduleAtNextAnimationFrame(K),this.languageConfigurationService);ue.push(ee.onDidChangeDecorations(K=>this._onDidChangeModelDecorations.fire(K))),ue.push(ee.onDidChangeLanguage(K=>{this._domElement.setAttribute("data-mode-id",ee.getLanguageId()),this._onDidChangeModelLanguage.fire(K)})),ue.push(ee.onDidChangeLanguageConfiguration(K=>this._onDidChangeModelLanguageConfiguration.fire(K))),ue.push(ee.onDidChangeContent(K=>this._onDidChangeModelContent.fire(K))),ue.push(ee.onDidChangeOptions(K=>this._onDidChangeModelOptions.fire(K))),ue.push(ee.onWillDispose(()=>this.setModel(null))),ue.push(z.onEvent(K=>{switch(K.kind){case 0:this._onDidContentSizeChange.fire(K);break;case 1:this._editorTextFocus.setValue(K.hasFocus);break;case 2:this._onDidScrollChange.fire(K);break;case 3:this._onDidChangeViewZones.fire();break;case 4:this._onDidChangeHiddenAreas.fire();break;case 5:this._onDidAttemptReadOnlyEdit.fire();break;case 6:{K.reachedMaxCursorCount&&this._notificationService.warn(y.localize(0,null,l.CursorsController.MAX_CURSOR_COUNT));const J=[];for(let ge=0,me=K.selections.length;ge<me;ge++)J[ge]=K.selections[ge].getPosition();const Y={position:J[0],secondaryPositions:J.slice(1),reason:K.reason,source:K.source};this._onDidChangeCursorPosition.fire(Y);const se={selection:K.selections[0],secondarySelections:K.selections.slice(1),modelVersionId:K.modelVersionId,oldSelections:K.oldSelections,oldModelVersionId:K.oldModelVersionId,source:K.source,reason:K.reason};this._onDidChangeCursorSelection.fire(se);break}}}));const[V,$]=this._createView(z);if($){this._domElement.appendChild(V.domNode.domNode);let K=Object.keys(this._contentWidgets);for(let J=0,Y=K.length;J<Y;J++){const se=K[J];V.addContentWidget(this._contentWidgets[se])}K=Object.keys(this._overlayWidgets);for(let J=0,Y=K.length;J<Y;J++){const se=K[J];V.addOverlayWidget(this._overlayWidgets[se])}V.render(!1,!0),V.domNode.domNode.setAttribute("data-uri",ee.uri.toString())}this._modelData=new H(ee,z,V,$,ue)}_createView(ee){let ue;this.isSimpleWidget?ue={paste:($,K,J,Y)=>{this._paste("keyboard",$,K,J,Y)},type:$=>{this._type("keyboard",$)},compositionType:($,K,J,Y)=>{this._compositionType("keyboard",$,K,J,Y)},startComposition:()=>{this._startComposition()},endComposition:()=>{this._endComposition("keyboard")},cut:()=>{this._cut("keyboard")}}:ue={paste:($,K,J,Y)=>{const se={text:$,pasteOnNewLine:K,multicursorText:J,mode:Y};this._commandService.executeCommand("paste",se)},type:$=>{const K={text:$};this._commandService.executeCommand("type",K)},compositionType:($,K,J,Y)=>{if(J||Y){const se={text:$,replacePrevCharCnt:K,replaceNextCharCnt:J,positionDelta:Y};this._commandService.executeCommand("compositionType",se)}else{const se={text:$,replaceCharCnt:K};this._commandService.executeCommand("replacePreviousChar",se)}},startComposition:()=>{this._commandService.executeCommand("compositionStart",{})},endComposition:()=>{this._commandService.executeCommand("compositionEnd",{})},cut:()=>{this._commandService.executeCommand("cut",{})}};const z=new i.ViewUserInputEvents(ee.coordinatesConverter);return z.onKeyDown=$=>this._onKeyDown.fire($),z.onKeyUp=$=>this._onKeyUp.fire($),z.onContextMenu=$=>this._onContextMenu.fire($),z.onMouseMove=$=>this._onMouseMove.fire($),z.onMouseLeave=$=>this._onMouseLeave.fire($),z.onMouseDown=$=>this._onMouseDown.fire($),z.onMouseUp=$=>this._onMouseUp.fire($),z.onMouseDrag=$=>this._onMouseDrag.fire($),z.onMouseDrop=$=>this._onMouseDrop.fire($),z.onMouseDropCanceled=$=>this._onMouseDropCanceled.fire($),z.onMouseWheel=$=>this._onMouseWheel.fire($),[new t.View(ue,this._configuration,this._themeService,ee,z,this._overflowWidgetsDomNode),!0]}_postDetachModelCleanup(ee){ee&&ee.removeAllDecorationsWithOwnerId(this._id)}_detachModel(){if(!this._modelData)return null;const ee=this._modelData.model,ue=this._modelData.hasRealView?this._modelData.view.domNode.domNode:null;return this._modelData.dispose(),this._modelData=null,this._domElement.removeAttribute("data-mode-id"),ue&&this._domElement.contains(ue)&&this._domElement.removeChild(ue),this._bannerDomNode&&this._domElement.contains(this._bannerDomNode)&&this._domElement.removeChild(this._bannerDomNode),ee}_removeDecorationType(ee){this._codeEditorService.removeDecorationType(ee)}hasModel(){return this._modelData!==null}};q=Ie([Ce(3,E.IInstantiationService),Ce(4,g.ICodeEditorService),Ce(5,_.ICommandService),Ce(6,L.IContextKeyService),Ce(7,M.IThemeService),Ce(8,k.INotificationService),Ce(9,O.IAccessibilityService),Ce(10,F.ILanguageConfigurationService)],q),e.CodeEditorWidget=q;class X extends w.Disposable{constructor(){super();this._onDidChangeToTrue=this._register(new I.Emitter),this.onDidChangeToTrue=this._onDidChangeToTrue.event,this._onDidChangeToFalse=this._register(new I.Emitter),this.onDidChangeToFalse=this._onDidChangeToFalse.event,this._value=0}setValue(ee){const ue=ee?2:1;this._value!==ue&&(this._value=ue,this._value===2?this._onDidChangeToTrue.fire():this._value===1&&this._onDidChangeToFalse.fire())}}e.BooleanEventEmitter=X;class G extends w.Disposable{constructor(ee,ue){super();this._editor=ee,ue.createKey("editorId",ee.getId()),this._editorSimpleInput=u.EditorContextKeys.editorSimpleInput.bindTo(ue),this._editorFocus=u.EditorContextKeys.focus.bindTo(ue),this._textInputFocus=u.EditorContextKeys.textInputFocus.bindTo(ue),this._editorTextFocus=u.EditorContextKeys.editorTextFocus.bindTo(ue),this._editorTabMovesFocus=u.EditorContextKeys.tabMovesFocus.bindTo(ue),this._editorReadonly=u.EditorContextKeys.readOnly.bindTo(ue),this._inDiffEditor=u.EditorContextKeys.inDiffEditor.bindTo(ue),this._editorColumnSelection=u.EditorContextKeys.columnSelection.bindTo(ue),this._hasMultipleSelections=u.EditorContextKeys.hasMultipleSelections.bindTo(ue),this._hasNonEmptySelection=u.EditorContextKeys.hasNonEmptySelection.bindTo(ue),this._canUndo=u.EditorContextKeys.canUndo.bindTo(ue),this._canRedo=u.EditorContextKeys.canRedo.bindTo(ue),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._updateFromConfig(),this._updateFromSelection(),this._updateFromFocus(),this._updateFromModel(),this._editorSimpleInput.set(this._editor.isSimpleWidget)}_updateFromConfig(){const ee=this._editor.getOptions();this._editorTabMovesFocus.set(ee.get(130)),this._editorReadonly.set(ee.get(81)),this._inDiffEditor.set(ee.get(54)),this._editorColumnSelection.set(ee.get(18))}_updateFromSelection(){const ee=this._editor.getSelections();ee?(this._hasMultipleSelections.set(ee.length>1),this._hasNonEmptySelection.set(ee.some(ue=>!ue.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 ee=this._editor.getModel();this._canUndo.set(Boolean(ee&&ee.canUndo())),this._canRedo.set(Boolean(ee&&ee.canRedo()))}}class re extends w.Disposable{constructor(ee,ue){super();this._editor=ee,this._contextKeyService=ue,this._langId=u.EditorContextKeys.languageId.bindTo(ue),this._hasCompletionItemProvider=u.EditorContextKeys.hasCompletionItemProvider.bindTo(ue),this._hasCodeActionsProvider=u.EditorContextKeys.hasCodeActionsProvider.bindTo(ue),this._hasCodeLensProvider=u.EditorContextKeys.hasCodeLensProvider.bindTo(ue),this._hasDefinitionProvider=u.EditorContextKeys.hasDefinitionProvider.bindTo(ue),this._hasDeclarationProvider=u.EditorContextKeys.hasDeclarationProvider.bindTo(ue),this._hasImplementationProvider=u.EditorContextKeys.hasImplementationProvider.bindTo(ue),this._hasTypeDefinitionProvider=u.EditorContextKeys.hasTypeDefinitionProvider.bindTo(ue),this._hasHoverProvider=u.EditorContextKeys.hasHoverProvider.bindTo(ue),this._hasDocumentHighlightProvider=u.EditorContextKeys.hasDocumentHighlightProvider.bindTo(ue),this._hasDocumentSymbolProvider=u.EditorContextKeys.hasDocumentSymbolProvider.bindTo(ue),this._hasReferenceProvider=u.EditorContextKeys.hasReferenceProvider.bindTo(ue),this._hasRenameProvider=u.EditorContextKeys.hasRenameProvider.bindTo(ue),this._hasSignatureHelpProvider=u.EditorContextKeys.hasSignatureHelpProvider.bindTo(ue),this._hasInlayHintsProvider=u.EditorContextKeys.hasInlayHintsProvider.bindTo(ue),this._hasDocumentFormattingProvider=u.EditorContextKeys.hasDocumentFormattingProvider.bindTo(ue),this._hasDocumentSelectionFormattingProvider=u.EditorContextKeys.hasDocumentSelectionFormattingProvider.bindTo(ue),this._hasMultipleDocumentFormattingProvider=u.EditorContextKeys.hasMultipleDocumentFormattingProvider.bindTo(ue),this._hasMultipleDocumentSelectionFormattingProvider=u.EditorContextKeys.hasMultipleDocumentSelectionFormattingProvider.bindTo(ue),this._isInWalkThrough=u.EditorContextKeys.isInWalkThroughSnippet.bindTo(ue);const z=()=>this._update();this._register(ee.onDidChangeModel(z)),this._register(ee.onDidChangeModelLanguage(z)),this._register(f.CompletionProviderRegistry.onDidChange(z)),this._register(f.CodeActionProviderRegistry.onDidChange(z)),this._register(f.CodeLensProviderRegistry.onDidChange(z)),this._register(f.DefinitionProviderRegistry.onDidChange(z)),this._register(f.DeclarationProviderRegistry.onDidChange(z)),this._register(f.ImplementationProviderRegistry.onDidChange(z)),this._register(f.TypeDefinitionProviderRegistry.onDidChange(z)),this._register(f.HoverProviderRegistry.onDidChange(z)),this._register(f.DocumentHighlightProviderRegistry.onDidChange(z)),this._register(f.DocumentSymbolProviderRegistry.onDidChange(z)),this._register(f.ReferenceProviderRegistry.onDidChange(z)),this._register(f.RenameProviderRegistry.onDidChange(z)),this._register(f.DocumentFormattingEditProviderRegistry.onDidChange(z)),this._register(f.DocumentRangeFormattingEditProviderRegistry.onDidChange(z)),this._register(f.SignatureHelpProviderRegistry.onDidChange(z)),this._register(f.InlayHintsProviderRegistry.onDidChange(z)),z()}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._isInWalkThrough.reset()})}_update(){const ee=this._editor.getModel();if(!ee){this.reset();return}this._contextKeyService.bufferChangeEvents(()=>{this._langId.set(ee.getLanguageId()),this._hasCompletionItemProvider.set(f.CompletionProviderRegistry.has(ee)),this._hasCodeActionsProvider.set(f.CodeActionProviderRegistry.has(ee)),this._hasCodeLensProvider.set(f.CodeLensProviderRegistry.has(ee)),this._hasDefinitionProvider.set(f.DefinitionProviderRegistry.has(ee)),this._hasDeclarationProvider.set(f.DeclarationProviderRegistry.has(ee)),this._hasImplementationProvider.set(f.ImplementationProviderRegistry.has(ee)),this._hasTypeDefinitionProvider.set(f.TypeDefinitionProviderRegistry.has(ee)),this._hasHoverProvider.set(f.HoverProviderRegistry.has(ee)),this._hasDocumentHighlightProvider.set(f.DocumentHighlightProviderRegistry.has(ee)),this._hasDocumentSymbolProvider.set(f.DocumentSymbolProviderRegistry.has(ee)),this._hasReferenceProvider.set(f.ReferenceProviderRegistry.has(ee)),this._hasRenameProvider.set(f.RenameProviderRegistry.has(ee)),this._hasSignatureHelpProvider.set(f.SignatureHelpProviderRegistry.has(ee)),this._hasInlayHintsProvider.set(f.InlayHintsProviderRegistry.has(ee)),this._hasDocumentFormattingProvider.set(f.DocumentFormattingEditProviderRegistry.has(ee)||f.DocumentRangeFormattingEditProviderRegistry.has(ee)),this._hasDocumentSelectionFormattingProvider.set(f.DocumentRangeFormattingEditProviderRegistry.has(ee)),this._hasMultipleDocumentFormattingProvider.set(f.DocumentFormattingEditProviderRegistry.all(ee).length+f.DocumentRangeFormattingEditProviderRegistry.all(ee).length>1),this._hasMultipleDocumentSelectionFormattingProvider.set(f.DocumentRangeFormattingEditProviderRegistry.all(ee).length>1),this._isInWalkThrough.set(ee.uri.scheme===b.Schemas.walkThroughSnippet)})}}e.EditorModeContext=re;class ae extends w.Disposable{constructor(ee){super();this._onChange=this._register(new I.Emitter),this.onChange=this._onChange.event,this._hasFocus=!1,this._domFocusTracker=this._register(m.trackFocus(ee)),this._register(this._domFocusTracker.onDidFocus(()=>{this._hasFocus=!0,this._onChange.fire(void 0)})),this._register(this._domFocusTracker.onDidBlur(()=>{this._hasFocus=!1,this._onChange.fire(void 0)}))}hasFocus(){return this._hasFocus}}const oe=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='"),Z=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 x(ce){return oe+encodeURIComponent(ce.toString())+Z}const U=encodeURIComponent('<svg xmlns="http://www.w3.org/2000/svg" height="3" width="12"><g fill="'),Q=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(ce){return U+encodeURIComponent(ce.toString())+Q}(0,M.registerThemingParticipant)((ce,ee)=>{const ue=ce.getColor(v.editorErrorBorder);ue&&ee.addRule(`.monaco-editor .squiggly-error { border-bottom: 4px double ${ue}; }`);const z=ce.getColor(v.editorErrorForeground);z&&ee.addRule(`.monaco-editor .squiggly-error { background: url("data:image/svg+xml,${x(z)}") repeat-x bottom left; }`);const V=ce.getColor(v.editorErrorBackground);V&&ee.addRule(`.monaco-editor .squiggly-error::before { display: block; content: ''; width: 100%; height: 100%; background: ${V}; }`);const $=ce.getColor(v.editorWarningBorder);$&&ee.addRule(`.monaco-editor .squiggly-warning { border-bottom: 4px double ${$}; }`);const K=ce.getColor(v.editorWarningForeground);K&&ee.addRule(`.monaco-editor .squiggly-warning { background: url("data:image/svg+xml,${x(K)}") repeat-x bottom left; }`);const J=ce.getColor(v.editorWarningBackground);J&&ee.addRule(`.monaco-editor .squiggly-warning::before { display: block; content: ''; width: 100%; height: 100%; background: ${J}; }`);const Y=ce.getColor(v.editorInfoBorder);Y&&ee.addRule(`.monaco-editor .squiggly-info { border-bottom: 4px double ${Y}; }`);const se=ce.getColor(v.editorInfoForeground);se&&ee.addRule(`.monaco-editor .squiggly-info { background: url("data:image/svg+xml,${x(se)}") repeat-x bottom left; }`);const ge=ce.getColor(v.editorInfoBackground);ge&&ee.addRule(`.monaco-editor .squiggly-info::before { display: block; content: ''; width: 100%; height: 100%; background: ${ge}; }`);const me=ce.getColor(v.editorHintBorder);me&&ee.addRule(`.monaco-editor .squiggly-hint { border-bottom: 2px dotted ${me}; }`);const le=ce.getColor(v.editorHintForeground);le&&ee.addRule(`.monaco-editor .squiggly-hint { background: url("data:image/svg+xml,${ne(le)}") no-repeat bottom left; }`);const he=ce.getColor(S.editorUnnecessaryCodeOpacity);he&&ee.addRule(`.monaco-editor.showUnused .squiggly-inline-unnecessary { opacity: ${he.rgba.a}; }`);const ve=ce.getColor(S.editorUnnecessaryCodeBorder);ve&&ee.addRule(`.monaco-editor.showUnused .squiggly-unnecessary { border-bottom: 2px dashed ${ve}; }`);const pe=ce.getColor(v.editorForeground)||"inherit";ee.addRule(`.monaco-editor.showDeprecated .squiggly-inline-deprecated { text-decoration: line-through; text-decoration-color: ${pe}}`)})}),define(te[292],ie([1,0,501,7,30,114,10,4,2,62,143,28,161,692,31,3,90,147,33,85,252,151,122,69,16,9,154,38,23,14,76,504,102,15,13,71,230,27,141,72,365]),function(j,e,y,m,D,I,w,b,p,h,g,t,i,n,l,c,r,s,o,a,d,u,f,S,v,C,_,L,E,N,k,M,O,B,T,R,P,F,W,A){"use strict";var H;Object.defineProperty(e,"__esModule",{value:!0}),e.DiffEditorWidget=void 0;class q{constructor(le,he){this._contextMenuService=le,this._clipboardService=he,this._zones=[],this._inlineDiffMargins=[],this._zonesMap={},this._decorations=[]}getForeignViewZones(le){return le.filter(he=>!this._zonesMap[String(he.id)])}clean(le){this._zones.length>0&&le.changeViewZones(he=>{for(const ve of this._zones)he.removeZone(ve)}),this._zones=[],this._zonesMap={},this._decorations=le.deltaDecorations(this._decorations,[])}apply(le,he,ve,pe){const be=pe?g.StableEditorScrollState.capture(le):null;le.changeViewZones(de=>{var fe;for(const _e of this._zones)de.removeZone(_e);for(const _e of this._inlineDiffMargins)_e.dispose();this._zones=[],this._zonesMap={},this._inlineDiffMargins=[];for(let _e=0,Le=ve.zones.length;_e<Le;_e++){const Te=ve.zones[_e];Te.suppressMouseDown=!0;const ke=de.addZone(Te);this._zones.push(ke),this._zonesMap[String(ke)]=!0,ve.zones[_e].diff&&Te.marginDomNode&&(Te.suppressMouseDown=!1,((fe=ve.zones[_e].diff)===null||fe===void 0?void 0:fe.originalModel.getValueLength())!==0&&this._inlineDiffMargins.push(new M.InlineDiffMargin(ke,Te.marginDomNode,le,ve.zones[_e].diff,this._contextMenuService,this._clipboardService)))}}),be&&be.restore(le),this._decorations=le.deltaDecorations(this._decorations,ve.decorations),he&&he.setZones(ve.overviewZones)}}let X=0;const G=(0,A.registerIcon)("diff-insert",F.Codicon.add,y.localize(0,null)),re=(0,A.registerIcon)("diff-remove",F.Codicon.remove,y.localize(1,null)),ae=(H=window.trustedTypes)===null||H===void 0?void 0:H.createPolicy("diffEditorWidget",{createHTML:me=>me});let oe=class ot extends p.Disposable{constructor(le,he,ve,pe,be,de,fe,_e,Le,Te,ke,Me){super();this._editorProgressService=Me,this._onDidDispose=this._register(new b.Emitter),this.onDidDispose=this._onDidDispose.event,this._onDidUpdateDiff=this._register(new b.Emitter),this.onDidUpdateDiff=this._onDidUpdateDiff.event,this._onDidContentSizeChange=this._register(new b.Emitter),this._lastOriginalWarning=null,this._lastModifiedWarning=null,this._editorWorkerService=be,this._codeEditorService=_e,this._contextKeyService=this._register(de.createScoped(le)),this._instantiationService=fe.createChild(new _.ServiceCollection([v.IContextKeyService,this._contextKeyService])),this._contextKeyService.createKey("isInDiffEditor",!0),this._themeService=Le,this._notificationService=Te,this._id=++X,this._state=0,this._updatingDiffProgress=null,this._domElement=le,he=he||{},this._options=se(he,{enableSplitViewResizing:!0,renderSideBySide:!0,maxComputationTime:5e3,maxFileSize:50,ignoreTrimWhitespace:!0,renderIndicators:!0,originalEditable:!1,diffCodeLens:!1,renderOverviewRuler:!0,diffWordWrap:"inherit"}),typeof he.isInEmbeddedEditor!="undefined"?this._contextKeyService.createKey("isInEmbeddedDiffEditor",he.isInEmbeddedEditor):this._contextKeyService.createKey("isInEmbeddedDiffEditor",!1),this._updateDecorationsRunner=this._register(new w.RunOnceScheduler(()=>this._updateDecorations(),0)),this._containerDomElement=document.createElement("div"),this._containerDomElement.className=ot._getClassName(this._themeService.getColorTheme(),this._options.renderSideBySide),this._containerDomElement.style.position="relative",this._containerDomElement.style.height="100%",this._domElement.appendChild(this._containerDomElement),this._overviewViewportDomElement=(0,D.createFastDomNode)(document.createElement("div")),this._overviewViewportDomElement.setClassName("diffViewport"),this._overviewViewportDomElement.setPosition("absolute"),this._overviewDomElement=document.createElement("div"),this._overviewDomElement.className="diffOverview",this._overviewDomElement.style.position="absolute",this._overviewDomElement.appendChild(this._overviewViewportDomElement.domNode),this._register(m.addStandardDisposableListener(this._overviewDomElement,"mousedown",He=>{this._modifiedEditor.delegateVerticalScrollbarMouseDown(He)})),this._options.renderOverviewRuler&&this._containerDomElement.appendChild(this._overviewDomElement),this._originalDomNode=document.createElement("div"),this._originalDomNode.className="editor original",this._originalDomNode.style.position="absolute",this._originalDomNode.style.height="100%",this._containerDomElement.appendChild(this._originalDomNode),this._modifiedDomNode=document.createElement("div"),this._modifiedDomNode.className="editor modified",this._modifiedDomNode.style.position="absolute",this._modifiedDomNode.style.height="100%",this._containerDomElement.appendChild(this._modifiedDomNode),this._beginUpdateDecorationsTimeout=-1,this._currentlyChangingViewZones=!1,this._diffComputationToken=0,this._originalEditorState=new q(ke,pe),this._modifiedEditorState=new q(ke,pe),this._isVisible=!0,this._isHandlingScrollEvent=!1,this._elementSizeObserver=this._register(new P.ElementSizeObserver(this._containerDomElement,he.dimension)),this._register(this._elementSizeObserver.onDidChange(()=>this._onDidContainerSizeChanged())),he.automaticLayout&&this._elementSizeObserver.startObserving(),this._diffComputationResult=null,this._originalEditor=this._createLeftHandSideEditor(he,ve.originalEditor||{}),this._modifiedEditor=this._createRightHandSideEditor(he,ve.modifiedEditor||{}),this._originalOverviewRuler=null,this._modifiedOverviewRuler=null,this._reviewPane=fe.createInstance(n.DiffReview,this),this._containerDomElement.appendChild(this._reviewPane.domNode.domNode),this._containerDomElement.appendChild(this._reviewPane.shadow.domNode),this._containerDomElement.appendChild(this._reviewPane.actionBarContainer.domNode),this._options.renderSideBySide?this._setStrategy(new ce(this._createDataSource(),this._options.enableSplitViewResizing)):this._setStrategy(new ue(this._createDataSource(),this._options.enableSplitViewResizing)),this._register(Le.onDidColorThemeChange(He=>{this._strategy&&this._strategy.applyColors(He)&&this._updateDecorationsRunner.schedule(),this._containerDomElement.className=ot._getClassName(this._themeService.getColorTheme(),this._options.renderSideBySide)}));const $e=B.EditorExtensionsRegistry.getDiffEditorContributions();for(const He of $e)try{this._register(fe.createInstance(He.ctor,this))}catch(Ge){(0,T.onUnexpectedError)(Ge)}this._codeEditorService.addDiffEditor(this)}_setState(le){this._state!==le&&(this._state=le,this._updatingDiffProgress&&(this._updatingDiffProgress.done(),this._updatingDiffProgress=null),this._state===1&&(this._updatingDiffProgress=this._editorProgressService.show(!0,1e3)))}diffReviewNext(){this._reviewPane.next()}diffReviewPrev(){this._reviewPane.prev()}static _getClassName(le,he){let ve="monaco-diff-editor monaco-editor-background ";return he&&(ve+="side-by-side "),ve+=(0,N.getThemeTypeSelector)(le.type),ve}_recreateOverviewRulers(){!this._options.renderOverviewRuler||(this._originalOverviewRuler&&(this._overviewDomElement.removeChild(this._originalOverviewRuler.getDomNode()),this._originalOverviewRuler.dispose()),this._originalEditor.hasModel()&&(this._originalOverviewRuler=this._originalEditor.createOverviewRuler("original diffOverviewRuler"),this._overviewDomElement.appendChild(this._originalOverviewRuler.getDomNode())),this._modifiedOverviewRuler&&(this._overviewDomElement.removeChild(this._modifiedOverviewRuler.getDomNode()),this._modifiedOverviewRuler.dispose()),this._modifiedEditor.hasModel()&&(this._modifiedOverviewRuler=this._modifiedEditor.createOverviewRuler("modified diffOverviewRuler"),this._overviewDomElement.appendChild(this._modifiedOverviewRuler.getDomNode())),this._layoutOverviewRulers())}_createLeftHandSideEditor(le,he){const ve=this._createInnerEditor(this._instantiationService,this._originalDomNode,this._adjustOptionsForLeftHandSide(le),he);this._register(ve.onDidScrollChange(be=>{this._isHandlingScrollEvent||!be.scrollTopChanged&&!be.scrollLeftChanged&&!be.scrollHeightChanged||(this._isHandlingScrollEvent=!0,this._modifiedEditor.setScrollPosition({scrollLeft:be.scrollLeft,scrollTop:be.scrollTop}),this._isHandlingScrollEvent=!1,this._layoutOverviewViewport())})),this._register(ve.onDidChangeViewZones(()=>{this._onViewZonesChanged()})),this._register(ve.onDidChangeConfiguration(be=>{!ve.getModel()||(be.hasChanged(44)&&this._updateDecorationsRunner.schedule(),be.hasChanged(132)&&(this._updateDecorationsRunner.cancel(),this._updateDecorations()))})),this._register(ve.onDidChangeHiddenAreas(()=>{this._updateDecorationsRunner.cancel(),this._updateDecorations()})),this._register(ve.onDidChangeModelContent(()=>{this._isVisible&&this._beginUpdateDecorationsSoon()}));const pe=this._contextKeyService.createKey("isInDiffLeftEditor",ve.hasWidgetFocus());return this._register(ve.onDidFocusEditorWidget(()=>pe.set(!0))),this._register(ve.onDidBlurEditorWidget(()=>pe.set(!1))),this._register(ve.onDidContentSizeChange(be=>{const de=this._originalEditor.getContentWidth()+this._modifiedEditor.getContentWidth()+ot.ONE_OVERVIEW_WIDTH,fe=Math.max(this._modifiedEditor.getContentHeight(),this._originalEditor.getContentHeight());this._onDidContentSizeChange.fire({contentHeight:fe,contentWidth:de,contentHeightChanged:be.contentHeightChanged,contentWidthChanged:be.contentWidthChanged})})),ve}_createRightHandSideEditor(le,he){const ve=this._createInnerEditor(this._instantiationService,this._modifiedDomNode,this._adjustOptionsForRightHandSide(le),he);this._register(ve.onDidScrollChange(be=>{this._isHandlingScrollEvent||!be.scrollTopChanged&&!be.scrollLeftChanged&&!be.scrollHeightChanged||(this._isHandlingScrollEvent=!0,this._originalEditor.setScrollPosition({scrollLeft:be.scrollLeft,scrollTop:be.scrollTop}),this._isHandlingScrollEvent=!1,this._layoutOverviewViewport())})),this._register(ve.onDidChangeViewZones(()=>{this._onViewZonesChanged()})),this._register(ve.onDidChangeConfiguration(be=>{!ve.getModel()||(be.hasChanged(44)&&this._updateDecorationsRunner.schedule(),be.hasChanged(132)&&(this._updateDecorationsRunner.cancel(),this._updateDecorations()))})),this._register(ve.onDidChangeHiddenAreas(()=>{this._updateDecorationsRunner.cancel(),this._updateDecorations()})),this._register(ve.onDidChangeModelContent(()=>{this._isVisible&&this._beginUpdateDecorationsSoon()})),this._register(ve.onDidChangeModelOptions(be=>{be.tabSize&&this._updateDecorationsRunner.schedule()}));const pe=this._contextKeyService.createKey("isInDiffRightEditor",ve.hasWidgetFocus());return this._register(ve.onDidFocusEditorWidget(()=>pe.set(!0))),this._register(ve.onDidBlurEditorWidget(()=>pe.set(!1))),this._register(ve.onDidContentSizeChange(be=>{const de=this._originalEditor.getContentWidth()+this._modifiedEditor.getContentWidth()+ot.ONE_OVERVIEW_WIDTH,fe=Math.max(this._modifiedEditor.getContentHeight(),this._originalEditor.getContentHeight());this._onDidContentSizeChange.fire({contentHeight:fe,contentWidth:de,contentHeightChanged:be.contentHeightChanged,contentWidthChanged:be.contentWidthChanged})})),ve}_createInnerEditor(le,he,ve,pe){return le.createInstance(i.CodeEditorWidget,he,ve,pe)}dispose(){this._codeEditorService.removeDiffEditor(this),this._beginUpdateDecorationsTimeout!==-1&&(window.clearTimeout(this._beginUpdateDecorationsTimeout),this._beginUpdateDecorationsTimeout=-1),this._cleanViewZonesAndDecorations(),this._originalOverviewRuler&&(this._overviewDomElement.removeChild(this._originalOverviewRuler.getDomNode()),this._originalOverviewRuler.dispose()),this._modifiedOverviewRuler&&(this._overviewDomElement.removeChild(this._modifiedOverviewRuler.getDomNode()),this._modifiedOverviewRuler.dispose()),this._overviewDomElement.removeChild(this._overviewViewportDomElement.domNode),this._options.renderOverviewRuler&&this._containerDomElement.removeChild(this._overviewDomElement),this._containerDomElement.removeChild(this._originalDomNode),this._originalEditor.dispose(),this._containerDomElement.removeChild(this._modifiedDomNode),this._modifiedEditor.dispose(),this._strategy.dispose(),this._containerDomElement.removeChild(this._reviewPane.domNode.domNode),this._containerDomElement.removeChild(this._reviewPane.shadow.domNode),this._containerDomElement.removeChild(this._reviewPane.actionBarContainer.domNode),this._reviewPane.dispose(),this._domElement.removeChild(this._containerDomElement),this._onDidDispose.fire(),super.dispose()}getId(){return this.getEditorType()+":"+this._id}getEditorType(){return s.EditorType.IDiffEditor}getLineChanges(){return this._diffComputationResult?this._diffComputationResult.changes:null}getOriginalEditor(){return this._originalEditor}getModifiedEditor(){return this._modifiedEditor}updateOptions(le){const he=se(le,this._options),ve=ge(this._options,he);this._options=he;const pe=ve.ignoreTrimWhitespace||ve.renderIndicators,be=this._isVisible&&(ve.maxComputationTime||ve.maxFileSize);pe?this._beginUpdateDecorations():be&&this._beginUpdateDecorationsSoon(),this._modifiedEditor.updateOptions(this._adjustOptionsForRightHandSide(le)),this._originalEditor.updateOptions(this._adjustOptionsForLeftHandSide(le)),this._strategy.setEnableSplitViewResizing(this._options.enableSplitViewResizing),ve.renderSideBySide&&(this._options.renderSideBySide?this._setStrategy(new ce(this._createDataSource(),this._options.enableSplitViewResizing)):this._setStrategy(new ue(this._createDataSource(),this._options.enableSplitViewResizing)),this._containerDomElement.className=ot._getClassName(this._themeService.getColorTheme(),this._options.renderSideBySide)),ve.renderOverviewRuler&&(this._options.renderOverviewRuler?this._containerDomElement.appendChild(this._overviewDomElement):this._containerDomElement.removeChild(this._overviewDomElement))}getModel(){return{original:this._originalEditor.getModel(),modified:this._modifiedEditor.getModel()}}setModel(le){if(le&&(!le.original||!le.modified))throw new Error(le.original?"DiffEditorWidget.setModel: Modified model is null":"DiffEditorWidget.setModel: Original model is null");this._cleanViewZonesAndDecorations(),this._originalEditor.setModel(le?le.original:null),this._modifiedEditor.setModel(le?le.modified:null),this._updateDecorationsRunner.cancel(),le&&(this._originalEditor.setScrollTop(0),this._modifiedEditor.setScrollTop(0)),this._diffComputationResult=null,this._diffComputationToken++,this._setState(0),le&&(this._recreateOverviewRulers(),this._beginUpdateDecorations()),this._layoutOverviewViewport()}getContainerDomNode(){return this._domElement}getVisibleColumnFromPosition(le){return this._modifiedEditor.getVisibleColumnFromPosition(le)}getPosition(){return this._modifiedEditor.getPosition()}setPosition(le){this._modifiedEditor.setPosition(le)}revealLine(le,he=0){this._modifiedEditor.revealLine(le,he)}revealLineInCenter(le,he=0){this._modifiedEditor.revealLineInCenter(le,he)}revealLineInCenterIfOutsideViewport(le,he=0){this._modifiedEditor.revealLineInCenterIfOutsideViewport(le,he)}revealLineNearTop(le,he=0){this._modifiedEditor.revealLineNearTop(le,he)}revealPosition(le,he=0){this._modifiedEditor.revealPosition(le,he)}revealPositionInCenter(le,he=0){this._modifiedEditor.revealPositionInCenter(le,he)}revealPositionInCenterIfOutsideViewport(le,he=0){this._modifiedEditor.revealPositionInCenterIfOutsideViewport(le,he)}revealPositionNearTop(le,he=0){this._modifiedEditor.revealPositionNearTop(le,he)}getSelection(){return this._modifiedEditor.getSelection()}getSelections(){return this._modifiedEditor.getSelections()}setSelection(le){this._modifiedEditor.setSelection(le)}setSelections(le){this._modifiedEditor.setSelections(le)}revealLines(le,he,ve=0){this._modifiedEditor.revealLines(le,he,ve)}revealLinesInCenter(le,he,ve=0){this._modifiedEditor.revealLinesInCenter(le,he,ve)}revealLinesInCenterIfOutsideViewport(le,he,ve=0){this._modifiedEditor.revealLinesInCenterIfOutsideViewport(le,he,ve)}revealLinesNearTop(le,he,ve=0){this._modifiedEditor.revealLinesNearTop(le,he,ve)}revealRange(le,he=0,ve=!1,pe=!0){this._modifiedEditor.revealRange(le,he,ve,pe)}revealRangeInCenter(le,he=0){this._modifiedEditor.revealRangeInCenter(le,he)}revealRangeInCenterIfOutsideViewport(le,he=0){this._modifiedEditor.revealRangeInCenterIfOutsideViewport(le,he)}revealRangeNearTop(le,he=0){this._modifiedEditor.revealRangeNearTop(le,he)}revealRangeNearTopIfOutsideViewport(le,he=0){this._modifiedEditor.revealRangeNearTopIfOutsideViewport(le,he)}revealRangeAtTop(le,he=0){this._modifiedEditor.revealRangeAtTop(le,he)}getSupportedActions(){return this._modifiedEditor.getSupportedActions()}saveViewState(){const le=this._originalEditor.saveViewState(),he=this._modifiedEditor.saveViewState();return{original:le,modified:he}}restoreViewState(le){if(le&&le.original&&le.modified){const he=le;this._originalEditor.restoreViewState(he.original),this._modifiedEditor.restoreViewState(he.modified)}}layout(le){this._elementSizeObserver.observe(le)}focus(){this._modifiedEditor.focus()}hasTextFocus(){return this._originalEditor.hasTextFocus()||this._modifiedEditor.hasTextFocus()}trigger(le,he,ve){this._modifiedEditor.trigger(le,he,ve)}changeDecorations(le){return this._modifiedEditor.changeDecorations(le)}_onDidContainerSizeChanged(){this._doLayout()}_getReviewHeight(){return this._reviewPane.isVisible()?this._elementSizeObserver.getHeight():0}_layoutOverviewRulers(){if(!this._options.renderOverviewRuler||!this._originalOverviewRuler||!this._modifiedOverviewRuler)return;const le=this._elementSizeObserver.getHeight(),he=this._getReviewHeight(),ve=ot.ENTIRE_DIFF_OVERVIEW_WIDTH-2*ot.ONE_OVERVIEW_WIDTH;this._modifiedEditor.getLayoutInfo()&&(this._originalOverviewRuler.setLayout({top:0,width:ot.ONE_OVERVIEW_WIDTH,right:ve+ot.ONE_OVERVIEW_WIDTH,height:le-he}),this._modifiedOverviewRuler.setLayout({top:0,right:0,width:ot.ONE_OVERVIEW_WIDTH,height:le-he}))}_onViewZonesChanged(){this._currentlyChangingViewZones||this._updateDecorationsRunner.schedule()}_beginUpdateDecorationsSoon(){this._beginUpdateDecorationsTimeout!==-1&&(window.clearTimeout(this._beginUpdateDecorationsTimeout),this._beginUpdateDecorationsTimeout=-1),this._beginUpdateDecorationsTimeout=window.setTimeout(()=>this._beginUpdateDecorations(),ot.UPDATE_DIFF_DECORATIONS_DELAY)}static _equals(le,he){return!le&&!he?!0:!le||!he?!1:le.toString()===he.toString()}_beginUpdateDecorations(){this._beginUpdateDecorationsTimeout=-1;const le=this._originalEditor.getModel(),he=this._modifiedEditor.getModel();if(!le||!he)return;this._diffComputationToken++;const ve=this._diffComputationToken,pe=this._options.maxFileSize*1024*1024,be=de=>{const fe=de.getValueLength();return pe===0||fe<=pe};if(!be(le)||!be(he)){(!ot._equals(le.uri,this._lastOriginalWarning)||!ot._equals(he.uri,this._lastModifiedWarning))&&(this._lastOriginalWarning=le.uri,this._lastModifiedWarning=he.uri,this._notificationService.warn(y.localize(2,null)));return}this._setState(1),this._editorWorkerService.computeDiff(le.uri,he.uri,this._options.ignoreTrimWhitespace,this._options.maxComputationTime).then(de=>{ve===this._diffComputationToken&&le===this._originalEditor.getModel()&&he===this._modifiedEditor.getModel()&&(this._setState(2),this._diffComputationResult=de,this._updateDecorationsRunner.schedule(),this._onDidUpdateDiff.fire())},de=>{ve===this._diffComputationToken&&le===this._originalEditor.getModel()&&he===this._modifiedEditor.getModel()&&(this._setState(2),this._diffComputationResult=null,this._updateDecorationsRunner.schedule())})}_cleanViewZonesAndDecorations(){this._originalEditorState.clean(this._originalEditor),this._modifiedEditorState.clean(this._modifiedEditor)}_updateDecorations(){if(!this._originalEditor.getModel()||!this._modifiedEditor.getModel())return;const le=this._diffComputationResult?this._diffComputationResult.changes:[],he=this._originalEditorState.getForeignViewZones(this._originalEditor.getWhitespaces()),ve=this._modifiedEditorState.getForeignViewZones(this._modifiedEditor.getWhitespaces()),pe=this._strategy.getEditorsDiffDecorations(le,this._options.ignoreTrimWhitespace,this._options.renderIndicators,he,ve);try{this._currentlyChangingViewZones=!0,this._originalEditorState.apply(this._originalEditor,this._originalOverviewRuler,pe.original,!1),this._modifiedEditorState.apply(this._modifiedEditor,this._modifiedOverviewRuler,pe.modified,!0)}finally{this._currentlyChangingViewZones=!1}}_adjustOptionsForSubEditor(le){const he=Object.assign({},le);return he.inDiffEditor=!0,he.automaticLayout=!1,he.scrollbar=Object.assign({},he.scrollbar||{}),he.scrollbar.vertical="visible",he.folding=!1,he.codeLens=this._options.diffCodeLens,he.fixedOverflowWidgets=!0,he.minimap=Object.assign({},he.minimap||{}),he.minimap.enabled=!1,he}_adjustOptionsForLeftHandSide(le){const he=this._adjustOptionsForSubEditor(le);return this._options.renderSideBySide?he.wordWrapOverride1=this._options.diffWordWrap:he.wordWrapOverride1="off",le.originalAriaLabel&&(he.ariaLabel=le.originalAriaLabel),he.readOnly=!this._options.originalEditable,he.extraEditorClassName="original-in-monaco-diff-editor",Object.assign(Object.assign({},he),{dimension:{height:0,width:0}})}_adjustOptionsForRightHandSide(le){const he=this._adjustOptionsForSubEditor(le);return le.modifiedAriaLabel&&(he.ariaLabel=le.modifiedAriaLabel),he.wordWrapOverride1=this._options.diffWordWrap,he.revealHorizontalRightPadding=l.EditorOptions.revealHorizontalRightPadding.defaultValue+ot.ENTIRE_DIFF_OVERVIEW_WIDTH,he.scrollbar.verticalHasArrows=!1,he.extraEditorClassName="modified-in-monaco-diff-editor",Object.assign(Object.assign({},he),{dimension:{height:0,width:0}})}doLayout(){this._elementSizeObserver.observe(),this._doLayout()}_doLayout(){const le=this._elementSizeObserver.getWidth(),he=this._elementSizeObserver.getHeight(),ve=this._getReviewHeight(),pe=this._strategy.layout();this._originalDomNode.style.width=pe+"px",this._originalDomNode.style.left="0px",this._modifiedDomNode.style.width=le-pe+"px",this._modifiedDomNode.style.left=pe+"px",this._overviewDomElement.style.top="0px",this._overviewDomElement.style.height=he-ve+"px",this._overviewDomElement.style.width=ot.ENTIRE_DIFF_OVERVIEW_WIDTH+"px",this._overviewDomElement.style.left=le-ot.ENTIRE_DIFF_OVERVIEW_WIDTH+"px",this._overviewViewportDomElement.setWidth(ot.ENTIRE_DIFF_OVERVIEW_WIDTH),this._overviewViewportDomElement.setHeight(30),this._originalEditor.layout({width:pe,height:he-ve}),this._modifiedEditor.layout({width:le-pe-(this._options.renderOverviewRuler?ot.ENTIRE_DIFF_OVERVIEW_WIDTH:0),height:he-ve}),(this._originalOverviewRuler||this._modifiedOverviewRuler)&&this._layoutOverviewRulers(),this._reviewPane.layout(he-ve,le,ve),this._layoutOverviewViewport()}_layoutOverviewViewport(){const le=this._computeOverviewViewport();le?(this._overviewViewportDomElement.setTop(le.top),this._overviewViewportDomElement.setHeight(le.height)):(this._overviewViewportDomElement.setTop(0),this._overviewViewportDomElement.setHeight(0))}_computeOverviewViewport(){const le=this._modifiedEditor.getLayoutInfo();if(!le)return null;const he=this._modifiedEditor.getScrollTop(),ve=this._modifiedEditor.getScrollHeight(),pe=Math.max(0,le.height),be=Math.max(0,pe-2*0),de=ve>0?be/ve:0,fe=Math.max(0,Math.floor(le.height*de)),_e=Math.floor(he*de);return{height:fe,top:_e}}_createDataSource(){return{getWidth:()=>this._elementSizeObserver.getWidth(),getHeight:()=>this._elementSizeObserver.getHeight()-this._getReviewHeight(),getOptions:()=>({renderOverviewRuler:this._options.renderOverviewRuler}),getContainerDomNode:()=>this._containerDomElement,relayoutEditors:()=>{this._doLayout()},getOriginalEditor:()=>this._originalEditor,getModifiedEditor:()=>this._modifiedEditor}}_setStrategy(le){this._strategy&&this._strategy.dispose(),this._strategy=le,le.applyColors(this._themeService.getColorTheme()),this._diffComputationResult&&this._updateDecorations(),this._doLayout()}_getLineChangeAtOrBeforeLineNumber(le,he){const ve=this._diffComputationResult?this._diffComputationResult.changes:[];if(ve.length===0||le<he(ve[0]))return null;let pe=0,be=ve.length-1;for(;pe<be;){const de=Math.floor((pe+be)/2),fe=he(ve[de]),_e=de+1<=be?he(ve[de+1]):1073741824;le<fe?be=de-1:le>=_e?pe=de+1:(pe=de,be=de)}return ve[pe]}_getEquivalentLineForOriginalLineNumber(le){const he=this._getLineChangeAtOrBeforeLineNumber(le,_e=>_e.originalStartLineNumber);if(!he)return le;const ve=he.originalStartLineNumber+(he.originalEndLineNumber>0?-1:0),pe=he.modifiedStartLineNumber+(he.modifiedEndLineNumber>0?-1:0),be=he.originalEndLineNumber>0?he.originalEndLineNumber-he.originalStartLineNumber+1:0,de=he.modifiedEndLineNumber>0?he.modifiedEndLineNumber-he.modifiedStartLineNumber+1:0,fe=le-ve;return fe<=be?pe+Math.min(fe,de):pe+de-be+fe}_getEquivalentLineForModifiedLineNumber(le){const he=this._getLineChangeAtOrBeforeLineNumber(le,_e=>_e.modifiedStartLineNumber);if(!he)return le;const ve=he.originalStartLineNumber+(he.originalEndLineNumber>0?-1:0),pe=he.modifiedStartLineNumber+(he.modifiedEndLineNumber>0?-1:0),be=he.originalEndLineNumber>0?he.originalEndLineNumber-he.originalStartLineNumber+1:0,de=he.modifiedEndLineNumber>0?he.modifiedEndLineNumber-he.modifiedStartLineNumber+1:0,fe=le-pe;return fe<=de?ve+Math.min(fe,be):ve+be-de+fe}getDiffLineInformationForOriginal(le){return this._diffComputationResult?{equivalentLineNumber:this._getEquivalentLineForOriginalLineNumber(le)}:null}getDiffLineInformationForModified(le){return this._diffComputationResult?{equivalentLineNumber:this._getEquivalentLineForModifiedLineNumber(le)}:null}};oe.ONE_OVERVIEW_WIDTH=15,oe.ENTIRE_DIFF_OVERVIEW_WIDTH=30,oe.UPDATE_DIFF_DECORATIONS_DELAY=200,oe=Ie([Ce(3,O.IClipboardService),Ce(4,a.IEditorWorkerService),Ce(5,v.IContextKeyService),Ce(6,C.IInstantiationService),Ce(7,t.ICodeEditorService),Ce(8,N.IThemeService),Ce(9,L.INotificationService),Ce(10,k.IContextMenuService),Ce(11,R.IEditorProgressService)],oe),e.DiffEditorWidget=oe;class Z extends p.Disposable{constructor(le){super();this._dataSource=le,this._insertColor=null,this._removeColor=null}applyColors(le){const he=(le.getColor(E.diffInserted)||E.defaultInsertColor).transparent(2),ve=(le.getColor(E.diffRemoved)||E.defaultRemoveColor).transparent(2),pe=!he.equals(this._insertColor)||!ve.equals(this._removeColor);return this._insertColor=he,this._removeColor=ve,pe}getEditorsDiffDecorations(le,he,ve,pe,be){be=be.sort((Le,Te)=>Le.afterLineNumber-Te.afterLineNumber),pe=pe.sort((Le,Te)=>Le.afterLineNumber-Te.afterLineNumber);const de=this._getViewZones(le,pe,be,ve),fe=this._getOriginalEditorDecorations(le,he,ve),_e=this._getModifiedEditorDecorations(le,he,ve);return{original:{decorations:fe.decorations,overviewZones:fe.overviewZones,zones:de.original},modified:{decorations:_e.decorations,overviewZones:_e.overviewZones,zones:de.modified}}}}class x{constructor(le){this._source=le,this._index=-1,this.current=null,this.advance()}advance(){this._index++,this._index<this._source.length?this.current=this._source[this._index]:this.current=null}}class U{constructor(le,he,ve,pe,be){this._lineChanges=le,this._originalForeignVZ=he,this._modifiedForeignVZ=ve,this._originalEditor=pe,this._modifiedEditor=be}static _getViewLineCount(le,he,ve){const pe=le.getModel(),be=le._getViewModel();if(pe&&be){const de=Y(pe,be,he,ve);return de.endLineNumber-de.startLineNumber+1}return ve-he+1}getViewZones(){const le=this._originalEditor.getOption(59),he=this._modifiedEditor.getOption(59),ve=this._originalEditor.getOption(132).wrappingColumn!==-1,pe=this._modifiedEditor.getOption(132).wrappingColumn!==-1,be=ve||pe,de=this._originalEditor.getModel(),fe=this._originalEditor._getViewModel().coordinatesConverter,_e=this._modifiedEditor._getViewModel().coordinatesConverter,Le={original:[],modified:[]};let Te=0,ke=0,Me=0,$e=0,He=0,Ge=0;const we=(Ve,qe)=>Ve.afterLineNumber-qe.afterLineNumber,Se=(Ve,qe)=>{if(qe.domNode===null&&Ve.length>0){const We=Ve[Ve.length-1];if(We.afterLineNumber===qe.afterLineNumber&&We.domNode===null){We.heightInLines+=qe.heightInLines;return}}Ve.push(qe)},De=new x(this._modifiedForeignVZ),Pe=new x(this._originalForeignVZ);let Fe=1,xe=1;for(let Ve=0,qe=this._lineChanges.length;Ve<=qe;Ve++){const We=Ve<qe?this._lineChanges[Ve]:null;We!==null?(Me=We.originalStartLineNumber+(We.originalEndLineNumber>0?-1:0),$e=We.modifiedStartLineNumber+(We.modifiedEndLineNumber>0?-1:0),ke=We.originalEndLineNumber>0?U._getViewLineCount(this._originalEditor,We.originalStartLineNumber,We.originalEndLineNumber):0,Te=We.modifiedEndLineNumber>0?U._getViewLineCount(this._modifiedEditor,We.modifiedStartLineNumber,We.modifiedEndLineNumber):0,He=Math.max(We.originalStartLineNumber,We.originalEndLineNumber),Ge=Math.max(We.modifiedStartLineNumber,We.modifiedEndLineNumber)):(Me+=1e7+ke,$e+=1e7+Te,He=Me,Ge=$e);let tt=[],Be=[];if(be){let Ae;We?We.originalEndLineNumber>0?Ae=We.originalStartLineNumber-Fe:Ae=We.modifiedStartLineNumber-xe:Ae=de.getLineCount()-Fe;for(let Ue=0;Ue<Ae;Ue++){const et=Fe+Ue,Ze=xe+Ue,Ke=fe.getModelLineViewLineCount(et),Ne=_e.getModelLineViewLineCount(Ze);Ke<Ne?tt.push({afterLineNumber:et,heightInLines:Ne-Ke,domNode:null,marginDomNode:null}):Ke>Ne&&Be.push({afterLineNumber:Ze,heightInLines:Ke-Ne,domNode:null,marginDomNode:null})}We&&(Fe=(We.originalEndLineNumber>0?We.originalEndLineNumber:We.originalStartLineNumber)+1,xe=(We.modifiedEndLineNumber>0?We.modifiedEndLineNumber:We.modifiedStartLineNumber)+1)}for(;De.current&&De.current.afterLineNumber<=Ge;){let Ae;De.current.afterLineNumber<=$e?Ae=Me-$e+De.current.afterLineNumber:Ae=He;let Ue=null;We&&We.modifiedStartLineNumber<=De.current.afterLineNumber&&De.current.afterLineNumber<=We.modifiedEndLineNumber&&(Ue=this._createOriginalMarginDomNodeForModifiedForeignViewZoneInAddedRegion()),tt.push({afterLineNumber:Ae,heightInLines:De.current.height/he,domNode:null,marginDomNode:Ue}),De.advance()}for(;Pe.current&&Pe.current.afterLineNumber<=He;){let Ae;Pe.current.afterLineNumber<=Me?Ae=$e-Me+Pe.current.afterLineNumber:Ae=Ge,Be.push({afterLineNumber:Ae,heightInLines:Pe.current.height/le,domNode:null}),Pe.advance()}if(We!==null&&$(We)){const Ae=this._produceOriginalFromDiff(We,ke,Te);Ae&&tt.push(Ae)}if(We!==null&&K(We)){const Ae=this._produceModifiedFromDiff(We,ke,Te);Ae&&Be.push(Ae)}let Ee=0,Re=0;for(tt=tt.sort(we),Be=Be.sort(we);Ee<tt.length&&Re<Be.length;){const Ae=tt[Ee],Ue=Be[Re],et=Ae.afterLineNumber-Me,Ze=Ue.afterLineNumber-$e;et<Ze?(Se(Le.original,Ae),Ee++):Ze<et?(Se(Le.modified,Ue),Re++):Ae.shouldNotShrink?(Se(Le.original,Ae),Ee++):Ue.shouldNotShrink?(Se(Le.modified,Ue),Re++):Ae.heightInLines>=Ue.heightInLines?(Ae.heightInLines-=Ue.heightInLines,Re++):(Ue.heightInLines-=Ae.heightInLines,Ee++)}for(;Ee<tt.length;)Se(Le.original,tt[Ee]),Ee++;for(;Re<Be.length;)Se(Le.modified,Be[Re]),Re++}return{original:U._ensureDomNodes(Le.original),modified:U._ensureDomNodes(Le.modified)}}static _ensureDomNodes(le){return le.map(he=>(he.domNode||(he.domNode=J()),he))}}function Q(me,le,he,ve,pe){return{range:new c.Range(me,le,he,ve),options:pe}}const ne={charDelete:o.ModelDecorationOptions.register({description:"diff-editor-char-delete",className:"char-delete"}),charDeleteWholeLine:o.ModelDecorationOptions.register({description:"diff-editor-char-delete-whole-line",className:"char-delete",isWholeLine:!0}),charInsert:o.ModelDecorationOptions.register({description:"diff-editor-char-insert",className:"char-insert"}),charInsertWholeLine:o.ModelDecorationOptions.register({description:"diff-editor-char-insert-whole-line",className:"char-insert",isWholeLine:!0}),lineInsert:o.ModelDecorationOptions.register({description:"diff-editor-line-insert",className:"line-insert",marginClassName:"line-insert",isWholeLine:!0}),lineInsertWithSign:o.ModelDecorationOptions.register({description:"diff-editor-line-insert-with-sign",className:"line-insert",linesDecorationsClassName:"insert-sign "+N.ThemeIcon.asClassName(G),marginClassName:"line-insert",isWholeLine:!0}),lineDelete:o.ModelDecorationOptions.register({description:"diff-editor-line-delete",className:"line-delete",marginClassName:"line-delete",isWholeLine:!0}),lineDeleteWithSign:o.ModelDecorationOptions.register({description:"diff-editor-line-delete-with-sign",className:"line-delete",linesDecorationsClassName:"delete-sign "+N.ThemeIcon.asClassName(re),marginClassName:"line-delete",isWholeLine:!0}),lineDeleteMargin:o.ModelDecorationOptions.register({description:"diff-editor-line-delete-margin",marginClassName:"line-delete"})};class ce extends Z{constructor(le,he){super(le);this._disableSash=he===!1,this._sashRatio=null,this._sashPosition=null,this._startSashPosition=null,this._sash=this._register(new I.Sash(this._dataSource.getContainerDomNode(),this,{orientation:0})),this._disableSash&&(this._sash.state=0),this._sash.onDidStart(()=>this._onSashDragStart()),this._sash.onDidChange(ve=>this._onSashDrag(ve)),this._sash.onDidEnd(()=>this._onSashDragEnd()),this._sash.onDidReset(()=>this._onSashReset())}setEnableSplitViewResizing(le){const he=le===!1;this._disableSash!==he&&(this._disableSash=he,this._sash.state=this._disableSash?0:3)}layout(le=this._sashRatio){const ve=this._dataSource.getWidth()-(this._dataSource.getOptions().renderOverviewRuler?oe.ENTIRE_DIFF_OVERVIEW_WIDTH:0);let pe=Math.floor((le||.5)*ve);const be=Math.floor(.5*ve);return pe=this._disableSash?be:pe||be,ve>ce.MINIMUM_EDITOR_WIDTH*2?(pe<ce.MINIMUM_EDITOR_WIDTH&&(pe=ce.MINIMUM_EDITOR_WIDTH),pe>ve-ce.MINIMUM_EDITOR_WIDTH&&(pe=ve-ce.MINIMUM_EDITOR_WIDTH)):pe=be,this._sashPosition!==pe&&(this._sashPosition=pe,this._sash.layout()),this._sashPosition}_onSashDragStart(){this._startSashPosition=this._sashPosition}_onSashDrag(le){const ve=this._dataSource.getWidth()-(this._dataSource.getOptions().renderOverviewRuler?oe.ENTIRE_DIFF_OVERVIEW_WIDTH:0),pe=this.layout((this._startSashPosition+(le.currentX-le.startX))/ve);this._sashRatio=pe/ve,this._dataSource.relayoutEditors()}_onSashDragEnd(){this._sash.layout()}_onSashReset(){this._sashRatio=.5,this._dataSource.relayoutEditors(),this._sash.layout()}getVerticalSashTop(le){return 0}getVerticalSashLeft(le){return this._sashPosition}getVerticalSashHeight(le){return this._dataSource.getHeight()}_getViewZones(le,he,ve){const pe=this._dataSource.getOriginalEditor(),be=this._dataSource.getModifiedEditor();return new ee(le,he,ve,pe,be).getViewZones()}_getOriginalEditorDecorations(le,he,ve){const pe=this._dataSource.getOriginalEditor(),be=String(this._removeColor),de={decorations:[],overviewZones:[]},fe=pe.getModel(),_e=pe._getViewModel();for(const Le of le)if(K(Le)){de.decorations.push({range:new c.Range(Le.originalStartLineNumber,1,Le.originalEndLineNumber,1073741824),options:ve?ne.lineDeleteWithSign:ne.lineDelete}),(!$(Le)||!Le.charChanges)&&de.decorations.push(Q(Le.originalStartLineNumber,1,Le.originalEndLineNumber,1073741824,ne.charDeleteWholeLine));const Te=Y(fe,_e,Le.originalStartLineNumber,Le.originalEndLineNumber);if(de.overviewZones.push(new d.OverviewRulerZone(Te.startLineNumber,Te.endLineNumber,be)),Le.charChanges){for(const ke of Le.charChanges)if(K(ke))if(he)for(let Me=ke.originalStartLineNumber;Me<=ke.originalEndLineNumber;Me++){let $e,He;Me===ke.originalStartLineNumber?$e=ke.originalStartColumn:$e=fe.getLineFirstNonWhitespaceColumn(Me),Me===ke.originalEndLineNumber?He=ke.originalEndColumn:He=fe.getLineLastNonWhitespaceColumn(Me),de.decorations.push(Q(Me,$e,Me,He,ne.charDelete))}else de.decorations.push(Q(ke.originalStartLineNumber,ke.originalStartColumn,ke.originalEndLineNumber,ke.originalEndColumn,ne.charDelete))}}return de}_getModifiedEditorDecorations(le,he,ve){const pe=this._dataSource.getModifiedEditor(),be=String(this._insertColor),de={decorations:[],overviewZones:[]},fe=pe.getModel(),_e=pe._getViewModel();for(const Le of le)if($(Le)){de.decorations.push({range:new c.Range(Le.modifiedStartLineNumber,1,Le.modifiedEndLineNumber,1073741824),options:ve?ne.lineInsertWithSign:ne.lineInsert}),(!K(Le)||!Le.charChanges)&&de.decorations.push(Q(Le.modifiedStartLineNumber,1,Le.modifiedEndLineNumber,1073741824,ne.charInsertWholeLine));const Te=Y(fe,_e,Le.modifiedStartLineNumber,Le.modifiedEndLineNumber);if(de.overviewZones.push(new d.OverviewRulerZone(Te.startLineNumber,Te.endLineNumber,be)),Le.charChanges){for(const ke of Le.charChanges)if($(ke))if(he)for(let Me=ke.modifiedStartLineNumber;Me<=ke.modifiedEndLineNumber;Me++){let $e,He;Me===ke.modifiedStartLineNumber?$e=ke.modifiedStartColumn:$e=fe.getLineFirstNonWhitespaceColumn(Me),Me===ke.modifiedEndLineNumber?He=ke.modifiedEndColumn:He=fe.getLineLastNonWhitespaceColumn(Me),de.decorations.push(Q(Me,$e,Me,He,ne.charInsert))}else de.decorations.push(Q(ke.modifiedStartLineNumber,ke.modifiedStartColumn,ke.modifiedEndLineNumber,ke.modifiedEndColumn,ne.charInsert))}}return de}}ce.MINIMUM_EDITOR_WIDTH=100;class ee extends U{constructor(le,he,ve,pe,be){super(le,he,ve,pe,be)}_createOriginalMarginDomNodeForModifiedForeignViewZoneInAddedRegion(){return null}_produceOriginalFromDiff(le,he,ve){return ve>he?{afterLineNumber:Math.max(le.originalStartLineNumber,le.originalEndLineNumber),heightInLines:ve-he,domNode:null}:null}_produceModifiedFromDiff(le,he,ve){return he>ve?{afterLineNumber:Math.max(le.modifiedStartLineNumber,le.modifiedEndLineNumber),heightInLines:he-ve,domNode:null}:null}}class ue extends Z{constructor(le,he){super(le);this._decorationsLeft=le.getOriginalEditor().getLayoutInfo().decorationsLeft,this._register(le.getOriginalEditor().onDidLayoutChange(ve=>{this._decorationsLeft!==ve.decorationsLeft&&(this._decorationsLeft=ve.decorationsLeft,le.relayoutEditors())}))}setEnableSplitViewResizing(le){}_getViewZones(le,he,ve,pe){const be=this._dataSource.getOriginalEditor(),de=this._dataSource.getModifiedEditor();return new z(le,he,ve,be,de,pe).getViewZones()}_getOriginalEditorDecorations(le,he,ve){const pe=String(this._removeColor),be={decorations:[],overviewZones:[]},de=this._dataSource.getOriginalEditor(),fe=de.getModel(),_e=de._getViewModel();for(const Le of le)if(K(Le)){be.decorations.push({range:new c.Range(Le.originalStartLineNumber,1,Le.originalEndLineNumber,1073741824),options:ne.lineDeleteMargin});const Te=Y(fe,_e,Le.originalStartLineNumber,Le.originalEndLineNumber);be.overviewZones.push(new d.OverviewRulerZone(Te.startLineNumber,Te.endLineNumber,pe))}return be}_getModifiedEditorDecorations(le,he,ve){const pe=this._dataSource.getModifiedEditor(),be=String(this._insertColor),de={decorations:[],overviewZones:[]},fe=pe.getModel(),_e=pe._getViewModel();for(const Le of le)if($(Le)){de.decorations.push({range:new c.Range(Le.modifiedStartLineNumber,1,Le.modifiedEndLineNumber,1073741824),options:ve?ne.lineInsertWithSign:ne.lineInsert});const Te=Y(fe,_e,Le.modifiedStartLineNumber,Le.modifiedEndLineNumber);if(de.overviewZones.push(new d.OverviewRulerZone(Te.startLineNumber,Te.endLineNumber,be)),Le.charChanges){for(const ke of Le.charChanges)if($(ke))if(he)for(let Me=ke.modifiedStartLineNumber;Me<=ke.modifiedEndLineNumber;Me++){let $e,He;Me===ke.modifiedStartLineNumber?$e=ke.modifiedStartColumn:$e=fe.getLineFirstNonWhitespaceColumn(Me),Me===ke.modifiedEndLineNumber?He=ke.modifiedEndColumn:He=fe.getLineLastNonWhitespaceColumn(Me),de.decorations.push(Q(Me,$e,Me,He,ne.charInsert))}else de.decorations.push(Q(ke.modifiedStartLineNumber,ke.modifiedStartColumn,ke.modifiedEndLineNumber,ke.modifiedEndColumn,ne.charInsert))}else de.decorations.push(Q(Le.modifiedStartLineNumber,1,Le.modifiedEndLineNumber,1073741824,ne.charInsertWholeLine))}return de}layout(){return Math.max(5,this._decorationsLeft)}}class z extends U{constructor(le,he,ve,pe,be,de){super(le,he,ve,pe,be);this._originalModel=pe.getModel(),this._renderIndicators=de,this._pendingLineChange=[],this._pendingViewZones=[],this._lineBreaksComputer=this._modifiedEditor._getViewModel().createLineBreaksComputer()}getViewZones(){const le=super.getViewZones();return this._finalize(le),le}_createOriginalMarginDomNodeForModifiedForeignViewZoneInAddedRegion(){const le=document.createElement("div");return le.className="inline-added-margin-view-zone",le}_produceOriginalFromDiff(le,he,ve){const pe=document.createElement("div");return pe.className="inline-added-margin-view-zone",{afterLineNumber:Math.max(le.originalStartLineNumber,le.originalEndLineNumber),heightInLines:ve,domNode:document.createElement("div"),marginDomNode:pe}}_produceModifiedFromDiff(le,he,ve){const pe=document.createElement("div");pe.className=`view-lines line-delete ${W.MOUSE_CURSOR_TEXT_CSS_CLASS_NAME}`;const be=document.createElement("div");be.className="inline-deleted-margin-view-zone";const de={shouldNotShrink:!0,afterLineNumber:le.modifiedEndLineNumber===0?le.modifiedStartLineNumber:le.modifiedStartLineNumber-1,heightInLines:he,minWidthInPx:0,domNode:pe,marginDomNode:be,diff:{originalStartLineNumber:le.originalStartLineNumber,originalEndLineNumber:le.originalEndLineNumber,modifiedStartLineNumber:le.modifiedStartLineNumber,modifiedEndLineNumber:le.modifiedEndLineNumber,originalModel:this._originalModel,viewLineCounts:null}};for(let fe=le.originalStartLineNumber;fe<=le.originalEndLineNumber;fe++)this._lineBreaksComputer.addRequest(this._originalModel.getLineContent(fe),null,null);return this._pendingLineChange.push(le),this._pendingViewZones.push(de),de}_finalize(le){const he=this._modifiedEditor.getOptions(),ve=this._modifiedEditor.getModel().getOptions().tabSize,pe=he.get(44),be=he.get(29),de=pe.typicalHalfwidthCharacterWidth,fe=he.get(93),_e=this._originalModel.mightContainNonBasicASCII(),Le=this._originalModel.mightContainRTL(),Te=he.get(59),Me=he.get(131).decorationsWidth,$e=he.get(105),He=he.get(88),Ge=he.get(83),we=he.get(45),Se=this._lineBreaksComputer.finalize();let De=0;for(let Pe=0;Pe<this._pendingLineChange.length;Pe++){const Fe=this._pendingLineChange[Pe],xe=this._pendingViewZones[Pe],Ve=xe.domNode;(0,h.applyFontInfo)(Ve,pe);const qe=xe.marginDomNode;(0,h.applyFontInfo)(qe,pe);const We=[];if(Fe.charChanges)for(const Ze of Fe.charChanges)K(Ze)&&We.push(new S.InlineDecoration(new c.Range(Ze.originalStartLineNumber,Ze.originalStartColumn,Ze.originalEndLineNumber,Ze.originalEndColumn),"char-delete",0));const tt=We.length>0,Be=(0,r.createStringBuilder)(1e4);let Ee=0,Re=0,Ae=null;for(let Ze=Fe.originalStartLineNumber;Ze<=Fe.originalEndLineNumber;Ze++){const Ke=Ze-Fe.originalStartLineNumber,Ne=this._originalModel.getLineTokens(Ze),Oe=Ne.getLineContent(),ze=Se[De++],je=u.LineDecoration.filter(We,Ze,1,Oe.length+1);if(ze){let Je=0;for(const Xe of ze.breakOffsets){const it=Ne.sliceAndInflate(Je,Xe,0),lt=Oe.substring(Je,Xe);Ee=Math.max(Ee,this._renderOriginalLine(Re++,lt,it,u.LineDecoration.extractWrapped(je,Je,Xe),tt,_e,Le,pe,be,Te,Me,$e,He,Ge,we,ve,Be,qe)),Je=Xe}for(Ae||(Ae=[]);Ae.length<Ke;)Ae[Ae.length]=1;Ae[Ke]=ze.breakOffsets.length,xe.heightInLines+=ze.breakOffsets.length-1;const Ye=document.createElement("div");Ye.className="line-delete",le.original.push({afterLineNumber:Ze,afterColumn:0,heightInLines:ze.breakOffsets.length-1,domNode:J(),marginDomNode:Ye})}else Ee=Math.max(Ee,this._renderOriginalLine(Re++,Oe,Ne,je,tt,_e,Le,pe,be,Te,Me,$e,He,Ge,we,ve,Be,qe))}Ee+=fe;const Ue=Be.build(),et=ae?ae.createHTML(Ue):Ue;if(Ve.innerHTML=et,xe.minWidthInPx=Ee*de,Ae){const Ze=Fe.originalEndLineNumber-Fe.originalStartLineNumber;for(;Ae.length<=Ze;)Ae[Ae.length]=1}xe.diff.viewLineCounts=Ae}le.original.sort((Pe,Fe)=>Pe.afterLineNumber-Fe.afterLineNumber)}_renderOriginalLine(le,he,ve,pe,be,de,fe,_e,Le,Te,ke,Me,$e,He,Ge,we,Se,De){Se.appendASCIIString('<div class="view-line'),be||Se.appendASCIIString(" char-delete"),Se.appendASCIIString('" style="top:'),Se.appendASCIIString(String(le*Te)),Se.appendASCIIString('px;width:1000000px;">');const Pe=S.ViewLineRenderingData.isBasicASCII(he,de),Fe=S.ViewLineRenderingData.containsRTL(he,Pe,fe),xe=(0,f.renderViewLine)(new f.RenderLineInput(_e.isMonospace&&!Le,_e.canUseHalfwidthRightwardsArrow,he,!1,Pe,Fe,0,ve,pe,we,0,_e.spaceWidth,_e.middotWidth,_e.wsmiddotWidth,Me,$e,He,Ge!==l.EditorFontLigatures.OFF,null),Se);if(Se.appendASCIIString("</div>"),this._renderIndicators){const Ve=document.createElement("div");Ve.className=`delete-sign ${N.ThemeIcon.asClassName(re)}`,Ve.setAttribute("style",`position:absolute;top:${le*Te}px;width:${ke}px;height:${Te}px;right:0;`),De.appendChild(Ve)}return xe.characterMapping.getAbsoluteOffset(xe.characterMapping.length)}}function V(me,le){return(0,l.stringSet)(me,le,["off","on","inherit"])}function $(me){return me.modifiedEndLineNumber>0}function K(me){return me.originalEndLineNumber>0}function J(){const me=document.createElement("div");return me.className="diagonal-fill",me}function Y(me,le,he,ve){const pe=me.getLineCount();return he=Math.min(pe,Math.max(1,he)),ve=Math.min(pe,Math.max(1,ve)),le.coordinatesConverter.convertModelRangeToViewRange(new c.Range(he,me.getLineMinColumn(he),ve,me.getLineMaxColumn(ve)))}function se(me,le){return{enableSplitViewResizing:(0,l.boolean)(me.enableSplitViewResizing,le.enableSplitViewResizing),renderSideBySide:(0,l.boolean)(me.renderSideBySide,le.renderSideBySide),maxComputationTime:(0,l.clampedInt)(me.maxComputationTime,le.maxComputationTime,0,1073741824),maxFileSize:(0,l.clampedInt)(me.maxFileSize,le.maxFileSize,0,1073741824),ignoreTrimWhitespace:(0,l.boolean)(me.ignoreTrimWhitespace,le.ignoreTrimWhitespace),renderIndicators:(0,l.boolean)(me.renderIndicators,le.renderIndicators),originalEditable:(0,l.boolean)(me.originalEditable,le.originalEditable),diffCodeLens:(0,l.boolean)(me.diffCodeLens,le.diffCodeLens),renderOverviewRuler:(0,l.boolean)(me.renderOverviewRuler,le.renderOverviewRuler),diffWordWrap:V(me.diffWordWrap,le.diffWordWrap)}}function ge(me,le){return{enableSplitViewResizing:me.enableSplitViewResizing!==le.enableSplitViewResizing,renderSideBySide:me.renderSideBySide!==le.renderSideBySide,maxComputationTime:me.maxComputationTime!==le.maxComputationTime,maxFileSize:me.maxFileSize!==le.maxFileSize,ignoreTrimWhitespace:me.ignoreTrimWhitespace!==le.ignoreTrimWhitespace,renderIndicators:me.renderIndicators!==le.renderIndicators,originalEditable:me.originalEditable!==le.originalEditable,diffCodeLens:me.diffCodeLens!==le.diffCodeLens,renderOverviewRuler:me.renderOverviewRuler!==le.renderOverviewRuler,diffWordWrap:me.diffWordWrap!==le.diffWordWrap}}(0,N.registerThemingParticipant)((me,le)=>{const he=me.getColor(E.diffInserted);he&&(le.addRule(`.monaco-editor .line-insert, .monaco-editor .char-insert { background-color: ${he}; }`),le.addRule(`.monaco-diff-editor .line-insert, .monaco-diff-editor .char-insert { background-color: ${he}; }`),le.addRule(`.monaco-editor .inline-added-margin-view-zone { background-color: ${he}; }`));const ve=me.getColor(E.diffRemoved);ve&&(le.addRule(`.monaco-editor .line-delete, .monaco-editor .char-delete { background-color: ${ve}; }`),le.addRule(`.monaco-diff-editor .line-delete, .monaco-diff-editor .char-delete { background-color: ${ve}; }`),le.addRule(`.monaco-editor .inline-deleted-margin-view-zone { background-color: ${ve}; }`));const pe=me.getColor(E.diffInsertedOutline);pe&&le.addRule(`.monaco-editor .line-insert, .monaco-editor .char-insert { border: 1px ${me.type==="hc"?"dashed":"solid"} ${pe}; }`);const be=me.getColor(E.diffRemovedOutline);be&&le.addRule(`.monaco-editor .line-delete, .monaco-editor .char-delete { border: 1px ${me.type==="hc"?"dashed":"solid"} ${be}; }`);const de=me.getColor(E.scrollbarShadow);de&&le.addRule(`.monaco-diff-editor.side-by-side .editor.modified { box-shadow: -6px 0 5px -5px ${de}; }`);const fe=me.getColor(E.diffBorder);fe&&le.addRule(`.monaco-diff-editor.side-by-side .editor.modified { border-left: 1px solid ${fe}; }`);const _e=me.getColor(E.scrollbarSliderBackground);_e&&le.addRule(`
|
||
.monaco-diff-editor .diffViewport {
|
||
background: ${_e};
|
||
}
|
||
`);const Le=me.getColor(E.scrollbarSliderHoverBackground);Le&&le.addRule(`
|
||
.monaco-diff-editor .diffViewport:hover {
|
||
background: ${Le};
|
||
}
|
||
`);const Te=me.getColor(E.scrollbarSliderActiveBackground);Te&&le.addRule(`
|
||
.monaco-diff-editor .diffViewport:active {
|
||
background: ${Te};
|
||
}
|
||
`);const ke=me.getColor(E.diffDiagonalFill);le.addRule(`
|
||
.monaco-editor .diagonal-fill {
|
||
background-image: linear-gradient(
|
||
-45deg,
|
||
${ke} 12.5%,
|
||
#0000 12.5%, #0000 50%,
|
||
${ke} 50%, ${ke} 62.5%,
|
||
#0000 62.5%, #0000 100%
|
||
);
|
||
background-size: 8px 8px;
|
||
}
|
||
`)})}),define(te[162],ie([1,0,39,28,161,26,16,9,38,14,63,32]),function(j,e,y,m,D,I,w,b,p,h,g,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.EmbeddedCodeEditorWidget=void 0;let i=class extends D.CodeEditorWidget{constructor(l,c,r,s,o,a,d,u,f,S,v){super(l,Object.assign(Object.assign({},r.getRawOptions()),{overflowWidgetsDomNode:r.getOverflowWidgetsDomNode()}),{},s,o,a,d,u,f,S,v);this._parentEditor=r,this._overwriteOptions=c,super.updateOptions(this._overwriteOptions),this._register(r.onDidChangeConfiguration(C=>this._onParentConfigurationChanged(C)))}getParentEditor(){return this._parentEditor}_onParentConfigurationChanged(l){super.updateOptions(this._parentEditor.getRawOptions()),super.updateOptions(this._overwriteOptions)}updateOptions(l){y.mixin(this._overwriteOptions,l,!0),super.updateOptions(this._overwriteOptions)}};i=Ie([Ce(3,b.IInstantiationService),Ce(4,m.ICodeEditorService),Ce(5,I.ICommandService),Ce(6,w.IContextKeyService),Ce(7,h.IThemeService),Ce(8,p.INotificationService),Ce(9,g.IAccessibilityService),Ce(10,t.ILanguageConfigurationService)],i),e.EmbeddedCodeEditorWidget=i}),define(te[706],ie([1,0,10,2,15,11,3,22,24,49,33,52,517,37,23,14,369]),function(j,e,y,m,D,I,w,b,p,h,g,t,i,n,l,c){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BracketMatchingController=void 0;const r=(0,l.registerColor)("editorOverviewRuler.bracketMatchForeground",{dark:"#A0A0A0",light:"#A0A0A0",hc:"#A0A0A0"},i.localize(0,null));class s extends D.EditorAction{constructor(){super({id:"editor.action.jumpToBracket",label:i.localize(1,null),alias:"Go to Bracket",precondition:void 0,kbOpts:{kbExpr:p.EditorContextKeys.editorTextFocus,primary:2048|1024|88,weight:100}})}run(f,S){var v;(v=d.get(S))===null||v===void 0||v.jumpToBracket()}}class o extends D.EditorAction{constructor(){super({id:"editor.action.selectToBracket",label:i.localize(2,null),alias:"Select to Bracket",precondition:void 0,description:{description:"Select to Bracket",args:[{name:"args",schema:{type:"object",properties:{selectBrackets:{type:"boolean",default:!0}}}}]}})}run(f,S,v){var C;let _=!0;v&&v.selectBrackets===!1&&(_=!1),(C=d.get(S))===null||C===void 0||C.selectToBracket(_)}}class a{constructor(f,S,v){this.position=f,this.brackets=S,this.options=v}}class d extends m.Disposable{constructor(f){super();this._editor=f,this._lastBracketsData=[],this._lastVersionId=0,this._decorations=[],this._updateBracketsSoon=this._register(new y.RunOnceScheduler(()=>this._updateBrackets(),50)),this._matchBrackets=this._editor.getOption(64),this._updateBracketsSoon.schedule(),this._register(f.onDidChangeCursorPosition(S=>{this._matchBrackets!=="never"&&this._updateBracketsSoon.schedule()})),this._register(f.onDidChangeModelContent(S=>{this._updateBracketsSoon.schedule()})),this._register(f.onDidChangeModel(S=>{this._lastBracketsData=[],this._decorations=[],this._updateBracketsSoon.schedule()})),this._register(f.onDidChangeModelLanguageConfiguration(S=>{this._lastBracketsData=[],this._updateBracketsSoon.schedule()})),this._register(f.onDidChangeConfiguration(S=>{S.hasChanged(64)&&(this._matchBrackets=this._editor.getOption(64),this._decorations=this._editor.deltaDecorations(this._decorations,[]),this._lastBracketsData=[],this._lastVersionId=0,this._updateBracketsSoon.schedule())})),this._register(f.onDidBlurEditorWidget(()=>{this._updateBracketsSoon.schedule()})),this._register(f.onDidFocusEditorWidget(()=>{this._updateBracketsSoon.schedule()}))}static get(f){return f.getContribution(d.ID)}jumpToBracket(){if(!this._editor.hasModel())return;const f=this._editor.getModel(),S=this._editor.getSelections().map(v=>{const C=v.getStartPosition(),_=f.bracketPairs.matchBracket(C);let L=null;if(_)_[0].containsPosition(C)?L=_[1].getStartPosition():_[1].containsPosition(C)&&(L=_[0].getStartPosition());else{const E=f.bracketPairs.findEnclosingBrackets(C);if(E)L=E[0].getStartPosition();else{const N=f.bracketPairs.findNextBracket(C);N&&N.range&&(L=N.range.getStartPosition())}}return L?new b.Selection(L.lineNumber,L.column,L.lineNumber,L.column):new b.Selection(C.lineNumber,C.column,C.lineNumber,C.column)});this._editor.setSelections(S),this._editor.revealRange(S[0])}selectToBracket(f){if(!this._editor.hasModel())return;const S=this._editor.getModel(),v=[];this._editor.getSelections().forEach(C=>{const _=C.getStartPosition();let L=S.bracketPairs.matchBracket(_);if(!L&&(L=S.bracketPairs.findEnclosingBrackets(_),!L)){const k=S.bracketPairs.findNextBracket(_);k&&k.range&&(L=S.bracketPairs.matchBracket(k.range.getStartPosition()))}let E=null,N=null;if(L){L.sort(w.Range.compareRangesUsingStarts);const[k,M]=L;if(E=f?k.getStartPosition():k.getEndPosition(),N=f?M.getEndPosition():M.getStartPosition(),M.containsPosition(_)){const O=E;E=N,N=O}}E&&N&&v.push(new b.Selection(E.lineNumber,E.column,N.lineNumber,N.column))}),v.length>0&&(this._editor.setSelections(v),this._editor.revealRange(v[0]))}_updateBrackets(){if(this._matchBrackets==="never")return;this._recomputeBrackets();let f=[],S=0;for(const v of this._lastBracketsData){let C=v.brackets;C&&(f[S++]={range:C[0],options:v.options},f[S++]={range:C[1],options:v.options})}this._decorations=this._editor.deltaDecorations(this._decorations,f)}_recomputeBrackets(){if(!this._editor.hasModel()||!this._editor.hasWidgetFocus()){this._lastBracketsData=[],this._lastVersionId=0;return}const f=this._editor.getSelections();if(f.length>100){this._lastBracketsData=[],this._lastVersionId=0;return}const S=this._editor.getModel(),v=S.getVersionId();let C=[];this._lastVersionId===v&&(C=this._lastBracketsData);let _=[],L=0;for(let O=0,B=f.length;O<B;O++){let T=f[O];T.isEmpty()&&(_[L++]=T.getStartPosition())}_.length>1&&_.sort(I.Position.compare);let E=[],N=0,k=0,M=C.length;for(let O=0,B=_.length;O<B;O++){let T=_[O];for(;k<M&&C[k].position.isBefore(T);)k++;if(k<M&&C[k].position.equals(T))E[N++]=C[k];else{let R=S.bracketPairs.matchBracket(T),P=d._DECORATION_OPTIONS_WITH_OVERVIEW_RULER;!R&&this._matchBrackets==="always"&&(R=S.bracketPairs.findEnclosingBrackets(T,20),P=d._DECORATION_OPTIONS_WITHOUT_OVERVIEW_RULER),E[N++]=new a(T,R,P)}}this._lastBracketsData=E,this._lastVersionId=v}}e.BracketMatchingController=d,d.ID="editor.contrib.bracketMatchingController",d._DECORATION_OPTIONS_WITH_OVERVIEW_RULER=g.ModelDecorationOptions.register({description:"bracket-match-overview",stickiness:1,className:"bracket-match",overviewRuler:{color:(0,c.themeColorFromId)(r),position:h.OverviewRulerLane.Center}}),d._DECORATION_OPTIONS_WITHOUT_OVERVIEW_RULER=g.ModelDecorationOptions.register({description:"bracket-match-no-overview",stickiness:1,className:"bracket-match"}),(0,D.registerEditorContribution)(d.ID,d),(0,D.registerEditorAction)(o),(0,D.registerEditorAction)(s),(0,c.registerThemingParticipant)((u,f)=>{const S=u.getColor(t.editorBracketMatchBackground);S&&f.addRule(`.monaco-editor .bracket-match { background-color: ${S}; }`);const v=u.getColor(t.editorBracketMatchBorder);v&&f.addRule(`.monaco-editor .bracket-match { border: 1px solid ${v}; }`)}),n.MenuRegistry.appendMenuItem(n.MenuId.MenubarGoMenu,{group:"5_infile_nav",command:{id:"editor.action.jumpToBracket",title:i.localize(3,null)},order:2})}),define(te[707],ie([1,0,15,98,203,3,24,519]),function(j,e,y,m,D,I,w,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0});class p extends y.EditorAction{constructor(){super({id:"editor.action.transposeLetters",label:b.localize(0,null),alias:"Transpose Letters",precondition:w.EditorContextKeys.writable,kbOpts:{kbExpr:w.EditorContextKeys.textInputFocus,primary:0,mac:{primary:256|50},weight:100}})}run(g,t){if(!t.hasModel())return;let i=t.getModel(),n=[],l=t.getSelections();for(let c of l){if(!c.isEmpty())continue;let r=c.startLineNumber,s=c.startColumn,o=i.getLineMaxColumn(r);if(r===1&&(s===1||s===2&&o===2))continue;let a=s===o?c.getPosition():D.MoveOperations.rightPosition(i,c.getPosition().lineNumber,c.getPosition().column),d=D.MoveOperations.leftPosition(i,a),u=D.MoveOperations.leftPosition(i,d),f=i.getValueInRange(I.Range.fromPositions(u,d)),S=i.getValueInRange(I.Range.fromPositions(d,a)),v=I.Range.fromPositions(u,a);n.push(new m.ReplaceCommand(v,S+f))}n.length>0&&(t.pushUndoStop(),t.executeCommands(this.id,n),t.pushUndoStop())}}(0,y.registerEditorAction)(p)}),define(te[708],ie([1,0,7,113,3,33,371]),function(j,e,y,m,D,I){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CodeLensWidget=e.CodeLensHelper=void 0;class w{constructor(t,i,n){this.afterColumn=1073741824,this.afterLineNumber=t,this.heightInPx=i,this._onHeight=n,this.suppressMouseDown=!0,this.domNode=document.createElement("div")}onComputedHeight(t){this._lastHeight===void 0?this._lastHeight=t:this._lastHeight!==t&&(this._lastHeight=t,this._onHeight())}isVisible(){return this._lastHeight!==0&&this.domNode.hasAttribute("monaco-visible-view-zone")}}class b{constructor(t,i,n){this.allowEditorOverflow=!1,this.suppressMouseDown=!0,this._commands=new Map,this._isEmpty=!0,this._editor=t,this._id=`codelens.widget-${b._idPool++}`,this.updatePosition(n),this._domNode=document.createElement("span"),this._domNode.className=`codelens-decoration ${i}`}withCommands(t,i){this._commands.clear();let n=[],l=!1;for(let c=0;c<t.length;c++){const r=t[c];if(!!r&&(l=!0,r.command)){const s=(0,m.renderLabelWithIcons)(r.command.title.trim());r.command.id?(n.push(y.$("a",{id:String(c),title:r.command.tooltip},...s)),this._commands.set(String(c),r.command)):n.push(y.$("span",{title:r.command.tooltip},...s)),c+1<t.length&&n.push(y.$("span",void 0,"\xA0|\xA0"))}}l?(y.reset(this._domNode,...n),this._isEmpty&&i&&this._domNode.classList.add("fadein"),this._isEmpty=!1):y.reset(this._domNode,y.$("span",void 0,"no commands"))}getCommand(t){return t.parentElement===this._domNode?this._commands.get(t.id):void 0}getId(){return this._id}getDomNode(){return this._domNode}updatePosition(t){const i=this._editor.getModel().getLineFirstNonWhitespaceColumn(t);this._widgetPosition={position:{lineNumber:t,column:i},preference:[1]}}getPosition(){return this._widgetPosition||null}}b._idPool=0;class p{constructor(){this._removeDecorations=[],this._addDecorations=[],this._addDecorationsCallbacks=[]}addDecoration(t,i){this._addDecorations.push(t),this._addDecorationsCallbacks.push(i)}removeDecoration(t){this._removeDecorations.push(t)}commit(t){let i=t.deltaDecorations(this._removeDecorations,this._addDecorations);for(let n=0,l=i.length;n<l;n++)this._addDecorationsCallbacks[n](i[n])}}e.CodeLensHelper=p;class h{constructor(t,i,n,l,c,r,s){this._isDisposed=!1,this._editor=i,this._className=n,this._data=t,this._decorationIds=[];let o,a=[];this._data.forEach((d,u)=>{d.symbol.command&&a.push(d.symbol),l.addDecoration({range:d.symbol.range,options:I.ModelDecorationOptions.EMPTY},f=>this._decorationIds[u]=f),o?o=D.Range.plusRange(o,d.symbol.range):o=D.Range.lift(d.symbol.range)}),this._viewZone=new w(o.startLineNumber-1,r,s),this._viewZoneId=c.addZone(this._viewZone),a.length>0&&(this._createContentWidgetIfNecessary(),this._contentWidget.withCommands(a,!1))}_createContentWidgetIfNecessary(){this._contentWidget?this._editor.layoutContentWidget(this._contentWidget):(this._contentWidget=new b(this._editor,this._className,this._viewZone.afterLineNumber+1),this._editor.addContentWidget(this._contentWidget))}dispose(t,i){this._decorationIds.forEach(t.removeDecoration,t),this._decorationIds=[],i&&i.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((t,i)=>{const n=this._editor.getModel().getDecorationRange(t),l=this._data[i].symbol;return!!(n&&D.Range.isEmpty(l.range)===n.isEmpty())})}updateCodeLensSymbols(t,i){this._decorationIds.forEach(i.removeDecoration,i),this._decorationIds=[],this._data=t,this._data.forEach((n,l)=>{i.addDecoration({range:n.symbol.range,options:I.ModelDecorationOptions.EMPTY},c=>this._decorationIds[l]=c)})}updateHeight(t,i){this._viewZone.heightInPx=t,i.layoutZone(this._viewZoneId),this._contentWidget&&this._editor.layoutContentWidget(this._contentWidget)}computeIfNecessary(t){if(!this._viewZone.isVisible())return null;for(let i=0;i<this._decorationIds.length;i++){const n=t.getDecorationRange(this._decorationIds[i]);n&&(this._data[i].symbol.range=n)}return this._data}updateCommands(t){this._createContentWidgetIfNecessary(),this._contentWidget.withCommands(t,!0);for(let i=0;i<this._data.length;i++){const n=t[i];if(n){const{symbol:l}=this._data[i];l.command=n.command||l.command}}}getCommand(t){var i;return(i=this._contentWidget)===null||i===void 0?void 0:i.getCommand(t)}getLineNumber(){const t=this._editor.getModel().getDecorationRange(this._decorationIds[0]);return t?t.startLineNumber:-1}update(t){if(this.isValid()){const i=this._editor.getModel().getDecorationRange(this._decorationIds[0]);i&&(this._viewZone.afterLineNumber=i.startLineNumber-1,t.layoutZone(this._viewZoneId),this._contentWidget&&(this._contentWidget.updatePosition(i.startLineNumber),this._editor.layoutContentWidget(this._contentWidget)))}}}e.CodeLensWidget=h}),define(te[709],ie([1,0,7,10,13,112,2,143,15,31,24,18,271,630,708,523,26,38,78,92]),function(j,e,y,m,D,I,w,b,p,h,g,t,i,n,l,c,r,s,o,a){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CodeLensContribution=void 0;let d=class{constructor(f,S,v,C,_){this._editor=f,this._commandService=v,this._notificationService=C,this._codeLensCache=_,this._disposables=new w.DisposableStore,this._localToDispose=new w.DisposableStore,this._lenses=[],this._oldCodeLensModels=new w.DisposableStore,this._provideCodeLensDebounce=S.for(t.CodeLensProviderRegistry,"CodeLensProvide",{min:250}),this._resolveCodeLensesDebounce=S.for(t.CodeLensProviderRegistry,"CodeLensResolve",{min:250,salt:"resolve"}),this._resolveCodeLensesScheduler=new m.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(L=>{(L.hasChanged(44)||L.hasChanged(16)||L.hasChanged(15))&&this._updateLensStyle(),L.hasChanged(14)&&this._onModelChange()})),this._disposables.add(t.CodeLensProviderRegistry.onDidChange(this._onModelChange,this)),this._onModelChange(),this._styleClassName="_"+(0,I.hash)(this._editor.getId()).toString(16),this._styleElement=y.createStyleSheet(y.isInShadowDOM(this._editor.getContainerDomNode())?this._editor.getContainerDomNode():void 0),this._updateLensStyle()}dispose(){var f;this._localDispose(),this._disposables.dispose(),this._oldCodeLensModels.dispose(),(f=this._currentCodeLensModel)===null||f===void 0||f.dispose(),this._styleElement.remove()}_getLayoutInfo(){let f=this._editor.getOption(16),S;return!f||f<5?(f=this._editor.getOption(46)*.9|0,S=this._editor.getOption(59)):S=f*Math.max(1.3,this._editor.getOption(59)/this._editor.getOption(46))|0,{codeLensHeight:S,fontSize:f}}_updateLensStyle(){const{codeLensHeight:f,fontSize:S}=this._getLayoutInfo(),v=this._editor.getOption(15),C=this._editor.getOption(44),_=`--codelens-font-family${this._styleClassName}`,L=`--codelens-font-features${this._styleClassName}`;let E=`
|
||
.monaco-editor .codelens-decoration.${this._styleClassName} { line-height: ${f}px; font-size: ${S}px; padding-right: ${Math.round(S*.5)}px; font-feature-settings: var(${L}) }
|
||
.monaco-editor .codelens-decoration.${this._styleClassName} span.codicon { line-height: ${f}px; font-size: ${S}px; }
|
||
`;v&&(E+=`.monaco-editor .codelens-decoration.${this._styleClassName} { font-family: var(${_}), ${h.EDITOR_FONT_DEFAULTS.fontFamily}}`),this._styleElement.textContent=E,this._editor.getContainerDomNode().style.setProperty(_,v??"inherit"),this._editor.getContainerDomNode().style.setProperty(L,C.fontFeatureSettings),this._editor.changeViewZones(N=>{for(let k of this._lenses)k.updateHeight(f,N)})}_localDispose(){var f,S,v;(f=this._getCodeLensModelPromise)===null||f===void 0||f.cancel(),this._getCodeLensModelPromise=void 0,(S=this._resolveCodeLensesPromise)===null||S===void 0||S.cancel(),this._resolveCodeLensesPromise=void 0,this._localToDispose.clear(),this._oldCodeLensModels.clear(),(v=this._currentCodeLensModel)===null||v===void 0||v.dispose()}_onModelChange(){this._localDispose();const f=this._editor.getModel();if(!f||!this._editor.getOption(14))return;const S=this._codeLensCache.get(f);if(S&&this._renderCodeLensSymbols(S),!t.CodeLensProviderRegistry.has(f)){S&&this._localToDispose.add((0,m.disposableTimeout)(()=>{const C=this._codeLensCache.get(f);S===C&&(this._codeLensCache.delete(f),this._onModelChange())},30*1e3));return}for(const C of t.CodeLensProviderRegistry.all(f))if(typeof C.onDidChange=="function"){let _=C.onDidChange(()=>v.schedule());this._localToDispose.add(_)}const v=new m.RunOnceScheduler(()=>{var C;const _=Date.now();(C=this._getCodeLensModelPromise)===null||C===void 0||C.cancel(),this._getCodeLensModelPromise=(0,m.createCancelablePromise)(L=>(0,i.getCodeLensModel)(f,L)),this._getCodeLensModelPromise.then(L=>{this._currentCodeLensModel&&this._oldCodeLensModels.add(this._currentCodeLensModel),this._currentCodeLensModel=L,this._codeLensCache.put(f,L);const E=this._provideCodeLensDebounce.update(f,Date.now()-_);v.delay=E,this._renderCodeLensSymbols(L),this._resolveCodeLensesInViewportSoon()},D.onUnexpectedError)},this._provideCodeLensDebounce.get(f));this._localToDispose.add(v),this._localToDispose.add((0,w.toDisposable)(()=>this._resolveCodeLensesScheduler.cancel())),this._localToDispose.add(this._editor.onDidChangeModelContent(()=>{this._editor.changeDecorations(C=>{this._editor.changeViewZones(_=>{let L=[],E=-1;this._lenses.forEach(k=>{!k.isValid()||E===k.getLineNumber()?L.push(k):(k.update(_),E=k.getLineNumber())});let N=new l.CodeLensHelper;L.forEach(k=>{k.dispose(N,_),this._lenses.splice(this._lenses.indexOf(k),1)}),N.commit(C)})}),v.schedule()})),this._localToDispose.add(this._editor.onDidFocusEditorWidget(()=>{v.schedule()})),this._localToDispose.add(this._editor.onDidScrollChange(C=>{C.scrollTopChanged&&this._lenses.length>0&&this._resolveCodeLensesInViewportSoon()})),this._localToDispose.add(this._editor.onDidLayoutChange(()=>{this._resolveCodeLensesInViewportSoon()})),this._localToDispose.add((0,w.toDisposable)(()=>{if(this._editor.getModel()){const C=b.StableEditorScrollState.capture(this._editor);this._editor.changeDecorations(_=>{this._editor.changeViewZones(L=>{this._disposeAllLenses(_,L)})}),C.restore(this._editor)}else this._disposeAllLenses(void 0,void 0)})),this._localToDispose.add(this._editor.onMouseDown(C=>{if(C.target.type!==9)return;let _=C.target.element;if((_==null?void 0:_.tagName)==="SPAN"&&(_=_.parentElement),(_==null?void 0:_.tagName)==="A")for(const L of this._lenses){let E=L.getCommand(_);if(E){this._commandService.executeCommand(E.id,...E.arguments||[]).catch(N=>this._notificationService.error(N));break}}})),v.schedule()}_disposeAllLenses(f,S){const v=new l.CodeLensHelper;for(const C of this._lenses)C.dispose(v,S);f&&v.commit(f),this._lenses.length=0}_renderCodeLensSymbols(f){if(!this._editor.hasModel())return;let S=this._editor.getModel().getLineCount(),v=[],C;for(let E of f.lenses){let N=E.symbol.range.startLineNumber;N<1||N>S||(C&&C[C.length-1].symbol.range.startLineNumber===N?C.push(E):(C=[E],v.push(C)))}const _=b.StableEditorScrollState.capture(this._editor),L=this._getLayoutInfo();this._editor.changeDecorations(E=>{this._editor.changeViewZones(N=>{const k=new l.CodeLensHelper;let M=0,O=0;for(;O<v.length&&M<this._lenses.length;){let B=v[O][0].symbol.range.startLineNumber,T=this._lenses[M].getLineNumber();T<B?(this._lenses[M].dispose(k,N),this._lenses.splice(M,1)):T===B?(this._lenses[M].updateCodeLensSymbols(v[O],k),O++,M++):(this._lenses.splice(M,0,new l.CodeLensWidget(v[O],this._editor,this._styleClassName,k,N,L.codeLensHeight,()=>this._resolveCodeLensesInViewportSoon())),M++,O++)}for(;M<this._lenses.length;)this._lenses[M].dispose(k,N),this._lenses.splice(M,1);for(;O<v.length;)this._lenses.push(new l.CodeLensWidget(v[O],this._editor,this._styleClassName,k,N,L.codeLensHeight,()=>this._resolveCodeLensesInViewportSoon())),O++;k.commit(E)})}),_.restore(this._editor)}_resolveCodeLensesInViewportSoon(){this._editor.getModel()&&this._resolveCodeLensesScheduler.schedule()}_resolveCodeLensesInViewport(){var f;(f=this._resolveCodeLensesPromise)===null||f===void 0||f.cancel(),this._resolveCodeLensesPromise=void 0;const S=this._editor.getModel();if(!S)return;const v=[],C=[];if(this._lenses.forEach(E=>{const N=E.computeIfNecessary(S);N&&(v.push(N),C.push(E))}),v.length===0)return;const _=Date.now(),L=(0,m.createCancelablePromise)(E=>{const N=v.map((k,M)=>{const O=new Array(k.length),B=k.map((T,R)=>!T.symbol.command&&typeof T.provider.resolveCodeLens=="function"?Promise.resolve(T.provider.resolveCodeLens(S,T.symbol,E)).then(P=>{O[R]=P},D.onUnexpectedExternalError):(O[R]=T.symbol,Promise.resolve(void 0)));return Promise.all(B).then(()=>{!E.isCancellationRequested&&!C[M].isDisposed()&&C[M].updateCommands(O)})});return Promise.all(N)});this._resolveCodeLensesPromise=L,this._resolveCodeLensesPromise.then(()=>{const E=this._resolveCodeLensesDebounce.update(S,Date.now()-_);this._resolveCodeLensesScheduler.delay=E,this._currentCodeLensModel&&this._codeLensCache.put(S,this._currentCodeLensModel),this._oldCodeLensModels.clear(),L===this._resolveCodeLensesPromise&&(this._resolveCodeLensesPromise=void 0)},E=>{(0,D.onUnexpectedError)(E),L===this._resolveCodeLensesPromise&&(this._resolveCodeLensesPromise=void 0)})}getModel(){return this._currentCodeLensModel}};d.ID="css.editor.codeLens",d=Ie([Ce(1,a.ILanguageFeatureDebounceService),Ce(2,r.ICommandService),Ce(3,s.INotificationService),Ce(4,n.ICodeLensCache)],d),e.CodeLensContribution=d,(0,p.registerEditorContribution)(d.ID,d),(0,p.registerEditorAction)(class extends p.EditorAction{constructor(){super({id:"codelens.showLensesInCurrentLine",precondition:g.EditorContextKeys.hasCodeLensProvider,label:(0,c.localize)(0,null),alias:"Show CodeLens Commands For Current Line"})}run(f,S){return ye(this,void 0,void 0,function*(){if(!S.hasModel())return;const v=f.get(o.IQuickInputService),C=f.get(r.ICommandService),_=f.get(s.INotificationService),L=S.getSelection().positionLineNumber,E=S.getContribution(d.ID);if(!E)return;const N=E.getModel();if(!N)return;const k=[];for(const O of N.lenses)O.symbol.command&&O.symbol.range.startLineNumber===L&&k.push({label:O.symbol.command.title,command:O.symbol.command});if(k.length===0)return;const M=yield v.pick(k,{canPickMany:!1});if(!!M){if(N.isDisposed)return yield C.executeCommand(this.id);try{yield C.executeCommand(M.command.id,...M.command.arguments||[])}catch(O){_.error(O)}}})}})}),define(te[293],ie([1,0,10,29,13,2,8,130,15,3,33,18,272,40]),function(j,e,y,m,D,I,w,b,p,h,g,t,i,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ColorDetector=e.ColorDecorationInjectedTextMarker=void 0,e.ColorDecorationInjectedTextMarker=Object.create({});const l=500;let c=class Ri extends I.Disposable{constructor(s,o){super();this._editor=s,this._configurationService=o,this._localToDispose=this._register(new I.DisposableStore),this._decorationsIds=[],this._colorDatas=new Map,this._colorDecoratorIds=new Set,this._ruleFactory=new b.DynamicCssRules(this._editor),this._colorDecorationClassRefs=this._register(new I.DisposableStore),this._register(s.onDidChangeModel(()=>{this._isEnabled=this.isEnabled(),this.onModelChanged()})),this._register(s.onDidChangeModelLanguage(()=>this.onModelChanged())),this._register(t.ColorProviderRegistry.onDidChange(()=>this.onModelChanged())),this._register(s.onDidChangeConfiguration(()=>{let a=this._isEnabled;this._isEnabled=this.isEnabled(),a!==this._isEnabled&&(this._isEnabled?this.onModelChanged():this.removeAllDecorations())})),this._timeoutTimer=null,this._computePromise=null,this._isEnabled=this.isEnabled(),this.onModelChanged()}isEnabled(){const s=this._editor.getModel();if(!s)return!1;const o=s.getLanguageId(),a=this._configurationService.getValue(o);if(a&&typeof a=="object"){const d=a.colorDecorators;if(d&&d.enable!==void 0&&!d.enable)return d.enable}return this._editor.getOption(17)}static get(s){return s.getContribution(this.ID)}dispose(){this.stop(),this.removeAllDecorations(),super.dispose()}onModelChanged(){if(this.stop(),!this._isEnabled)return;const s=this._editor.getModel();!s||!t.ColorProviderRegistry.has(s)||(this._localToDispose.add(this._editor.onDidChangeModelContent(()=>{this._timeoutTimer||(this._timeoutTimer=new y.TimeoutTimer,this._timeoutTimer.cancelAndSet(()=>{this._timeoutTimer=null,this.beginCompute()},Ri.RECOMPUTE_TIME))})),this.beginCompute())}beginCompute(){this._computePromise=(0,y.createCancelablePromise)(s=>{const o=this._editor.getModel();return o?(0,i.getColors)(o,s):Promise.resolve([])}),this._computePromise.then(s=>{this.updateDecorations(s),this.updateColorDecorators(s),this._computePromise=null},D.onUnexpectedError)}stop(){this._timeoutTimer&&(this._timeoutTimer.cancel(),this._timeoutTimer=null),this._computePromise&&(this._computePromise.cancel(),this._computePromise=null),this._localToDispose.clear()}updateDecorations(s){const o=s.map(a=>({range:{startLineNumber:a.colorInfo.range.startLineNumber,startColumn:a.colorInfo.range.startColumn,endLineNumber:a.colorInfo.range.endLineNumber,endColumn:a.colorInfo.range.endColumn},options:g.ModelDecorationOptions.EMPTY}));this._decorationsIds=this._editor.deltaDecorations(this._decorationsIds,o),this._colorDatas=new Map,this._decorationsIds.forEach((a,d)=>this._colorDatas.set(a,s[d]))}updateColorDecorators(s){this._colorDecorationClassRefs.clear();let o=[];for(let a=0;a<s.length&&o.length<l;a++){const{red:d,green:u,blue:f,alpha:S}=s[a].colorInfo.color,v=new m.RGBA(Math.round(d*255),Math.round(u*255),Math.round(f*255),S);let C=`rgba(${v.r}, ${v.g}, ${v.b}, ${v.a})`;const _=this._colorDecorationClassRefs.add(this._ruleFactory.createClassNameRef({backgroundColor:C}));o.push({range:{startLineNumber:s[a].colorInfo.range.startLineNumber,startColumn:s[a].colorInfo.range.startColumn,endLineNumber:s[a].colorInfo.range.endLineNumber,endColumn:s[a].colorInfo.range.endColumn},options:{description:"colorDetector",before:{content:w.noBreakWhitespace,inlineClassName:`${_.className} colorpicker-color-decoration`,inlineClassNameAffectsLetterSpacing:!0,attachedData:e.ColorDecorationInjectedTextMarker}}})}this._colorDecoratorIds=new Set(this._editor.deltaDecorations([...this._colorDecoratorIds],o))}removeAllDecorations(){this._decorationsIds=this._editor.deltaDecorations(this._decorationsIds,[]),this._colorDecoratorIds=new Set(this._editor.deltaDecorations([...this._colorDecoratorIds],[])),this._colorDecorationClassRefs.clear()}getColorData(s){const o=this._editor.getModel();if(!o)return null;const a=o.getDecorationsInRange(h.Range.fromPositions(s,s)).filter(d=>this._colorDatas.has(d.id));return a.length===0?null:this._colorDatas.get(a[0].id)}isColorDecorationId(s){return this._colorDecoratorIds.has(s)}};c.ID="editor.contrib.colorDetector",c.RECOMPUTE_TIME=1e3,c=Ie([Ce(1,n.IConfigurationService)],c),e.ColorDetector=c,(0,p.registerEditorContribution)(c.ID,c)}),define(te[710],ie([1,0,2,17,15,11,3,22,33,452,373]),function(j,e,y,m,D,I,w,b,p,h){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DragAndDropController=void 0;function g(i){return m.isMacintosh?i.altKey:i.ctrlKey}class t extends y.Disposable{constructor(n){super();this._editor=n,this._register(this._editor.onMouseDown(l=>this._onEditorMouseDown(l))),this._register(this._editor.onMouseUp(l=>this._onEditorMouseUp(l))),this._register(this._editor.onMouseDrag(l=>this._onEditorMouseDrag(l))),this._register(this._editor.onMouseDrop(l=>this._onEditorMouseDrop(l))),this._register(this._editor.onMouseDropCanceled(()=>this._onEditorMouseDropCanceled())),this._register(this._editor.onKeyDown(l=>this.onEditorKeyDown(l))),this._register(this._editor.onKeyUp(l=>this.onEditorKeyUp(l))),this._register(this._editor.onDidBlurEditorWidget(()=>this.onEditorBlur())),this._register(this._editor.onDidBlurEditorText(()=>this.onEditorBlur())),this._dndDecorationIds=[],this._mouseDown=!1,this._modifierPressed=!1,this._dragSelection=null}onEditorBlur(){this._removeDecoration(),this._dragSelection=null,this._mouseDown=!1,this._modifierPressed=!1}onEditorKeyDown(n){!this._editor.getOption(31)||this._editor.getOption(18)||(g(n)&&(this._modifierPressed=!0),this._mouseDown&&g(n)&&this._editor.updateOptions({mouseStyle:"copy"}))}onEditorKeyUp(n){!this._editor.getOption(31)||this._editor.getOption(18)||(g(n)&&(this._modifierPressed=!1),this._mouseDown&&n.keyCode===t.TRIGGER_KEY_VALUE&&this._editor.updateOptions({mouseStyle:"default"}))}_onEditorMouseDown(n){this._mouseDown=!0}_onEditorMouseUp(n){this._mouseDown=!1,this._editor.updateOptions({mouseStyle:"text"})}_onEditorMouseDrag(n){let l=n.target;if(this._dragSelection===null){let r=(this._editor.getSelections()||[]).filter(s=>l.position&&s.containsPosition(l.position));if(r.length===1)this._dragSelection=r[0];else return}g(n.event)?this._editor.updateOptions({mouseStyle:"copy"}):this._editor.updateOptions({mouseStyle:"default"}),l.position&&(this._dragSelection.containsPosition(l.position)?this._removeDecoration():this.showAt(l.position))}_onEditorMouseDropCanceled(){this._editor.updateOptions({mouseStyle:"text"}),this._removeDecoration(),this._dragSelection=null,this._mouseDown=!1}_onEditorMouseDrop(n){if(n.target&&(this._hitContent(n.target)||this._hitMargin(n.target))&&n.target.position){let l=new I.Position(n.target.position.lineNumber,n.target.position.column);if(this._dragSelection===null){let c=null;if(n.event.shiftKey){let r=this._editor.getSelection();if(r){const{selectionStartLineNumber:s,selectionStartColumn:o}=r;c=[new b.Selection(s,o,l.lineNumber,l.column)]}}else c=(this._editor.getSelections()||[]).map(r=>r.containsPosition(l)?new b.Selection(l.lineNumber,l.column,l.lineNumber,l.column):r);this._editor.setSelections(c||[],"mouse",3)}else(!this._dragSelection.containsPosition(l)||(g(n.event)||this._modifierPressed)&&(this._dragSelection.getEndPosition().equals(l)||this._dragSelection.getStartPosition().equals(l)))&&(this._editor.pushUndoStop(),this._editor.executeCommand(t.ID,new h.DragAndDropCommand(this._dragSelection,l,g(n.event)||this._modifierPressed)),this._editor.pushUndoStop())}this._editor.updateOptions({mouseStyle:"text"}),this._removeDecoration(),this._dragSelection=null,this._mouseDown=!1}showAt(n){let l=[{range:new w.Range(n.lineNumber,n.column,n.lineNumber,n.column),options:t._DECORATION_OPTIONS}];this._dndDecorationIds=this._editor.deltaDecorations(this._dndDecorationIds,l),this._editor.revealPosition(n,1)}_removeDecoration(){this._dndDecorationIds=this._editor.deltaDecorations(this._dndDecorationIds,[])}_hitContent(n){return n.type===6||n.type===7}_hitMargin(n){return n.type===2||n.type===3||n.type===4}dispose(){this._removeDecoration(),this._dragSelection=null,this._mouseDown=!1,this._modifierPressed=!1,super.dispose()}}e.DragAndDropController=t,t.ID="editor.contrib.dragAndDrop",t.TRIGGER_KEY_VALUE=m.isMacintosh?6:5,t._DECORATION_OPTIONS=p.ModelDecorationOptions.register({description:"dnd-target",className:"dnd-target"}),(0,D.registerEditorContribution)(t.ID,t)}),define(te[711],ie([1,0,3,49,33,23,14]),function(j,e,y,m,D,I,w){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.FindDecorations=void 0;class b{constructor(h){this._editor=h,this._decorations=[],this._overviewRulerApproximateDecorations=[],this._findScopeDecorationIds=[],this._rangeHighlightDecorationId=null,this._highlightedDecorationId=null,this._startPosition=this._editor.getPosition()}dispose(){this._editor.deltaDecorations(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 h=this._findScopeDecorationIds.map(g=>this._editor.getModel().getDecorationRange(g)).filter(g=>!!g);if(h.length)return h}return null}getStartPosition(){return this._startPosition}setStartPosition(h){this._startPosition=h,this.setCurrentFindMatch(null)}_getDecorationIndex(h){const g=this._decorations.indexOf(h);return g>=0?g+1:1}getCurrentMatchesPosition(h){let g=this._editor.getModel().getDecorationsInRange(h);for(const t of g){const i=t.options;if(i===b._FIND_MATCH_DECORATION||i===b._CURRENT_FIND_MATCH_DECORATION)return this._getDecorationIndex(t.id)}return 0}setCurrentFindMatch(h){let g=null,t=0;if(h)for(let i=0,n=this._decorations.length;i<n;i++){let l=this._editor.getModel().getDecorationRange(this._decorations[i]);if(h.equalsRange(l)){g=this._decorations[i],t=i+1;break}}return(this._highlightedDecorationId!==null||g!==null)&&this._editor.changeDecorations(i=>{if(this._highlightedDecorationId!==null&&(i.changeDecorationOptions(this._highlightedDecorationId,b._FIND_MATCH_DECORATION),this._highlightedDecorationId=null),g!==null&&(this._highlightedDecorationId=g,i.changeDecorationOptions(this._highlightedDecorationId,b._CURRENT_FIND_MATCH_DECORATION)),this._rangeHighlightDecorationId!==null&&(i.removeDecoration(this._rangeHighlightDecorationId),this._rangeHighlightDecorationId=null),g!==null){let n=this._editor.getModel().getDecorationRange(g);if(n.startLineNumber!==n.endLineNumber&&n.endColumn===1){let l=n.endLineNumber-1,c=this._editor.getModel().getLineMaxColumn(l);n=new y.Range(n.startLineNumber,n.startColumn,l,c)}this._rangeHighlightDecorationId=i.addDecoration(n,b._RANGE_HIGHLIGHT_DECORATION)}}),t}set(h,g){this._editor.changeDecorations(t=>{let i=b._FIND_MATCH_DECORATION,n=[];if(h.length>1e3){i=b._FIND_MATCH_NO_OVERVIEW_DECORATION;const c=this._editor.getModel().getLineCount(),s=this._editor.getLayoutInfo().height/c,o=Math.max(2,Math.ceil(3/s));let a=h[0].range.startLineNumber,d=h[0].range.endLineNumber;for(let u=1,f=h.length;u<f;u++){const S=h[u].range;d+o>=S.startLineNumber?S.endLineNumber>d&&(d=S.endLineNumber):(n.push({range:new y.Range(a,1,d,1),options:b._FIND_MATCH_ONLY_OVERVIEW_DECORATION}),a=S.startLineNumber,d=S.endLineNumber)}n.push({range:new y.Range(a,1,d,1),options:b._FIND_MATCH_ONLY_OVERVIEW_DECORATION})}let l=new Array(h.length);for(let c=0,r=h.length;c<r;c++)l[c]={range:h[c].range,options:i};this._decorations=t.deltaDecorations(this._decorations,l),this._overviewRulerApproximateDecorations=t.deltaDecorations(this._overviewRulerApproximateDecorations,n),this._rangeHighlightDecorationId&&(t.removeDecoration(this._rangeHighlightDecorationId),this._rangeHighlightDecorationId=null),this._findScopeDecorationIds.length&&(this._findScopeDecorationIds.forEach(c=>t.removeDecoration(c)),this._findScopeDecorationIds=[]),(g==null?void 0:g.length)&&(this._findScopeDecorationIds=g.map(c=>t.addDecoration(c,b._FIND_SCOPE_DECORATION)))})}matchBeforePosition(h){if(this._decorations.length===0)return null;for(let g=this._decorations.length-1;g>=0;g--){let t=this._decorations[g],i=this._editor.getModel().getDecorationRange(t);if(!(!i||i.endLineNumber>h.lineNumber)){if(i.endLineNumber<h.lineNumber)return i;if(!(i.endColumn>h.column))return i}}return this._editor.getModel().getDecorationRange(this._decorations[this._decorations.length-1])}matchAfterPosition(h){if(this._decorations.length===0)return null;for(let g=0,t=this._decorations.length;g<t;g++){let i=this._decorations[g],n=this._editor.getModel().getDecorationRange(i);if(!(!n||n.startLineNumber<h.lineNumber)){if(n.startLineNumber>h.lineNumber)return n;if(!(n.startColumn<h.column))return n}}return this._editor.getModel().getDecorationRange(this._decorations[0])}_allDecorations(){let h=[];return h=h.concat(this._decorations),h=h.concat(this._overviewRulerApproximateDecorations),this._findScopeDecorationIds.length&&h.push(...this._findScopeDecorationIds),this._rangeHighlightDecorationId&&h.push(this._rangeHighlightDecorationId),h}}e.FindDecorations=b,b._CURRENT_FIND_MATCH_DECORATION=D.ModelDecorationOptions.register({description:"current-find-match",stickiness:1,zIndex:13,className:"currentFindMatch",showIfCollapsed:!0,overviewRuler:{color:(0,w.themeColorFromId)(I.overviewRulerFindMatchForeground),position:m.OverviewRulerLane.Center},minimap:{color:(0,w.themeColorFromId)(I.minimapFindMatch),position:m.MinimapPosition.Inline}}),b._FIND_MATCH_DECORATION=D.ModelDecorationOptions.register({description:"find-match",stickiness:1,zIndex:10,className:"findMatch",showIfCollapsed:!0,overviewRuler:{color:(0,w.themeColorFromId)(I.overviewRulerFindMatchForeground),position:m.OverviewRulerLane.Center},minimap:{color:(0,w.themeColorFromId)(I.minimapFindMatch),position:m.MinimapPosition.Inline}}),b._FIND_MATCH_NO_OVERVIEW_DECORATION=D.ModelDecorationOptions.register({description:"find-match-no-overview",stickiness:1,className:"findMatch",showIfCollapsed:!0}),b._FIND_MATCH_ONLY_OVERVIEW_DECORATION=D.ModelDecorationOptions.register({description:"find-match-only-overview",stickiness:1,overviewRuler:{color:(0,w.themeColorFromId)(I.overviewRulerFindMatchForeground),position:m.OverviewRulerLane.Center}}),b._RANGE_HIGHLIGHT_DECORATION=D.ModelDecorationOptions.register({description:"find-range-highlight",stickiness:1,className:"rangeHighlight",isWholeLine:!0}),b._FIND_SCOPE_DECORATION=D.ModelDecorationOptions.register({description:"find-scope",className:"findScope",isWholeLine:!0})}),define(te[163],ie([1,0,19,10,2,98,11,3,22,150,711,453,454,16]),function(j,e,y,m,D,I,w,b,p,h,g,t,i,n){"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 n.RawContextKey("findWidgetVisible",!1),e.CONTEXT_FIND_WIDGET_NOT_VISIBLE=e.CONTEXT_FIND_WIDGET_VISIBLE.toNegated(),e.CONTEXT_FIND_INPUT_FOCUSED=new n.RawContextKey("findInputFocussed",!1),e.CONTEXT_REPLACE_INPUT_FOCUSED=new n.RawContextKey("replaceInputFocussed",!1),e.ToggleCaseSensitiveKeybinding={primary:512|33,mac:{primary:2048|512|33}},e.ToggleWholeWordKeybinding={primary:512|53,mac:{primary:2048|512|53}},e.ToggleRegexKeybinding={primary:512|48,mac:{primary:2048|512|48}},e.ToggleSearchScopeKeybinding={primary:512|42,mac:{primary:2048|512|42}},e.TogglePreserveCaseKeybinding={primary:512|46,mac:{primary:2048|512|46}},e.FIND_IDS={StartFindAction:"actions.find",StartFindWithSelection:"actions.findWithSelection",StartFindWithArgs:"editor.actions.findWithArgs",NextMatchFindAction:"editor.action.nextMatchFindAction",PreviousMatchFindAction:"editor.action.previousMatchFindAction",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 l=240;class c{constructor(s,o){this._toDispose=new D.DisposableStore,this._editor=s,this._state=o,this._isDisposed=!1,this._startSearchingTimer=new m.TimeoutTimer,this._decorations=new g.FindDecorations(s),this._toDispose.add(this._decorations),this._updateDecorationsScheduler=new m.RunOnceScheduler(()=>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,D.dispose)(this._startSearchingTimer),this._toDispose.dispose()}_onStateChanged(s){this._isDisposed||!this._editor.hasModel()||(s.searchString||s.isReplaceRevealed||s.isRegex||s.wholeWord||s.matchCase||s.searchScope)&&(this._editor.getModel().isTooLargeForSyncing()?(this._startSearchingTimer.cancel(),this._startSearchingTimer.setIfNotSet(()=>{s.searchScope?this.research(s.moveCursor,this._state.searchScope):this.research(s.moveCursor)},l)):s.searchScope?this.research(s.moveCursor,this._state.searchScope):this.research(s.moveCursor))}static _getSearchRange(s,o){return o||s.getFullModelRange()}research(s,o){let a=null;typeof o!="undefined"?o!==null&&(Array.isArray(o)?a=o:a=[o]):a=this._decorations.getFindScopes(),a!==null&&(a=a.map(S=>{if(S.startLineNumber!==S.endLineNumber){let v=S.endLineNumber;return S.endColumn===1&&(v=v-1),new b.Range(S.startLineNumber,1,v,this._editor.getModel().getLineMaxColumn(v))}return S}));let d=this._findMatches(a,!1,e.MATCHES_LIMIT);this._decorations.set(d,a);const u=this._editor.getSelection();let f=this._decorations.getCurrentMatchesPosition(u);if(f===0&&d.length>0){const S=(0,y.findFirstInSorted)(d.map(v=>v.range),v=>b.Range.compareRangesUsingStarts(v,u)>=0);f=S>0?S-1+1:f}this._state.changeMatchInfo(f,this._decorations.getCount(),void 0),s&&this._editor.getOption(35).cursorMoveOnType&&this._moveToNextMatch(this._decorations.getStartPosition())}_hasMatches(){return this._state.matchesCount>0}_cannotFind(){if(!this._hasMatches()){let s=this._decorations.getFindScope();return s&&this._editor.revealRangeInCenterIfOutsideViewport(s,0),!0}return!1}_setCurrentFindMatch(s){let o=this._decorations.setCurrentFindMatch(s);this._state.changeMatchInfo(o,this._decorations.getCount(),s),this._editor.setSelection(s),this._editor.revealRangeInCenterIfOutsideViewport(s,0)}_prevSearchPosition(s){let o=this._state.isRegex&&(this._state.searchString.indexOf("^")>=0||this._state.searchString.indexOf("$")>=0),{lineNumber:a,column:d}=s,u=this._editor.getModel();return o||d===1?(a===1?a=u.getLineCount():a--,d=u.getLineMaxColumn(a)):d--,new w.Position(a,d)}_moveToPrevMatch(s,o=!1){if(!this._state.canNavigateBack()){const _=this._decorations.matchAfterPosition(s);_&&this._setCurrentFindMatch(_);return}if(this._decorations.getCount()<e.MATCHES_LIMIT){let _=this._decorations.matchBeforePosition(s);_&&_.isEmpty()&&_.getStartPosition().equals(s)&&(s=this._prevSearchPosition(s),_=this._decorations.matchBeforePosition(s)),_&&this._setCurrentFindMatch(_);return}if(this._cannotFind())return;let a=this._decorations.getFindScope(),d=c._getSearchRange(this._editor.getModel(),a);d.getEndPosition().isBefore(s)&&(s=d.getEndPosition()),s.isBefore(d.getStartPosition())&&(s=d.getEndPosition());let{lineNumber:u,column:f}=s,S=this._editor.getModel(),v=new w.Position(u,f),C=S.findPreviousMatch(this._state.searchString,v,this._state.isRegex,this._state.matchCase,this._state.wholeWord?this._editor.getOption(117):null,!1);if(C&&C.range.isEmpty()&&C.range.getStartPosition().equals(v)&&(v=this._prevSearchPosition(v),C=S.findPreviousMatch(this._state.searchString,v,this._state.isRegex,this._state.matchCase,this._state.wholeWord?this._editor.getOption(117):null,!1)),!!C){if(!o&&!d.containsRange(C.range))return this._moveToPrevMatch(C.range.getStartPosition(),!0);this._setCurrentFindMatch(C.range)}}moveToPrevMatch(){this._moveToPrevMatch(this._editor.getSelection().getStartPosition())}_nextSearchPosition(s){let o=this._state.isRegex&&(this._state.searchString.indexOf("^")>=0||this._state.searchString.indexOf("$")>=0),{lineNumber:a,column:d}=s,u=this._editor.getModel();return o||d===u.getLineMaxColumn(a)?(a===u.getLineCount()?a=1:a++,d=1):d++,new w.Position(a,d)}_moveToNextMatch(s){if(!this._state.canNavigateForward()){const a=this._decorations.matchBeforePosition(s);a&&this._setCurrentFindMatch(a);return}if(this._decorations.getCount()<e.MATCHES_LIMIT){let a=this._decorations.matchAfterPosition(s);a&&a.isEmpty()&&a.getStartPosition().equals(s)&&(s=this._nextSearchPosition(s),a=this._decorations.matchAfterPosition(s)),a&&this._setCurrentFindMatch(a);return}let o=this._getNextMatch(s,!1,!0);o&&this._setCurrentFindMatch(o.range)}_getNextMatch(s,o,a,d=!1){if(this._cannotFind())return null;let u=this._decorations.getFindScope(),f=c._getSearchRange(this._editor.getModel(),u);f.getEndPosition().isBefore(s)&&(s=f.getStartPosition()),s.isBefore(f.getStartPosition())&&(s=f.getStartPosition());let{lineNumber:S,column:v}=s,C=this._editor.getModel(),_=new w.Position(S,v),L=C.findNextMatch(this._state.searchString,_,this._state.isRegex,this._state.matchCase,this._state.wholeWord?this._editor.getOption(117):null,o);return a&&L&&L.range.isEmpty()&&L.range.getStartPosition().equals(_)&&(_=this._nextSearchPosition(_),L=C.findNextMatch(this._state.searchString,_,this._state.isRegex,this._state.matchCase,this._state.wholeWord?this._editor.getOption(117):null,o)),L?!d&&!f.containsRange(L.range)?this._getNextMatch(L.range.getEndPosition(),o,a,!0):L:null}moveToNextMatch(){this._moveToNextMatch(this._editor.getSelection().getEndPosition())}_getReplacePattern(){return this._state.isRegex?(0,i.parseReplaceString)(this._state.replaceString):i.ReplacePattern.fromStaticValue(this._state.replaceString)}replace(){if(!this._hasMatches())return;let s=this._getReplacePattern(),o=this._editor.getSelection(),a=this._getNextMatch(o.getStartPosition(),!0,!1);if(a)if(o.equalsRange(a.range)){let d=s.buildReplaceString(a.matches,this._state.preserveCase),u=new I.ReplaceCommand(o,d);this._executeEditorCommand("replace",u),this._decorations.setStartPosition(new w.Position(o.startLineNumber,o.startColumn+d.length)),this.research(!0)}else this._decorations.setStartPosition(this._editor.getPosition()),this._setCurrentFindMatch(a.range)}_findMatches(s,o,a){const d=(s||[null]).map(u=>c._getSearchRange(this._editor.getModel(),u));return this._editor.getModel().findMatches(this._state.searchString,d,this._state.isRegex,this._state.matchCase,this._state.wholeWord?this._editor.getOption(117):null,o,a)}replaceAll(){if(!this._hasMatches())return;const s=this._decorations.getFindScopes();s===null&&this._state.matchesCount>=e.MATCHES_LIMIT?this._largeReplaceAll():this._regularReplaceAll(s),this.research(!1)}_largeReplaceAll(){const o=new h.SearchParams(this._state.searchString,this._state.isRegex,this._state.matchCase,this._state.wholeWord?this._editor.getOption(117):null).parseSearchRequest();if(!o)return;let a=o.regex;if(!a.multiline){let L="mu";a.ignoreCase&&(L+="i"),a.global&&(L+="g"),a=new RegExp(a.source,L)}const d=this._editor.getModel(),u=d.getValue(1),f=d.getFullModelRange(),S=this._getReplacePattern();let v;const C=this._state.preserveCase;S.hasReplacementPatterns||C?v=u.replace(a,function(){return S.buildReplaceString(arguments,C)}):v=u.replace(a,S.buildReplaceString(null,C));let _=new I.ReplaceCommandThatPreservesSelection(f,v,this._editor.getSelection());this._executeEditorCommand("replaceAll",_)}_regularReplaceAll(s){const o=this._getReplacePattern();let a=this._findMatches(s,o.hasReplacementPatterns||this._state.preserveCase,1073741824),d=[];for(let f=0,S=a.length;f<S;f++)d[f]=o.buildReplaceString(a[f].matches,this._state.preserveCase);let u=new t.ReplaceAllCommand(this._editor.getSelection(),a.map(f=>f.range),d);this._executeEditorCommand("replaceAll",u)}selectAllMatches(){if(!this._hasMatches())return;let s=this._decorations.getFindScopes(),a=this._findMatches(s,!1,1073741824).map(u=>new p.Selection(u.range.startLineNumber,u.range.startColumn,u.range.endLineNumber,u.range.endColumn)),d=this._editor.getSelection();for(let u=0,f=a.length;u<f;u++)if(a[u].equalsRange(d)){a=[d].concat(a.slice(0,u)).concat(a.slice(u+1));break}this._editor.setSelections(a)}_executeEditorCommand(s,o){try{this._ignoreModelContentChanged=!0,this._editor.pushUndoStop(),this._editor.executeCommand(s,o),this._editor.pushUndoStop()}finally{this._ignoreModelContentChanged=!1}}}e.FindModelBoundToEditorModel=c}),define(te[712],ie([1,0,7,264,60,10,163,23,14]),function(j,e,y,m,D,I,w,b,p){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.FindOptionsWidget=void 0;class h extends D.Widget{constructor(t,i,n,l){super();this._hideSoon=this._register(new I.RunOnceScheduler(()=>this._hide(),2e3)),this._isVisible=!1,this._editor=t,this._state=i,this._keybindingService=n,this._domNode=document.createElement("div"),this._domNode.className="findOptionsWidget",this._domNode.style.display="none",this._domNode.style.top="10px",this._domNode.setAttribute("role","presentation"),this._domNode.setAttribute("aria-hidden","true");const c=l.getColorTheme().getColor(b.inputActiveOptionBorder),r=l.getColorTheme().getColor(b.inputActiveOptionForeground),s=l.getColorTheme().getColor(b.inputActiveOptionBackground);this.caseSensitive=this._register(new m.CaseSensitiveCheckbox({appendTitle:this._keybindingLabelFor(w.FIND_IDS.ToggleCaseSensitiveCommand),isChecked:this._state.matchCase,inputActiveOptionBorder:c,inputActiveOptionForeground:r,inputActiveOptionBackground:s})),this._domNode.appendChild(this.caseSensitive.domNode),this._register(this.caseSensitive.onChange(()=>{this._state.change({matchCase:this.caseSensitive.checked},!1)})),this.wholeWords=this._register(new m.WholeWordsCheckbox({appendTitle:this._keybindingLabelFor(w.FIND_IDS.ToggleWholeWordCommand),isChecked:this._state.wholeWord,inputActiveOptionBorder:c,inputActiveOptionForeground:r,inputActiveOptionBackground:s})),this._domNode.appendChild(this.wholeWords.domNode),this._register(this.wholeWords.onChange(()=>{this._state.change({wholeWord:this.wholeWords.checked},!1)})),this.regex=this._register(new m.RegexCheckbox({appendTitle:this._keybindingLabelFor(w.FIND_IDS.ToggleRegexCommand),isChecked:this._state.isRegex,inputActiveOptionBorder:c,inputActiveOptionForeground:r,inputActiveOptionBackground:s})),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(o=>{let a=!1;o.isRegex&&(this.regex.checked=this._state.isRegex,a=!0),o.wholeWord&&(this.wholeWords.checked=this._state.wholeWord,a=!0),o.matchCase&&(this.caseSensitive.checked=this._state.matchCase,a=!0),!this._state.isRevealed&&a&&this._revealTemporarily()})),this._register(y.addDisposableNonBubblingMouseOutListener(this._domNode,o=>this._onMouseOut())),this._register(y.addDisposableListener(this._domNode,"mouseover",o=>this._onMouseOver())),this._applyTheme(l.getColorTheme()),this._register(l.onDidColorThemeChange(this._applyTheme.bind(this)))}_keybindingLabelFor(t){let i=this._keybindingService.lookupKeybinding(t);return i?` (${i.getLabel()})`:""}dispose(){this._editor.removeOverlayWidget(this),super.dispose()}getId(){return h.ID}getDomNode(){return this._domNode}getPosition(){return{preference:0}}highlightFindOptions(){this._revealTemporarily()}_revealTemporarily(){this._show(),this._hideSoon.schedule()}_onMouseOut(){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")}_applyTheme(t){let i={inputActiveOptionBorder:t.getColor(b.inputActiveOptionBorder),inputActiveOptionForeground:t.getColor(b.inputActiveOptionForeground),inputActiveOptionBackground:t.getColor(b.inputActiveOptionBackground)};this.caseSensitive.style(i),this.wholeWords.style(i),this.regex.style(i)}}e.FindOptionsWidget=h,h.ID="editor.contrib.findOptionsWidget",(0,p.registerThemingParticipant)((g,t)=>{const i=g.getColor(b.editorWidgetBackground);i&&t.addRule(`.monaco-editor .findOptionsWidget { background-color: ${i}; }`);const n=g.getColor(b.editorWidgetForeground);n&&t.addRule(`.monaco-editor .findOptionsWidget { color: ${n}; }`);const l=g.getColor(b.widgetShadow);l&&t.addRule(`.monaco-editor .findOptionsWidget { box-shadow: 0 0 8px 2px ${l}; }`);const c=g.getColor(b.contrastBorder);c&&t.addRule(`.monaco-editor .findOptionsWidget { border: 2px solid ${c}; }`)})}),define(te[713],ie([1,0,4,2,3,163]),function(j,e,y,m,D,I){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.FindReplaceState=void 0;function w(p,h){return p===1?!0:p===2?!1:h}class b extends m.Disposable{constructor(){super();this._onFindReplaceStateChange=this._register(new y.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}get searchString(){return this._searchString}get replaceString(){return this._replaceString}get isRevealed(){return this._isRevealed}get isReplaceRevealed(){return this._isReplaceRevealed}get isRegex(){return w(this._isRegexOverride,this._isRegex)}get wholeWord(){return w(this._wholeWordOverride,this._wholeWord)}get matchCase(){return w(this._matchCaseOverride,this._matchCase)}get preserveCase(){return w(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}changeMatchInfo(h,g,t){let i={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},n=!1;g===0&&(h=0),h>g&&(h=g),this._matchesPosition!==h&&(this._matchesPosition=h,i.matchesPosition=!0,n=!0),this._matchesCount!==g&&(this._matchesCount=g,i.matchesCount=!0,n=!0),typeof t!="undefined"&&(D.Range.equalsRange(this._currentMatch,t)||(this._currentMatch=t,i.currentMatch=!0,n=!0)),n&&this._onFindReplaceStateChange.fire(i)}change(h,g,t=!0){var i;let n={moveCursor:g,updateHistory:t,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},l=!1;const c=this.isRegex,r=this.wholeWord,s=this.matchCase,o=this.preserveCase;typeof h.searchString!="undefined"&&this._searchString!==h.searchString&&(this._searchString=h.searchString,n.searchString=!0,l=!0),typeof h.replaceString!="undefined"&&this._replaceString!==h.replaceString&&(this._replaceString=h.replaceString,n.replaceString=!0,l=!0),typeof h.isRevealed!="undefined"&&this._isRevealed!==h.isRevealed&&(this._isRevealed=h.isRevealed,n.isRevealed=!0,l=!0),typeof h.isReplaceRevealed!="undefined"&&this._isReplaceRevealed!==h.isReplaceRevealed&&(this._isReplaceRevealed=h.isReplaceRevealed,n.isReplaceRevealed=!0,l=!0),typeof h.isRegex!="undefined"&&(this._isRegex=h.isRegex),typeof h.wholeWord!="undefined"&&(this._wholeWord=h.wholeWord),typeof h.matchCase!="undefined"&&(this._matchCase=h.matchCase),typeof h.preserveCase!="undefined"&&(this._preserveCase=h.preserveCase),typeof h.searchScope!="undefined"&&(((i=h.searchScope)===null||i===void 0?void 0:i.every(a=>{var d;return(d=this._searchScope)===null||d===void 0?void 0:d.some(u=>!D.Range.equalsRange(u,a))}))||(this._searchScope=h.searchScope,n.searchScope=!0,l=!0)),typeof h.loop!="undefined"&&this._loop!==h.loop&&(this._loop=h.loop,n.loop=!0,l=!0),typeof h.isSearching!="undefined"&&this._isSearching!==h.isSearching&&(this._isSearching=h.isSearching,n.isSearching=!0,l=!0),typeof h.filters!="undefined"&&(this._filters?this._filters.update(h.filters):this._filters=h.filters,n.filters=!0,l=!0),this._isRegexOverride=typeof h.isRegexOverride!="undefined"?h.isRegexOverride:0,this._wholeWordOverride=typeof h.wholeWordOverride!="undefined"?h.wholeWordOverride:0,this._matchCaseOverride=typeof h.matchCaseOverride!="undefined"?h.matchCaseOverride:0,this._preserveCaseOverride=typeof h.preserveCaseOverride!="undefined"?h.preserveCaseOverride:0,c!==this.isRegex&&(l=!0,n.isRegex=!0),r!==this.wholeWord&&(l=!0,n.wholeWord=!0),s!==this.matchCase&&(l=!0,n.matchCase=!0),o!==this.preserveCase&&(l=!0,n.preserveCase=!0),l&&this._onFindReplaceStateChange.fire(n)}canNavigateBack(){return this.canNavigateInLoop()||this.matchesPosition!==1}canNavigateForward(){return this.canNavigateInLoop()||this.matchesPosition<this.matchesCount}canNavigateInLoop(){return this._loop||this.matchesCount>=I.MATCHES_LIMIT}}e.FindReplaceState=b}),define(te[714],ie([1,0,7,43,172,114,60,10,27,13,2,17,8,3,163,530,626,596,23,72,14,374]),function(j,e,y,m,D,I,w,b,p,h,g,t,i,n,l,c,r,s,o,a,d){"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=void 0;const u=(0,a.registerIcon)("find-selection",p.Codicon.selection,c.localize(0,null)),f=(0,a.registerIcon)("find-collapsed",p.Codicon.chevronRight,c.localize(1,null)),S=(0,a.registerIcon)("find-expanded",p.Codicon.chevronDown,c.localize(2,null));e.findReplaceIcon=(0,a.registerIcon)("find-replace",p.Codicon.replace,c.localize(3,null)),e.findReplaceAllIcon=(0,a.registerIcon)("find-replace-all",p.Codicon.replaceAll,c.localize(4,null)),e.findPreviousMatchIcon=(0,a.registerIcon)("find-previous-match",p.Codicon.arrowUp,c.localize(5,null)),e.findNextMatchIcon=(0,a.registerIcon)("find-next-match",p.Codicon.arrowDown,c.localize(6,null));const v=c.localize(7,null),C=c.localize(8,null),_=c.localize(9,null),L=c.localize(10,null),E=c.localize(11,null),N=c.localize(12,null),k=c.localize(13,null),M=c.localize(14,null),O=c.localize(15,null),B=c.localize(16,null),T=c.localize(17,null),R=c.localize(18,null,l.MATCHES_LIMIT);e.NLS_MATCHES_LOCATION=c.localize(19,null),e.NLS_NO_RESULTS=c.localize(20,null);const P=419,W=275-54;let A=69;const H=33,q="ctrlEnterReplaceAll.windows.donotask",X=t.isMacintosh?256:2048;class G{constructor(U){this.afterLineNumber=U,this.heightInPx=H,this.suppressMouseDown=!1,this.domNode=document.createElement("div"),this.domNode.className="dock-find-viewzone"}}e.FindWidgetViewZone=G;function re(x,U,Q){const ne=!!U.match(/\n/);if(Q&&ne&&Q.selectionStart>0){x.stopPropagation();return}}function ae(x,U,Q){const ne=!!U.match(/\n/);if(Q&&ne&&Q.selectionEnd<Q.value.length){x.stopPropagation();return}}class oe extends w.Widget{constructor(U,Q,ne,ce,ee,ue,z,V,$){super();this._cachedHeight=null,this._revealTimeouts=[],this._codeEditor=U,this._controller=Q,this._state=ne,this._contextViewProvider=ce,this._keybindingService=ee,this._contextKeyService=ue,this._storageService=V,this._notificationService=$,this._ctrlEnterReplaceAllWarningPrompted=!!V.getBoolean(q,0),this._isVisible=!1,this._isReplaceVisible=!1,this._ignoreChangeEvent=!1,this._updateHistoryDelayer=new b.Delayer(500),this._register((0,g.toDisposable)(()=>this._updateHistoryDelayer.cancel())),this._register(this._state.onFindReplaceStateChange(K=>this._onStateChanged(K))),this._buildDomNode(),this._updateButtons(),this._tryUpdateWidgetWidth(),this._findInput.inputBox.layout(),this._register(this._codeEditor.onDidChangeConfiguration(K=>{if(K.hasChanged(81)&&(this._codeEditor.getOption(81)&&this._state.change({isReplaceRevealed:!1},!1),this._updateButtons()),K.hasChanged(131)&&this._tryUpdateWidgetWidth(),K.hasChanged(2)&&this.updateAccessibilitySupport(),K.hasChanged(35)){const J=this._codeEditor.getOption(35).addExtraSpaceOnTop;J&&!this._viewZone&&(this._viewZone=new G(0),this._showViewZone()),!J&&this._viewZone&&this._removeViewZone()}})),this.updateAccessibilitySupport(),this._register(this._codeEditor.onDidChangeCursorSelection(()=>{this._isVisible&&this._updateToggleSelectionFindButton()})),this._register(this._codeEditor.onDidFocusEditorWidget(()=>ye(this,void 0,void 0,function*(){if(this._isVisible){let K=yield this._controller.getGlobalBufferTerm();K&&K!==this._state.searchString&&(this._state.change({searchString:K},!1),this._findInput.select())}}))),this._findInputFocused=l.CONTEXT_FIND_INPUT_FOCUSED.bindTo(ue),this._findFocusTracker=this._register(y.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=l.CONTEXT_REPLACE_INPUT_FOCUSED.bindTo(ue),this._replaceFocusTracker=this._register(y.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(35).addExtraSpaceOnTop&&(this._viewZone=new G(0)),this._applyTheme(z.getColorTheme()),this._register(z.onDidColorThemeChange(this._applyTheme.bind(this))),this._register(this._codeEditor.onDidChangeModel(()=>{!this._isVisible||(this._viewZoneId=void 0)})),this._register(this._codeEditor.onDidScrollChange(K=>{if(K.scrollTopChanged){this._layoutViewZone();return}setTimeout(()=>{this._layoutViewZone()},0)}))}getId(){return oe.ID}getDomNode(){return this._domNode}getPosition(){return this._isVisible?{preference:0}:null}_onStateChanged(U){if(U.searchString){try{this._ignoreChangeEvent=!0,this._findInput.setValue(this._state.searchString)}finally{this._ignoreChangeEvent=!1}this._updateButtons()}if(U.replaceString&&(this._replaceInput.inputBox.value=this._state.replaceString),U.isRevealed&&(this._state.isRevealed?this._reveal():this._hide(!0)),U.isReplaceRevealed&&(this._state.isReplaceRevealed?!this._codeEditor.getOption(81)&&!this._isReplaceVisible&&(this._isReplaceVisible=!0,this._replaceInput.width=y.getTotalWidth(this._findInput.domNode),this._updateButtons(),this._replaceInput.inputBox.layout()):this._isReplaceVisible&&(this._isReplaceVisible=!1,this._updateButtons())),(U.isRevealed||U.isReplaceRevealed)&&(this._state.isRevealed||this._state.isReplaceRevealed)&&this._tryUpdateHeight()&&this._showViewZone(),U.isRegex&&this._findInput.setRegex(this._state.isRegex),U.wholeWord&&this._findInput.setWholeWords(this._state.wholeWord),U.matchCase&&this._findInput.setCaseSensitive(this._state.matchCase),U.preserveCase&&this._replaceInput.setPreserveCase(this._state.preserveCase),U.searchScope&&(this._state.searchScope?this._toggleSelectionFind.checked=!0:this._toggleSelectionFind.checked=!1,this._updateToggleSelectionFindButton()),U.searchString||U.matchesCount||U.matchesPosition){let Q=this._state.searchString.length>0&&this._state.matchesCount===0;this._domNode.classList.toggle("no-results",Q),this._updateMatchesCount(),this._updateButtons()}(U.searchString||U.currentMatch)&&this._layoutViewZone(),U.updateHistory&&this._delayedUpdateHistory(),U.loop&&this._updateButtons()}_delayedUpdateHistory(){this._updateHistoryDelayer.trigger(this._updateHistory.bind(this)).then(void 0,h.onUnexpectedError)}_updateHistory(){this._state.searchString&&this._findInput.inputBox.addToHistory(),this._state.replaceString&&this._replaceInput.inputBox.addToHistory()}_updateMatchesCount(){this._matchesCount.style.minWidth=A+"px",this._state.matchesCount>=l.MATCHES_LIMIT?this._matchesCount.title=R:this._matchesCount.title="",this._matchesCount.firstChild&&this._matchesCount.removeChild(this._matchesCount.firstChild);let U;if(this._state.matchesCount>0){let Q=String(this._state.matchesCount);this._state.matchesCount>=l.MATCHES_LIMIT&&(Q+="+");let ne=String(this._state.matchesPosition);ne==="0"&&(ne="?"),U=i.format(e.NLS_MATCHES_LOCATION,ne,Q)}else U=e.NLS_NO_RESULTS;this._matchesCount.appendChild(document.createTextNode(U)),(0,m.alert)(this._getAriaLabel(U,this._state.currentMatch,this._state.searchString)),A=Math.max(A,this._matchesCount.clientWidth)}_getAriaLabel(U,Q,ne){if(U===e.NLS_NO_RESULTS)return ne===""?c.localize(21,null,U):c.localize(22,null,U,ne);if(Q){const ce=c.localize(23,null,U,ne,Q.startLineNumber+":"+Q.startColumn),ee=this._codeEditor.getModel();return ee&&Q.startLineNumber<=ee.getLineCount()&&Q.startLineNumber>=1?`${ee.getLineContent(Q.startLineNumber)}, ${ce}`:ce}return c.localize(24,null,U,ne)}_updateToggleSelectionFindButton(){let U=this._codeEditor.getSelection(),Q=U?U.startLineNumber!==U.endLineNumber||U.startColumn!==U.endColumn:!1,ne=this._toggleSelectionFind.checked;this._isVisible&&(ne||Q)?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);let U=this._state.searchString.length>0,Q=!!this._state.matchesCount;this._prevBtn.setEnabled(this._isVisible&&U&&Q&&this._state.canNavigateBack()),this._nextBtn.setEnabled(this._isVisible&&U&&Q&&this._state.canNavigateForward()),this._replaceBtn.setEnabled(this._isVisible&&this._isReplaceVisible&&U),this._replaceAllBtn.setEnabled(this._isVisible&&this._isReplaceVisible&&U),this._domNode.classList.toggle("replaceToggled",this._isReplaceVisible),this._toggleReplaceBtn.setExpanded(this._isReplaceVisible);let ne=!this._codeEditor.getOption(81);this._toggleReplaceBtn.setEnabled(this._isVisible&&ne)}_reveal(){if(this._revealTimeouts.forEach(U=>{clearTimeout(U)}),this._revealTimeouts=[],!this._isVisible){this._isVisible=!0;const U=this._codeEditor.getSelection();switch(this._codeEditor.getOption(35).autoFindInSelection){case"always":this._toggleSelectionFind.checked=!0;break;case"never":this._toggleSelectionFind.checked=!1;break;case"multiline":{const ne=!!U&&U.startLineNumber!==U.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 Q=!0;if(this._codeEditor.getOption(35).seedSearchStringFromSelection&&U){const ne=this._codeEditor.getDomNode();if(ne){const ce=y.getDomNodePagePosition(ne),ee=this._codeEditor.getScrolledVisiblePosition(U.getStartPosition()),ue=ce.left+(ee?ee.left:0),z=ee?ee.top:0;if(this._viewZone&&z<this._viewZone.heightInPx){U.endLineNumber>U.startLineNumber&&(Q=!1);const V=y.getTopLeftOffset(this._domNode).left;ue>V&&(Q=!1);const $=this._codeEditor.getScrolledVisiblePosition(U.getEndPosition());ce.left+($?$.left:0)>V&&(Q=!1)}}}this._showViewZone(Q)}}_hide(U){this._revealTimeouts.forEach(Q=>{clearTimeout(Q)}),this._revealTimeouts=[],this._isVisible&&(this._isVisible=!1,this._updateButtons(),this._domNode.classList.remove("visible"),this._domNode.setAttribute("aria-hidden","true"),this._findInput.clearMessage(),U&&this._codeEditor.focus(),this._codeEditor.layoutOverlayWidget(this),this._removeViewZone())}_layoutViewZone(U){if(!this._codeEditor.getOption(35).addExtraSpaceOnTop){this._removeViewZone();return}if(!this._isVisible)return;const ne=this._viewZone;this._viewZoneId!==void 0||!ne||this._codeEditor.changeViewZones(ce=>{ne.heightInPx=this._getHeight(),this._viewZoneId=ce.addZone(ne),this._codeEditor.setScrollTop(U||this._codeEditor.getScrollTop()+ne.heightInPx)})}_showViewZone(U=!0){if(!this._isVisible||!this._codeEditor.getOption(35).addExtraSpaceOnTop)return;this._viewZone===void 0&&(this._viewZone=new G(0));const ne=this._viewZone;this._codeEditor.changeViewZones(ce=>{if(this._viewZoneId!==void 0){const ee=this._getHeight();if(ee===ne.heightInPx)return;let ue=ee-ne.heightInPx;ne.heightInPx=ee,ce.layoutZone(this._viewZoneId),U&&this._codeEditor.setScrollTop(this._codeEditor.getScrollTop()+ue);return}else{let ee=this._getHeight();if(ee-=this._codeEditor.getOption(75).top,ee<=0)return;ne.heightInPx=ee,this._viewZoneId=ce.addZone(ne),U&&this._codeEditor.setScrollTop(this._codeEditor.getScrollTop()+ee)}})}_removeViewZone(){this._codeEditor.changeViewZones(U=>{this._viewZoneId!==void 0&&(U.removeZone(this._viewZoneId),this._viewZoneId=void 0,this._viewZone&&(this._codeEditor.setScrollTop(this._codeEditor.getScrollTop()-this._viewZone.heightInPx),this._viewZone=void 0))})}_applyTheme(U){let Q={inputActiveOptionBorder:U.getColor(o.inputActiveOptionBorder),inputActiveOptionBackground:U.getColor(o.inputActiveOptionBackground),inputActiveOptionForeground:U.getColor(o.inputActiveOptionForeground),inputBackground:U.getColor(o.inputBackground),inputForeground:U.getColor(o.inputForeground),inputBorder:U.getColor(o.inputBorder),inputValidationInfoBackground:U.getColor(o.inputValidationInfoBackground),inputValidationInfoForeground:U.getColor(o.inputValidationInfoForeground),inputValidationInfoBorder:U.getColor(o.inputValidationInfoBorder),inputValidationWarningBackground:U.getColor(o.inputValidationWarningBackground),inputValidationWarningForeground:U.getColor(o.inputValidationWarningForeground),inputValidationWarningBorder:U.getColor(o.inputValidationWarningBorder),inputValidationErrorBackground:U.getColor(o.inputValidationErrorBackground),inputValidationErrorForeground:U.getColor(o.inputValidationErrorForeground),inputValidationErrorBorder:U.getColor(o.inputValidationErrorBorder)};this._findInput.style(Q),this._replaceInput.style(Q),this._toggleSelectionFind.style(Q)}_tryUpdateWidgetWidth(){if(!this._isVisible||!y.isInDOM(this._domNode))return;const U=this._codeEditor.getLayoutInfo();if(U.contentWidth<=0){this._domNode.classList.add("hiddenEditor");return}else this._domNode.classList.contains("hiddenEditor")&&this._domNode.classList.remove("hiddenEditor");const ne=U.width,ce=U.minimap.minimapWidth;let ee=!1,ue=!1,z=!1;if(this._resized&&y.getTotalWidth(this._domNode)>P){this._domNode.style.maxWidth=`${ne-28-ce-15}px`,this._replaceInput.width=y.getTotalWidth(this._findInput.domNode);return}if(P+28+ce>=ne&&(ue=!0),P+28+ce-A>=ne&&(z=!0),P+28+ce-A>=ne+50&&(ee=!0),this._domNode.classList.toggle("collapsed-find-widget",ee),this._domNode.classList.toggle("narrow-find-widget",z),this._domNode.classList.toggle("reduced-find-widget",ue),!z&&!ee&&(this._domNode.style.maxWidth=`${ne-28-ce-15}px`),this._resized){this._findInput.inputBox.layout();let V=this._findInput.inputBox.element.clientWidth;V>0&&(this._replaceInput.width=V)}else this._isReplaceVisible&&(this._replaceInput.width=y.getTotalWidth(this._findInput.domNode))}_getHeight(){let U=0;return U+=4,U+=this._findInput.inputBox.height+2,this._isReplaceVisible&&(U+=4,U+=this._replaceInput.inputBox.height+2),U+=4,U}_tryUpdateHeight(){const U=this._getHeight();return this._cachedHeight!==null&&this._cachedHeight===U?!1:(this._cachedHeight=U,this._domNode.style.height=`${U}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){let U=this._codeEditor.getSelections();U.map(Q=>{Q.endColumn===1&&Q.endLineNumber>Q.startLineNumber&&(Q=Q.setEndPosition(Q.endLineNumber-1,this._codeEditor.getModel().getLineMaxColumn(Q.endLineNumber-1)));const ne=this._state.currentMatch;return Q.startLineNumber!==Q.endLineNumber&&!n.Range.equalsRange(Q,ne)?Q:null}).filter(Q=>!!Q),U.length&&this._state.change({searchScope:U},!0)}}_onFindInputMouseDown(U){U.middleButton&&U.stopPropagation()}_onFindInputKeyDown(U){if(U.equals(X|3))if(this._keybindingService.dispatchEvent(U,U.target)){U.preventDefault();return}else{this._findInput.inputBox.insertAtCursor(`
|
||
`),U.preventDefault();return}if(U.equals(2)){this._isReplaceVisible?this._replaceInput.focus():this._findInput.focusOnCaseSensitive(),U.preventDefault();return}if(U.equals(2048|18)){this._codeEditor.focus(),U.preventDefault();return}if(U.equals(16))return re(U,this._findInput.getValue(),this._findInput.domNode.querySelector("textarea"));if(U.equals(18))return ae(U,this._findInput.getValue(),this._findInput.domNode.querySelector("textarea"))}_onReplaceInputKeyDown(U){if(U.equals(X|3))if(this._keybindingService.dispatchEvent(U,U.target)){U.preventDefault();return}else{t.isWindows&&t.isNative&&!this._ctrlEnterReplaceAllWarningPrompted&&(this._notificationService.info(c.localize(25,null)),this._ctrlEnterReplaceAllWarningPrompted=!0,this._storageService.store(q,!0,0,0)),this._replaceInput.inputBox.insertAtCursor(`
|
||
`),U.preventDefault();return}if(U.equals(2)){this._findInput.focusOnCaseSensitive(),U.preventDefault();return}if(U.equals(1024|2)){this._findInput.focus(),U.preventDefault();return}if(U.equals(2048|18)){this._codeEditor.focus(),U.preventDefault();return}if(U.equals(16))return re(U,this._replaceInput.inputBox.value,this._replaceInput.inputBox.element.querySelector("textarea"));if(U.equals(18))return ae(U,this._replaceInput.inputBox.value,this._replaceInput.inputBox.element.querySelector("textarea"))}getVerticalSashLeft(U){return 0}_keybindingLabelFor(U){let Q=this._keybindingService.lookupKeybinding(U);return Q?` (${Q.getLabel()})`:""}_buildDomNode(){const U=!0,Q=!0;this._findInput=this._register(new r.ContextScopedFindInput(null,this._contextViewProvider,{width:W,label:v,placeholder:C,appendCaseSensitiveLabel:this._keybindingLabelFor(l.FIND_IDS.ToggleCaseSensitiveCommand),appendWholeWordsLabel:this._keybindingLabelFor(l.FIND_IDS.ToggleWholeWordCommand),appendRegexLabel:this._keybindingLabelFor(l.FIND_IDS.ToggleRegexCommand),validation:V=>{if(V.length===0||!this._findInput.getRegex())return null;try{return new RegExp(V,"gu"),null}catch($){return{content:$.message}}},flexibleHeight:U,flexibleWidth:Q,flexibleMaxHeight:118,showHistoryHint:()=>(0,s.showHistoryKeybindingHint)(this._keybindingService)},this._contextKeyService,!0)),this._findInput.setRegex(!!this._state.isRegex),this._findInput.setCaseSensitive(!!this._state.matchCase),this._findInput.setWholeWords(!!this._state.wholeWord),this._register(this._findInput.onKeyDown(V=>this._onFindInputKeyDown(V))),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(V=>{V.equals(1024|2)&&this._isReplaceVisible&&(this._replaceInput.focus(),V.preventDefault())})),this._register(this._findInput.onRegexKeyDown(V=>{V.equals(2)&&this._isReplaceVisible&&(this._replaceInput.focusOnPreserve(),V.preventDefault())})),this._register(this._findInput.inputBox.onDidHeightChange(V=>{this._tryUpdateHeight()&&this._showViewZone()})),t.isLinux&&this._register(this._findInput.onMouseDown(V=>this._onFindInputMouseDown(V))),this._matchesCount=document.createElement("div"),this._matchesCount.className="matchesCount",this._updateMatchesCount(),this._prevBtn=this._register(new Z({label:_+this._keybindingLabelFor(l.FIND_IDS.PreviousMatchFindAction),icon:e.findPreviousMatchIcon,onTrigger:()=>{this._codeEditor.getAction(l.FIND_IDS.PreviousMatchFindAction).run().then(void 0,h.onUnexpectedError)}})),this._nextBtn=this._register(new Z({label:L+this._keybindingLabelFor(l.FIND_IDS.NextMatchFindAction),icon:e.findNextMatchIcon,onTrigger:()=>{this._codeEditor.getAction(l.FIND_IDS.NextMatchFindAction).run().then(void 0,h.onUnexpectedError)}}));let ne=document.createElement("div");ne.className="find-part",ne.appendChild(this._findInput.domNode);const ce=document.createElement("div");ce.className="find-actions",ne.appendChild(ce),ce.appendChild(this._matchesCount),ce.appendChild(this._prevBtn.domNode),ce.appendChild(this._nextBtn.domNode),this._toggleSelectionFind=this._register(new D.Checkbox({icon:u,title:E+this._keybindingLabelFor(l.FIND_IDS.ToggleSearchScopeCommand),isChecked:!1})),this._register(this._toggleSelectionFind.onChange(()=>{if(this._toggleSelectionFind.checked){if(this._codeEditor.hasModel()){let V=this._codeEditor.getSelections();V.map($=>($.endColumn===1&&$.endLineNumber>$.startLineNumber&&($=$.setEndPosition($.endLineNumber-1,this._codeEditor.getModel().getLineMaxColumn($.endLineNumber-1))),$.isEmpty()?null:$)).filter($=>!!$),V.length&&this._state.change({searchScope:V},!0)}}else this._state.change({searchScope:null},!0)})),ce.appendChild(this._toggleSelectionFind.domNode),this._closeBtn=this._register(new Z({label:N+this._keybindingLabelFor(l.FIND_IDS.CloseFindWidgetCommand),icon:a.widgetClose,onTrigger:()=>{this._state.change({isRevealed:!1,searchScope:null},!1)},onKeyDown:V=>{V.equals(2)&&this._isReplaceVisible&&(this._replaceBtn.isEnabled()?this._replaceBtn.focus():this._codeEditor.focus(),V.preventDefault())}})),ce.appendChild(this._closeBtn.domNode),this._replaceInput=this._register(new r.ContextScopedReplaceInput(null,void 0,{label:k,placeholder:M,appendPreserveCaseLabel:this._keybindingLabelFor(l.FIND_IDS.TogglePreserveCaseCommand),history:[],flexibleHeight:U,flexibleWidth:Q,flexibleMaxHeight:118,showHistoryHint:()=>(0,s.showHistoryKeybindingHint)(this._keybindingService)},this._contextKeyService,!0)),this._replaceInput.setPreserveCase(!!this._state.preserveCase),this._register(this._replaceInput.onKeyDown(V=>this._onReplaceInputKeyDown(V))),this._register(this._replaceInput.inputBox.onDidChange(()=>{this._state.change({replaceString:this._replaceInput.inputBox.value},!1)})),this._register(this._replaceInput.inputBox.onDidHeightChange(V=>{this._isReplaceVisible&&this._tryUpdateHeight()&&this._showViewZone()})),this._register(this._replaceInput.onDidOptionChange(()=>{this._state.change({preserveCase:this._replaceInput.getPreserveCase()},!0)})),this._register(this._replaceInput.onPreserveCaseKeyDown(V=>{V.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(),V.preventDefault())})),this._replaceBtn=this._register(new Z({label:O+this._keybindingLabelFor(l.FIND_IDS.ReplaceOneAction),icon:e.findReplaceIcon,onTrigger:()=>{this._controller.replace()},onKeyDown:V=>{V.equals(1024|2)&&(this._closeBtn.focus(),V.preventDefault())}})),this._replaceAllBtn=this._register(new Z({label:B+this._keybindingLabelFor(l.FIND_IDS.ReplaceAllAction),icon:e.findReplaceAllIcon,onTrigger:()=>{this._controller.replaceAll()}}));let ee=document.createElement("div");ee.className="replace-part",ee.appendChild(this._replaceInput.domNode);const ue=document.createElement("div");ue.className="replace-actions",ee.appendChild(ue),ue.appendChild(this._replaceBtn.domNode),ue.appendChild(this._replaceAllBtn.domNode),this._toggleReplaceBtn=this._register(new Z({label:T,className:"codicon toggle left",onTrigger:()=>{this._state.change({isReplaceRevealed:!this._isReplaceVisible},!1),this._isReplaceVisible&&(this._replaceInput.width=y.getTotalWidth(this._findInput.domNode),this._replaceInput.inputBox.layout()),this._showViewZone()}})),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.style.width=`${P}px`,this._domNode.appendChild(this._toggleReplaceBtn.domNode),this._domNode.appendChild(ne),this._domNode.appendChild(ee),this._resizeSash=new I.Sash(this._domNode,this,{orientation:0,size:2}),this._resized=!1;let z=P;this._register(this._resizeSash.onDidStart(()=>{z=y.getTotalWidth(this._domNode)})),this._register(this._resizeSash.onDidChange(V=>{this._resized=!0;let $=z+V.startX-V.currentX;if($<P)return;const K=parseFloat(y.getComputedStyle(this._domNode).maxWidth)||0;$>K||(this._domNode.style.width=`${$}px`,this._isReplaceVisible&&(this._replaceInput.width=y.getTotalWidth(this._findInput.domNode)),this._findInput.inputBox.layout(),this._tryUpdateHeight())})),this._register(this._resizeSash.onDidReset(()=>{const V=y.getTotalWidth(this._domNode);if(V<P)return;let $=P;if(!this._resized||V===P){const K=this._codeEditor.getLayoutInfo();$=K.width-28-K.minimap.minimapWidth-15,this._resized=!0}this._domNode.style.width=`${$}px`,this._isReplaceVisible&&(this._replaceInput.width=y.getTotalWidth(this._findInput.domNode)),this._findInput.inputBox.layout()}))}updateAccessibilitySupport(){const U=this._codeEditor.getOption(2);this._findInput.setFocusInputOnOptionClick(U!==2)}}e.FindWidget=oe,oe.ID="editor.contrib.findWidget";class Z extends w.Widget{constructor(U){super();this._opts=U;let Q="button";this._opts.className&&(Q=Q+" "+this._opts.className),this._opts.icon&&(Q=Q+" "+d.ThemeIcon.asClassName(this._opts.icon)),this._domNode=document.createElement("div"),this._domNode.title=this._opts.label,this._domNode.tabIndex=0,this._domNode.className=Q,this._domNode.setAttribute("role","button"),this._domNode.setAttribute("aria-label",this._opts.label),this.onclick(this._domNode,ne=>{this._opts.onTrigger(),ne.preventDefault()}),this.onkeydown(this._domNode,ne=>{if(ne.equals(10)||ne.equals(3)){this._opts.onTrigger(),ne.preventDefault();return}this._opts.onKeyDown&&this._opts.onKeyDown(ne)})}get domNode(){return this._domNode}isEnabled(){return this._domNode.tabIndex>=0}focus(){this._domNode.focus()}setEnabled(U){this._domNode.classList.toggle("disabled",!U),this._domNode.setAttribute("aria-disabled",String(!U)),this._domNode.tabIndex=U?0:-1}setExpanded(U){this._domNode.setAttribute("aria-expanded",String(!!U)),U?(this._domNode.classList.remove(...d.ThemeIcon.asClassNameArray(f)),this._domNode.classList.add(...d.ThemeIcon.asClassNameArray(S))):(this._domNode.classList.remove(...d.ThemeIcon.asClassNameArray(S)),this._domNode.classList.add(...d.ThemeIcon.asClassNameArray(f)))}}e.SimpleButton=Z,(0,d.registerThemingParticipant)((x,U)=>{const Q=(ge,me)=>{me&&U.addRule(`.monaco-editor ${ge} { background-color: ${me}; }`)};Q(".findMatch",x.getColor(o.editorFindMatchHighlight)),Q(".currentFindMatch",x.getColor(o.editorFindMatch)),Q(".findScope",x.getColor(o.editorFindRangeHighlight));const ne=x.getColor(o.editorWidgetBackground);Q(".find-widget",ne);const ce=x.getColor(o.widgetShadow);ce&&U.addRule(`.monaco-editor .find-widget { box-shadow: 0 0 8px 2px ${ce}; }`);const ee=x.getColor(o.editorFindMatchHighlightBorder);ee&&U.addRule(`.monaco-editor .findMatch { border: 1px ${x.type==="hc"?"dotted":"solid"} ${ee}; box-sizing: border-box; }`);const ue=x.getColor(o.editorFindMatchBorder);ue&&U.addRule(`.monaco-editor .currentFindMatch { border: 2px solid ${ue}; padding: 1px; box-sizing: border-box; }`);const z=x.getColor(o.editorFindRangeHighlightBorder);z&&U.addRule(`.monaco-editor .findScope { border: 1px ${x.type==="hc"?"dashed":"solid"} ${z}; }`);const V=x.getColor(o.contrastBorder);V&&U.addRule(`.monaco-editor .find-widget { border: 1px solid ${V}; }`);const $=x.getColor(o.editorWidgetForeground);$&&U.addRule(`.monaco-editor .find-widget { color: ${$}; }`);const K=x.getColor(o.errorForeground);K&&U.addRule(`.monaco-editor .find-widget.no-results .matchesCount { color: ${K}; }`);const J=x.getColor(o.editorWidgetResizeBorder);if(J)U.addRule(`.monaco-editor .find-widget .monaco-sash { background-color: ${J}; }`);else{const ge=x.getColor(o.editorWidgetBorder);ge&&U.addRule(`.monaco-editor .find-widget .monaco-sash { background-color: ${ge}; }`)}const Y=x.getColor(o.toolbarHoverBackground);Y&&U.addRule(`
|
||
.monaco-editor .find-widget .button:not(.disabled):hover,
|
||
.monaco-editor .find-widget .codicon-find-selection:hover {
|
||
background-color: ${Y} !important;
|
||
}
|
||
`);const se=x.getColor(o.focusBorder);se&&U.addRule(`.monaco-editor .find-widget .monaco-inputbox.synthetic-focus { outline-color: ${se}; }`)})}),define(te[294],ie([1,0,10,2,8,15,24,163,712,713,714,529,37,102,16,76,42,38,80,14]),function(j,e,y,m,D,I,w,b,p,h,g,t,i,n,l,c,r,s,o,a){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.StartFindReplaceAction=e.PreviousSelectionMatchFindAction=e.NextSelectionMatchFindAction=e.SelectionMatchFindAction=e.PreviousMatchFindAction=e.NextMatchFindAction=e.MatchFindAction=e.StartFindWithSelectionAction=e.StartFindWithArgsAction=e.StartFindAction=e.FindController=e.CommonFindController=e.getSelectionSearchString=void 0;const d=524288;function u(T,R="single",P=!1){if(!T.hasModel())return null;const F=T.getSelection();if(R==="single"&&F.startLineNumber===F.endLineNumber||R==="multiple"){if(F.isEmpty()){const W=T.getConfiguredWordAtPosition(F.getStartPosition());if(W&&P===!1)return W.word}else if(T.getModel().getValueLengthInRange(F)<d)return T.getModel().getValueInRange(F)}return null}e.getSelectionSearchString=u;let f=class Pi extends m.Disposable{constructor(R,P,F,W){super();this._editor=R,this._findWidgetVisible=b.CONTEXT_FIND_WIDGET_VISIBLE.bindTo(P),this._contextKeyService=P,this._storageService=F,this._clipboardService=W,this._updateHistoryDelayer=new y.Delayer(500),this._state=this._register(new h.FindReplaceState),this.loadQueryState(),this._register(this._state.onFindReplaceStateChange(A=>this._onStateChanged(A))),this._model=null,this._register(this._editor.onDidChangeModel(()=>{let A=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),A&&this._start({forceRevealReplace:!1,seedSearchStringFromSelection:"none",seedSearchStringFromNonEmptySelection:!1,seedSearchStringFromGlobalClipboard:!1,shouldFocus:0,shouldAnimate:!1,updateSearchScope:!1,loop:this._editor.getOption(35).loop})}))}get editor(){return this._editor}static get(R){return R.getContribution(Pi.ID)}dispose(){this.disposeModel(),super.dispose()}disposeModel(){this._model&&(this._model.dispose(),this._model=null)}_onStateChanged(R){this.saveQueryState(R),R.isRevealed&&(this._state.isRevealed?this._findWidgetVisible.set(!0):(this._findWidgetVisible.reset(),this.disposeModel())),R.searchString&&this.setGlobalBufferTerm(this._state.searchString)}saveQueryState(R){R.isRegex&&this._storageService.store("editor.isRegex",this._state.actualIsRegex,1,0),R.wholeWord&&this._storageService.store("editor.wholeWord",this._state.actualWholeWord,1,0),R.matchCase&&this._storageService.store("editor.matchCase",this._state.actualMatchCase,1,0),R.preserveCase&&this._storageService.store("editor.preserveCase",this._state.actualPreserveCase,1,0)}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!!b.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 R=this._editor.getSelections();R.map(P=>(P.endColumn===1&&P.endLineNumber>P.startLineNumber&&(P=P.setEndPosition(P.endLineNumber-1,this._editor.getModel().getLineMaxColumn(P.endLineNumber-1))),P.isEmpty()?null:P)).filter(P=>!!P),R.length&&this._state.change({searchScope:R},!0)}}setSearchString(R){this._state.isRegex&&(R=D.escapeRegExpCharacters(R)),this._state.change({searchString:R},!1)}highlightFindOptions(R=!1){}_start(R,P){return ye(this,void 0,void 0,function*(){if(this.disposeModel(),!this._editor.hasModel())return;let F=Object.assign(Object.assign({},P),{isRevealed:!0});if(R.seedSearchStringFromSelection==="single"){let W=u(this._editor,R.seedSearchStringFromSelection,R.seedSearchStringFromNonEmptySelection);W&&(this._state.isRegex?F.searchString=D.escapeRegExpCharacters(W):F.searchString=W)}else if(R.seedSearchStringFromSelection==="multiple"&&!R.updateSearchScope){let W=u(this._editor,R.seedSearchStringFromSelection);W&&(F.searchString=W)}if(!F.searchString&&R.seedSearchStringFromGlobalClipboard){let W=yield this.getGlobalBufferTerm();if(!this._editor.hasModel())return;W&&(F.searchString=W)}if(R.forceRevealReplace||F.isReplaceRevealed?F.isReplaceRevealed=!0:this._findWidgetVisible.get()||(F.isReplaceRevealed=!1),R.updateSearchScope){let W=this._editor.getSelections();W.some(A=>!A.isEmpty())&&(F.searchScope=W)}F.loop=R.loop,this._state.change(F,!1),this._model||(this._model=new b.FindModelBoundToEditorModel(this._editor,this._state))})}start(R,P){return this._start(R,P)}moveToNextMatch(){return this._model?(this._model.moveToNextMatch(),!0):!1}moveToPrevMatch(){return this._model?(this._model.moveToPrevMatch(),!0):!1}replace(){return this._model?(this._model.replace(),!0):!1}replaceAll(){return this._model?(this._model.replaceAll(),!0):!1}selectAllMatches(){return this._model?(this._model.selectAllMatches(),this._editor.focus(),!0):!1}getGlobalBufferTerm(){return ye(this,void 0,void 0,function*(){return this._editor.getOption(35).globalFindClipboard&&this._editor.hasModel()&&!this._editor.getModel().isTooLargeForSyncing()?this._clipboardService.readFindText():""})}setGlobalBufferTerm(R){this._editor.getOption(35).globalFindClipboard&&this._editor.hasModel()&&!this._editor.getModel().isTooLargeForSyncing()&&this._clipboardService.writeFindText(R)}};f.ID="editor.contrib.findController",f=Ie([Ce(1,l.IContextKeyService),Ce(2,o.IStorageService),Ce(3,n.IClipboardService)],f),e.CommonFindController=f;let S=class extends f{constructor(R,P,F,W,A,H,q,X){super(R,F,q,X);this._contextViewService=P,this._keybindingService=W,this._themeService=A,this._notificationService=H,this._widget=null,this._findOptionsWidget=null}_start(R,P){const F=Object.create(null,{_start:{get:()=>super._start}});return ye(this,void 0,void 0,function*(){this._widget||this._createFindWidget();const W=this._editor.getSelection();let A=!1;switch(this._editor.getOption(35).autoFindInSelection){case"always":A=!0;break;case"never":A=!1;break;case"multiline":{A=!!W&&W.startLineNumber!==W.endLineNumber;break}default:break}R.updateSearchScope=R.updateSearchScope||A,yield F._start.call(this,R,P),this._widget&&(R.shouldFocus===2?this._widget.focusReplaceInput():R.shouldFocus===1&&this._widget.focusFindInput())})}highlightFindOptions(R=!1){this._widget||this._createFindWidget(),this._state.isRevealed&&!R?this._widget.highlightFindOptions():this._findOptionsWidget.highlightFindOptions()}_createFindWidget(){this._widget=this._register(new g.FindWidget(this._editor,this,this._state,this._contextViewService,this._keybindingService,this._contextKeyService,this._themeService,this._storageService,this._notificationService)),this._findOptionsWidget=this._register(new p.FindOptionsWidget(this._editor,this._state,this._keybindingService,this._themeService))}};S=Ie([Ce(1,c.IContextViewService),Ce(2,l.IContextKeyService),Ce(3,r.IKeybindingService),Ce(4,a.IThemeService),Ce(5,s.INotificationService),Ce(6,o.IStorageService),Ce(7,n.IClipboardService)],S),e.FindController=S,e.StartFindAction=(0,I.registerMultiEditorAction)(new I.MultiEditorAction({id:b.FIND_IDS.StartFindAction,label:t.localize(0,null),alias:"Find",precondition:l.ContextKeyExpr.or(w.EditorContextKeys.focus,l.ContextKeyExpr.has("editorIsOpen")),kbOpts:{kbExpr:null,primary:2048|36,weight:100},menuOpts:{menuId:i.MenuId.MenubarEditMenu,group:"3_find",title:t.localize(1,null),order:1}})),e.StartFindAction.addImplementation(0,(T,R,P)=>{const F=f.get(R);return F?F.start({forceRevealReplace:!1,seedSearchStringFromSelection:R.getOption(35).seedSearchStringFromSelection!=="never"?"single":"none",seedSearchStringFromNonEmptySelection:R.getOption(35).seedSearchStringFromSelection==="selection",seedSearchStringFromGlobalClipboard:R.getOption(35).globalFindClipboard,shouldFocus:1,shouldAnimate:!0,updateSearchScope:!1,loop:R.getOption(35).loop}):!1});const v={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"},regex:{type:"boolean"},regexOverride:{type:"number",description:t.localize(2,null)},wholeWord:{type:"boolean"},wholeWordOverride:{type:"number",description:t.localize(3,null)},matchCase:{type:"boolean"},matchCaseOverride:{type:"number",description:t.localize(4,null)},preserveCase:{type:"boolean"},preserveCaseOverride:{type:"number",description:t.localize(5,null)},findInSelection:{type:"boolean"}}}}]};class C extends I.EditorAction{constructor(){super({id:b.FIND_IDS.StartFindWithArgs,label:t.localize(6,null),alias:"Find With Arguments",precondition:void 0,kbOpts:{kbExpr:null,primary:0,weight:100},description:v})}run(R,P,F){return ye(this,void 0,void 0,function*(){const W=f.get(P);if(W){const A=F?{searchString:F.searchString,replaceString:F.replaceString,isReplaceRevealed:F.replaceString!==void 0,isRegex:F.isRegex,wholeWord:F.matchWholeWord,matchCase:F.isCaseSensitive,preserveCase:F.preserveCase}:{};yield W.start({forceRevealReplace:!1,seedSearchStringFromSelection:W.getState().searchString.length===0&&P.getOption(35).seedSearchStringFromSelection!=="never"?"single":"none",seedSearchStringFromNonEmptySelection:P.getOption(35).seedSearchStringFromSelection==="selection",seedSearchStringFromGlobalClipboard:!0,shouldFocus:1,shouldAnimate:!0,updateSearchScope:(F==null?void 0:F.findInSelection)||!1,loop:P.getOption(35).loop},A),W.setGlobalBufferTerm(W.getState().searchString)}})}}e.StartFindWithArgsAction=C;class _ extends I.EditorAction{constructor(){super({id:b.FIND_IDS.StartFindWithSelection,label:t.localize(7,null),alias:"Find With Selection",precondition:void 0,kbOpts:{kbExpr:null,primary:0,mac:{primary:2048|35},weight:100}})}run(R,P){return ye(this,void 0,void 0,function*(){const F=f.get(P);F&&(yield F.start({forceRevealReplace:!1,seedSearchStringFromSelection:"multiple",seedSearchStringFromNonEmptySelection:!1,seedSearchStringFromGlobalClipboard:!1,shouldFocus:0,shouldAnimate:!0,updateSearchScope:!1,loop:P.getOption(35).loop}),F.setGlobalBufferTerm(F.getState().searchString))})}}e.StartFindWithSelectionAction=_;class L extends I.EditorAction{run(R,P){return ye(this,void 0,void 0,function*(){const F=f.get(P);F&&!this._run(F)&&(yield F.start({forceRevealReplace:!1,seedSearchStringFromSelection:F.getState().searchString.length===0&&P.getOption(35).seedSearchStringFromSelection!=="never"?"single":"none",seedSearchStringFromNonEmptySelection:P.getOption(35).seedSearchStringFromSelection==="selection",seedSearchStringFromGlobalClipboard:!0,shouldFocus:0,shouldAnimate:!0,updateSearchScope:!1,loop:P.getOption(35).loop}),this._run(F))})}}e.MatchFindAction=L;class E extends L{constructor(){super({id:b.FIND_IDS.NextMatchFindAction,label:t.localize(8,null),alias:"Find Next",precondition:void 0,kbOpts:[{kbExpr:w.EditorContextKeys.focus,primary:61,mac:{primary:2048|37,secondary:[61]},weight:100},{kbExpr:l.ContextKeyExpr.and(w.EditorContextKeys.focus,b.CONTEXT_FIND_INPUT_FOCUSED),primary:3,weight:100}]})}_run(R){return R.moveToNextMatch()?(R.editor.pushUndoStop(),!0):!1}}e.NextMatchFindAction=E;class N extends L{constructor(){super({id:b.FIND_IDS.PreviousMatchFindAction,label:t.localize(9,null),alias:"Find Previous",precondition:void 0,kbOpts:[{kbExpr:w.EditorContextKeys.focus,primary:1024|61,mac:{primary:2048|1024|37,secondary:[1024|61]},weight:100},{kbExpr:l.ContextKeyExpr.and(w.EditorContextKeys.focus,b.CONTEXT_FIND_INPUT_FOCUSED),primary:1024|3,weight:100}]})}_run(R){return R.moveToPrevMatch()}}e.PreviousMatchFindAction=N;class k extends I.EditorAction{run(R,P){return ye(this,void 0,void 0,function*(){const F=f.get(P);if(!F)return;const W=P.getOption(35).seedSearchStringFromSelection==="selection";let A=null;P.getOption(35).seedSearchStringFromSelection!=="never"&&(A=u(P,"single",W)),A&&F.setSearchString(A),this._run(F)||(yield F.start({forceRevealReplace:!1,seedSearchStringFromSelection:P.getOption(35).seedSearchStringFromSelection!=="never"?"single":"none",seedSearchStringFromNonEmptySelection:W,seedSearchStringFromGlobalClipboard:!1,shouldFocus:0,shouldAnimate:!0,updateSearchScope:!1,loop:P.getOption(35).loop}),this._run(F))})}}e.SelectionMatchFindAction=k;class M extends k{constructor(){super({id:b.FIND_IDS.NextSelectionMatchFindAction,label:t.localize(10,null),alias:"Find Next Selection",precondition:void 0,kbOpts:{kbExpr:w.EditorContextKeys.focus,primary:2048|61,weight:100}})}_run(R){return R.moveToNextMatch()}}e.NextSelectionMatchFindAction=M;class O extends k{constructor(){super({id:b.FIND_IDS.PreviousSelectionMatchFindAction,label:t.localize(11,null),alias:"Find Previous Selection",precondition:void 0,kbOpts:{kbExpr:w.EditorContextKeys.focus,primary:2048|1024|61,weight:100}})}_run(R){return R.moveToPrevMatch()}}e.PreviousSelectionMatchFindAction=O,e.StartFindReplaceAction=(0,I.registerMultiEditorAction)(new I.MultiEditorAction({id:b.FIND_IDS.StartFindReplaceAction,label:t.localize(12,null),alias:"Replace",precondition:l.ContextKeyExpr.or(w.EditorContextKeys.focus,l.ContextKeyExpr.has("editorIsOpen")),kbOpts:{kbExpr:null,primary:2048|38,mac:{primary:2048|512|36},weight:100},menuOpts:{menuId:i.MenuId.MenubarEditMenu,group:"3_find",title:t.localize(13,null),order:2}})),e.StartFindReplaceAction.addImplementation(0,(T,R,P)=>{if(!R.hasModel()||R.getOption(81))return!1;const F=f.get(R);if(!F)return!1;const W=R.getSelection(),A=F.isFindInputFocused(),H=!W.isEmpty()&&W.startLineNumber===W.endLineNumber&&R.getOption(35).seedSearchStringFromSelection!=="never"&&!A,q=A||H?2:1;return F.start({forceRevealReplace:!0,seedSearchStringFromSelection:H?"single":"none",seedSearchStringFromNonEmptySelection:R.getOption(35).seedSearchStringFromSelection==="selection",seedSearchStringFromGlobalClipboard:R.getOption(35).seedSearchStringFromSelection!=="never",shouldFocus:q,shouldAnimate:!0,updateSearchScope:!1,loop:R.getOption(35).loop})}),(0,I.registerEditorContribution)(f.ID,S),(0,I.registerEditorAction)(C),(0,I.registerEditorAction)(_),(0,I.registerEditorAction)(E),(0,I.registerEditorAction)(N),(0,I.registerEditorAction)(M),(0,I.registerEditorAction)(O);const B=I.EditorCommand.bindToContribution(f.get);(0,I.registerEditorCommand)(new B({id:b.FIND_IDS.CloseFindWidgetCommand,precondition:b.CONTEXT_FIND_WIDGET_VISIBLE,handler:T=>T.closeFindWidget(),kbOpts:{weight:100+5,kbExpr:l.ContextKeyExpr.and(w.EditorContextKeys.focus,l.ContextKeyExpr.not("isComposing")),primary:9,secondary:[1024|9]}})),(0,I.registerEditorCommand)(new B({id:b.FIND_IDS.ToggleCaseSensitiveCommand,precondition:void 0,handler:T=>T.toggleCaseSensitive(),kbOpts:{weight:100+5,kbExpr:w.EditorContextKeys.focus,primary:b.ToggleCaseSensitiveKeybinding.primary,mac:b.ToggleCaseSensitiveKeybinding.mac,win:b.ToggleCaseSensitiveKeybinding.win,linux:b.ToggleCaseSensitiveKeybinding.linux}})),(0,I.registerEditorCommand)(new B({id:b.FIND_IDS.ToggleWholeWordCommand,precondition:void 0,handler:T=>T.toggleWholeWords(),kbOpts:{weight:100+5,kbExpr:w.EditorContextKeys.focus,primary:b.ToggleWholeWordKeybinding.primary,mac:b.ToggleWholeWordKeybinding.mac,win:b.ToggleWholeWordKeybinding.win,linux:b.ToggleWholeWordKeybinding.linux}})),(0,I.registerEditorCommand)(new B({id:b.FIND_IDS.ToggleRegexCommand,precondition:void 0,handler:T=>T.toggleRegex(),kbOpts:{weight:100+5,kbExpr:w.EditorContextKeys.focus,primary:b.ToggleRegexKeybinding.primary,mac:b.ToggleRegexKeybinding.mac,win:b.ToggleRegexKeybinding.win,linux:b.ToggleRegexKeybinding.linux}})),(0,I.registerEditorCommand)(new B({id:b.FIND_IDS.ToggleSearchScopeCommand,precondition:void 0,handler:T=>T.toggleSearchScope(),kbOpts:{weight:100+5,kbExpr:w.EditorContextKeys.focus,primary:b.ToggleSearchScopeKeybinding.primary,mac:b.ToggleSearchScopeKeybinding.mac,win:b.ToggleSearchScopeKeybinding.win,linux:b.ToggleSearchScopeKeybinding.linux}})),(0,I.registerEditorCommand)(new B({id:b.FIND_IDS.TogglePreserveCaseCommand,precondition:void 0,handler:T=>T.togglePreserveCase(),kbOpts:{weight:100+5,kbExpr:w.EditorContextKeys.focus,primary:b.TogglePreserveCaseKeybinding.primary,mac:b.TogglePreserveCaseKeybinding.mac,win:b.TogglePreserveCaseKeybinding.win,linux:b.TogglePreserveCaseKeybinding.linux}})),(0,I.registerEditorCommand)(new B({id:b.FIND_IDS.ReplaceOneAction,precondition:b.CONTEXT_FIND_WIDGET_VISIBLE,handler:T=>T.replace(),kbOpts:{weight:100+5,kbExpr:w.EditorContextKeys.focus,primary:2048|1024|22}})),(0,I.registerEditorCommand)(new B({id:b.FIND_IDS.ReplaceOneAction,precondition:b.CONTEXT_FIND_WIDGET_VISIBLE,handler:T=>T.replace(),kbOpts:{weight:100+5,kbExpr:l.ContextKeyExpr.and(w.EditorContextKeys.focus,b.CONTEXT_REPLACE_INPUT_FOCUSED),primary:3}})),(0,I.registerEditorCommand)(new B({id:b.FIND_IDS.ReplaceAllAction,precondition:b.CONTEXT_FIND_WIDGET_VISIBLE,handler:T=>T.replaceAll(),kbOpts:{weight:100+5,kbExpr:w.EditorContextKeys.focus,primary:2048|512|3}})),(0,I.registerEditorCommand)(new B({id:b.FIND_IDS.ReplaceAllAction,precondition:b.CONTEXT_FIND_WIDGET_VISIBLE,handler:T=>T.replaceAll(),kbOpts:{weight:100+5,kbExpr:l.ContextKeyExpr.and(w.EditorContextKeys.focus,b.CONTEXT_REPLACE_INPUT_FOCUSED),primary:void 0,mac:{primary:2048|3}}})),(0,I.registerEditorCommand)(new B({id:b.FIND_IDS.SelectAllMatchesAction,precondition:b.CONTEXT_FIND_WIDGET_VISIBLE,handler:T=>T.selectAllMatches(),kbOpts:{weight:100+5,kbExpr:w.EditorContextKeys.focus,primary:512|3}}))}),define(te[715],ie([1,0,27,33,532,72,14]),function(j,e,y,m,D,I,w){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.FoldingDecorationProvider=e.foldingCollapsedIcon=e.foldingExpandedIcon=void 0,e.foldingExpandedIcon=(0,I.registerIcon)("folding-expanded",y.Codicon.chevronDown,(0,D.localize)(0,null)),e.foldingCollapsedIcon=(0,I.registerIcon)("folding-collapsed",y.Codicon.chevronRight,(0,D.localize)(1,null));class b{constructor(h){this.editor=h,this.autoHideFoldingControls=!0,this.showFoldingHighlights=!0}getDecorationOption(h,g){return g?b.HIDDEN_RANGE_DECORATION:h?this.showFoldingHighlights?b.COLLAPSED_HIGHLIGHTED_VISUAL_DECORATION:b.COLLAPSED_VISUAL_DECORATION:this.autoHideFoldingControls?b.EXPANDED_AUTO_HIDE_VISUAL_DECORATION:b.EXPANDED_VISUAL_DECORATION}deltaDecorations(h,g){return this.editor.deltaDecorations(h,g)}changeDecorations(h){return this.editor.changeDecorations(h)}}e.FoldingDecorationProvider=b,b.COLLAPSED_VISUAL_DECORATION=m.ModelDecorationOptions.register({description:"folding-collapsed-visual-decoration",stickiness:1,afterContentClassName:"inline-folded",isWholeLine:!0,firstLineDecorationClassName:w.ThemeIcon.asClassName(e.foldingCollapsedIcon)}),b.COLLAPSED_HIGHLIGHTED_VISUAL_DECORATION=m.ModelDecorationOptions.register({description:"folding-collapsed-highlighted-visual-decoration",stickiness:1,afterContentClassName:"inline-folded",className:"folded-background",isWholeLine:!0,firstLineDecorationClassName:w.ThemeIcon.asClassName(e.foldingCollapsedIcon)}),b.EXPANDED_AUTO_HIDE_VISUAL_DECORATION=m.ModelDecorationOptions.register({description:"folding-expanded-auto-hide-visual-decoration",stickiness:1,isWholeLine:!0,firstLineDecorationClassName:w.ThemeIcon.asClassName(e.foldingExpandedIcon)}),b.EXPANDED_VISUAL_DECORATION=m.ModelDecorationOptions.register({description:"folding-expanded-visual-decoration",stickiness:1,isWholeLine:!0,firstLineDecorationClassName:"alwaysShowFoldIcons "+w.ThemeIcon.asClassName(e.foldingExpandedIcon)}),b.HIDDEN_RANGE_DECORATION=m.ModelDecorationOptions.register({description:"folding-hidden-range-decoration",stickiness:1})}),define(te[716],ie([1,0,10,13,55,2,8,20,143,15,24,18,32,455,456,457,458,531,16,23,14,715,255,38,74,92,65,375]),function(j,e,y,m,D,I,w,b,p,h,g,t,i,n,l,c,r,s,o,a,d,u,f,S,v,C,_){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.editorFoldForeground=e.foldBackgroundBackground=e.FoldingController=void 0;const L=new o.RawContextKey("foldingEnabled",!1);let E=class Oi extends I.Disposable{constructor(x,U,Q,ne,ce){super();this.contextKeyService=U,this.languageConfigurationService=Q,this._tooManyRegionsNotified=!1,this.localToDispose=this._register(new I.DisposableStore),this.editor=x;const ee=this.editor.getOptions();this._isEnabled=ee.get(37),this._useFoldingProviders=ee.get(38)!=="indentation",this._unfoldOnClickAfterEndOfLine=ee.get(42),this._restoringViewState=!1,this._currentModelHasFoldedImports=!1,this._foldingImportsByDefault=ee.get(40),this._maxFoldingRegions=ee.get(41),this.updateDebounceInfo=ce.for(t.FoldingRangeProviderRegistry,"Folding",{min:200}),this.foldingModel=null,this.hiddenRangeModel=null,this.rangeProvider=null,this.foldingRegionPromise=null,this.foldingStateMemento=null,this.foldingModelPromise=null,this.updateScheduler=null,this.cursorChangedScheduler=null,this.mouseDownInfo=null,this.foldingDecorationProvider=new u.FoldingDecorationProvider(x),this.foldingDecorationProvider.autoHideFoldingControls=ee.get(99)==="mouseover",this.foldingDecorationProvider.showFoldingHighlights=ee.get(39),this.foldingEnabled=L.bindTo(this.contextKeyService),this.foldingEnabled.set(this._isEnabled),this._notifyTooManyRegions=ue=>{this._tooManyRegionsNotified||(ne.notify({severity:v.default.Warning,sticky:!0,message:s.localize(0,null,ue)}),this._tooManyRegionsNotified=!0)},this._register(this.editor.onDidChangeModel(()=>this.onModelChanged())),this._register(this.editor.onDidChangeConfiguration(ue=>{if(ue.hasChanged(37)&&(this._isEnabled=this.editor.getOptions().get(37),this.foldingEnabled.set(this._isEnabled),this.onModelChanged()),ue.hasChanged(41)&&(this._maxFoldingRegions=this.editor.getOptions().get(41),this._tooManyRegionsNotified=!1,this.onModelChanged()),ue.hasChanged(99)||ue.hasChanged(39)){const z=this.editor.getOptions();this.foldingDecorationProvider.autoHideFoldingControls=z.get(99)==="mouseover",this.foldingDecorationProvider.showFoldingHighlights=z.get(39),this.triggerFoldingModelChanged()}ue.hasChanged(38)&&(this._useFoldingProviders=this.editor.getOptions().get(38)!=="indentation",this.onFoldingStrategyChanged()),ue.hasChanged(42)&&(this._unfoldOnClickAfterEndOfLine=this.editor.getOptions().get(42)),ue.hasChanged(40)&&(this._foldingImportsByDefault=this.editor.getOptions().get(40))})),this.onModelChanged()}static get(x){return x.getContribution(Oi.ID)}saveViewState(){let x=this.editor.getModel();if(!x||!this._isEnabled||x.isTooLargeForTokenization())return{};if(this.foldingModel){let U=this.foldingModel.isInitialized?this.foldingModel.getMemento():this.hiddenRangeModel.getMemento(),Q=this.rangeProvider?this.rangeProvider.id:void 0;return{collapsedRegions:U,lineCount:x.getLineCount(),provider:Q,foldedImports:this._currentModelHasFoldedImports}}}restoreViewState(x){let U=this.editor.getModel();if(!U||!this._isEnabled||U.isTooLargeForTokenization()||!this.hiddenRangeModel||!x||x.lineCount!==U.getLineCount()||(this._currentModelHasFoldedImports=!!x.foldedImports,!x.collapsedRegions))return;(x.provider===f.ID_SYNTAX_PROVIDER||x.provider===r.ID_INIT_PROVIDER)&&(this.foldingStateMemento=x);const Q=x.collapsedRegions;if(this.hiddenRangeModel.applyMemento(Q)){const ne=this.getFoldingModel();ne&&ne.then(ce=>{if(ce){this._restoringViewState=!0;try{ce.applyMemento(Q)}finally{this._restoringViewState=!1}}}).then(void 0,m.onUnexpectedError)}}onModelChanged(){this.localToDispose.clear();let x=this.editor.getModel();!this._isEnabled||!x||x.isTooLargeForTokenization()||(this._currentModelHasFoldedImports=!1,this.foldingModel=new n.FoldingModel(x,this.foldingDecorationProvider),this.localToDispose.add(this.foldingModel),this.hiddenRangeModel=new l.HiddenRangeModel(this.foldingModel),this.localToDispose.add(this.hiddenRangeModel),this.localToDispose.add(this.hiddenRangeModel.onDidChange(U=>this.onHiddenRangesChanges(U))),this.updateScheduler=new y.Delayer(this.updateDebounceInfo.get(x)),this.cursorChangedScheduler=new y.RunOnceScheduler(()=>this.revealCursor(),200),this.localToDispose.add(this.cursorChangedScheduler),this.localToDispose.add(t.FoldingRangeProviderRegistry.onDidChange(()=>this.onFoldingStrategyChanged())),this.localToDispose.add(this.editor.onDidChangeModelLanguageConfiguration(()=>this.onFoldingStrategyChanged())),this.localToDispose.add(this.editor.onDidChangeModelContent(U=>this.onDidChangeModelContent(U))),this.localToDispose.add(this.editor.onDidChangeCursorPosition(()=>this.onCursorPositionChanged())),this.localToDispose.add(this.editor.onMouseDown(U=>this.onEditorMouseDown(U))),this.localToDispose.add(this.editor.onMouseUp(U=>this.onEditorMouseUp(U))),this.localToDispose.add({dispose:()=>{this.foldingRegionPromise&&(this.foldingRegionPromise.cancel(),this.foldingRegionPromise=null),this.updateScheduler&&this.updateScheduler.cancel(),this.updateScheduler=null,this.foldingModel=null,this.foldingModelPromise=null,this.hiddenRangeModel=null,this.cursorChangedScheduler=null,this.foldingStateMemento=null,this.rangeProvider&&this.rangeProvider.dispose(),this.rangeProvider=null}}),this.triggerFoldingModelChanged())}onFoldingStrategyChanged(){this.rangeProvider&&this.rangeProvider.dispose(),this.rangeProvider=null,this.triggerFoldingModelChanged()}getRangeProvider(x){if(this.rangeProvider)return this.rangeProvider;if(this.rangeProvider=new c.IndentRangeProvider(x,this.languageConfigurationService,this._maxFoldingRegions),this._useFoldingProviders&&this.foldingModel){let U=t.FoldingRangeProviderRegistry.ordered(this.foldingModel.textModel);if(U.length===0&&this.foldingStateMemento&&this.foldingStateMemento.collapsedRegions)return this.rangeProvider=new r.InitializingRangeProvider(x,this.foldingStateMemento.collapsedRegions,()=>{this.foldingStateMemento=null,this.onFoldingStrategyChanged()},3e4);U.length>0&&(this.rangeProvider=new f.SyntaxRangeProvider(x,U,()=>this.triggerFoldingModelChanged(),this._maxFoldingRegions))}return this.foldingStateMemento=null,this.rangeProvider}getFoldingModel(){return this.foldingModelPromise}onDidChangeModelContent(x){var U;(U=this.hiddenRangeModel)===null||U===void 0||U.notifyChangeModelContent(x),this.triggerFoldingModelChanged()}triggerFoldingModelChanged(){this.updateScheduler&&(this.foldingRegionPromise&&(this.foldingRegionPromise.cancel(),this.foldingRegionPromise=null),this.foldingModelPromise=this.updateScheduler.trigger(()=>{const x=this.foldingModel;if(!x)return null;const U=new _.StopWatch(!0),Q=this.getRangeProvider(x.textModel);let ne=this.foldingRegionPromise=(0,y.createCancelablePromise)(ce=>Q.compute(ce,this._notifyTooManyRegions));return ne.then(ce=>{if(ce&&ne===this.foldingRegionPromise){let ee;if(this._foldingImportsByDefault&&!this._currentModelHasFoldedImports){const $=ce.setCollapsedAllOfType(t.FoldingRangeKind.Imports.value,!0);$&&(ee=p.StableEditorScrollState.capture(this.editor),this._currentModelHasFoldedImports=$)}let ue=this.editor.getSelections(),z=ue?ue.map($=>$.startLineNumber):[];x.update(ce,z),ee&&ee.restore(this.editor);const V=this.updateDebounceInfo.update(x.textModel,U.elapsed());this.updateScheduler&&(this.updateScheduler.defaultDelay=V)}return x})}).then(void 0,x=>((0,m.onUnexpectedError)(x),null)))}onHiddenRangesChanges(x){if(this.hiddenRangeModel&&x.length&&!this._restoringViewState){let U=this.editor.getSelections();U&&this.hiddenRangeModel.adjustSelections(U)&&this.editor.setSelections(U)}this.editor.setHiddenAreas(x)}onCursorPositionChanged(){this.hiddenRangeModel&&this.hiddenRangeModel.hasRanges()&&this.cursorChangedScheduler.schedule()}revealCursor(){const x=this.getFoldingModel();!x||x.then(U=>{if(U){let Q=this.editor.getSelections();if(Q&&Q.length>0){let ne=[];for(let ce of Q){let ee=ce.selectionStartLineNumber;this.hiddenRangeModel&&this.hiddenRangeModel.isHidden(ee)&&ne.push(...U.getAllRegionsAtLine(ee,ue=>ue.isCollapsed&&ee>ue.startLineNumber))}ne.length&&(U.toggleCollapseState(ne),this.reveal(Q[0].getPosition()))}}}).then(void 0,m.onUnexpectedError)}onEditorMouseDown(x){if(this.mouseDownInfo=null,!this.hiddenRangeModel||!x.target||!x.target.range||!x.event.leftButton&&!x.event.middleButton)return;const U=x.target.range;let Q=!1;switch(x.target.type){case 4:{const ne=x.target.detail,ce=x.target.element.offsetLeft;if(ne.offsetX-ce<5)return;Q=!0;break}case 7:{if(this._unfoldOnClickAfterEndOfLine&&this.hiddenRangeModel.hasRanges()&&!x.target.detail.isAfterLines)break;return}case 6:{if(this.hiddenRangeModel.hasRanges()){let ne=this.editor.getModel();if(ne&&U.startColumn===ne.getLineMaxColumn(U.startLineNumber))break}return}default:return}this.mouseDownInfo={lineNumber:U.startLineNumber,iconClicked:Q}}onEditorMouseUp(x){const U=this.getFoldingModel();if(!U||!this.mouseDownInfo||!x.target)return;let Q=this.mouseDownInfo.lineNumber,ne=this.mouseDownInfo.iconClicked,ce=x.target.range;if(!(!ce||ce.startLineNumber!==Q)){if(ne){if(x.target.type!==4)return}else{let ee=this.editor.getModel();if(!ee||ce.startColumn!==ee.getLineMaxColumn(Q))return}U.then(ee=>{if(ee){let ue=ee.getRegionAtLine(Q);if(ue&&ue.startLineNumber===Q){let z=ue.isCollapsed;if(ne||z){let V=x.event.altKey,$=[];if(V){let K=Y=>!Y.containedBy(ue)&&!ue.containedBy(Y),J=ee.getRegionsInside(null,K);for(const Y of J)Y.isCollapsed&&$.push(Y);$.length===0&&($=J)}else{let K=x.event.middleButton||x.event.shiftKey;if(K)for(const J of ee.getRegionsInside(ue))J.isCollapsed===z&&$.push(J);(z||!K||$.length===0)&&$.push(ue)}ee.toggleCollapseState($),this.reveal({lineNumber:Q,column:1})}}}}).then(void 0,m.onUnexpectedError)}}reveal(x){this.editor.revealPositionInCenterIfOutsideViewport(x,0)}};E.ID="editor.contrib.folding",E=Ie([Ce(1,o.IContextKeyService),Ce(2,i.ILanguageConfigurationService),Ce(3,S.INotificationService),Ce(4,C.ILanguageFeatureDebounceService)],E),e.FoldingController=E;class N extends h.EditorAction{runEditorCommand(x,U,Q){const ne=x.get(i.ILanguageConfigurationService),ce=E.get(U);if(!ce)return;const ee=ce.getFoldingModel();if(ee)return this.reportTelemetry(x,U),ee.then(ue=>{if(ue){this.invoke(ce,ue,U,Q,ne);const z=U.getSelection();z&&ce.reveal(z.getStartPosition())}})}getSelectedLines(x){let U=x.getSelections();return U?U.map(Q=>Q.startLineNumber):[]}getLineNumbers(x,U){return x&&x.selectionLines?x.selectionLines.map(Q=>Q+1):this.getSelectedLines(U)}run(x,U){}}function k(Z){if(!b.isUndefined(Z)){if(!b.isObject(Z))return!1;const x=Z;if(!b.isUndefined(x.levels)&&!b.isNumber(x.levels)||!b.isUndefined(x.direction)&&!b.isString(x.direction)||!b.isUndefined(x.selectionLines)&&(!b.isArray(x.selectionLines)||!x.selectionLines.every(b.isNumber)))return!1}return!0}class M extends N{constructor(){super({id:"editor.unfold",label:s.localize(1,null),alias:"Unfold",precondition:L,kbOpts:{kbExpr:g.EditorContextKeys.editorTextFocus,primary:2048|1024|89,mac:{primary:2048|512|89},weight:100},description:{description:"Unfold the content in the editor",args:[{name:"Unfold editor argument",description:`Property-value pairs that can be passed through this argument:
|
||
* 'levels': Number of levels to unfold. If not set, defaults to 1.
|
||
* 'direction': If 'up', unfold given number of levels up otherwise unfolds down.
|
||
* 'selectionLines': The start lines (0-based) of the editor selections to apply the unfold action to. If not set, the active selection(s) will be used.
|
||
`,constraint:k,schema:{type:"object",properties:{levels:{type:"number",default:1},direction:{type:"string",enum:["up","down"],default:"down"},selectionLines:{type:"array",items:{type:"number"}}}}}]}})}invoke(x,U,Q,ne){let ce=ne&&ne.levels||1,ee=this.getLineNumbers(ne,Q);ne&&ne.direction==="up"?(0,n.setCollapseStateLevelsUp)(U,!1,ce,ee):(0,n.setCollapseStateLevelsDown)(U,!1,ce,ee)}}class O extends N{constructor(){super({id:"editor.unfoldRecursively",label:s.localize(2,null),alias:"Unfold Recursively",precondition:L,kbOpts:{kbExpr:g.EditorContextKeys.editorTextFocus,primary:(0,D.KeyChord)(2048|41,2048|89),weight:100}})}invoke(x,U,Q,ne){(0,n.setCollapseStateLevelsDown)(U,!1,Number.MAX_VALUE,this.getSelectedLines(Q))}}class B extends N{constructor(){super({id:"editor.fold",label:s.localize(3,null),alias:"Fold",precondition:L,kbOpts:{kbExpr:g.EditorContextKeys.editorTextFocus,primary:2048|1024|87,mac:{primary:2048|512|87},weight:100},description:{description:"Fold the content in the editor",args:[{name:"Fold editor argument",description:`Property-value pairs that can be passed through this argument:
|
||
* 'levels': Number of levels to fold.
|
||
* 'direction': If 'up', folds given number of levels up otherwise folds down.
|
||
* 'selectionLines': The start lines (0-based) of the editor selections to apply the fold action to. If not set, the active selection(s) will be used.
|
||
If no levels or direction is set, folds the region at the locations or if already collapsed, the first uncollapsed parent instead.
|
||
`,constraint:k,schema:{type:"object",properties:{levels:{type:"number"},direction:{type:"string",enum:["up","down"]},selectionLines:{type:"array",items:{type:"number"}}}}}]}})}invoke(x,U,Q,ne){let ce=this.getLineNumbers(ne,Q);const ee=ne&&ne.levels,ue=ne&&ne.direction;typeof ee!="number"&&typeof ue!="string"?(0,n.setCollapseStateUp)(U,!0,ce):ue==="up"?(0,n.setCollapseStateLevelsUp)(U,!0,ee||1,ce):(0,n.setCollapseStateLevelsDown)(U,!0,ee||1,ce)}}class T extends N{constructor(){super({id:"editor.toggleFold",label:s.localize(4,null),alias:"Toggle Fold",precondition:L,kbOpts:{kbExpr:g.EditorContextKeys.editorTextFocus,primary:(0,D.KeyChord)(2048|41,2048|42),weight:100}})}invoke(x,U,Q){let ne=this.getSelectedLines(Q);(0,n.toggleCollapseState)(U,1,ne)}}class R extends N{constructor(){super({id:"editor.foldRecursively",label:s.localize(5,null),alias:"Fold Recursively",precondition:L,kbOpts:{kbExpr:g.EditorContextKeys.editorTextFocus,primary:(0,D.KeyChord)(2048|41,2048|87),weight:100}})}invoke(x,U,Q){let ne=this.getSelectedLines(Q);(0,n.setCollapseStateLevelsDown)(U,!0,Number.MAX_VALUE,ne)}}class P extends N{constructor(){super({id:"editor.foldAllBlockComments",label:s.localize(6,null),alias:"Fold All Block Comments",precondition:L,kbOpts:{kbExpr:g.EditorContextKeys.editorTextFocus,primary:(0,D.KeyChord)(2048|41,2048|85),weight:100}})}invoke(x,U,Q,ne,ce){if(U.regions.hasTypes())(0,n.setCollapseStateForType)(U,t.FoldingRangeKind.Comment.value,!0);else{const ee=Q.getModel();if(!ee)return;const ue=ce.getLanguageConfiguration(ee.getLanguageId()).comments;if(ue&&ue.blockCommentStartToken){let z=new RegExp("^\\s*"+(0,w.escapeRegExpCharacters)(ue.blockCommentStartToken));(0,n.setCollapseStateForMatchingLines)(U,z,!0)}}}}class F extends N{constructor(){super({id:"editor.foldAllMarkerRegions",label:s.localize(7,null),alias:"Fold All Regions",precondition:L,kbOpts:{kbExpr:g.EditorContextKeys.editorTextFocus,primary:(0,D.KeyChord)(2048|41,2048|29),weight:100}})}invoke(x,U,Q,ne,ce){if(U.regions.hasTypes())(0,n.setCollapseStateForType)(U,t.FoldingRangeKind.Region.value,!0);else{const ee=Q.getModel();if(!ee)return;const ue=ce.getLanguageConfiguration(ee.getLanguageId()).foldingRules;if(ue&&ue.markers&&ue.markers.start){let z=new RegExp(ue.markers.start);(0,n.setCollapseStateForMatchingLines)(U,z,!0)}}}}class W extends N{constructor(){super({id:"editor.unfoldAllMarkerRegions",label:s.localize(8,null),alias:"Unfold All Regions",precondition:L,kbOpts:{kbExpr:g.EditorContextKeys.editorTextFocus,primary:(0,D.KeyChord)(2048|41,2048|30),weight:100}})}invoke(x,U,Q,ne,ce){if(U.regions.hasTypes())(0,n.setCollapseStateForType)(U,t.FoldingRangeKind.Region.value,!1);else{const ee=Q.getModel();if(!ee)return;const ue=ce.getLanguageConfiguration(ee.getLanguageId()).foldingRules;if(ue&&ue.markers&&ue.markers.start){let z=new RegExp(ue.markers.start);(0,n.setCollapseStateForMatchingLines)(U,z,!1)}}}}class A extends N{constructor(){super({id:"editor.foldAllExcept",label:s.localize(9,null),alias:"Fold All Regions Except Selected",precondition:L,kbOpts:{kbExpr:g.EditorContextKeys.editorTextFocus,primary:(0,D.KeyChord)(2048|41,2048|83),weight:100}})}invoke(x,U,Q){let ne=this.getSelectedLines(Q);(0,n.setCollapseStateForRest)(U,!0,ne)}}class H extends N{constructor(){super({id:"editor.unfoldAllExcept",label:s.localize(10,null),alias:"Unfold All Regions Except Selected",precondition:L,kbOpts:{kbExpr:g.EditorContextKeys.editorTextFocus,primary:(0,D.KeyChord)(2048|41,2048|81),weight:100}})}invoke(x,U,Q){let ne=this.getSelectedLines(Q);(0,n.setCollapseStateForRest)(U,!1,ne)}}class q extends N{constructor(){super({id:"editor.foldAll",label:s.localize(11,null),alias:"Fold All",precondition:L,kbOpts:{kbExpr:g.EditorContextKeys.editorTextFocus,primary:(0,D.KeyChord)(2048|41,2048|21),weight:100}})}invoke(x,U,Q){(0,n.setCollapseStateLevelsDown)(U,!0)}}class X extends N{constructor(){super({id:"editor.unfoldAll",label:s.localize(12,null),alias:"Unfold All",precondition:L,kbOpts:{kbExpr:g.EditorContextKeys.editorTextFocus,primary:(0,D.KeyChord)(2048|41,2048|40),weight:100}})}invoke(x,U,Q){(0,n.setCollapseStateLevelsDown)(U,!1)}}class G extends N{getFoldingLevel(){return parseInt(this.id.substr(G.ID_PREFIX.length))}invoke(x,U,Q){(0,n.setCollapseStateAtLevel)(U,this.getFoldingLevel(),!0,this.getSelectedLines(Q))}}G.ID_PREFIX="editor.foldLevel",G.ID=Z=>G.ID_PREFIX+Z;class re extends N{constructor(){super({id:"editor.gotoParentFold",label:s.localize(13,null),alias:"Go to Parent Fold",precondition:L,kbOpts:{kbExpr:g.EditorContextKeys.editorTextFocus,weight:100}})}invoke(x,U,Q){let ne=this.getSelectedLines(Q);if(ne.length>0){let ce=(0,n.getParentFoldLine)(ne[0],U);ce!==null&&Q.setSelection({startLineNumber:ce,startColumn:1,endLineNumber:ce,endColumn:1})}}}class ae extends N{constructor(){super({id:"editor.gotoPreviousFold",label:s.localize(14,null),alias:"Go to Previous Folding Range",precondition:L,kbOpts:{kbExpr:g.EditorContextKeys.editorTextFocus,weight:100}})}invoke(x,U,Q){let ne=this.getSelectedLines(Q);if(ne.length>0){let ce=(0,n.getPreviousFoldLine)(ne[0],U);ce!==null&&Q.setSelection({startLineNumber:ce,startColumn:1,endLineNumber:ce,endColumn:1})}}}class oe extends N{constructor(){super({id:"editor.gotoNextFold",label:s.localize(15,null),alias:"Go to Next Folding Range",precondition:L,kbOpts:{kbExpr:g.EditorContextKeys.editorTextFocus,weight:100}})}invoke(x,U,Q){let ne=this.getSelectedLines(Q);if(ne.length>0){let ce=(0,n.getNextFoldLine)(ne[0],U);ce!==null&&Q.setSelection({startLineNumber:ce,startColumn:1,endLineNumber:ce,endColumn:1})}}}(0,h.registerEditorContribution)(E.ID,E),(0,h.registerEditorAction)(M),(0,h.registerEditorAction)(O),(0,h.registerEditorAction)(B),(0,h.registerEditorAction)(R),(0,h.registerEditorAction)(q),(0,h.registerEditorAction)(X),(0,h.registerEditorAction)(P),(0,h.registerEditorAction)(F),(0,h.registerEditorAction)(W),(0,h.registerEditorAction)(A),(0,h.registerEditorAction)(H),(0,h.registerEditorAction)(T),(0,h.registerEditorAction)(re),(0,h.registerEditorAction)(ae),(0,h.registerEditorAction)(oe);for(let Z=1;Z<=7;Z++)(0,h.registerInstantiatedEditorAction)(new G({id:G.ID(Z),label:s.localize(16,null,Z),alias:`Fold Level ${Z}`,precondition:L,kbOpts:{kbExpr:g.EditorContextKeys.editorTextFocus,primary:(0,D.KeyChord)(2048|41,2048|21+Z),weight:100}}));e.foldBackgroundBackground=(0,a.registerColor)("editor.foldBackground",{light:(0,a.transparent)(a.editorSelectionBackground,.3),dark:(0,a.transparent)(a.editorSelectionBackground,.3),hc:null},s.localize(17,null),!0),e.editorFoldForeground=(0,a.registerColor)("editorGutter.foldingControlForeground",{dark:a.iconForeground,light:a.iconForeground,hc:a.iconForeground},s.localize(18,null)),(0,d.registerThemingParticipant)((Z,x)=>{const U=Z.getColor(e.foldBackgroundBackground);U&&x.addRule(`.monaco-editor .folded-background { background-color: ${U}; }`);const Q=Z.getColor(e.editorFoldForeground);Q&&x.addRule(`
|
||
.monaco-editor .cldr${d.ThemeIcon.asCSSSelector(u.foldingExpandedIcon)},
|
||
.monaco-editor .cldr${d.ThemeIcon.asCSSSelector(u.foldingCollapsedIcon)} {
|
||
color: ${Q} !important;
|
||
}
|
||
`)})}),define(te[717],ie([1,0,10,21,29,2,3,272,293,451,652,14]),function(j,e,y,m,D,I,w,b,p,h,g,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ColorHoverParticipant=e.ColorHover=void 0;class i{constructor(c,r,s,o){this.owner=c,this.range=r,this.model=s,this.provider=o,this.forceShowAtRange=!0}isValidForHoverAnchor(c){return c.type===1&&this.range.startColumn<=c.range.startColumn&&this.range.endColumn>=c.range.endColumn}}e.ColorHover=i;let n=class{constructor(c,r){this._editor=c,this._themeService=r}computeSync(c,r){return[]}computeAsync(c,r,s){return y.AsyncIterableObject.fromPromise(this._computeAsync(c,r,s))}_computeAsync(c,r,s){return ye(this,void 0,void 0,function*(){if(!this._editor.hasModel())return[];const o=p.ColorDetector.get(this._editor);if(!o)return[];for(const a of r){if(!o.isColorDecorationId(a.id))continue;const d=o.getColorData(a.range.getStartPosition());if(d)return[yield this._createColorHover(this._editor.getModel(),d.colorInfo,d.provider)]}return[]})}_createColorHover(c,r,s){return ye(this,void 0,void 0,function*(){const o=c.getValueInRange(r.range),{red:a,green:d,blue:u,alpha:f}=r.color,S=new D.RGBA(Math.round(a*255),Math.round(d*255),Math.round(u*255),f),v=new D.Color(S),C=yield(0,b.getColorPresentations)(c,r,s,m.CancellationToken.None),_=new h.ColorPickerModel(v,[],0);return _.colorPresentations=C||[],_.guessColorPresentation(v,o),new i(this,w.Range.lift(r.range),_,s)})}renderHoverParts(c,r){if(r.length===0||!this._editor.hasModel())return I.Disposable.None;const s=new I.DisposableStore,o=r[0],a=this._editor.getModel(),d=o.model,u=s.add(new g.ColorPickerWidget(c.fragment,d,this._editor.getOption(129),this._themeService));c.setColorPicker(u);let f=new w.Range(o.range.startLineNumber,o.range.startColumn,o.range.endLineNumber,o.range.endColumn);const S=()=>{let C,_;if(d.presentation.textEdit){C=[d.presentation.textEdit],_=new w.Range(d.presentation.textEdit.range.startLineNumber,d.presentation.textEdit.range.startColumn,d.presentation.textEdit.range.endLineNumber,d.presentation.textEdit.range.endColumn);const L=this._editor.getModel()._setTrackedRange(null,_,3);this._editor.pushUndoStop(),this._editor.executeEdits("colorpicker",C),_=this._editor.getModel()._getTrackedRange(L)||_}else C=[{identifier:null,range:f,text:d.presentation.label,forceMoveMarkers:!1}],_=f.setEndPosition(f.endLineNumber,f.startColumn+d.presentation.label.length),this._editor.pushUndoStop(),this._editor.executeEdits("colorpicker",C);d.presentation.additionalTextEdits&&(C=[...d.presentation.additionalTextEdits],this._editor.executeEdits("colorpicker",C),c.hide()),this._editor.pushUndoStop(),f=_},v=C=>(0,b.getColorPresentations)(a,{range:f,color:{red:C.rgba.r/255,green:C.rgba.g/255,blue:C.rgba.b/255,alpha:C.rgba.a}},o.provider,m.CancellationToken.None).then(_=>{d.colorPresentations=_||[]});return s.add(d.onColorFlushed(C=>{v(C).then(S)})),s.add(d.onDidChangeColor(v)),s}};n=Ie([Ce(1,t.IThemeService)],n),e.ColorHoverParticipant=n}),define(te[718],ie([1,0,10,13,106,15,3,22,24,33,85,52,548,14,459]),function(j,e,y,m,D,I,w,b,p,h,g,t,i,n,l){"use strict";Object.defineProperty(e,"__esModule",{value:!0});let c=class Jt{constructor(a,d){this.decorationIds=[],this.editor=a,this.editorWorkerService=d}static get(a){return a.getContribution(Jt.ID)}dispose(){}run(a,d){this.currentRequest&&this.currentRequest.cancel();const u=this.editor.getSelection(),f=this.editor.getModel();if(!f||!u)return;let S=u;if(S.startLineNumber!==S.endLineNumber)return;const v=new D.EditorState(this.editor,1|4),C=f.uri;return this.editorWorkerService.canNavigateValueSet(C)?(this.currentRequest=(0,y.createCancelablePromise)(_=>this.editorWorkerService.navigateValueSet(C,S,d)),this.currentRequest.then(_=>{if(!_||!_.range||!_.value||!v.validate(this.editor))return;let L=w.Range.lift(_.range),E=_.range,N=_.value.length-(S.endColumn-S.startColumn);E={startLineNumber:E.startLineNumber,startColumn:E.startColumn,endLineNumber:E.endLineNumber,endColumn:E.startColumn+_.value.length},N>1&&(S=new b.Selection(S.startLineNumber,S.startColumn,S.endLineNumber,S.endColumn+N-1));const k=new l.InPlaceReplaceCommand(L,S,_.value);this.editor.pushUndoStop(),this.editor.executeCommand(a,k),this.editor.pushUndoStop(),this.decorationIds=this.editor.deltaDecorations(this.decorationIds,[{range:E,options:Jt.DECORATION}]),this.decorationRemover&&this.decorationRemover.cancel(),this.decorationRemover=(0,y.timeout)(350),this.decorationRemover.then(()=>this.decorationIds=this.editor.deltaDecorations(this.decorationIds,[])).catch(m.onUnexpectedError)}).catch(m.onUnexpectedError)):Promise.resolve(void 0)}};c.ID="editor.contrib.inPlaceReplaceController",c.DECORATION=h.ModelDecorationOptions.register({description:"in-place-replace",className:"valueSetReplacement"}),c=Ie([Ce(1,g.IEditorWorkerService)],c);class r extends I.EditorAction{constructor(){super({id:"editor.action.inPlaceReplace.up",label:i.localize(0,null),alias:"Replace with Previous Value",precondition:p.EditorContextKeys.writable,kbOpts:{kbExpr:p.EditorContextKeys.editorTextFocus,primary:2048|1024|82,weight:100}})}run(a,d){const u=c.get(d);return u?u.run(this.id,!0):Promise.resolve(void 0)}}class s extends I.EditorAction{constructor(){super({id:"editor.action.inPlaceReplace.down",label:i.localize(1,null),alias:"Replace with Next Value",precondition:p.EditorContextKeys.writable,kbOpts:{kbExpr:p.EditorContextKeys.editorTextFocus,primary:2048|1024|84,weight:100}})}run(a,d){const u=c.get(d);return u?u.run(this.id,!1):Promise.resolve(void 0)}}(0,I.registerEditorContribution)(c.ID,c),(0,I.registerEditorAction)(r),(0,I.registerEditorAction)(s),(0,n.registerThemingParticipant)((o,a)=>{const d=o.getColor(t.editorBracketMatchBorder);d&&a.addRule(`.monaco-editor.vs .valueSetReplacement { outline: solid 2px ${d}; }`)})}),define(te[719],ie([1,0,2,8,15,197,61,3,22,24,33,32,45,258,549,78]),function(j,e,y,m,D,I,w,b,p,h,g,t,i,n,l,c){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IndentationToTabsCommand=e.IndentationToSpacesCommand=e.AutoIndentOnPaste=e.AutoIndentOnPasteCommand=e.ReindentSelectedLinesAction=e.ReindentLinesAction=e.DetectIndentation=e.IndentUsingSpaces=e.IndentUsingTabs=e.ChangeIndentationSizeAction=e.IndentationToTabsAction=e.IndentationToSpacesAction=e.getReindentEditOperations=void 0;function r(k,M,O,B,T){if(k.getLineCount()===1&&k.getLineMaxColumn(1)===1)return[];const R=M.getLanguageConfiguration(k.getLanguageId()).indentationRules;if(!R)return[];for(B=Math.min(B,k.getLineCount());O<=B&&R.unIndentedLinePattern;){let oe=k.getLineContent(O);if(!R.unIndentedLinePattern.test(oe))break;O++}if(O>B-1)return[];const{tabSize:P,indentSize:F,insertSpaces:W}=k.getOptions(),A=(oe,Z)=>(Z=Z||1,I.ShiftCommand.shiftIndent(oe,oe.length+Z,P,F,W)),H=(oe,Z)=>(Z=Z||1,I.ShiftCommand.unshiftIndent(oe,oe.length+Z,P,F,W));let q=[],X,G=k.getLineContent(O),re=G;if(T!=null){X=T;let oe=m.getLeadingWhitespace(G);re=X+G.substring(oe.length),R.decreaseIndentPattern&&R.decreaseIndentPattern.test(re)&&(X=H(X),re=X+G.substring(oe.length)),G!==re&&q.push(w.EditOperation.replaceMove(new p.Selection(O,1,O,oe.length+1),g.TextModel.normalizeIndentation(X,F,W)))}else X=m.getLeadingWhitespace(G);let ae=X;R.increaseIndentPattern&&R.increaseIndentPattern.test(re)?(ae=A(ae),X=A(X)):R.indentNextLinePattern&&R.indentNextLinePattern.test(re)&&(ae=A(ae)),O++;for(let oe=O;oe<=B;oe++){let Z=k.getLineContent(oe),x=m.getLeadingWhitespace(Z),U=ae+Z.substring(x.length);R.decreaseIndentPattern&&R.decreaseIndentPattern.test(U)&&(ae=H(ae),X=H(X)),x!==ae&&q.push(w.EditOperation.replaceMove(new p.Selection(oe,1,oe,x.length+1),g.TextModel.normalizeIndentation(ae,F,W))),!(R.unIndentedLinePattern&&R.unIndentedLinePattern.test(Z))&&(R.increaseIndentPattern&&R.increaseIndentPattern.test(U)?(X=A(X),ae=X):R.indentNextLinePattern&&R.indentNextLinePattern.test(U)?ae=A(ae):ae=X)}return q}e.getReindentEditOperations=r;class s extends D.EditorAction{constructor(){super({id:s.ID,label:l.localize(0,null),alias:"Convert Indentation to Spaces",precondition:h.EditorContextKeys.writable})}run(M,O){let B=O.getModel();if(!B)return;let T=B.getOptions(),R=O.getSelection();if(!R)return;const P=new E(R,T.tabSize);O.pushUndoStop(),O.executeCommands(this.id,[P]),O.pushUndoStop(),B.updateOptions({insertSpaces:!0})}}e.IndentationToSpacesAction=s,s.ID="editor.action.indentationToSpaces";class o extends D.EditorAction{constructor(){super({id:o.ID,label:l.localize(1,null),alias:"Convert Indentation to Tabs",precondition:h.EditorContextKeys.writable})}run(M,O){let B=O.getModel();if(!B)return;let T=B.getOptions(),R=O.getSelection();if(!R)return;const P=new N(R,T.tabSize);O.pushUndoStop(),O.executeCommands(this.id,[P]),O.pushUndoStop(),B.updateOptions({insertSpaces:!1})}}e.IndentationToTabsAction=o,o.ID="editor.action.indentationToTabs";class a extends D.EditorAction{constructor(M,O){super(O);this.insertSpaces=M}run(M,O){const B=M.get(c.IQuickInputService),T=M.get(i.IModelService);let R=O.getModel();if(!R)return;const P=T.getCreationOptions(R.getLanguageId(),R.uri,R.isForSimpleWidget),F=[1,2,3,4,5,6,7,8].map(A=>({id:A.toString(),label:A.toString(),description:A===P.tabSize?l.localize(2,null):void 0})),W=Math.min(R.getOptions().tabSize-1,7);setTimeout(()=>{B.pick(F,{placeHolder:l.localize(3,null),activeItem:F[W]}).then(A=>{A&&R&&!R.isDisposed()&&R.updateOptions({tabSize:parseInt(A.label,10),insertSpaces:this.insertSpaces})})},50)}}e.ChangeIndentationSizeAction=a;class d extends a{constructor(){super(!1,{id:d.ID,label:l.localize(4,null),alias:"Indent Using Tabs",precondition:void 0})}}e.IndentUsingTabs=d,d.ID="editor.action.indentUsingTabs";class u extends a{constructor(){super(!0,{id:u.ID,label:l.localize(5,null),alias:"Indent Using Spaces",precondition:void 0})}}e.IndentUsingSpaces=u,u.ID="editor.action.indentUsingSpaces";class f extends D.EditorAction{constructor(){super({id:f.ID,label:l.localize(6,null),alias:"Detect Indentation from Content",precondition:void 0})}run(M,O){const B=M.get(i.IModelService);let T=O.getModel();if(!T)return;const R=B.getCreationOptions(T.getLanguageId(),T.uri,T.isForSimpleWidget);T.detectIndentation(R.insertSpaces,R.tabSize)}}e.DetectIndentation=f,f.ID="editor.action.detectIndentation";class S extends D.EditorAction{constructor(){super({id:"editor.action.reindentlines",label:l.localize(7,null),alias:"Reindent Lines",precondition:h.EditorContextKeys.writable})}run(M,O){const B=M.get(t.ILanguageConfigurationService);let T=O.getModel();if(!T)return;let R=r(T,B,1,T.getLineCount());R.length>0&&(O.pushUndoStop(),O.executeEdits(this.id,R),O.pushUndoStop())}}e.ReindentLinesAction=S;class v extends D.EditorAction{constructor(){super({id:"editor.action.reindentselectedlines",label:l.localize(8,null),alias:"Reindent Selected Lines",precondition:h.EditorContextKeys.writable})}run(M,O){const B=M.get(t.ILanguageConfigurationService);let T=O.getModel();if(!T)return;let R=O.getSelections();if(R===null)return;let P=[];for(let F of R){let W=F.startLineNumber,A=F.endLineNumber;if(W!==A&&F.endColumn===1&&A--,W===1){if(W===A)continue}else W--;let H=r(T,B,W,A);P.push(...H)}P.length>0&&(O.pushUndoStop(),O.executeEdits(this.id,P),O.pushUndoStop())}}e.ReindentSelectedLinesAction=v;class C{constructor(M,O){this._initialSelection=O,this._edits=[],this._selectionId=null;for(let B of M)B.range&&typeof B.text=="string"&&this._edits.push(B)}getEditOperations(M,O){for(let T of this._edits)O.addEditOperation(b.Range.lift(T.range),T.text);let B=!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?(B=!0,this._selectionId=O.trackSelection(this._initialSelection,!0)):this._edits[0].range.endColumn===this._initialSelection.startColumn&&this._edits[0].range.endLineNumber===this._initialSelection.startLineNumber&&(B=!0,this._selectionId=O.trackSelection(this._initialSelection,!1))),B||(this._selectionId=O.trackSelection(this._initialSelection))}computeCursorState(M,O){return O.getTrackedSelection(this._selectionId)}}e.AutoIndentOnPasteCommand=C;class _{constructor(M){this.callOnDispose=new y.DisposableStore,this.callOnModel=new y.DisposableStore,this.editor=M,this.callOnDispose.add(M.onDidChangeConfiguration(()=>this.update())),this.callOnDispose.add(M.onDidChangeModel(()=>this.update())),this.callOnDispose.add(M.onDidChangeModelLanguage(()=>this.update()))}update(){this.callOnModel.clear(),!(this.editor.getOption(9)<4||this.editor.getOption(48))&&(!this.editor.hasModel()||this.callOnModel.add(this.editor.onDidPaste(({range:M})=>{this.trigger(M)})))}trigger(M){let O=this.editor.getSelections();if(O===null||O.length>1)return;const B=this.editor.getModel();if(!B||!B.isCheapToTokenize(M.getStartPosition().lineNumber))return;const T=this.editor.getOption(9),{tabSize:R,indentSize:P,insertSpaces:F}=B.getOptions();let W=[],A={shiftIndent:G=>I.ShiftCommand.shiftIndent(G,G.length+1,R,P,F),unshiftIndent:G=>I.ShiftCommand.unshiftIndent(G,G.length+1,R,P,F)},H=M.startLineNumber;for(;H<=M.endLineNumber;){if(this.shouldIgnoreLine(B,H)){H++;continue}break}if(H>M.endLineNumber)return;let q=B.getLineContent(H);if(!/\S/.test(q.substring(0,M.startColumn-1))){const G=t.LanguageConfigurationRegistry.getGoodIndentForLine(T,B,B.getLanguageId(),H,A);if(G!==null){let re=m.getLeadingWhitespace(q),ae=n.getSpaceCnt(G,R),oe=n.getSpaceCnt(re,R);if(ae!==oe){let Z=n.generateIndent(ae,R,F);W.push({range:new b.Range(H,1,H,re.length+1),text:Z}),q=Z+q.substr(re.length)}else{let Z=t.LanguageConfigurationRegistry.getIndentMetadata(B,H);if(Z===0||Z===8)return}}}const X=H;for(;H<M.endLineNumber;){if(!/\S/.test(B.getLineContent(H+1))){H++;continue}break}if(H!==M.endLineNumber){let G={getLineTokens:ae=>B.getLineTokens(ae),getLanguageId:()=>B.getLanguageId(),getLanguageIdAtPosition:(ae,oe)=>B.getLanguageIdAtPosition(ae,oe),getLineContent:ae=>ae===X?q:B.getLineContent(ae)},re=t.LanguageConfigurationRegistry.getGoodIndentForLine(T,G,B.getLanguageId(),H+1,A);if(re!==null){let ae=n.getSpaceCnt(re,R),oe=n.getSpaceCnt(m.getLeadingWhitespace(B.getLineContent(H+1)),R);if(ae!==oe){let Z=ae-oe;for(let x=H+1;x<=M.endLineNumber;x++){let U=B.getLineContent(x),Q=m.getLeadingWhitespace(U),ce=n.getSpaceCnt(Q,R)+Z,ee=n.generateIndent(ce,R,F);ee!==Q&&W.push({range:new b.Range(x,1,x,Q.length+1),text:ee})}}}}if(W.length>0){this.editor.pushUndoStop();let G=new C(W,this.editor.getSelection());this.editor.executeCommand("autoIndentOnPaste",G),this.editor.pushUndoStop()}}shouldIgnoreLine(M,O){M.forceTokenization(O);let B=M.getLineFirstNonWhitespaceColumn(O);if(B===0)return!0;let T=M.getLineTokens(O);if(T.getCount()>0){let R=T.findTokenIndexAtOffset(B);if(R>=0&&T.getStandardTokenType(R)===1)return!0}return!1}dispose(){this.callOnDispose.dispose(),this.callOnModel.dispose()}}e.AutoIndentOnPaste=_,_.ID="editor.contrib.autoIndentOnPaste";function L(k,M,O,B){if(k.getLineCount()===1&&k.getLineMaxColumn(1)===1)return;let T="";for(let P=0;P<O;P++)T+=" ";let R=new RegExp(T,"gi");for(let P=1,F=k.getLineCount();P<=F;P++){let W=k.getLineFirstNonWhitespaceColumn(P);if(W===0&&(W=k.getLineMaxColumn(P)),W===1)continue;const A=new b.Range(P,1,P,W),H=k.getValueInRange(A),q=B?H.replace(/\t/ig,T):H.replace(R," ");M.addEditOperation(A,q)}}class E{constructor(M,O){this.selection=M,this.tabSize=O,this.selectionId=null}getEditOperations(M,O){this.selectionId=O.trackSelection(this.selection),L(M,O,this.tabSize,!0)}computeCursorState(M,O){return O.getTrackedSelection(this.selectionId)}}e.IndentationToSpacesCommand=E;class N{constructor(M,O){this.selection=M,this.tabSize=O,this.selectionId=null}getEditOperations(M,O){this.selectionId=O.trackSelection(this.selection),L(M,O,this.tabSize,!1)}computeCursorState(M,O){return O.getTrackedSelection(this.selectionId)}}e.IndentationToTabsCommand=N,(0,D.registerEditorContribution)(_.ID,_),(0,D.registerEditorAction)(s),(0,D.registerEditorAction)(o),(0,D.registerEditorAction)(d),(0,D.registerEditorAction)(u),(0,D.registerEditorAction)(f),(0,D.registerEditorAction)(S),(0,D.registerEditorAction)(v)}),define(te[207],ie([1,0,10,21,13,4,2,8,160,61,3,18,188,26,259,189,32,428]),function(j,e,y,m,D,I,w,b,p,h,g,t,i,n,l,c,r,s){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.minimizeInlineCompletion=e.provideInlineCompletions=e.SynchronizedInlineCompletionsCache=e.UpdateOperation=e.InlineCompletionsSession=e.InlineCompletionsModel=void 0;let o=class extends w.Disposable{constructor(E,N,k,M){super();this.editor=E,this.cache=N,this.commandService=k,this.languageConfigurationService=M,this.onDidChangeEmitter=new I.Emitter,this.onDidChange=this.onDidChangeEmitter.event,this.completionSession=this._register(new w.MutableDisposable),this.active=!1,this.disposed=!1,this._register(k.onDidExecuteCommand(O=>{new Set([p.CoreEditingCommands.Tab.id,p.CoreEditingCommands.DeleteLeft.id,p.CoreEditingCommands.DeleteRight.id,l.inlineSuggestCommitId,"acceptSelectedSuggestion"]).has(O.commandId)&&E.hasTextFocus()&&this.handleUserInput()})),this._register(this.editor.onDidType(O=>{this.handleUserInput()})),this._register(this.editor.onDidChangeCursorPosition(O=>{this.session&&!this.session.isValid&&this.hide()})),this._register((0,w.toDisposable)(()=>{this.disposed=!0})),this._register(this.editor.onDidBlurEditorWidget(()=>{this.hide()}))}handleUserInput(){this.session&&!this.session.isValid&&this.hide(),setTimeout(()=>{this.disposed||this.startSessionIfTriggered()},0)}get session(){return this.completionSession.value}get ghostText(){var E;return(E=this.session)===null||E===void 0?void 0:E.ghostText}get minReservedLineCount(){return this.session?this.session.minReservedLineCount:0}setExpanded(E){var N;(N=this.session)===null||N===void 0||N.setExpanded(E)}setActive(E){var N;this.active=E,E&&((N=this.session)===null||N===void 0||N.scheduleAutomaticUpdate())}startSessionIfTriggered(){!this.editor.getOption(55).enabled||this.session&&this.session.isValid||this.trigger(t.InlineCompletionTriggerKind.Automatic)}trigger(E){if(this.completionSession.value){E===t.InlineCompletionTriggerKind.Explicit&&this.completionSession.value.ensureUpdateWithExplicitContext();return}this.completionSession.value=new a(this.editor,this.editor.getPosition(),()=>this.active,this.commandService,this.cache,E,this.languageConfigurationService),this.completionSession.value.takeOwnership(this.completionSession.value.onDidChange(()=>{this.onDidChangeEmitter.fire()}))}hide(){this.completionSession.clear(),this.onDidChangeEmitter.fire()}commitCurrentSuggestion(){var E;(E=this.session)===null||E===void 0||E.commitCurrentCompletion()}showNext(){var E;(E=this.session)===null||E===void 0||E.showNextInlineCompletion()}showPrevious(){var E;(E=this.session)===null||E===void 0||E.showPreviousInlineCompletion()}hasMultipleInlineCompletions(){var E;return ye(this,void 0,void 0,function*(){const N=yield(E=this.session)===null||E===void 0?void 0:E.hasMultipleInlineCompletions();return N!==void 0?N:!1})}};o=Ie([Ce(2,n.ICommandService),Ce(3,r.ILanguageConfigurationService)],o),e.InlineCompletionsModel=o;class a extends i.BaseGhostTextWidgetModel{constructor(E,N,k,M,O,B,T){super(E);this.triggerPosition=N,this.shouldUpdate=k,this.commandService=M,this.cache=O,this.initialTriggerKind=B,this.languageConfigurationService=T,this.minReservedLineCount=0,this.updateOperation=this._register(new w.MutableDisposable),this.updateSoon=this._register(new y.RunOnceScheduler(()=>{let P=this.initialTriggerKind;return this.initialTriggerKind=t.InlineCompletionTriggerKind.Automatic,this.update(P)},50)),this.currentlySelectedCompletionId=void 0;let R;this._register(this.onDidChange(()=>{const P=this.currentCompletion;if(P&&P.sourceInlineCompletion!==R){R=P.sourceInlineCompletion;const F=P.sourceProvider;F.handleItemDidShow&&F.handleItemDidShow(P.sourceInlineCompletions,R)}})),this._register((0,w.toDisposable)(()=>{this.cache.clear()})),this._register(this.editor.onDidChangeCursorPosition(P=>{this.cache.value&&this.onDidChangeEmitter.fire()})),this._register(this.editor.onDidChangeModelContent(P=>{this.scheduleAutomaticUpdate()})),this._register(t.InlineCompletionsProviderRegistry.onDidChange(()=>{this.updateSoon.schedule()})),this.scheduleAutomaticUpdate()}fixAndGetIndexOfCurrentSelection(){if(!this.currentlySelectedCompletionId||!this.cache.value||this.cache.value.completions.length===0)return 0;const E=this.cache.value.completions.findIndex(N=>N.semanticId===this.currentlySelectedCompletionId);return E===-1?(this.currentlySelectedCompletionId=void 0,0):E}get currentCachedCompletion(){if(!!this.cache.value)return this.cache.value.completions[this.fixAndGetIndexOfCurrentSelection()]}showNextInlineCompletion(){var E;return ye(this,void 0,void 0,function*(){yield this.ensureUpdateWithExplicitContext();const N=((E=this.cache.value)===null||E===void 0?void 0:E.completions)||[];if(N.length>0){const k=(this.fixAndGetIndexOfCurrentSelection()+1)%N.length;this.currentlySelectedCompletionId=N[k].semanticId}else this.currentlySelectedCompletionId=void 0;this.onDidChangeEmitter.fire()})}showPreviousInlineCompletion(){var E;return ye(this,void 0,void 0,function*(){yield this.ensureUpdateWithExplicitContext();const N=((E=this.cache.value)===null||E===void 0?void 0:E.completions)||[];if(N.length>0){const k=(this.fixAndGetIndexOfCurrentSelection()+N.length-1)%N.length;this.currentlySelectedCompletionId=N[k].semanticId}else this.currentlySelectedCompletionId=void 0;this.onDidChangeEmitter.fire()})}ensureUpdateWithExplicitContext(){var E;return ye(this,void 0,void 0,function*(){this.updateOperation.value?this.updateOperation.value.triggerKind===t.InlineCompletionTriggerKind.Explicit?yield this.updateOperation.value.promise:yield this.update(t.InlineCompletionTriggerKind.Explicit):((E=this.cache.value)===null||E===void 0?void 0:E.triggerKind)!==t.InlineCompletionTriggerKind.Explicit&&(yield this.update(t.InlineCompletionTriggerKind.Explicit))})}hasMultipleInlineCompletions(){var E;return ye(this,void 0,void 0,function*(){return yield this.ensureUpdateWithExplicitContext(),(((E=this.cache.value)===null||E===void 0?void 0:E.completions.length)||0)>1})}get ghostText(){const E=this.currentCompletion,N=this.editor.getOptions().get(55).mode;return E?(0,c.inlineCompletionToGhostText)(E,this.editor.getModel(),N,this.editor.getPosition()):void 0}get currentCompletion(){const E=this.currentCachedCompletion;if(!!E)return E.toLiveInlineCompletion()}get isValid(){return this.editor.getPosition().lineNumber===this.triggerPosition.lineNumber}scheduleAutomaticUpdate(){this.updateOperation.clear(),this.updateSoon.schedule()}update(E){return ye(this,void 0,void 0,function*(){if(!this.shouldUpdate())return;const N=this.editor.getPosition(),k=(0,y.createCancelablePromise)(O=>ye(this,void 0,void 0,function*(){let B;try{B=yield v(N,this.editor.getModel(),{triggerKind:E,selectedSuggestionInfo:void 0},O,this.languageConfigurationService)}catch(T){(0,D.onUnexpectedError)(T);return}O.isCancellationRequested||(this.cache.setValue(this.editor,B,E),this.onDidChangeEmitter.fire())})),M=new d(k,E);this.updateOperation.value=M,yield k,this.updateOperation.value===M&&this.updateOperation.clear()})}takeOwnership(E){this._register(E)}commitCurrentCompletion(){if(!this.ghostText)return;const E=this.currentCompletion;E&&this.commit(E)}commit(E){const N=this.cache.clearAndLeak();this.editor.executeEdits("inlineSuggestion.accept",[h.EditOperation.replaceMove(E.range,E.text)]),E.command?this.commandService.executeCommand(E.command.id,...E.command.arguments||[]).finally(()=>{N==null||N.dispose()}).then(void 0,D.onUnexpectedExternalError):N==null||N.dispose(),this.onDidChangeEmitter.fire()}}e.InlineCompletionsSession=a;class d{constructor(E,N){this.promise=E,this.triggerKind=N}dispose(){this.promise.cancel()}}e.UpdateOperation=d;class u extends w.Disposable{constructor(E,N,k,M){super();this.triggerKind=M;const O=E.deltaDecorations([],N.items.map(B=>({range:B.range,options:{description:"inline-completion-tracking-range"}})));this._register((0,w.toDisposable)(()=>{E.deltaDecorations(O,[])})),this.completions=N.items.map((B,T)=>new f(B,O[T])),this._register(E.onDidChangeModelContent(()=>{let B=!1;const T=E.getModel();for(const R of this.completions){const P=T.getDecorationRange(R.decorationId);if(!P){(0,D.onUnexpectedError)(new Error("Decoration has no range"));continue}R.synchronizedRange.equalsRange(P)||(B=!0,R.synchronizedRange=P)}B&&k()})),this._register(N)}}e.SynchronizedInlineCompletionsCache=u;class f{constructor(E,N){this.inlineCompletion=E,this.decorationId=N,this.semanticId=JSON.stringify({text:this.inlineCompletion.text,startLine:this.inlineCompletion.range.startLineNumber,startColumn:this.inlineCompletion.range.startColumn,command:this.inlineCompletion.command}),this.synchronizedRange=E.range}toLiveInlineCompletion(){return{text:this.inlineCompletion.text,range:this.synchronizedRange,command:this.inlineCompletion.command,sourceProvider:this.inlineCompletion.sourceProvider,sourceInlineCompletions:this.inlineCompletion.sourceInlineCompletions,sourceInlineCompletion:this.inlineCompletion.sourceInlineCompletion}}}function S(L,E){const N=E.getWordAtPosition(L),k=E.getLineMaxColumn(L.lineNumber);return N?new g.Range(L.lineNumber,N.startColumn,L.lineNumber,k):g.Range.fromPositions(L,L.with(void 0,k))}function v(L,E,N,k=m.CancellationToken.None,M){return ye(this,void 0,void 0,function*(){const O=S(L,E),B=t.InlineCompletionsProviderRegistry.all(E),T=yield Promise.all(B.map(P=>ye(this,void 0,void 0,function*(){const F=yield P.provideInlineCompletions(E,L,N,k);return{completions:F,provider:P,dispose:()=>{F&&P.freeInlineCompletions(F)}}}))),R=new Map;for(const P of T){const F=P.completions;if(F)for(const W of F.items){const A=W.range?g.Range.lift(W.range):O;if(A.startLineNumber!==A.endLineNumber)continue;const H=M&&W.completeBracketPairs?C(W.text,A.getStartPosition(),E,M):W.text,q={text:H,range:A,command:W.command,sourceProvider:P.provider,sourceInlineCompletions:F,sourceInlineCompletion:W};R.set(JSON.stringify({text:H,range:W.range}),q)}}return{items:[...R.values()],dispose:()=>{for(const P of T)P.dispose()}}})}e.provideInlineCompletions=v;function C(L,E,N,k){const O=N.getLineContent(E.lineNumber).substring(0,E.column-1)+L,B=N.tokenizeLineWithEdit(E,O.length-(E.column-1),L),T=B==null?void 0:B.sliceAndInflate(E.column-1,O.length,0);return T?(console.log(T),(0,s.fixBracketsInLine)(T,k)):L}function _(L,E){if(!E)return E;const N=L.getValueInRange(E.range),k=(0,b.commonPrefixLength)(N,E.text),M=L.getOffsetAt(E.range.getStartPosition())+k,O=L.getPositionAt(M),B=N.substr(k),T=(0,b.commonSuffixLength)(B,E.text),R=L.getPositionAt(Math.max(M,L.getOffsetAt(E.range.getEndPosition())-T));return{range:g.Range.fromPositions(O,R),text:E.text.substr(k,E.text.length-k-T)}}e.minimizeInlineCompletion=_}),define(te[720],ie([1,0,15,206,24,552]),function(j,e,y,m,D,I){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ExpandLineSelectionAction=void 0;class w extends y.EditorAction{constructor(){super({id:"expandLineSelection",label:I.localize(0,null),alias:"Expand Line Selection",precondition:void 0,kbOpts:{weight:0,kbExpr:D.EditorContextKeys.textInputFocus,primary:2048|42}})}run(p,h,g){if(g=g||{},!h.hasModel())return;const t=h._getViewModel();t.model.pushStackElement(),t.setCursorStates(g.source,3,m.CursorMoveCommands.expandLineSelection(t,t.getCursorStates())),t.revealPrimaryCursor(g.source,!0)}}e.ExpandLineSelectionAction=w,(0,y.registerEditorAction)(w)}),define(te[721],ie([1,0,55,160,15,98,402,205,61,11,3,22,24,462,600,463,553,37]),function(j,e,y,m,D,I,w,b,p,h,g,t,i,n,l,c,r,s){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),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 o extends D.EditorAction{constructor(Z,x){super(x);this.down=Z}run(Z,x){if(!x.hasModel())return;const U=x.getSelections().map((ce,ee)=>({selection:ce,index:ee,ignore:!1}));U.sort((ce,ee)=>g.Range.compareRangesUsingStarts(ce.selection,ee.selection));let Q=U[0];for(let ce=1;ce<U.length;ce++){const ee=U[ce];Q.selection.endLineNumber===ee.selection.startLineNumber&&(Q.index<ee.index?ee.ignore=!0:(Q.ignore=!0,Q=ee))}const ne=[];for(const ce of U)ne.push(new n.CopyLinesCommand(ce.selection,this.down,ce.ignore));x.pushUndoStop(),x.executeCommands(this.id,ne),x.pushUndoStop()}}class a extends o{constructor(){super(!1,{id:"editor.action.copyLinesUpAction",label:r.localize(0,null),alias:"Copy Line Up",precondition:i.EditorContextKeys.writable,kbOpts:{kbExpr:i.EditorContextKeys.editorTextFocus,primary:512|1024|16,linux:{primary:2048|512|1024|16},weight:100},menuOpts:{menuId:s.MenuId.MenubarSelectionMenu,group:"2_line",title:r.localize(1,null),order:1}})}}class d extends o{constructor(){super(!0,{id:"editor.action.copyLinesDownAction",label:r.localize(2,null),alias:"Copy Line Down",precondition:i.EditorContextKeys.writable,kbOpts:{kbExpr:i.EditorContextKeys.editorTextFocus,primary:512|1024|18,linux:{primary:2048|512|1024|18},weight:100},menuOpts:{menuId:s.MenuId.MenubarSelectionMenu,group:"2_line",title:r.localize(3,null),order:2}})}}class u extends D.EditorAction{constructor(){super({id:"editor.action.duplicateSelection",label:r.localize(4,null),alias:"Duplicate Selection",precondition:i.EditorContextKeys.writable,menuOpts:{menuId:s.MenuId.MenubarSelectionMenu,group:"2_line",title:r.localize(5,null),order:5}})}run(Z,x,U){if(!x.hasModel())return;const Q=[],ne=x.getSelections(),ce=x.getModel();for(const ee of ne)if(ee.isEmpty())Q.push(new n.CopyLinesCommand(ee,!0));else{const ue=new t.Selection(ee.endLineNumber,ee.endColumn,ee.endLineNumber,ee.endColumn);Q.push(new I.ReplaceCommandThatSelectsText(ue,ce.getValueInRange(ee)))}x.pushUndoStop(),x.executeCommands(this.id,Q),x.pushUndoStop()}}e.DuplicateSelectionAction=u;class f extends D.EditorAction{constructor(Z,x){super(x);this.down=Z}run(Z,x){let U=[],Q=x.getSelections()||[];const ne=x.getOption(9);for(const ce of Q)U.push(new l.MoveLinesCommand(ce,this.down,ne));x.pushUndoStop(),x.executeCommands(this.id,U),x.pushUndoStop()}}class S extends f{constructor(){super(!1,{id:"editor.action.moveLinesUpAction",label:r.localize(6,null),alias:"Move Line Up",precondition:i.EditorContextKeys.writable,kbOpts:{kbExpr:i.EditorContextKeys.editorTextFocus,primary:512|16,linux:{primary:512|16},weight:100},menuOpts:{menuId:s.MenuId.MenubarSelectionMenu,group:"2_line",title:r.localize(7,null),order:3}})}}class v extends f{constructor(){super(!0,{id:"editor.action.moveLinesDownAction",label:r.localize(8,null),alias:"Move Line Down",precondition:i.EditorContextKeys.writable,kbOpts:{kbExpr:i.EditorContextKeys.editorTextFocus,primary:512|18,linux:{primary:512|18},weight:100},menuOpts:{menuId:s.MenuId.MenubarSelectionMenu,group:"2_line",title:r.localize(9,null),order:4}})}}class C extends D.EditorAction{constructor(Z,x){super(x);this.descending=Z}run(Z,x){const U=x.getSelections()||[];for(const ne of U)if(!c.SortLinesCommand.canRun(x.getModel(),ne,this.descending))return;let Q=[];for(let ne=0,ce=U.length;ne<ce;ne++)Q[ne]=new c.SortLinesCommand(U[ne],this.descending);x.pushUndoStop(),x.executeCommands(this.id,Q),x.pushUndoStop()}}e.AbstractSortLinesAction=C;class _ extends C{constructor(){super(!1,{id:"editor.action.sortLinesAscending",label:r.localize(10,null),alias:"Sort Lines Ascending",precondition:i.EditorContextKeys.writable})}}e.SortLinesAscendingAction=_;class L extends C{constructor(){super(!0,{id:"editor.action.sortLinesDescending",label:r.localize(11,null),alias:"Sort Lines Descending",precondition:i.EditorContextKeys.writable})}}e.SortLinesDescendingAction=L;class E extends D.EditorAction{constructor(){super({id:"editor.action.removeDuplicateLines",label:r.localize(12,null),alias:"Delete Duplicate Lines",precondition:i.EditorContextKeys.writable})}run(Z,x){if(!x.hasModel())return;let U=x.getModel();if(U.getLineCount()===1&&U.getLineMaxColumn(1)===1)return;let Q=[],ne=[],ce=0;for(let ee of x.getSelections()){let ue=new Set,z=[];for(let J=ee.startLineNumber;J<=ee.endLineNumber;J++){let Y=U.getLineContent(J);ue.has(Y)||(z.push(Y),ue.add(Y))}let V=new t.Selection(ee.startLineNumber,1,ee.endLineNumber,U.getLineMaxColumn(ee.endLineNumber)),$=ee.startLineNumber-ce,K=new t.Selection($,1,$+z.length-1,z[z.length-1].length);Q.push(p.EditOperation.replace(V,z.join(`
|
||
`))),ne.push(K),ce+=ee.endLineNumber-ee.startLineNumber+1-z.length}x.pushUndoStop(),x.executeEdits(this.id,Q,ne),x.pushUndoStop()}}e.DeleteDuplicateLinesAction=E;class N extends D.EditorAction{constructor(){super({id:N.ID,label:r.localize(13,null),alias:"Trim Trailing Whitespace",precondition:i.EditorContextKeys.writable,kbOpts:{kbExpr:i.EditorContextKeys.editorTextFocus,primary:(0,y.KeyChord)(2048|41,2048|54),weight:100}})}run(Z,x,U){let Q=[];U.reason==="auto-save"&&(Q=(x.getSelections()||[]).map(ee=>new h.Position(ee.positionLineNumber,ee.positionColumn)));let ne=x.getSelection();if(ne===null)return;let ce=new w.TrimTrailingWhitespaceCommand(ne,Q);x.pushUndoStop(),x.executeCommands(this.id,[ce]),x.pushUndoStop()}}e.TrimTrailingWhitespaceAction=N,N.ID="editor.action.trimTrailingWhitespace";class k extends D.EditorAction{constructor(){super({id:"editor.action.deleteLines",label:r.localize(14,null),alias:"Delete Line",precondition:i.EditorContextKeys.writable,kbOpts:{kbExpr:i.EditorContextKeys.textInputFocus,primary:2048|1024|41,weight:100}})}run(Z,x){if(!x.hasModel())return;let U=this._getLinesToRemove(x),Q=x.getModel();if(Q.getLineCount()===1&&Q.getLineMaxColumn(1)===1)return;let ne=0,ce=[],ee=[];for(let ue=0,z=U.length;ue<z;ue++){const V=U[ue];let $=V.startLineNumber,K=V.endLineNumber,J=1,Y=Q.getLineMaxColumn(K);K<Q.getLineCount()?(K+=1,Y=1):$>1&&($-=1,J=Q.getLineMaxColumn($)),ce.push(p.EditOperation.replace(new t.Selection($,J,K,Y),"")),ee.push(new t.Selection($-ne,V.positionColumn,$-ne,V.positionColumn)),ne+=V.endLineNumber-V.startLineNumber+1}x.pushUndoStop(),x.executeEdits(this.id,ce,ee),x.pushUndoStop()}_getLinesToRemove(Z){let x=Z.getSelections().map(ne=>{let ce=ne.endLineNumber;return ne.startLineNumber<ne.endLineNumber&&ne.endColumn===1&&(ce-=1),{startLineNumber:ne.startLineNumber,selectionStartColumn:ne.selectionStartColumn,endLineNumber:ce,positionColumn:ne.positionColumn}});x.sort((ne,ce)=>ne.startLineNumber===ce.startLineNumber?ne.endLineNumber-ce.endLineNumber:ne.startLineNumber-ce.startLineNumber);let U=[],Q=x[0];for(let ne=1;ne<x.length;ne++)Q.endLineNumber+1>=x[ne].startLineNumber?Q.endLineNumber=x[ne].endLineNumber:(U.push(Q),Q=x[ne]);return U.push(Q),U}}e.DeleteLinesAction=k;class M extends D.EditorAction{constructor(){super({id:"editor.action.indentLines",label:r.localize(15,null),alias:"Indent Line",precondition:i.EditorContextKeys.writable,kbOpts:{kbExpr:i.EditorContextKeys.editorTextFocus,primary:2048|89,weight:100}})}run(Z,x){const U=x._getViewModel();!U||(x.pushUndoStop(),x.executeCommands(this.id,b.TypeOperations.indent(U.cursorConfig,x.getModel(),x.getSelections())),x.pushUndoStop())}}e.IndentLinesAction=M;class O extends D.EditorAction{constructor(){super({id:"editor.action.outdentLines",label:r.localize(16,null),alias:"Outdent Line",precondition:i.EditorContextKeys.writable,kbOpts:{kbExpr:i.EditorContextKeys.editorTextFocus,primary:2048|87,weight:100}})}run(Z,x){m.CoreEditingCommands.Outdent.runEditorCommand(Z,x,null)}}class B extends D.EditorAction{constructor(){super({id:"editor.action.insertLineBefore",label:r.localize(17,null),alias:"Insert Line Above",precondition:i.EditorContextKeys.writable,kbOpts:{kbExpr:i.EditorContextKeys.editorTextFocus,primary:2048|1024|3,weight:100}})}run(Z,x){const U=x._getViewModel();!U||(x.pushUndoStop(),x.executeCommands(this.id,b.TypeOperations.lineInsertBefore(U.cursorConfig,x.getModel(),x.getSelections())))}}e.InsertLineBeforeAction=B;class T extends D.EditorAction{constructor(){super({id:"editor.action.insertLineAfter",label:r.localize(18,null),alias:"Insert Line Below",precondition:i.EditorContextKeys.writable,kbOpts:{kbExpr:i.EditorContextKeys.editorTextFocus,primary:2048|3,weight:100}})}run(Z,x){const U=x._getViewModel();!U||(x.pushUndoStop(),x.executeCommands(this.id,b.TypeOperations.lineInsertAfter(U.cursorConfig,x.getModel(),x.getSelections())))}}e.InsertLineAfterAction=T;class R extends D.EditorAction{run(Z,x){if(!x.hasModel())return;const U=x.getSelection();let Q=this._getRangesToDelete(x),ne=[];for(let ue=0,z=Q.length-1;ue<z;ue++){let V=Q[ue],$=Q[ue+1];g.Range.intersectRanges(V,$)===null?ne.push(V):Q[ue+1]=g.Range.plusRange(V,$)}ne.push(Q[Q.length-1]);let ce=this._getEndCursorState(U,ne),ee=ne.map(ue=>p.EditOperation.replace(ue,""));x.pushUndoStop(),x.executeEdits(this.id,ee,ce),x.pushUndoStop()}}e.AbstractDeleteAllToBoundaryAction=R;class P extends R{constructor(){super({id:"deleteAllLeft",label:r.localize(19,null),alias:"Delete All Left",precondition:i.EditorContextKeys.writable,kbOpts:{kbExpr:i.EditorContextKeys.textInputFocus,primary:0,mac:{primary:2048|1},weight:100}})}_getEndCursorState(Z,x){let U=null,Q=[],ne=0;return x.forEach(ce=>{let ee;if(ce.endColumn===1&&ne>0){let ue=ce.startLineNumber-ne;ee=new t.Selection(ue,ce.startColumn,ue,ce.startColumn)}else ee=new t.Selection(ce.startLineNumber,ce.startColumn,ce.startLineNumber,ce.startColumn);ne+=ce.endLineNumber-ce.startLineNumber,ce.intersectRanges(Z)?U=ee:Q.push(ee)}),U&&Q.unshift(U),Q}_getRangesToDelete(Z){let x=Z.getSelections();if(x===null)return[];let U=x,Q=Z.getModel();return Q===null?[]:(U.sort(g.Range.compareRangesUsingStarts),U=U.map(ne=>{if(ne.isEmpty())if(ne.startColumn===1){let ce=Math.max(1,ne.startLineNumber-1),ee=ne.startLineNumber===1?1:Q.getLineContent(ce).length+1;return new g.Range(ce,ee,ne.startLineNumber,1)}else return new g.Range(ne.startLineNumber,1,ne.startLineNumber,ne.startColumn);else return new g.Range(ne.startLineNumber,1,ne.endLineNumber,ne.endColumn)}),U)}}e.DeleteAllLeftAction=P;class F extends R{constructor(){super({id:"deleteAllRight",label:r.localize(20,null),alias:"Delete All Right",precondition:i.EditorContextKeys.writable,kbOpts:{kbExpr:i.EditorContextKeys.textInputFocus,primary:0,mac:{primary:256|41,secondary:[2048|20]},weight:100}})}_getEndCursorState(Z,x){let U=null,Q=[];for(let ne=0,ce=x.length,ee=0;ne<ce;ne++){let ue=x[ne],z=new t.Selection(ue.startLineNumber-ee,ue.startColumn,ue.startLineNumber-ee,ue.startColumn);ue.intersectRanges(Z)?U=z:Q.push(z)}return U&&Q.unshift(U),Q}_getRangesToDelete(Z){let x=Z.getModel();if(x===null)return[];let U=Z.getSelections();if(U===null)return[];let Q=U.map(ne=>{if(ne.isEmpty()){const ce=x.getLineMaxColumn(ne.startLineNumber);return ne.startColumn===ce?new g.Range(ne.startLineNumber,ne.startColumn,ne.startLineNumber+1,1):new g.Range(ne.startLineNumber,ne.startColumn,ne.startLineNumber,ce)}return ne});return Q.sort(g.Range.compareRangesUsingStarts),Q}}e.DeleteAllRightAction=F;class W extends D.EditorAction{constructor(){super({id:"editor.action.joinLines",label:r.localize(21,null),alias:"Join Lines",precondition:i.EditorContextKeys.writable,kbOpts:{kbExpr:i.EditorContextKeys.editorTextFocus,primary:0,mac:{primary:256|40},weight:100}})}run(Z,x){let U=x.getSelections();if(U===null)return;let Q=x.getSelection();if(Q===null)return;U.sort(g.Range.compareRangesUsingStarts);let ne=[],ce=U.reduce((K,J)=>K.isEmpty()?K.endLineNumber===J.startLineNumber?(Q.equalsSelection(K)&&(Q=J),J):J.startLineNumber>K.endLineNumber+1?(ne.push(K),J):new t.Selection(K.startLineNumber,K.startColumn,J.endLineNumber,J.endColumn):J.startLineNumber>K.endLineNumber?(ne.push(K),J):new t.Selection(K.startLineNumber,K.startColumn,J.endLineNumber,J.endColumn));ne.push(ce);let ee=x.getModel();if(ee===null)return;let ue=[],z=[],V=Q,$=0;for(let K=0,J=ne.length;K<J;K++){let Y=ne[K],se=Y.startLineNumber,ge=1,me=0,le,he,ve=ee.getLineContent(Y.endLineNumber).length-Y.endColumn;if(Y.isEmpty()||Y.startLineNumber===Y.endLineNumber){let de=Y.getStartPosition();de.lineNumber<ee.getLineCount()?(le=se+1,he=ee.getLineMaxColumn(le)):(le=de.lineNumber,he=ee.getLineMaxColumn(de.lineNumber))}else le=Y.endLineNumber,he=ee.getLineMaxColumn(le);let pe=ee.getLineContent(se);for(let de=se+1;de<=le;de++){let fe=ee.getLineContent(de),_e=ee.getLineFirstNonWhitespaceColumn(de);if(_e>=1){let Le=!0;pe===""&&(Le=!1),Le&&(pe.charAt(pe.length-1)===" "||pe.charAt(pe.length-1)===" ")&&(Le=!1,pe=pe.replace(/[\s\uFEFF\xA0]+$/g," "));let Te=fe.substr(_e-1);pe+=(Le?" ":"")+Te,Le?me=Te.length+1:me=Te.length}else me=0}let be=new g.Range(se,ge,le,he);if(!be.isEmpty()){let de;Y.isEmpty()?(ue.push(p.EditOperation.replace(be,pe)),de=new t.Selection(be.startLineNumber-$,pe.length-me+1,se-$,pe.length-me+1)):Y.startLineNumber===Y.endLineNumber?(ue.push(p.EditOperation.replace(be,pe)),de=new t.Selection(Y.startLineNumber-$,Y.startColumn,Y.endLineNumber-$,Y.endColumn)):(ue.push(p.EditOperation.replace(be,pe)),de=new t.Selection(Y.startLineNumber-$,Y.startColumn,Y.startLineNumber-$,pe.length-ve)),g.Range.intersectRanges(be,Q)!==null?V=de:z.push(de)}$+=be.endLineNumber-be.startLineNumber}z.unshift(V),x.pushUndoStop(),x.executeEdits(this.id,ue,z),x.pushUndoStop()}}e.JoinLinesAction=W;class A extends D.EditorAction{constructor(){super({id:"editor.action.transpose",label:r.localize(22,null),alias:"Transpose characters around the cursor",precondition:i.EditorContextKeys.writable})}run(Z,x){let U=x.getSelections();if(U===null)return;let Q=x.getModel();if(Q===null)return;let ne=[];for(let ce=0,ee=U.length;ce<ee;ce++){let ue=U[ce];if(!ue.isEmpty())continue;let z=ue.getStartPosition(),V=Q.getLineMaxColumn(z.lineNumber);if(z.column>=V){if(z.lineNumber===Q.getLineCount())continue;let $=new g.Range(z.lineNumber,Math.max(1,z.column-1),z.lineNumber+1,1),K=Q.getValueInRange($).split("").reverse().join("");ne.push(new I.ReplaceCommand(new t.Selection(z.lineNumber,Math.max(1,z.column-1),z.lineNumber+1,1),K))}else{let $=new g.Range(z.lineNumber,Math.max(1,z.column-1),z.lineNumber,z.column+1),K=Q.getValueInRange($).split("").reverse().join("");ne.push(new I.ReplaceCommandThatPreservesSelection($,K,new t.Selection(z.lineNumber,z.column+1,z.lineNumber,z.column+1)))}}x.pushUndoStop(),x.executeCommands(this.id,ne),x.pushUndoStop()}}e.TransposeAction=A;class H extends D.EditorAction{run(Z,x){const U=x.getSelections();if(U===null)return;const Q=x.getModel();if(Q===null)return;const ne=x.getOption(117),ce=[];for(const ee of U)if(ee.isEmpty()){const ue=ee.getStartPosition(),z=x.getConfiguredWordAtPosition(ue);if(!z)continue;const V=new g.Range(ue.lineNumber,z.startColumn,ue.lineNumber,z.endColumn),$=Q.getValueInRange(V);ce.push(p.EditOperation.replace(V,this._modifyText($,ne)))}else{const ue=Q.getValueInRange(ee);ce.push(p.EditOperation.replace(ee,this._modifyText(ue,ne)))}x.pushUndoStop(),x.executeEdits(this.id,ce),x.pushUndoStop()}}e.AbstractCaseAction=H;class q extends H{constructor(){super({id:"editor.action.transformToUppercase",label:r.localize(23,null),alias:"Transform to Uppercase",precondition:i.EditorContextKeys.writable})}_modifyText(Z,x){return Z.toLocaleUpperCase()}}e.UpperCaseAction=q;class X extends H{constructor(){super({id:"editor.action.transformToLowercase",label:r.localize(24,null),alias:"Transform to Lowercase",precondition:i.EditorContextKeys.writable})}_modifyText(Z,x){return Z.toLocaleLowerCase()}}e.LowerCaseAction=X;class G{constructor(Z,x){this._pattern=Z,this._flags=x,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 re extends H{constructor(){super({id:"editor.action.transformToTitlecase",label:r.localize(25,null),alias:"Transform to Title Case",precondition:i.EditorContextKeys.writable})}_modifyText(Z,x){const U=re.titleBoundary.get();return U?Z.toLocaleLowerCase().replace(U,Q=>Q.toLocaleUpperCase()):Z}}e.TitleCaseAction=re,re.titleBoundary=new G("(^|[^\\p{L}\\p{N}']|((^|\\P{L})'))\\p{L}","gmu");class ae extends H{constructor(){super({id:"editor.action.transformToSnakecase",label:r.localize(26,null),alias:"Transform to Snake Case",precondition:i.EditorContextKeys.writable})}_modifyText(Z,x){const U=ae.caseBoundary.get(),Q=ae.singleLetters.get();return!U||!Q?Z:Z.replace(U,"$1_$2").replace(Q,"$1_$2$3").toLocaleLowerCase()}}e.SnakeCaseAction=ae,ae.caseBoundary=new G("(\\p{Ll})(\\p{Lu})","gmu"),ae.singleLetters=new G("(\\p{Lu}|\\p{N})(\\p{Lu})(\\p{Ll})","gmu"),(0,D.registerEditorAction)(a),(0,D.registerEditorAction)(d),(0,D.registerEditorAction)(u),(0,D.registerEditorAction)(S),(0,D.registerEditorAction)(v),(0,D.registerEditorAction)(_),(0,D.registerEditorAction)(L),(0,D.registerEditorAction)(E),(0,D.registerEditorAction)(N),(0,D.registerEditorAction)(k),(0,D.registerEditorAction)(M),(0,D.registerEditorAction)(O),(0,D.registerEditorAction)(B),(0,D.registerEditorAction)(T),(0,D.registerEditorAction)(P),(0,D.registerEditorAction)(F),(0,D.registerEditorAction)(W),(0,D.registerEditorAction)(A),(0,D.registerEditorAction)(q),(0,D.registerEditorAction)(X),ae.caseBoundary.isSupported()&&ae.singleLetters.isSupported()&&(0,D.registerEditorAction)(ae),re.titleBoundary.isSupported()&&(0,D.registerEditorAction)(re)}),define(te[722],ie([1,0,19,10,21,29,13,4,2,8,25,15,28,11,3,24,33,18,32,554,16,23,14]),function(j,e,y,m,D,I,w,b,p,h,g,t,i,n,l,c,r,s,o,a,d,u,f){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.editorLinkedEditingBackground=e.LinkedEditingAction=e.LinkedEditingContribution=e.CONTEXT_ONTYPE_RENAME_INPUT_VISIBLE=void 0,e.CONTEXT_ONTYPE_RENAME_INPUT_VISIBLE=new d.RawContextKey("LinkedEditingInputVisible",!1);const S="linked-editing-decoration";let v=class ei extends p.Disposable{constructor(N,k,M){super();this.languageConfigurationService=M,this._debounceDuration=200,this._localToDispose=this._register(new p.DisposableStore),this._editor=N,this._enabled=!1,this._visibleContextKey=e.CONTEXT_ONTYPE_RENAME_INPUT_VISIBLE.bindTo(k),this._currentDecorations=[],this._languageWordPattern=null,this._currentWordPattern=null,this._ignoreChangeEvent=!1,this._localToDispose=this._register(new p.DisposableStore),this._rangeUpdateTriggerPromise=null,this._rangeSyncTriggerPromise=null,this._currentRequest=null,this._currentRequestPosition=null,this._currentRequestModelVersion=null,this._register(this._editor.onDidChangeModel(()=>this.reinitialize(!0))),this._register(this._editor.onDidChangeConfiguration(O=>{(O.hasChanged(62)||O.hasChanged(82))&&this.reinitialize(!1)})),this._register(s.LinkedEditingRangeProviderRegistry.onDidChange(()=>this.reinitialize(!1))),this._register(this._editor.onDidChangeModelLanguage(()=>this.reinitialize(!0))),this.reinitialize(!0)}static get(N){return N.getContribution(ei.ID)}reinitialize(N){const k=this._editor.getModel(),M=k!==null&&(this._editor.getOption(62)||this._editor.getOption(82))&&s.LinkedEditingRangeProviderRegistry.has(k);if(M===this._enabled&&!N||(this._enabled=M,this.clearRanges(),this._localToDispose.clear(),!M||k===null))return;this._localToDispose.add(b.Event.runAndSubscribe(k.onDidChangeLanguageConfiguration,()=>{this._languageWordPattern=this.languageConfigurationService.getLanguageConfiguration(k.getLanguageId()).getWordDefinition()}));const O=new m.Delayer(this._debounceDuration),B=()=>{this._rangeUpdateTriggerPromise=O.trigger(()=>this.updateRanges(),this._debounceDuration)},T=new m.Delayer(0),R=P=>{this._rangeSyncTriggerPromise=T.trigger(()=>this._syncRanges(P))};this._localToDispose.add(this._editor.onDidChangeCursorPosition(()=>{B()})),this._localToDispose.add(this._editor.onDidChangeModelContent(P=>{if(!this._ignoreChangeEvent&&this._currentDecorations.length>0){const F=k.getDecorationRange(this._currentDecorations[0]);if(F&&P.changes.every(W=>F.intersectRanges(W.range))){R(this._currentDecorations);return}}B()})),this._localToDispose.add({dispose:()=>{O.cancel(),T.cancel()}}),this.updateRanges()}_syncRanges(N){if(!this._editor.hasModel()||N!==this._currentDecorations||N.length===0)return;const k=this._editor.getModel(),M=k.getDecorationRange(N[0]);if(!M||M.startLineNumber!==M.endLineNumber)return this.clearRanges();const O=k.getValueInRange(M);if(this._currentWordPattern){const T=O.match(this._currentWordPattern);if((T?T[0].length:0)!==O.length)return this.clearRanges()}let B=[];for(let T=1,R=N.length;T<R;T++){const P=k.getDecorationRange(N[T]);if(!!P)if(P.startLineNumber!==P.endLineNumber)B.push({range:P,text:O});else{let F=k.getValueInRange(P),W=O,A=P.startColumn,H=P.endColumn;const q=h.commonPrefixLength(F,W);A+=q,F=F.substr(q),W=W.substr(q);const X=h.commonSuffixLength(F,W);H-=X,F=F.substr(0,F.length-X),W=W.substr(0,W.length-X),(A!==H||W.length!==0)&&B.push({range:new l.Range(P.startLineNumber,A,P.endLineNumber,H),text:W})}}if(B.length!==0)try{this._editor.popUndoStop(),this._ignoreChangeEvent=!0;const T=this._editor._getViewModel().getPrevEditOperationType();this._editor.executeEdits("linkedEditing",B),this._editor._getViewModel().setPrevEditOperationType(T)}finally{this._ignoreChangeEvent=!1}}dispose(){this.clearRanges(),super.dispose()}clearRanges(){this._visibleContextKey.set(!1),this._currentDecorations=this._editor.deltaDecorations(this._currentDecorations,[]),this._currentRequest&&(this._currentRequest.cancel(),this._currentRequest=null,this._currentRequestPosition=null)}updateRanges(N=!1){return ye(this,void 0,void 0,function*(){if(!this._editor.hasModel()){this.clearRanges();return}const k=this._editor.getPosition();if(!this._enabled&&!N||this._editor.getSelections().length>1){this.clearRanges();return}const M=this._editor.getModel(),O=M.getVersionId();if(this._currentRequestPosition&&this._currentRequestModelVersion===O){if(k.equals(this._currentRequestPosition))return;if(this._currentDecorations&&this._currentDecorations.length>0){const T=M.getDecorationRange(this._currentDecorations[0]);if(T&&T.containsPosition(k))return}}this._currentRequestPosition=k,this._currentRequestModelVersion=O;const B=(0,m.createCancelablePromise)(T=>ye(this,void 0,void 0,function*(){try{const R=yield L(M,k,T);if(B!==this._currentRequest||(this._currentRequest=null,O!==M.getVersionId()))return;let P=[];(R==null?void 0:R.ranges)&&(P=R.ranges),this._currentWordPattern=(R==null?void 0:R.wordPattern)||this._languageWordPattern;let F=!1;for(let A=0,H=P.length;A<H;A++)if(l.Range.containsPosition(P[A],k)){if(F=!0,A!==0){const q=P[A];P.splice(A,1),P.unshift(q)}break}if(!F){this.clearRanges();return}const W=P.map(A=>({range:A,options:ei.DECORATION}));this._visibleContextKey.set(!0),this._currentDecorations=this._editor.deltaDecorations(this._currentDecorations,W)}catch(R){(0,w.isCancellationError)(R)||(0,w.onUnexpectedError)(R),(this._currentRequest===B||!this._currentRequest)&&this.clearRanges()}}));return this._currentRequest=B,B})}};v.ID="editor.contrib.linkedEditing",v.DECORATION=r.ModelDecorationOptions.register({description:"linked-editing",stickiness:0,className:S}),v=Ie([Ce(1,d.IContextKeyService),Ce(2,o.ILanguageConfigurationService)],v),e.LinkedEditingContribution=v;class C extends t.EditorAction{constructor(){super({id:"editor.action.linkedEditing",label:a.localize(0,null),alias:"Start Linked Editing",precondition:d.ContextKeyExpr.and(c.EditorContextKeys.writable,c.EditorContextKeys.hasRenameProvider),kbOpts:{kbExpr:c.EditorContextKeys.editorTextFocus,primary:2048|1024|60,weight:100}})}runCommand(N,k){const M=N.get(i.ICodeEditorService),[O,B]=Array.isArray(k)&&k||[void 0,void 0];return g.URI.isUri(O)&&n.Position.isIPosition(B)?M.openCodeEditor({resource:O},M.getActiveCodeEditor()).then(T=>{!T||(T.setPosition(B),T.invokeWithinContext(R=>(this.reportTelemetry(R,T),this.run(R,T))))},w.onUnexpectedError):super.runCommand(N,k)}run(N,k){const M=v.get(k);return M?Promise.resolve(M.updateRanges(!0)):Promise.resolve()}}e.LinkedEditingAction=C;const _=t.EditorCommand.bindToContribution(v.get);(0,t.registerEditorCommand)(new _({id:"cancelLinkedEditingInput",precondition:e.CONTEXT_ONTYPE_RENAME_INPUT_VISIBLE,handler:E=>E.clearRanges(),kbOpts:{kbExpr:c.EditorContextKeys.editorTextFocus,weight:100+99,primary:9,secondary:[1024|9]}}));function L(E,N,k){const M=s.LinkedEditingRangeProviderRegistry.ordered(E);return(0,m.first)(M.map(O=>()=>ye(this,void 0,void 0,function*(){try{return yield O.provideLinkedEditingRanges(E,N,k)}catch(B){(0,w.onUnexpectedExternalError)(B);return}})),O=>!!O&&y.isNonEmptyArray(O==null?void 0:O.ranges))}e.editorLinkedEditingBackground=(0,u.registerColor)("editor.linkedEditingBackground",{dark:I.Color.fromHex("#f00").transparent(.3),light:I.Color.fromHex("#f00").transparent(.3),hc:I.Color.fromHex("#f00").transparent(.3)},a.localize(1,null)),(0,f.registerThemingParticipant)((E,N)=>{const k=E.getColor(e.editorLinkedEditingBackground);k&&N.addRule(`.monaco-editor .${S} { background: ${k}; border-left-color: ${k}; }`)}),(0,t.registerModelAndPositionCommand)("_executeLinkedEditingProvider",(E,N)=>L(E,N,D.CancellationToken.None)),(0,t.registerEditorContribution)(v.ID,v),(0,t.registerEditorAction)(C)}),define(te[723],ie([1,0,10,21,13,66,2,48,17,41,25,15,33,18,186,598,555,38,51,23,14,380]),function(j,e,y,m,D,I,w,b,p,h,g,t,i,n,l,c,r,s,o,a,d){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.LinkDetector=void 0;function u(_,L){const E=_.url&&/^command:/i.test(_.url.toString()),N=_.tooltip?_.tooltip:E?r.localize(0,null):r.localize(1,null),k=L?p.isMacintosh?r.localize(2,null):r.localize(3,null):p.isMacintosh?r.localize(4,null):r.localize(5,null);if(_.url){let M="";if(/^command:/i.test(_.url.toString())){const B=_.url.toString().match(/^command:([^?#]+)/);if(B){const T=B[1];M=` "${r.localize(6,null,T)}"`}}return new I.MarkdownString("",!0).appendMarkdown(`[${N}](${_.url.toString(!0).replace(/ /g,"%20")}${M}) (${k})`)}else return new I.MarkdownString().appendText(`${N} (${k})`)}const f={general:i.ModelDecorationOptions.register({description:"detected-link",stickiness:1,collapseOnReplaceEdit:!0,inlineClassName:"detected-link"}),active:i.ModelDecorationOptions.register({description:"detected-link-active",stickiness:1,collapseOnReplaceEdit:!0,inlineClassName:"detected-link-active"})};class S{constructor(L,E){this.link=L,this.decorationId=E}static decoration(L,E){return{range:L.range,options:S._getOptions(L,E,!1)}}static _getOptions(L,E,N){const k=Object.assign({},N?f.active:f.general);return k.hoverMessage=u(L,E),k}activate(L,E){L.changeDecorationOptions(this.decorationId,S._getOptions(this.link,E,!0))}deactivate(L,E){L.changeDecorationOptions(this.decorationId,S._getOptions(this.link,E,!1))}}let v=class ti{constructor(L,E,N){this.listenersToRemove=new w.DisposableStore,this.editor=L,this.openerService=E,this.notificationService=N;let k=new l.ClickLinkGesture(L);this.listenersToRemove.add(k),this.listenersToRemove.add(k.onMouseMoveOrRelevantKeyDown(([M,O])=>{this._onEditorMouseMove(M,O)})),this.listenersToRemove.add(k.onExecute(M=>{this.onEditorMouseUp(M)})),this.listenersToRemove.add(k.onCancel(M=>{this.cleanUpActiveLinkDecoration()})),this.enabled=L.getOption(63),this.listenersToRemove.add(L.onDidChangeConfiguration(M=>{const O=L.getOption(63);this.enabled!==O&&(this.enabled=O,this.updateDecorations([]),this.stop(),this.beginCompute())})),this.listenersToRemove.add(L.onDidChangeModelContent(M=>this.onChange())),this.listenersToRemove.add(L.onDidChangeModel(M=>this.onModelChanged())),this.listenersToRemove.add(L.onDidChangeModelLanguage(M=>this.onModelLanguageChanged())),this.listenersToRemove.add(n.LinkProviderRegistry.onDidChange(M=>this.onModelLanguageChanged())),this.timeout=new y.TimeoutTimer,this.computePromise=null,this.activeLinksList=null,this.currentOccurrences={},this.activeLinkDecorationId=null,this.beginCompute()}static get(L){return L.getContribution(ti.ID)}onModelChanged(){this.currentOccurrences={},this.activeLinkDecorationId=null,this.stop(),this.beginCompute()}onModelLanguageChanged(){this.stop(),this.beginCompute()}onChange(){this.timeout.setIfNotSet(()=>this.beginCompute(),ti.RECOMPUTE_TIME)}beginCompute(){return ye(this,void 0,void 0,function*(){if(!this.editor.hasModel()||!this.enabled)return;const L=this.editor.getModel();if(!!n.LinkProviderRegistry.has(L)){this.activeLinksList&&(this.activeLinksList.dispose(),this.activeLinksList=null),this.computePromise=y.createCancelablePromise(E=>(0,c.getLinks)(L,E));try{this.activeLinksList=yield this.computePromise,this.updateDecorations(this.activeLinksList.links)}catch(E){(0,D.onUnexpectedError)(E)}finally{this.computePromise=null}}})}updateDecorations(L){const E=this.editor.getOption(70)==="altKey";let N=[],k=Object.keys(this.currentOccurrences);for(let B=0,T=k.length;B<T;B++){let R=k[B],P=this.currentOccurrences[R];N.push(P.decorationId)}let M=[];if(L)for(const B of L)M.push(S.decoration(B,E));let O=this.editor.deltaDecorations(N,M);this.currentOccurrences={},this.activeLinkDecorationId=null;for(let B=0,T=O.length;B<T;B++){let R=new S(L[B],O[B]);this.currentOccurrences[R.decorationId]=R}}_onEditorMouseMove(L,E){const N=this.editor.getOption(70)==="altKey";if(this.isEnabled(L,E)){this.cleanUpActiveLinkDecoration();const k=this.getLinkOccurrence(L.target.position);k&&this.editor.changeDecorations(M=>{k.activate(M,N),this.activeLinkDecorationId=k.decorationId})}else this.cleanUpActiveLinkDecoration()}cleanUpActiveLinkDecoration(){const L=this.editor.getOption(70)==="altKey";if(this.activeLinkDecorationId){const E=this.currentOccurrences[this.activeLinkDecorationId];E&&this.editor.changeDecorations(N=>{E.deactivate(N,L)}),this.activeLinkDecorationId=null}}onEditorMouseUp(L){if(!this.isEnabled(L))return;const E=this.getLinkOccurrence(L.target.position);!E||this.openLinkOccurrence(E,L.hasSideBySideModifier,!0)}openLinkOccurrence(L,E,N=!1){if(!this.openerService)return;const{link:k}=L;k.resolve(m.CancellationToken.None).then(M=>{if(typeof M=="string"&&this.editor.hasModel()){const O=this.editor.getModel().uri;if(O.scheme===b.Schemas.file&&M.startsWith(`${b.Schemas.file}:`)){const B=g.URI.parse(M);if(B.scheme===b.Schemas.file){const T=h.originalFSPath(B);let R=null;T.startsWith("/./")?R=`.${T.substr(1)}`:T.startsWith("//./")&&(R=`.${T.substr(2)}`),R&&(M=h.joinPath(O,R))}}}return this.openerService.open(M,{openToSide:E,fromUserGesture:N,allowContributedOpeners:!0,allowCommands:!0})},M=>{const O=M instanceof Error?M.message:M;O==="invalid"?this.notificationService.warn(r.localize(7,null,k.url.toString())):O==="missing"?this.notificationService.warn(r.localize(8,null)):(0,D.onUnexpectedError)(M)})}getLinkOccurrence(L){if(!this.editor.hasModel()||!L)return null;const E=this.editor.getModel().getDecorationsInRange({startLineNumber:L.lineNumber,startColumn:L.column,endLineNumber:L.lineNumber,endColumn:L.column},0,!0);for(const N of E){const k=this.currentOccurrences[N.id];if(k)return k}return null}isEnabled(L,E){return Boolean(L.target.type===6&&(L.hasTriggerModifier||E&&E.keyCodeIsTriggerKey))}stop(){var L;this.timeout.cancel(),this.activeLinksList&&((L=this.activeLinksList)===null||L===void 0||L.dispose(),this.activeLinksList=null),this.computePromise&&(this.computePromise.cancel(),this.computePromise=null)}dispose(){this.listenersToRemove.dispose(),this.stop(),this.timeout.dispose()}};v.ID="editor.linkDetector",v.RECOMPUTE_TIME=1e3,v=Ie([Ce(1,o.IOpenerService),Ce(2,s.INotificationService)],v),e.LinkDetector=v;class C extends t.EditorAction{constructor(){super({id:"editor.action.openLink",label:r.localize(9,null),alias:"Open Link",precondition:void 0})}run(L,E){const N=v.get(E);if(!N||!E.hasModel())return;let k=E.getSelections();for(let M of k){let O=N.getLinkOccurrence(M.getEndPosition());O&&N.openLinkOccurrence(O,!1)}}}(0,t.registerEditorContribution)(v.ID,v),(0,t.registerEditorAction)(C),(0,d.registerThemingParticipant)((_,L)=>{const E=_.getColor(a.editorActiveLinkForeground);E&&L.addRule(`.monaco-editor .detected-link-active { color: ${E} !important; }`)})}),define(te[724],ie([1,0,43,10,55,2,15,206,3,22,24,49,33,18,294,557,37,16,23,14]),function(j,e,y,m,D,I,w,b,p,h,g,t,i,n,l,c,r,s,o,a){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SelectionHighlighter=e.CompatChangeAll=e.SelectHighlightsAction=e.MoveSelectionToPreviousFindMatchAction=e.MoveSelectionToNextFindMatchAction=e.AddSelectionToPreviousFindMatchAction=e.AddSelectionToNextFindMatchAction=e.MultiCursorSelectionControllerAction=e.MultiCursorSelectionController=e.MultiCursorSession=e.MultiCursorSessionResult=e.InsertCursorBelow=e.InsertCursorAbove=void 0;function d(H,q){const X=q.filter(G=>!H.find(re=>re.equals(G)));if(X.length>=1){const G=X.map(ae=>`line ${ae.viewState.position.lineNumber} column ${ae.viewState.position.column}`).join(", "),re=X.length===1?c.localize(0,null,G):c.localize(1,null,G);(0,y.status)(re)}}class u extends w.EditorAction{constructor(){super({id:"editor.action.insertCursorAbove",label:c.localize(2,null),alias:"Add Cursor Above",precondition:void 0,kbOpts:{kbExpr:g.EditorContextKeys.editorTextFocus,primary:2048|512|16,linux:{primary:1024|512|16,secondary:[2048|1024|16]},weight:100},menuOpts:{menuId:r.MenuId.MenubarSelectionMenu,group:"3_multi",title:c.localize(3,null),order:2}})}run(q,X,G){if(!X.hasModel())return;let re=!0;G&&G.logicalLine===!1&&(re=!1);const ae=X._getViewModel();if(ae.cursorConfig.readOnly)return;ae.pushStackElement();const oe=ae.getCursorStates();ae.setCursorStates(G.source,3,b.CursorMoveCommands.addCursorUp(ae,oe,re)),ae.revealTopMostCursor(G.source),d(oe,ae.getCursorStates())}}e.InsertCursorAbove=u;class f extends w.EditorAction{constructor(){super({id:"editor.action.insertCursorBelow",label:c.localize(4,null),alias:"Add Cursor Below",precondition:void 0,kbOpts:{kbExpr:g.EditorContextKeys.editorTextFocus,primary:2048|512|18,linux:{primary:1024|512|18,secondary:[2048|1024|18]},weight:100},menuOpts:{menuId:r.MenuId.MenubarSelectionMenu,group:"3_multi",title:c.localize(5,null),order:3}})}run(q,X,G){if(!X.hasModel())return;let re=!0;G&&G.logicalLine===!1&&(re=!1);const ae=X._getViewModel();if(ae.cursorConfig.readOnly)return;ae.pushStackElement();const oe=ae.getCursorStates();ae.setCursorStates(G.source,3,b.CursorMoveCommands.addCursorDown(ae,oe,re)),ae.revealBottomMostCursor(G.source),d(oe,ae.getCursorStates())}}e.InsertCursorBelow=f;class S extends w.EditorAction{constructor(){super({id:"editor.action.insertCursorAtEndOfEachLineSelected",label:c.localize(6,null),alias:"Add Cursors to Line Ends",precondition:void 0,kbOpts:{kbExpr:g.EditorContextKeys.editorTextFocus,primary:1024|512|39,weight:100},menuOpts:{menuId:r.MenuId.MenubarSelectionMenu,group:"3_multi",title:c.localize(7,null),order:4}})}getCursorsForSelection(q,X,G){if(!q.isEmpty()){for(let re=q.startLineNumber;re<q.endLineNumber;re++){let ae=X.getLineMaxColumn(re);G.push(new h.Selection(re,ae,re,ae))}q.endColumn>1&&G.push(new h.Selection(q.endLineNumber,q.endColumn,q.endLineNumber,q.endColumn))}}run(q,X){if(!X.hasModel())return;const G=X.getModel(),re=X.getSelections(),ae=X._getViewModel(),oe=ae.getCursorStates();let Z=[];re.forEach(x=>this.getCursorsForSelection(x,G,Z)),Z.length>0&&X.setSelections(Z),d(oe,ae.getCursorStates())}}class v extends w.EditorAction{constructor(){super({id:"editor.action.addCursorsToBottom",label:c.localize(8,null),alias:"Add Cursors To Bottom",precondition:void 0})}run(q,X){if(!X.hasModel())return;const G=X.getSelections(),re=X.getModel().getLineCount();let ae=[];for(let x=G[0].startLineNumber;x<=re;x++)ae.push(new h.Selection(x,G[0].startColumn,x,G[0].endColumn));const oe=X._getViewModel(),Z=oe.getCursorStates();ae.length>0&&X.setSelections(ae),d(Z,oe.getCursorStates())}}class C extends w.EditorAction{constructor(){super({id:"editor.action.addCursorsToTop",label:c.localize(9,null),alias:"Add Cursors To Top",precondition:void 0})}run(q,X){if(!X.hasModel())return;const G=X.getSelections();let re=[];for(let Z=G[0].startLineNumber;Z>=1;Z--)re.push(new h.Selection(Z,G[0].startColumn,Z,G[0].endColumn));const ae=X._getViewModel(),oe=ae.getCursorStates();re.length>0&&X.setSelections(re),d(oe,ae.getCursorStates())}}class _{constructor(q,X,G){this.selections=q,this.revealRange=X,this.revealScrollType=G}}e.MultiCursorSessionResult=_;class L{constructor(q,X,G,re,ae,oe,Z){this._editor=q,this.findController=X,this.isDisconnectedFromFindController=G,this.searchText=re,this.wholeWord=ae,this.matchCase=oe,this.currentMatch=Z}static create(q,X){if(!q.hasModel())return null;const G=X.getState();if(!q.hasTextFocus()&&G.isRevealed&&G.searchString.length>0)return new L(q,X,!1,G.searchString,G.wholeWord,G.matchCase,null);let re=!1,ae,oe;const Z=q.getSelections();Z.length===1&&Z[0].isEmpty()?(re=!0,ae=!0,oe=!0):(ae=G.wholeWord,oe=G.matchCase);const x=q.getSelection();let U,Q=null;if(x.isEmpty()){const ne=q.getConfiguredWordAtPosition(x.getStartPosition());if(!ne)return null;U=ne.word,Q=new h.Selection(x.startLineNumber,ne.startColumn,x.startLineNumber,ne.endColumn)}else U=q.getModel().getValueInRange(x).replace(/\r\n/g,`
|
||
`);return new L(q,X,re,U,ae,oe,Q)}addSelectionToNextFindMatch(){if(!this._editor.hasModel())return null;const q=this._getNextMatch();if(!q)return null;const X=this._editor.getSelections();return new _(X.concat(q),q,0)}moveSelectionToNextFindMatch(){if(!this._editor.hasModel())return null;const q=this._getNextMatch();if(!q)return null;const X=this._editor.getSelections();return new _(X.slice(0,X.length-1).concat(q),q,0)}_getNextMatch(){if(!this._editor.hasModel())return null;if(this.currentMatch){const re=this.currentMatch;return this.currentMatch=null,re}this.findController.highlightFindOptions();const q=this._editor.getSelections(),X=q[q.length-1],G=this._editor.getModel().findNextMatch(this.searchText,X.getEndPosition(),!1,this.matchCase,this.wholeWord?this._editor.getOption(117):null,!1);return G?new h.Selection(G.range.startLineNumber,G.range.startColumn,G.range.endLineNumber,G.range.endColumn):null}addSelectionToPreviousFindMatch(){if(!this._editor.hasModel())return null;const q=this._getPreviousMatch();if(!q)return null;const X=this._editor.getSelections();return new _(X.concat(q),q,0)}moveSelectionToPreviousFindMatch(){if(!this._editor.hasModel())return null;const q=this._getPreviousMatch();if(!q)return null;const X=this._editor.getSelections();return new _(X.slice(0,X.length-1).concat(q),q,0)}_getPreviousMatch(){if(!this._editor.hasModel())return null;if(this.currentMatch){const re=this.currentMatch;return this.currentMatch=null,re}this.findController.highlightFindOptions();const q=this._editor.getSelections(),X=q[q.length-1],G=this._editor.getModel().findPreviousMatch(this.searchText,X.getStartPosition(),!1,this.matchCase,this.wholeWord?this._editor.getOption(117):null,!1);return G?new h.Selection(G.range.startLineNumber,G.range.startColumn,G.range.endLineNumber,G.range.endColumn):null}selectAll(){return this._editor.hasModel()?(this.findController.highlightFindOptions(),this._editor.getModel().findMatches(this.searchText,!0,!1,this.matchCase,this.wholeWord?this._editor.getOption(117):null,!1,1073741824)):[]}}e.MultiCursorSession=L;class E extends I.Disposable{constructor(q){super();this._sessionDispose=this._register(new I.DisposableStore),this._editor=q,this._ignoreSelectionChange=!1,this._session=null}static get(q){return q.getContribution(E.ID)}dispose(){this._endSession(),super.dispose()}_beginSessionIfNeeded(q){if(!this._session){const X=L.create(this._editor,q);if(!X)return;this._session=X;const G={searchString:this._session.searchText};this._session.isDisconnectedFromFindController&&(G.wholeWordOverride=1,G.matchCaseOverride=1,G.isRegexOverride=2),q.getState().change(G,!1),this._sessionDispose.add(this._editor.onDidChangeCursorSelection(re=>{this._ignoreSelectionChange||this._endSession()})),this._sessionDispose.add(this._editor.onDidBlurEditorText(()=>{this._endSession()})),this._sessionDispose.add(q.getState().onFindReplaceStateChange(re=>{(re.matchCase||re.wholeWord)&&this._endSession()}))}}_endSession(){if(this._sessionDispose.clear(),this._session&&this._session.isDisconnectedFromFindController){const q={wholeWordOverride:0,matchCaseOverride:0,isRegexOverride:0};this._session.findController.getState().change(q,!1)}this._session=null}_setSelections(q){this._ignoreSelectionChange=!0,this._editor.setSelections(q),this._ignoreSelectionChange=!1}_expandEmptyToWord(q,X){if(!X.isEmpty())return X;const G=this._editor.getConfiguredWordAtPosition(X.getStartPosition());return G?new h.Selection(X.startLineNumber,G.startColumn,X.startLineNumber,G.endColumn):X}_applySessionResult(q){!q||(this._setSelections(q.selections),q.revealRange&&this._editor.revealRangeInCenterIfOutsideViewport(q.revealRange,q.revealScrollType))}getSession(q){return this._session}addSelectionToNextFindMatch(q){if(!!this._editor.hasModel()){if(!this._session){const X=this._editor.getSelections();if(X.length>1){const re=q.getState().matchCase;if(!W(this._editor.getModel(),X,re)){const oe=this._editor.getModel();let Z=[];for(let x=0,U=X.length;x<U;x++)Z[x]=this._expandEmptyToWord(oe,X[x]);this._editor.setSelections(Z);return}}}this._beginSessionIfNeeded(q),this._session&&this._applySessionResult(this._session.addSelectionToNextFindMatch())}}addSelectionToPreviousFindMatch(q){this._beginSessionIfNeeded(q),this._session&&this._applySessionResult(this._session.addSelectionToPreviousFindMatch())}moveSelectionToNextFindMatch(q){this._beginSessionIfNeeded(q),this._session&&this._applySessionResult(this._session.moveSelectionToNextFindMatch())}moveSelectionToPreviousFindMatch(q){this._beginSessionIfNeeded(q),this._session&&this._applySessionResult(this._session.moveSelectionToPreviousFindMatch())}selectAll(q){if(!this._editor.hasModel())return;let X=null;const G=q.getState();if(G.isRevealed&&G.searchString.length>0&&G.isRegex)X=this._editor.getModel().findMatches(G.searchString,!0,G.isRegex,G.matchCase,G.wholeWord?this._editor.getOption(117):null,!1,1073741824);else{if(this._beginSessionIfNeeded(q),!this._session)return;X=this._session.selectAll()}if(G.searchScope){const re=G.searchScope;let ae=[];X.forEach(oe=>{re.forEach(Z=>{oe.range.endLineNumber<=Z.endLineNumber&&oe.range.startLineNumber>=Z.startLineNumber&&ae.push(oe)})}),X=ae}if(X.length>0){const re=this._editor.getSelection();for(let ae=0,oe=X.length;ae<oe;ae++){const Z=X[ae];if(Z.range.intersectRanges(re)){X[ae]=X[0],X[0]=Z;break}}this._setSelections(X.map(ae=>new h.Selection(ae.range.startLineNumber,ae.range.startColumn,ae.range.endLineNumber,ae.range.endColumn)))}}}e.MultiCursorSelectionController=E,E.ID="editor.contrib.multiCursorController";class N extends w.EditorAction{run(q,X){const G=E.get(X);if(!G)return;const re=l.CommonFindController.get(X);if(!re)return;const ae=X._getViewModel();if(ae){const oe=ae.getCursorStates();this._run(G,re),d(oe,ae.getCursorStates())}}}e.MultiCursorSelectionControllerAction=N;class k extends N{constructor(){super({id:"editor.action.addSelectionToNextFindMatch",label:c.localize(10,null),alias:"Add Selection To Next Find Match",precondition:void 0,kbOpts:{kbExpr:g.EditorContextKeys.focus,primary:2048|34,weight:100},menuOpts:{menuId:r.MenuId.MenubarSelectionMenu,group:"3_multi",title:c.localize(11,null),order:5}})}_run(q,X){q.addSelectionToNextFindMatch(X)}}e.AddSelectionToNextFindMatchAction=k;class M extends N{constructor(){super({id:"editor.action.addSelectionToPreviousFindMatch",label:c.localize(12,null),alias:"Add Selection To Previous Find Match",precondition:void 0,menuOpts:{menuId:r.MenuId.MenubarSelectionMenu,group:"3_multi",title:c.localize(13,null),order:6}})}_run(q,X){q.addSelectionToPreviousFindMatch(X)}}e.AddSelectionToPreviousFindMatchAction=M;class O extends N{constructor(){super({id:"editor.action.moveSelectionToNextFindMatch",label:c.localize(14,null),alias:"Move Last Selection To Next Find Match",precondition:void 0,kbOpts:{kbExpr:g.EditorContextKeys.focus,primary:(0,D.KeyChord)(2048|41,2048|34),weight:100}})}_run(q,X){q.moveSelectionToNextFindMatch(X)}}e.MoveSelectionToNextFindMatchAction=O;class B extends N{constructor(){super({id:"editor.action.moveSelectionToPreviousFindMatch",label:c.localize(15,null),alias:"Move Last Selection To Previous Find Match",precondition:void 0})}_run(q,X){q.moveSelectionToPreviousFindMatch(X)}}e.MoveSelectionToPreviousFindMatchAction=B;class T extends N{constructor(){super({id:"editor.action.selectHighlights",label:c.localize(16,null),alias:"Select All Occurrences of Find Match",precondition:void 0,kbOpts:{kbExpr:g.EditorContextKeys.focus,primary:2048|1024|42,weight:100},menuOpts:{menuId:r.MenuId.MenubarSelectionMenu,group:"3_multi",title:c.localize(17,null),order:7}})}_run(q,X){q.selectAll(X)}}e.SelectHighlightsAction=T;class R extends N{constructor(){super({id:"editor.action.changeAll",label:c.localize(18,null),alias:"Change All Occurrences",precondition:s.ContextKeyExpr.and(g.EditorContextKeys.writable,g.EditorContextKeys.editorTextFocus),kbOpts:{kbExpr:g.EditorContextKeys.editorTextFocus,primary:2048|60,weight:100},contextMenuOpts:{group:"1_modification",order:1.2}})}_run(q,X){q.selectAll(X)}}e.CompatChangeAll=R;class P{constructor(q,X,G,re,ae){this._model=q,this._searchText=X,this._matchCase=G,this._wordSeparators=re,this._modelVersionId=this._model.getVersionId(),this._cachedFindMatches=null,ae&&this._model===ae._model&&this._searchText===ae._searchText&&this._matchCase===ae._matchCase&&this._wordSeparators===ae._wordSeparators&&this._modelVersionId===ae._modelVersionId&&(this._cachedFindMatches=ae._cachedFindMatches)}findMatches(){return this._cachedFindMatches===null&&(this._cachedFindMatches=this._model.findMatches(this._searchText,!0,!1,this._matchCase,this._wordSeparators,!1).map(q=>q.range),this._cachedFindMatches.sort(p.Range.compareRangesUsingStarts)),this._cachedFindMatches}}class F extends I.Disposable{constructor(q){super();this.editor=q,this._isEnabled=q.getOption(97),this.decorations=[],this.updateSoon=this._register(new m.RunOnceScheduler(()=>this._update(),300)),this.state=null,this._register(q.onDidChangeConfiguration(G=>{this._isEnabled=q.getOption(97)})),this._register(q.onDidChangeCursorSelection(G=>{!this._isEnabled||(G.selection.isEmpty()?G.reason===3?(this.state&&this._setState(null),this.updateSoon.schedule()):this._setState(null):this._update())})),this._register(q.onDidChangeModel(G=>{this._setState(null)})),this._register(q.onDidChangeModelContent(G=>{this._isEnabled&&this.updateSoon.schedule()}));const X=l.CommonFindController.get(q);X&&this._register(X.getState().onFindReplaceStateChange(G=>{this._update()}))}_update(){this._setState(F._createState(this.state,this._isEnabled,this.editor))}static _createState(q,X,G){if(!X||!G.hasModel())return null;const re=G.getSelection();if(re.startLineNumber!==re.endLineNumber)return null;const ae=E.get(G);if(!ae)return null;const oe=l.CommonFindController.get(G);if(!oe)return null;let Z=ae.getSession(oe);if(!Z){const Q=G.getSelections();if(Q.length>1){const ce=oe.getState().matchCase;if(!W(G.getModel(),Q,ce))return null}Z=L.create(G,oe)}if(!Z||Z.currentMatch||/^[ \t]+$/.test(Z.searchText)||Z.searchText.length>200)return null;const x=oe.getState(),U=x.matchCase;if(x.isRevealed){let Q=x.searchString;U||(Q=Q.toLowerCase());let ne=Z.searchText;if(U||(ne=ne.toLowerCase()),Q===ne&&Z.matchCase===x.matchCase&&Z.wholeWord===x.wholeWord&&!x.isRegex)return null}return new P(G.getModel(),Z.searchText,Z.matchCase,Z.wholeWord?G.getOption(117):null,q)}_setState(q){if(this.state=q,!this.state){this.decorations=this.editor.deltaDecorations(this.decorations,[]);return}if(!this.editor.hasModel())return;const X=this.editor.getModel();if(X.isTooLargeForTokenization())return;const G=this.state.findMatches(),re=this.editor.getSelections();re.sort(p.Range.compareRangesUsingStarts);const ae=[];for(let x=0,U=0,Q=G.length,ne=re.length;x<Q;){const ce=G[x];if(U>=ne)ae.push(ce),x++;else{const ee=p.Range.compareRangesUsingStarts(ce,re[U]);ee<0?((re[U].isEmpty()||!p.Range.areIntersecting(ce,re[U]))&&ae.push(ce),x++):(ee>0||x++,U++)}}const oe=n.DocumentHighlightProviderRegistry.has(X)&&this.editor.getOption(72),Z=ae.map(x=>({range:x,options:oe?F._SELECTION_HIGHLIGHT:F._SELECTION_HIGHLIGHT_OVERVIEW}));this.decorations=this.editor.deltaDecorations(this.decorations,Z)}dispose(){this._setState(null),super.dispose()}}e.SelectionHighlighter=F,F.ID="editor.contrib.selectionHighlighter",F._SELECTION_HIGHLIGHT_OVERVIEW=i.ModelDecorationOptions.register({description:"selection-highlight-overview",stickiness:1,className:"selectionHighlight",minimap:{color:(0,a.themeColorFromId)(o.minimapSelectionOccurrenceHighlight),position:t.MinimapPosition.Inline},overviewRuler:{color:(0,a.themeColorFromId)(o.overviewRulerSelectionHighlightForeground),position:t.OverviewRulerLane.Center}}),F._SELECTION_HIGHLIGHT=i.ModelDecorationOptions.register({description:"selection-highlight",stickiness:1,className:"selectionHighlight"});function W(H,q,X){const G=A(H,q[0],!X);for(let re=1,ae=q.length;re<ae;re++){const oe=q[re];if(oe.isEmpty())return!1;const Z=A(H,oe,!X);if(G!==Z)return!1}return!0}function A(H,q,X){const G=H.getValueInRange(q);return X?G.toLowerCase():G}(0,w.registerEditorContribution)(E.ID,E),(0,w.registerEditorContribution)(F.ID,F),(0,w.registerEditorAction)(u),(0,w.registerEditorAction)(f),(0,w.registerEditorAction)(S),(0,w.registerEditorAction)(k),(0,w.registerEditorAction)(M),(0,w.registerEditorAction)(O),(0,w.registerEditorAction)(B),(0,w.registerEditorAction)(T),(0,w.registerEditorAction)(R),(0,w.registerEditorAction)(v),(0,w.registerEditorAction)(C)}),define(te[725],ie([1,0,7,115,10,13,4,2,111,8,162,685,570,16,9,80,23,131,14,261,107,277,695,140,386,283]),function(j,e,y,m,D,I,w,b,p,h,g,t,i,n,l,c,r,s,o,a,d,u,f){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SuggestContentWidget=e.SuggestWidget=e.editorSuggestWidgetStatusForeground=e.editorSuggestWidgetHighlightFocusForeground=e.editorSuggestWidgetHighlightForeground=e.editorSuggestWidgetSelectedBackground=e.editorSuggestWidgetSelectedIconForeground=e.editorSuggestWidgetSelectedForeground=e.editorSuggestWidgetForeground=e.editorSuggestWidgetBorder=e.editorSuggestWidgetBackground=void 0,e.editorSuggestWidgetBackground=(0,r.registerColor)("editorSuggestWidget.background",{dark:r.editorWidgetBackground,light:r.editorWidgetBackground,hc:r.editorWidgetBackground},i.localize(0,null)),e.editorSuggestWidgetBorder=(0,r.registerColor)("editorSuggestWidget.border",{dark:r.editorWidgetBorder,light:r.editorWidgetBorder,hc:r.editorWidgetBorder},i.localize(1,null)),e.editorSuggestWidgetForeground=(0,r.registerColor)("editorSuggestWidget.foreground",{dark:r.editorForeground,light:r.editorForeground,hc:r.editorForeground},i.localize(2,null)),e.editorSuggestWidgetSelectedForeground=(0,r.registerColor)("editorSuggestWidget.selectedForeground",{dark:r.quickInputListFocusForeground,light:r.quickInputListFocusForeground,hc:r.quickInputListFocusForeground},i.localize(3,null)),e.editorSuggestWidgetSelectedIconForeground=(0,r.registerColor)("editorSuggestWidget.selectedIconForeground",{dark:r.quickInputListFocusIconForeground,light:r.quickInputListFocusIconForeground,hc:r.quickInputListFocusIconForeground},i.localize(4,null)),e.editorSuggestWidgetSelectedBackground=(0,r.registerColor)("editorSuggestWidget.selectedBackground",{dark:r.quickInputListFocusBackground,light:r.quickInputListFocusBackground,hc:r.quickInputListFocusBackground},i.localize(5,null)),e.editorSuggestWidgetHighlightForeground=(0,r.registerColor)("editorSuggestWidget.highlightForeground",{dark:r.listHighlightForeground,light:r.listHighlightForeground,hc:r.listHighlightForeground},i.localize(6,null)),e.editorSuggestWidgetHighlightFocusForeground=(0,r.registerColor)("editorSuggestWidget.focusHighlightForeground",{dark:r.listFocusHighlightForeground,light:r.listFocusHighlightForeground,hc:r.listFocusHighlightForeground},i.localize(7,null)),e.editorSuggestWidgetStatusForeground=(0,r.registerColor)("editorSuggestWidgetStatus.foreground",{dark:(0,r.transparent)(e.editorSuggestWidgetForeground,.5),light:(0,r.transparent)(e.editorSuggestWidgetForeground,.5),hc:(0,r.transparent)(e.editorSuggestWidgetForeground,.5)},i.localize(8,null));class S{constructor(L,E){this._service=L,this._key=`suggestWidget.size/${E.getEditorType()}/${E instanceof g.EmbeddedCodeEditorWidget}`}restore(){var L;const E=(L=this._service.get(this._key,0))!==null&&L!==void 0?L:"";try{const N=JSON.parse(E);if(y.Dimension.is(N))return y.Dimension.lift(N)}catch{}}store(L){this._service.store(this._key,JSON.stringify(L),0,1)}reset(){this._service.remove(this._key,0)}}let v=class ii{constructor(L,E,N,k,M){this.editor=L,this._storageService=E,this._state=0,this._isAuto=!1,this._ignoreFocusEvents=!1,this._forceRenderingAbove=!1,this._explainMode=!1,this._showTimeout=new D.TimeoutTimer,this._disposables=new b.DisposableStore,this._onDidSelect=new w.Emitter,this._onDidFocus=new w.Emitter,this._onDidHide=new w.Emitter,this._onDidShow=new w.Emitter,this.onDidSelect=this._onDidSelect.event,this.onDidFocus=this._onDidFocus.event,this.onDidHide=this._onDidHide.event,this.onDidShow=this._onDidShow.event,this._onDetailsKeydown=new w.Emitter,this.onDetailsKeyDown=this._onDetailsKeydown.event,this.element=new a.ResizableHTMLElement,this.element.domNode.classList.add("editor-widget","suggest-widget"),this._contentWidget=new C(this,L),this._persistedSize=new S(E,L);class O{constructor(A,H,q=!1,X=!1){this.persistedSize=A,this.currentSize=H,this.persistHeight=q,this.persistWidth=X}}let B;this._disposables.add(this.element.onDidWillResize(()=>{this._contentWidget.lockPreference(),B=new O(this._persistedSize.restore(),this.element.size)})),this._disposables.add(this.element.onDidResize(W=>{var A,H,q,X;if(this._resize(W.dimension.width,W.dimension.height),B&&(B.persistHeight=B.persistHeight||!!W.north||!!W.south,B.persistWidth=B.persistWidth||!!W.east||!!W.west),!!W.done){if(B){const{itemHeight:G,defaultSize:re}=this.getLayoutInfo(),ae=Math.round(G/2);let{width:oe,height:Z}=this.element.size;(!B.persistHeight||Math.abs(B.currentSize.height-Z)<=ae)&&(Z=(H=(A=B.persistedSize)===null||A===void 0?void 0:A.height)!==null&&H!==void 0?H:re.height),(!B.persistWidth||Math.abs(B.currentSize.width-oe)<=ae)&&(oe=(X=(q=B.persistedSize)===null||q===void 0?void 0:q.width)!==null&&X!==void 0?X:re.width),this._persistedSize.store(new y.Dimension(oe,Z))}this._contentWidget.unlockPreference(),B=void 0}})),this._messageElement=y.append(this.element.domNode,y.$(".message")),this._listElement=y.append(this.element.domNode,y.$(".tree"));const T=M.createInstance(u.SuggestDetailsWidget,this.editor);T.onDidClose(this.toggleDetails,this,this._disposables),this._details=new u.SuggestDetailsOverlay(T,this.editor);const R=()=>this.element.domNode.classList.toggle("no-icons",!this.editor.getOption(106).showIcons);R();const P=M.createInstance(f.ItemRenderer,this.editor);this._disposables.add(P),this._disposables.add(P.onDidToggleDetails(()=>this.toggleDetails())),this._list=new m.List("SuggestWidget",this._listElement,{getHeight:W=>this.getLayoutInfo().itemHeight,getTemplateId:W=>"suggestion"},[P],{alwaysConsumeMouseWheel:!0,useShadows:!1,mouseSupport:!1,accessibilityProvider:{getRole:()=>"option",getWidgetAriaLabel:()=>i.localize(11,null),getWidgetRole:()=>"listbox",getAriaLabel:W=>{let A=W.textLabel;if(typeof W.completion.label!="string"){const{detail:G,description:re}=W.completion.label;G&&re?A=i.localize(12,null,A,G,re):G?A=i.localize(13,null,A,G):re&&(A=i.localize(14,null,A,re))}if(!W.isResolved||!this._isDetailsVisible())return A;const{documentation:H,detail:q}=W.completion,X=h.format("{0}{1}",q||"",H?typeof H=="string"?H:H.value:"");return i.localize(15,null,A,X)}}}),this._status=M.createInstance(t.SuggestWidgetStatus,this.element.domNode);const F=()=>this.element.domNode.classList.toggle("with-status-bar",this.editor.getOption(106).showStatusBar);F(),this._disposables.add((0,s.attachListStyler)(this._list,k,{listInactiveFocusBackground:e.editorSuggestWidgetSelectedBackground,listInactiveFocusOutline:r.activeContrastBorder})),this._disposables.add(k.onDidColorThemeChange(W=>this._onThemeChange(W))),this._onThemeChange(k.getColorTheme()),this._disposables.add(this._list.onMouseDown(W=>this._onListMouseDownOrTap(W))),this._disposables.add(this._list.onTap(W=>this._onListMouseDownOrTap(W))),this._disposables.add(this._list.onDidChangeSelection(W=>this._onListSelection(W))),this._disposables.add(this._list.onDidChangeFocus(W=>this._onListFocus(W))),this._disposables.add(this.editor.onDidChangeCursorSelection(()=>this._onCursorSelectionChanged())),this._disposables.add(this.editor.onDidChangeConfiguration(W=>{W.hasChanged(106)&&(F(),R())})),this._ctxSuggestWidgetVisible=d.Context.Visible.bindTo(N),this._ctxSuggestWidgetDetailsVisible=d.Context.DetailsVisible.bindTo(N),this._ctxSuggestWidgetMultipleSuggestions=d.Context.MultipleSuggestions.bindTo(N),this._disposables.add(y.addStandardDisposableListener(this._details.widget.domNode,"keydown",W=>{this._onDetailsKeydown.fire(W)})),this._disposables.add(this.editor.onMouseDown(W=>this._onEditorMouseDown(W)))}dispose(){var L;this._details.widget.dispose(),this._details.dispose(),this._list.dispose(),this._status.dispose(),this._disposables.dispose(),(L=this._loadingTimeout)===null||L===void 0||L.dispose(),this._showTimeout.dispose(),this._contentWidget.dispose(),this.element.dispose()}_onEditorMouseDown(L){this._details.widget.domNode.contains(L.target.element)?this._details.widget.domNode.focus():this.element.domNode.contains(L.target.element)&&this.editor.focus()}_onCursorSelectionChanged(){this._state!==0&&this._contentWidget.layout()}_onListMouseDownOrTap(L){typeof L.element=="undefined"||typeof L.index=="undefined"||(L.browserEvent.preventDefault(),L.browserEvent.stopPropagation(),this._select(L.element,L.index))}_onListSelection(L){L.elements.length&&this._select(L.elements[0],L.indexes[0])}_select(L,E){const N=this._completionModel;N&&(this._onDidSelect.fire({item:L,index:E,model:N}),this.editor.focus())}_onThemeChange(L){this._details.widget.borderWidth=L.type==="hc"?2:1}_onListFocus(L){var E;if(this._ignoreFocusEvents)return;if(!L.elements.length){this._currentSuggestionDetails&&(this._currentSuggestionDetails.cancel(),this._currentSuggestionDetails=void 0,this._focusedItem=void 0),this.editor.setAriaOptions({activeDescendant:void 0});return}if(!this._completionModel)return;const N=L.elements[0],k=L.indexes[0];N!==this._focusedItem&&((E=this._currentSuggestionDetails)===null||E===void 0||E.cancel(),this._currentSuggestionDetails=void 0,this._focusedItem=N,this._list.reveal(k),this._currentSuggestionDetails=(0,D.createCancelablePromise)(M=>ye(this,void 0,void 0,function*(){const O=(0,D.disposableTimeout)(()=>{this._isDetailsVisible()&&this.showDetails(!0)},250);M.onCancellationRequested(()=>O.dispose());const B=yield N.resolve(M);return O.dispose(),B})),this._currentSuggestionDetails.then(()=>{k>=this._list.length||N!==this._list.element(k)||(this._ignoreFocusEvents=!0,this._list.splice(k,1,[N]),this._list.setFocus([k]),this._ignoreFocusEvents=!1,this._isDetailsVisible()?this.showDetails(!1):this.element.domNode.classList.remove("docs-side"),this.editor.setAriaOptions({activeDescendant:(0,f.getAriaId)(k)}))}).catch(I.onUnexpectedError)),this._onDidFocus.fire({item:N,index:k,model:this._completionModel})}_setState(L){if(this._state!==L)switch(this._state=L,this.element.domNode.classList.toggle("frozen",L===4),this.element.domNode.classList.remove("message"),L){case 0:y.hide(this._messageElement,this._listElement,this._status.element),this._details.hide(!0),this._status.hide(),this._contentWidget.hide(),this._ctxSuggestWidgetVisible.reset(),this._ctxSuggestWidgetMultipleSuggestions.reset(),this._showTimeout.cancel(),this.element.domNode.classList.remove("visible"),this._list.splice(0,this._list.length),this._focusedItem=void 0,this._cappedHeight=void 0,this._explainMode=!1;break;case 1:this.element.domNode.classList.add("message"),this._messageElement.textContent=ii.LOADING_MESSAGE,y.hide(this._listElement,this._status.element),y.show(this._messageElement),this._details.hide(),this._show(),this._focusedItem=void 0;break;case 2:this.element.domNode.classList.add("message"),this._messageElement.textContent=ii.NO_SUGGESTIONS_MESSAGE,y.hide(this._listElement,this._status.element),y.show(this._messageElement),this._details.hide(),this._show(),this._focusedItem=void 0;break;case 3:y.hide(this._messageElement),y.show(this._listElement,this._status.element),this._show();break;case 4:y.hide(this._messageElement),y.show(this._listElement,this._status.element),this._show();break;case 5:y.hide(this._messageElement),y.show(this._listElement,this._status.element),this._details.show(),this._show();break}}_show(){this._status.show(),this._contentWidget.show(),this._layout(this._persistedSize.restore()),this._ctxSuggestWidgetVisible.set(!0),this._showTimeout.cancelAndSet(()=>{this.element.domNode.classList.add("visible"),this._onDidShow.fire(this)},100)}showTriggered(L,E){this._state===0&&(this._contentWidget.setPosition(this.editor.getPosition()),this._isAuto=!!L,this._isAuto||(this._loadingTimeout=(0,D.disposableTimeout)(()=>this._setState(1),E)))}showSuggestions(L,E,N,k){var M,O;if(this._contentWidget.setPosition(this.editor.getPosition()),(M=this._loadingTimeout)===null||M===void 0||M.dispose(),(O=this._currentSuggestionDetails)===null||O===void 0||O.cancel(),this._currentSuggestionDetails=void 0,this._completionModel!==L&&(this._completionModel=L),N&&this._state!==2&&this._state!==0){this._setState(4);return}const B=this._completionModel.items.length,T=B===0;if(this._ctxSuggestWidgetMultipleSuggestions.set(B>1),T){this._setState(k?0:2),this._completionModel=void 0;return}this._focusedItem=void 0,this._list.splice(0,this._list.length,this._completionModel.items),this._setState(N?4:3),this._list.reveal(E,0),this._list.setFocus([E]),this._layout(this.element.size),this._details.widget.domNode.classList.remove("focused")}selectNextPage(){switch(this._state){case 0:return!1;case 5:return this._details.widget.pageDown(),!0;case 1:return!this._isAuto;default:return this._list.focusNextPage(),!0}}selectNext(){switch(this._state){case 0:return!1;case 1:return!this._isAuto;default:return this._list.focusNext(1,!0),!0}}selectLast(){switch(this._state){case 0:return!1;case 5:return this._details.widget.scrollBottom(),!0;case 1:return!this._isAuto;default:return this._list.focusLast(),!0}}selectPreviousPage(){switch(this._state){case 0:return!1;case 5:return this._details.widget.pageUp(),!0;case 1:return!this._isAuto;default:return this._list.focusPreviousPage(),!0}}selectPrevious(){switch(this._state){case 0:return!1;case 1:return!this._isAuto;default:return this._list.focusPrevious(1,!0),!1}}selectFirst(){switch(this._state){case 0:return!1;case 5:return this._details.widget.scrollTop(),!0;case 1:return!this._isAuto;default:return this._list.focusFirst(),!0}}getFocusedItem(){if(this._state!==0&&this._state!==2&&this._state!==1&&this._completionModel)return{item:this._list.getFocusedElements()[0],index:this._list.getFocus()[0],model:this._completionModel}}toggleDetailsFocus(){this._state===5?(this._setState(3),this._details.widget.domNode.classList.remove("focused")):this._state===3&&this._isDetailsVisible()&&(this._setState(5),this._details.widget.domNode.classList.add("focused"))}toggleDetails(){this._isDetailsVisible()?(this._ctxSuggestWidgetDetailsVisible.set(!1),this._setDetailsVisible(!1),this._details.hide(),this.element.domNode.classList.remove("shows-details")):((0,u.canExpandCompletionItem)(this._list.getFocusedElements()[0])||this._explainMode)&&(this._state===3||this._state===5||this._state===4)&&(this._ctxSuggestWidgetDetailsVisible.set(!0),this._setDetailsVisible(!0),this.showDetails(!1))}showDetails(L){this._details.show(),L?this._details.widget.renderLoading():this._details.widget.renderItem(this._list.getFocusedElements()[0],this._explainMode),this._positionDetails(),this.editor.focus(),this.element.domNode.classList.add("shows-details")}toggleExplainMode(){this._list.getFocusedElements()[0]&&(this._explainMode=!this._explainMode,this._isDetailsVisible()?this.showDetails(!1):this.toggleDetails())}resetPersistedSize(){this._persistedSize.reset()}hideWidget(){var L;(L=this._loadingTimeout)===null||L===void 0||L.dispose(),this._setState(0),this._onDidHide.fire(this),this.element.clearSashHoverState();const E=this._persistedSize.restore(),N=Math.ceil(this.getLayoutInfo().itemHeight*4.3);E&&E.height<N&&this._persistedSize.store(E.with(void 0,N))}isFrozen(){return this._state===4}_afterRender(L){if(L===null){this._isDetailsVisible()&&this._details.hide();return}this._state===2||this._state===1||(this._isDetailsVisible()&&this._details.show(),this._positionDetails())}_layout(L){var E,N,k;if(!this.editor.hasModel()||!this.editor.getDomNode())return;const M=y.getClientArea(document.body),O=this.getLayoutInfo();L||(L=O.defaultSize);let B=L.height,T=L.width;if(this._status.element.style.lineHeight=`${O.itemHeight}px`,this._state===2||this._state===1)B=O.itemHeight+O.borderHeight,T=O.defaultSize.width/2,this.element.enableSashes(!1,!1,!1,!1),this.element.minSize=this.element.maxSize=new y.Dimension(T,B),this._contentWidget.setPreference(2);else{const R=M.width-O.borderHeight-2*O.horizontalPadding;T>R&&(T=R);const P=this._completionModel?this._completionModel.stats.pLabelLen*O.typicalHalfwidthCharacterWidth:T,F=O.statusBarHeight+this._list.contentHeight+O.borderHeight,W=O.itemHeight+O.statusBarHeight,A=y.getDomNodePagePosition(this.editor.getDomNode()),H=this.editor.getScrolledVisiblePosition(this.editor.getPosition()),q=A.top+H.top+H.height,X=Math.min(M.height-q-O.verticalPadding,F),G=A.top+H.top-O.verticalPadding,re=Math.min(G,F);let ae=Math.min(Math.max(re,X)+O.borderHeight,F);B===((E=this._cappedHeight)===null||E===void 0?void 0:E.capped)&&(B=this._cappedHeight.wanted),B<W&&(B=W),B>ae&&(B=ae);const oe=150;B>X||this._forceRenderingAbove&&G>oe?(this._contentWidget.setPreference(1),this.element.enableSashes(!0,!0,!1,!1),ae=re):(this._contentWidget.setPreference(2),this.element.enableSashes(!1,!0,!0,!1),ae=X),this.element.preferredSize=new y.Dimension(P,O.defaultSize.height),this.element.maxSize=new y.Dimension(R,ae),this.element.minSize=new y.Dimension(220,W),this._cappedHeight=B===F?{wanted:(k=(N=this._cappedHeight)===null||N===void 0?void 0:N.wanted)!==null&&k!==void 0?k:L.height,capped:B}:void 0}this._resize(T,B)}_resize(L,E){const{width:N,height:k}=this.element.maxSize;L=Math.min(N,L),E=Math.min(k,E);const{statusBarHeight:M}=this.getLayoutInfo();this._list.layout(E-M,L),this._listElement.style.height=`${E-M}px`,this.element.layout(E,L),this._contentWidget.layout(),this._positionDetails()}_positionDetails(){var L;this._isDetailsVisible()&&this._details.placeAtAnchor(this.element.domNode,((L=this._contentWidget.getPosition())===null||L===void 0?void 0:L.preference[0])===2)}getLayoutInfo(){const L=this.editor.getOption(44),E=(0,p.clamp)(this.editor.getOption(108)||L.lineHeight,8,1e3),N=!this.editor.getOption(106).showStatusBar||this._state===2||this._state===1?0:E,k=this._details.widget.borderWidth,M=2*k;return{itemHeight:E,statusBarHeight:N,borderWidth:k,borderHeight:M,typicalHalfwidthCharacterWidth:L.typicalHalfwidthCharacterWidth,verticalPadding:22,horizontalPadding:14,defaultSize:new y.Dimension(430,N+12*E+M)}}_isDetailsVisible(){return this._storageService.getBoolean("expandSuggestionDocs",0,!1)}_setDetailsVisible(L){this._storageService.store("expandSuggestionDocs",L,0,0)}forceRenderingAbove(){this._forceRenderingAbove||(this._forceRenderingAbove=!0,this._layout(this._persistedSize.restore()))}stopForceRenderingAbove(){this._forceRenderingAbove=!1}};v.LOADING_MESSAGE=i.localize(9,null),v.NO_SUGGESTIONS_MESSAGE=i.localize(10,null),v=Ie([Ce(1,c.IStorageService),Ce(2,n.IContextKeyService),Ce(3,o.IThemeService),Ce(4,l.IInstantiationService)],v),e.SuggestWidget=v;class C{constructor(L,E){this._widget=L,this._editor=E,this.allowEditorOverflow=!0,this.suppressMouseDown=!1,this._preferenceLocked=!1,this._added=!1,this._hidden=!1}dispose(){this._added&&(this._added=!1,this._editor.removeContentWidget(this))}getId(){return"editor.widget.suggestWidget"}getDomNode(){return this._widget.element.domNode}show(){this._hidden=!1,this._added||(this._added=!0,this._editor.addContentWidget(this))}hide(){this._hidden||(this._hidden=!0,this.layout())}layout(){this._editor.layoutContentWidget(this)}getPosition(){return this._hidden||!this._position||!this._preference?null:{position:this._position,preference:[this._preference]}}beforeRender(){const{height:L,width:E}=this._widget.element.size,{borderWidth:N,horizontalPadding:k}=this._widget.getLayoutInfo();return new y.Dimension(E+2*N+k,L+2*N)}afterRender(L){this._widget._afterRender(L)}setPreference(L){this._preferenceLocked||(this._preference=L)}lockPreference(){this._preferenceLocked=!0}unlockPreference(){this._preferenceLocked=!1}setPosition(L){this._position=L}}e.SuggestContentWidget=C}),define(te[726],ie([1,0,10,2,15,18,270,45,291,281,40,14,92,65]),function(j,e,y,m,D,I,w,b,p,h,g,t,i,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});let l=class extends m.Disposable{constructor(r,s,o,a,d){super();this._modelService=s,this._themeService=o,this._configurationService=a,this._editor=r,this._debounceInformation=d.for(I.DocumentRangeSemanticTokensProviderRegistry,"DocumentRangeSemanticTokens",{min:100,max:500}),this._tokenizeViewport=new y.RunOnceScheduler(()=>this._tokenizeViewportNow(),100),this._outstandingRequests=[];const u=()=>{this._editor.hasModel()&&this._tokenizeViewport.schedule(this._debounceInformation.get(this._editor.getModel()))};this._register(this._editor.onDidScrollChange(()=>{u()})),this._register(this._editor.onDidChangeModel(()=>{this._cancelAll(),u()})),this._register(this._editor.onDidChangeModelContent(f=>{this._cancelAll(),u()})),this._register(I.DocumentRangeSemanticTokensProviderRegistry.onDidChange(()=>{this._cancelAll(),u()})),this._register(this._configurationService.onDidChangeConfiguration(f=>{f.affectsConfiguration(p.SEMANTIC_HIGHLIGHTING_SETTING_ID)&&(this._cancelAll(),u())})),this._register(this._themeService.onDidColorThemeChange(()=>{this._cancelAll(),u()}))}_cancelAll(){for(const r of this._outstandingRequests)r.cancel();this._outstandingRequests=[]}_removeOutstandingRequest(r){for(let s=0,o=this._outstandingRequests.length;s<o;s++)if(this._outstandingRequests[s]===r){this._outstandingRequests.splice(s,1);return}}_tokenizeViewportNow(){if(!this._editor.hasModel())return;const r=this._editor.getModel();if(r.hasCompleteSemanticTokens())return;if(!(0,p.isSemanticColoringEnabled)(r,this._themeService,this._configurationService)){r.hasSomeSemanticTokens()&&r.setSemanticTokens(null,!1);return}if(!(0,w.hasDocumentRangeSemanticTokensProvider)(r)){r.hasSomeSemanticTokens()&&r.setSemanticTokens(null,!1);return}const s=this._editor.getVisibleRangesPlusViewportAboveBelow();this._outstandingRequests=this._outstandingRequests.concat(s.map(o=>this._requestRange(r,o)))}_requestRange(r,s){const o=r.getVersionId(),a=(0,y.createCancelablePromise)(u=>Promise.resolve((0,w.getDocumentRangeSemanticTokens)(r,s,u))),d=new n.StopWatch(!1);return a.then(u=>{if(this._debounceInformation.update(r,d.elapsed()),!u||!u.tokens||r.isDisposed()||r.getVersionId()!==o)return;const{provider:f,tokens:S}=u,v=this._modelService.getSemanticTokensProviderStyling(f);r.setPartialSemanticTokens(s,(0,h.toMultilineTokens2)(S,v,r.getLanguageId()))}).then(()=>this._removeOutstandingRequest(a),()=>this._removeOutstandingRequest(a)),a}};l.ID="editor.contrib.viewportSemanticTokens",l=Ie([Ce(1,b.IModelService),Ce(2,t.IThemeService),Ce(3,g.IConfigurationService),Ce(4,i.ILanguageFeatureDebounceService)],l),(0,D.registerEditorContribution)(l.ID,l)}),define(te[727],ie([1,0,43,19,10,21,13,2,15,3,24,49,33,18,579,16,23,14]),function(j,e,y,m,D,I,w,b,p,h,g,t,i,n,l,c,r,s){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getOccurrencesAtPosition=void 0;const o=(0,r.registerColor)("editor.wordHighlightBackground",{dark:"#575757B8",light:"#57575740",hc:null},l.localize(0,null),!0),a=(0,r.registerColor)("editor.wordHighlightStrongBackground",{dark:"#004972B8",light:"#0e639c40",hc:null},l.localize(1,null),!0),d=(0,r.registerColor)("editor.wordHighlightBorder",{light:null,dark:null,hc:r.activeContrastBorder},l.localize(2,null)),u=(0,r.registerColor)("editor.wordHighlightStrongBorder",{light:null,dark:null,hc:r.activeContrastBorder},l.localize(3,null)),f=(0,r.registerColor)("editorOverviewRuler.wordHighlightForeground",{dark:"#A0A0A0CC",light:"#A0A0A0CC",hc:"#A0A0A0CC"},l.localize(4,null),!0),S=(0,r.registerColor)("editorOverviewRuler.wordHighlightStrongForeground",{dark:"#C0A0C0CC",light:"#C0A0C0CC",hc:"#C0A0C0CC"},l.localize(5,null),!0),v=new c.RawContextKey("hasWordHighlights",!1);function C(P,F,W){const A=n.DocumentHighlightProviderRegistry.ordered(P);return(0,D.first)(A.map(H=>()=>Promise.resolve(H.provideDocumentHighlights(P,F,W)).then(void 0,w.onUnexpectedExternalError)),m.isNonEmptyArray)}e.getOccurrencesAtPosition=C;class _{constructor(F,W,A){this._wordRange=this._getCurrentWordRange(F,W),this.result=(0,D.createCancelablePromise)(H=>this._compute(F,W,A,H))}_getCurrentWordRange(F,W){const A=F.getWordAtPosition(W.getPosition());return A?new h.Range(W.startLineNumber,A.startColumn,W.startLineNumber,A.endColumn):null}isValid(F,W,A){const H=W.startLineNumber,q=W.startColumn,X=W.endColumn,G=this._getCurrentWordRange(F,W);let re=Boolean(this._wordRange&&this._wordRange.equalsRange(G));for(let ae=0,oe=A.length;!re&&ae<oe;ae++){let Z=F.getDecorationRange(A[ae]);Z&&Z.startLineNumber===H&&Z.startColumn<=q&&Z.endColumn>=X&&(re=!0)}return re}cancel(){this.result.cancel()}}class L extends _{_compute(F,W,A,H){return C(F,W.getPosition(),H).then(q=>q||[])}}class E extends _{constructor(F,W,A){super(F,W,A);this._selectionIsEmpty=W.isEmpty()}_compute(F,W,A,H){return(0,D.timeout)(250,H).then(()=>{if(!W.isEmpty())return[];const q=F.getWordAtPosition(W.getPosition());return!q||q.word.length>1e3?[]:F.findMatches(q.word,!0,!1,!0,A,!1).map(G=>({range:G.range,kind:n.DocumentHighlightKind.Text}))})}isValid(F,W,A){const H=W.isEmpty();return this._selectionIsEmpty!==H?!1:super.isValid(F,W,A)}}function N(P,F,W){return n.DocumentHighlightProviderRegistry.has(P)?new L(P,F,W):new E(P,F,W)}(0,p.registerModelAndPositionCommand)("_executeDocumentHighlights",(P,F)=>C(P,F,I.CancellationToken.None));class k{constructor(F,W){this.toUnhook=new b.DisposableStore,this.workerRequestTokenId=0,this.workerRequestCompleted=!1,this.workerRequestValue=[],this.lastCursorPositionChangeTime=0,this.renderDecorationsTimer=-1,this.editor=F,this._hasWordHighlights=v.bindTo(W),this._ignorePositionChangeEvent=!1,this.occurrencesHighlight=this.editor.getOption(72),this.model=this.editor.getModel(),this.toUnhook.add(F.onDidChangeCursorPosition(A=>{this._ignorePositionChangeEvent||!this.occurrencesHighlight||this._onPositionChanged(A)})),this.toUnhook.add(F.onDidChangeModelContent(A=>{this._stopAll()})),this.toUnhook.add(F.onDidChangeConfiguration(A=>{let H=this.editor.getOption(72);this.occurrencesHighlight!==H&&(this.occurrencesHighlight=H,this._stopAll())})),this._decorationIds=[],this.workerRequestTokenId=0,this.workerRequest=null,this.workerRequestCompleted=!1,this.lastCursorPositionChangeTime=0,this.renderDecorationsTimer=-1}hasDecorations(){return this._decorationIds.length>0}restore(){!this.occurrencesHighlight||this._run()}_getSortedHighlights(){return m.coalesce(this._decorationIds.map(F=>this.model.getDecorationRange(F)).sort(h.Range.compareRangesUsingStarts))}moveNext(){let F=this._getSortedHighlights(),A=(F.findIndex(q=>q.containsPosition(this.editor.getPosition()))+1)%F.length,H=F[A];try{this._ignorePositionChangeEvent=!0,this.editor.setPosition(H.getStartPosition()),this.editor.revealRangeInCenterIfOutsideViewport(H);const q=this._getWord();if(q){const X=this.editor.getModel().getLineContent(H.startLineNumber);(0,y.alert)(`${X}, ${A+1} of ${F.length} for '${q.word}'`)}}finally{this._ignorePositionChangeEvent=!1}}moveBack(){let F=this._getSortedHighlights(),A=(F.findIndex(q=>q.containsPosition(this.editor.getPosition()))-1+F.length)%F.length,H=F[A];try{this._ignorePositionChangeEvent=!0,this.editor.setPosition(H.getStartPosition()),this.editor.revealRangeInCenterIfOutsideViewport(H);const q=this._getWord();if(q){const X=this.editor.getModel().getLineContent(H.startLineNumber);(0,y.alert)(`${X}, ${A+1} of ${F.length} for '${q.word}'`)}}finally{this._ignorePositionChangeEvent=!1}}_removeDecorations(){this._decorationIds.length>0&&(this._decorationIds=this.editor.deltaDecorations(this._decorationIds,[]),this._hasWordHighlights.set(!1))}_stopAll(){this._removeDecorations(),this.renderDecorationsTimer!==-1&&(clearTimeout(this.renderDecorationsTimer),this.renderDecorationsTimer=-1),this.workerRequest!==null&&(this.workerRequest.cancel(),this.workerRequest=null),this.workerRequestCompleted||(this.workerRequestTokenId++,this.workerRequestCompleted=!0)}_onPositionChanged(F){if(!this.occurrencesHighlight){this._stopAll();return}if(F.reason!==3){this._stopAll();return}this._run()}_getWord(){let F=this.editor.getSelection(),W=F.startLineNumber,A=F.startColumn;return this.model.getWordAtPosition({lineNumber:W,column:A})}_run(){let F=this.editor.getSelection();if(F.startLineNumber!==F.endLineNumber){this._stopAll();return}let W=F.startColumn,A=F.endColumn;const H=this._getWord();if(!H||H.startColumn>W||H.endColumn<A){this._stopAll();return}const q=this.workerRequest&&this.workerRequest.isValid(this.model,F,this._decorationIds);if(this.lastCursorPositionChangeTime=new Date().getTime(),q)this.workerRequestCompleted&&this.renderDecorationsTimer!==-1&&(clearTimeout(this.renderDecorationsTimer),this.renderDecorationsTimer=-1,this._beginRenderDecorations());else{this._stopAll();let X=++this.workerRequestTokenId;this.workerRequestCompleted=!1,this.workerRequest=N(this.model,this.editor.getSelection(),this.editor.getOption(117)),this.workerRequest.result.then(G=>{X===this.workerRequestTokenId&&(this.workerRequestCompleted=!0,this.workerRequestValue=G||[],this._beginRenderDecorations())},w.onUnexpectedError)}}_beginRenderDecorations(){let F=new Date().getTime(),W=this.lastCursorPositionChangeTime+250;F>=W?(this.renderDecorationsTimer=-1,this.renderDecorations()):this.renderDecorationsTimer=setTimeout(()=>{this.renderDecorations()},W-F)}renderDecorations(){this.renderDecorationsTimer=-1;let F=[];for(const W of this.workerRequestValue)W.range&&F.push({range:W.range,options:k._getDecorationOptions(W.kind)});this._decorationIds=this.editor.deltaDecorations(this._decorationIds,F),this._hasWordHighlights.set(this.hasDecorations())}static _getDecorationOptions(F){return F===n.DocumentHighlightKind.Write?this._WRITE_OPTIONS:F===n.DocumentHighlightKind.Text?this._TEXT_OPTIONS:this._REGULAR_OPTIONS}dispose(){this._stopAll(),this.toUnhook.dispose()}}k._WRITE_OPTIONS=i.ModelDecorationOptions.register({description:"word-highlight-strong",stickiness:1,className:"wordHighlightStrong",overviewRuler:{color:(0,s.themeColorFromId)(S),position:t.OverviewRulerLane.Center},minimap:{color:(0,s.themeColorFromId)(r.minimapSelectionOccurrenceHighlight),position:t.MinimapPosition.Inline}}),k._TEXT_OPTIONS=i.ModelDecorationOptions.register({description:"selection-highlight",stickiness:1,className:"selectionHighlight",overviewRuler:{color:(0,s.themeColorFromId)(r.overviewRulerSelectionHighlightForeground),position:t.OverviewRulerLane.Center},minimap:{color:(0,s.themeColorFromId)(r.minimapSelectionOccurrenceHighlight),position:t.MinimapPosition.Inline}}),k._REGULAR_OPTIONS=i.ModelDecorationOptions.register({description:"word-highlight",stickiness:1,className:"wordHighlight",overviewRuler:{color:(0,s.themeColorFromId)(f),position:t.OverviewRulerLane.Center},minimap:{color:(0,s.themeColorFromId)(r.minimapSelectionOccurrenceHighlight),position:t.MinimapPosition.Inline}});let M=class Fi extends b.Disposable{constructor(F,W){super();this.wordHighlighter=null;const A=()=>{F.hasModel()&&(this.wordHighlighter=new k(F,W))};this._register(F.onDidChangeModel(H=>{this.wordHighlighter&&(this.wordHighlighter.dispose(),this.wordHighlighter=null),A()})),A()}static get(F){return F.getContribution(Fi.ID)}saveViewState(){return!!(this.wordHighlighter&&this.wordHighlighter.hasDecorations())}moveNext(){this.wordHighlighter&&this.wordHighlighter.moveNext()}moveBack(){this.wordHighlighter&&this.wordHighlighter.moveBack()}restoreViewState(F){this.wordHighlighter&&F&&this.wordHighlighter.restore()}dispose(){this.wordHighlighter&&(this.wordHighlighter.dispose(),this.wordHighlighter=null),super.dispose()}};M.ID="editor.contrib.wordHighlighter",M=Ie([Ce(1,c.IContextKeyService)],M);class O extends p.EditorAction{constructor(F,W){super(W);this._isNext=F}run(F,W){const A=M.get(W);!A||(this._isNext?A.moveNext():A.moveBack())}}class B extends O{constructor(){super(!0,{id:"editor.action.wordHighlight.next",label:l.localize(6,null),alias:"Go to Next Symbol Highlight",precondition:v,kbOpts:{kbExpr:g.EditorContextKeys.editorTextFocus,primary:65,weight:100}})}}class T extends O{constructor(){super(!1,{id:"editor.action.wordHighlight.prev",label:l.localize(7,null),alias:"Go to Previous Symbol Highlight",precondition:v,kbOpts:{kbExpr:g.EditorContextKeys.editorTextFocus,primary:1024|65,weight:100}})}}class R extends p.EditorAction{constructor(){super({id:"editor.action.wordHighlight.trigger",label:l.localize(8,null),alias:"Trigger Symbol Highlight",precondition:v.toNegated(),kbOpts:{kbExpr:g.EditorContextKeys.editorTextFocus,primary:0,weight:100}})}run(F,W,A){const H=M.get(W);!H||H.restoreViewState(!0)}}(0,p.registerEditorContribution)(M.ID,M),(0,p.registerEditorAction)(B),(0,p.registerEditorAction)(T),(0,p.registerEditorAction)(R),(0,s.registerThemingParticipant)((P,F)=>{const W=P.getColor(r.editorSelectionHighlight);W&&(F.addRule(`.monaco-editor .focused .selectionHighlight { background-color: ${W}; }`),F.addRule(`.monaco-editor .selectionHighlight { background-color: ${W.transparent(.5)}; }`));const A=P.getColor(o);A&&F.addRule(`.monaco-editor .wordHighlight { background-color: ${A}; }`);const H=P.getColor(a);H&&F.addRule(`.monaco-editor .wordHighlightStrong { background-color: ${H}; }`);const q=P.getColor(r.editorSelectionHighlightBorder);q&&F.addRule(`.monaco-editor .selectionHighlight { border: 1px ${P.type==="hc"?"dotted":"solid"} ${q}; box-sizing: border-box; }`);const X=P.getColor(d);X&&F.addRule(`.monaco-editor .wordHighlight { border: 1px ${P.type==="hc"?"dashed":"solid"} ${X}; box-sizing: border-box; }`);const G=P.getColor(u);G&&F.addRule(`.monaco-editor .wordHighlightStrong { border: 1px ${P.type==="hc"?"dashed":"solid"} ${G}; box-sizing: border-box; }`)})}),define(te[295],ie([1,0,15,98,31,59,159,118,11,3,22,24,32,580,63,16,273]),function(j,e,y,m,D,I,w,b,p,h,g,t,i,n,l,c,r){"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 s extends y.EditorCommand{constructor(Z){super(Z);this._inSelectionMode=Z.inSelectionMode,this._wordNavigationType=Z.wordNavigationType}runEditorCommand(Z,x,U){if(!x.hasModel())return;const Q=(0,b.getMapForWordSeparators)(x.getOption(117)),ne=x.getModel(),ee=x.getSelections().map(ue=>{const z=new p.Position(ue.positionLineNumber,ue.positionColumn),V=this._move(Q,ne,z,this._wordNavigationType);return this._moveTo(ue,V,this._inSelectionMode)});if(ne.pushStackElement(),x._getViewModel().setCursorStates("moveWordCommand",3,ee.map(ue=>I.CursorState.fromModelSelection(ue))),ee.length===1){const ue=new p.Position(ee[0].positionLineNumber,ee[0].positionColumn);x.revealPosition(ue,0)}}_moveTo(Z,x,U){return U?new g.Selection(Z.selectionStartLineNumber,Z.selectionStartColumn,x.lineNumber,x.column):new g.Selection(x.lineNumber,x.column,x.lineNumber,x.column)}}e.MoveWordCommand=s;class o extends s{_move(Z,x,U,Q){return w.WordOperations.moveWordLeft(Z,x,U,Q)}}e.WordLeftCommand=o;class a extends s{_move(Z,x,U,Q){return w.WordOperations.moveWordRight(Z,x,U,Q)}}e.WordRightCommand=a;class d extends o{constructor(){super({inSelectionMode:!1,wordNavigationType:0,id:"cursorWordStartLeft",precondition:void 0})}}e.CursorWordStartLeft=d;class u extends o{constructor(){super({inSelectionMode:!1,wordNavigationType:2,id:"cursorWordEndLeft",precondition:void 0})}}e.CursorWordEndLeft=u;class f extends o{constructor(){var Z;super({inSelectionMode:!1,wordNavigationType:1,id:"cursorWordLeft",precondition:void 0,kbOpts:{kbExpr:c.ContextKeyExpr.and(t.EditorContextKeys.textInputFocus,(Z=c.ContextKeyExpr.and(l.CONTEXT_ACCESSIBILITY_MODE_ENABLED,r.IsWindowsContext))===null||Z===void 0?void 0:Z.negate()),primary:2048|15,mac:{primary:512|15},weight:100}})}}e.CursorWordLeft=f;class S extends o{constructor(){super({inSelectionMode:!0,wordNavigationType:0,id:"cursorWordStartLeftSelect",precondition:void 0})}}e.CursorWordStartLeftSelect=S;class v extends o{constructor(){super({inSelectionMode:!0,wordNavigationType:2,id:"cursorWordEndLeftSelect",precondition:void 0})}}e.CursorWordEndLeftSelect=v;class C extends o{constructor(){var Z;super({inSelectionMode:!0,wordNavigationType:1,id:"cursorWordLeftSelect",precondition:void 0,kbOpts:{kbExpr:c.ContextKeyExpr.and(t.EditorContextKeys.textInputFocus,(Z=c.ContextKeyExpr.and(l.CONTEXT_ACCESSIBILITY_MODE_ENABLED,r.IsWindowsContext))===null||Z===void 0?void 0:Z.negate()),primary:2048|1024|15,mac:{primary:512|1024|15},weight:100}})}}e.CursorWordLeftSelect=C;class _ extends o{constructor(){super({inSelectionMode:!1,wordNavigationType:3,id:"cursorWordAccessibilityLeft",precondition:void 0})}_move(Z,x,U,Q){return super._move((0,b.getMapForWordSeparators)(D.EditorOptions.wordSeparators.defaultValue),x,U,Q)}}e.CursorWordAccessibilityLeft=_;class L extends o{constructor(){super({inSelectionMode:!0,wordNavigationType:3,id:"cursorWordAccessibilityLeftSelect",precondition:void 0})}_move(Z,x,U,Q){return super._move((0,b.getMapForWordSeparators)(D.EditorOptions.wordSeparators.defaultValue),x,U,Q)}}e.CursorWordAccessibilityLeftSelect=L;class E extends a{constructor(){super({inSelectionMode:!1,wordNavigationType:0,id:"cursorWordStartRight",precondition:void 0})}}e.CursorWordStartRight=E;class N extends a{constructor(){var Z;super({inSelectionMode:!1,wordNavigationType:2,id:"cursorWordEndRight",precondition:void 0,kbOpts:{kbExpr:c.ContextKeyExpr.and(t.EditorContextKeys.textInputFocus,(Z=c.ContextKeyExpr.and(l.CONTEXT_ACCESSIBILITY_MODE_ENABLED,r.IsWindowsContext))===null||Z===void 0?void 0:Z.negate()),primary:2048|17,mac:{primary:512|17},weight:100}})}}e.CursorWordEndRight=N;class k extends a{constructor(){super({inSelectionMode:!1,wordNavigationType:2,id:"cursorWordRight",precondition:void 0})}}e.CursorWordRight=k;class M extends a{constructor(){super({inSelectionMode:!0,wordNavigationType:0,id:"cursorWordStartRightSelect",precondition:void 0})}}e.CursorWordStartRightSelect=M;class O extends a{constructor(){var Z;super({inSelectionMode:!0,wordNavigationType:2,id:"cursorWordEndRightSelect",precondition:void 0,kbOpts:{kbExpr:c.ContextKeyExpr.and(t.EditorContextKeys.textInputFocus,(Z=c.ContextKeyExpr.and(l.CONTEXT_ACCESSIBILITY_MODE_ENABLED,r.IsWindowsContext))===null||Z===void 0?void 0:Z.negate()),primary:2048|1024|17,mac:{primary:512|1024|17},weight:100}})}}e.CursorWordEndRightSelect=O;class B extends a{constructor(){super({inSelectionMode:!0,wordNavigationType:2,id:"cursorWordRightSelect",precondition:void 0})}}e.CursorWordRightSelect=B;class T extends a{constructor(){super({inSelectionMode:!1,wordNavigationType:3,id:"cursorWordAccessibilityRight",precondition:void 0})}_move(Z,x,U,Q){return super._move((0,b.getMapForWordSeparators)(D.EditorOptions.wordSeparators.defaultValue),x,U,Q)}}e.CursorWordAccessibilityRight=T;class R extends a{constructor(){super({inSelectionMode:!0,wordNavigationType:3,id:"cursorWordAccessibilityRightSelect",precondition:void 0})}_move(Z,x,U,Q){return super._move((0,b.getMapForWordSeparators)(D.EditorOptions.wordSeparators.defaultValue),x,U,Q)}}e.CursorWordAccessibilityRightSelect=R;class P extends y.EditorCommand{constructor(Z){super(Z);this._whitespaceHeuristics=Z.whitespaceHeuristics,this._wordNavigationType=Z.wordNavigationType}runEditorCommand(Z,x,U){const Q=Z.get(i.ILanguageConfigurationService);if(!x.hasModel())return;const ne=(0,b.getMapForWordSeparators)(x.getOption(117)),ce=x.getModel(),ee=x.getSelections(),ue=x.getOption(5),z=x.getOption(8),V=Q.getLanguageConfiguration(ce.getLanguageId()).getAutoClosingPairs(),$=x._getViewModel(),K=ee.map(J=>{const Y=this._delete({wordSeparators:ne,model:ce,selection:J,whitespaceHeuristics:this._whitespaceHeuristics,autoClosingDelete:x.getOption(6),autoClosingBrackets:ue,autoClosingQuotes:z,autoClosingPairs:V,autoClosedCharacters:$.getCursorAutoClosedCharacters()},this._wordNavigationType);return new m.ReplaceCommand(Y,"")});x.pushUndoStop(),x.executeCommands(this.id,K),x.pushUndoStop()}}e.DeleteWordCommand=P;class F extends P{_delete(Z,x){let U=w.WordOperations.deleteWordLeft(Z,x);return U||new h.Range(1,1,1,1)}}e.DeleteWordLeftCommand=F;class W extends P{_delete(Z,x){let U=w.WordOperations.deleteWordRight(Z,x);if(U)return U;const Q=Z.model.getLineCount(),ne=Z.model.getLineMaxColumn(Q);return new h.Range(Q,ne,Q,ne)}}e.DeleteWordRightCommand=W;class A extends F{constructor(){super({whitespaceHeuristics:!1,wordNavigationType:0,id:"deleteWordStartLeft",precondition:t.EditorContextKeys.writable})}}e.DeleteWordStartLeft=A;class H extends F{constructor(){super({whitespaceHeuristics:!1,wordNavigationType:2,id:"deleteWordEndLeft",precondition:t.EditorContextKeys.writable})}}e.DeleteWordEndLeft=H;class q extends F{constructor(){super({whitespaceHeuristics:!0,wordNavigationType:0,id:"deleteWordLeft",precondition:t.EditorContextKeys.writable,kbOpts:{kbExpr:t.EditorContextKeys.textInputFocus,primary:2048|1,mac:{primary:512|1},weight:100}})}}e.DeleteWordLeft=q;class X extends W{constructor(){super({whitespaceHeuristics:!1,wordNavigationType:0,id:"deleteWordStartRight",precondition:t.EditorContextKeys.writable})}}e.DeleteWordStartRight=X;class G extends W{constructor(){super({whitespaceHeuristics:!1,wordNavigationType:2,id:"deleteWordEndRight",precondition:t.EditorContextKeys.writable})}}e.DeleteWordEndRight=G;class re extends W{constructor(){super({whitespaceHeuristics:!0,wordNavigationType:2,id:"deleteWordRight",precondition:t.EditorContextKeys.writable,kbOpts:{kbExpr:t.EditorContextKeys.textInputFocus,primary:2048|20,mac:{primary:512|20},weight:100}})}}e.DeleteWordRight=re;class ae extends y.EditorAction{constructor(){super({id:"deleteInsideWord",precondition:t.EditorContextKeys.writable,label:n.localize(0,null),alias:"Delete Word"})}run(Z,x,U){if(!x.hasModel())return;const Q=(0,b.getMapForWordSeparators)(x.getOption(117)),ne=x.getModel(),ee=x.getSelections().map(ue=>{const z=w.WordOperations.deleteInsideWord(Q,ne,ue);return new m.ReplaceCommand(z,"")});x.pushUndoStop(),x.executeCommands(this.id,ee),x.pushUndoStop()}}e.DeleteInsideWord=ae,(0,y.registerEditorCommand)(new d),(0,y.registerEditorCommand)(new u),(0,y.registerEditorCommand)(new f),(0,y.registerEditorCommand)(new S),(0,y.registerEditorCommand)(new v),(0,y.registerEditorCommand)(new C),(0,y.registerEditorCommand)(new E),(0,y.registerEditorCommand)(new N),(0,y.registerEditorCommand)(new k),(0,y.registerEditorCommand)(new M),(0,y.registerEditorCommand)(new O),(0,y.registerEditorCommand)(new B),(0,y.registerEditorCommand)(new _),(0,y.registerEditorCommand)(new L),(0,y.registerEditorCommand)(new T),(0,y.registerEditorCommand)(new R),(0,y.registerEditorCommand)(new A),(0,y.registerEditorCommand)(new H),(0,y.registerEditorCommand)(new q),(0,y.registerEditorCommand)(new X),(0,y.registerEditorCommand)(new G),(0,y.registerEditorCommand)(new re),(0,y.registerEditorAction)(ae)}),define(te[728],ie([1,0,15,159,3,24,295,26]),function(j,e,y,m,D,I,w,b){"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 p extends w.DeleteWordCommand{constructor(){super({whitespaceHeuristics:!0,wordNavigationType:0,id:"deleteWordPartLeft",precondition:I.EditorContextKeys.writable,kbOpts:{kbExpr:I.EditorContextKeys.textInputFocus,primary:0,mac:{primary:256|512|1},weight:100}})}_delete(s,o){let a=m.WordPartOperations.deleteWordPartLeft(s);return a||new D.Range(1,1,1,1)}}e.DeleteWordPartLeft=p;class h extends w.DeleteWordCommand{constructor(){super({whitespaceHeuristics:!0,wordNavigationType:2,id:"deleteWordPartRight",precondition:I.EditorContextKeys.writable,kbOpts:{kbExpr:I.EditorContextKeys.textInputFocus,primary:0,mac:{primary:256|512|20},weight:100}})}_delete(s,o){let a=m.WordPartOperations.deleteWordPartRight(s);if(a)return a;const d=s.model.getLineCount(),u=s.model.getLineMaxColumn(d);return new D.Range(d,u,d,u)}}e.DeleteWordPartRight=h;class g extends w.MoveWordCommand{_move(s,o,a,d){return m.WordPartOperations.moveWordPartLeft(s,o,a)}}e.WordPartLeftCommand=g;class t extends g{constructor(){super({inSelectionMode:!1,wordNavigationType:0,id:"cursorWordPartLeft",precondition:void 0,kbOpts:{kbExpr:I.EditorContextKeys.textInputFocus,primary:0,mac:{primary:256|512|15},weight:100}})}}e.CursorWordPartLeft=t,b.CommandsRegistry.registerCommandAlias("cursorWordPartStartLeft","cursorWordPartLeft");class i extends g{constructor(){super({inSelectionMode:!0,wordNavigationType:0,id:"cursorWordPartLeftSelect",precondition:void 0,kbOpts:{kbExpr:I.EditorContextKeys.textInputFocus,primary:0,mac:{primary:256|512|1024|15},weight:100}})}}e.CursorWordPartLeftSelect=i,b.CommandsRegistry.registerCommandAlias("cursorWordPartStartLeftSelect","cursorWordPartLeftSelect");class n extends w.MoveWordCommand{_move(s,o,a,d){return m.WordPartOperations.moveWordPartRight(s,o,a)}}e.WordPartRightCommand=n;class l extends n{constructor(){super({inSelectionMode:!1,wordNavigationType:2,id:"cursorWordPartRight",precondition:void 0,kbOpts:{kbExpr:I.EditorContextKeys.textInputFocus,primary:0,mac:{primary:256|512|17},weight:100}})}}e.CursorWordPartRight=l;class c extends n{constructor(){super({inSelectionMode:!0,wordNavigationType:2,id:"cursorWordPartRightSelect",precondition:void 0,kbOpts:{kbExpr:I.EditorContextKeys.textInputFocus,primary:0,mac:{primary:256|512|1024|17},weight:100}})}}e.CursorWordPartRightSelect=c,(0,y.registerEditorCommand)(new p),(0,y.registerEditorCommand)(new h),(0,y.registerEditorCommand)(new t),(0,y.registerEditorCommand)(new i),(0,y.registerEditorCommand)(new l),(0,y.registerEditorCommand)(new c)}),define(te[729],ie([1,0,7,114,29,133,2,39,3,33,389]),function(j,e,y,m,D,I,w,b,p,h){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ZoneWidget=e.OverlayWidgetDelegate=e.ViewZoneDelegate=void 0;const g=new D.Color(new D.RGBA(0,122,204)),t={showArrow:!0,showFrame:!0,className:"",frameColor:g,arrowColor:g,keepEditorSelection:!1},i="vs.editor.contrib.zoneWidget";class n{constructor(o,a,d,u,f,S){this.id="",this.domNode=o,this.afterLineNumber=a,this.afterColumn=d,this.heightInLines=u,this._onDomNodeTop=f,this._onComputedHeight=S}onDomNodeTop(o){this._onDomNodeTop(o)}onComputedHeight(o){this._onComputedHeight(o)}}e.ViewZoneDelegate=n;class l{constructor(o,a){this._id=o,this._domNode=a}getId(){return this._id}getDomNode(){return this._domNode}getPosition(){return null}}e.OverlayWidgetDelegate=l;class c{constructor(o){this._editor=o,this._ruleName=c._IdGenerator.nextId(),this._decorations=[],this._color=null,this._height=-1}dispose(){this.hide(),y.removeCSSRulesContainingSelector(this._ruleName)}set color(o){this._color!==o&&(this._color=o,this._updateStyle())}set height(o){this._height!==o&&(this._height=o,this._updateStyle())}_updateStyle(){y.removeCSSRulesContainingSelector(this._ruleName),y.createCSSRule(`.monaco-editor ${this._ruleName}`,`border-style: solid; border-color: transparent; border-bottom-color: ${this._color}; border-width: ${this._height}px; bottom: -${this._height}px; margin-left: -${this._height}px; `)}show(o){o.column===1&&(o={lineNumber:o.lineNumber,column:2}),this._decorations=this._editor.deltaDecorations(this._decorations,[{range:p.Range.fromPositions(o),options:{description:"zone-widget-arrow",className:this._ruleName,stickiness:1}}])}hide(){this._editor.deltaDecorations(this._decorations,[])}}c._IdGenerator=new I.IdGenerator(".arrow-decoration-");class r{constructor(o,a={}){this._arrow=null,this._overlayWidget=null,this._resizeSash=null,this._positionMarkerId=[],this._viewZone=null,this._disposables=new w.DisposableStore,this.container=null,this._isShowing=!1,this.editor=o,this.options=b.deepClone(a),b.mixin(this.options,t,!1),this.domNode=document.createElement("div"),this.options.isAccessible||(this.domNode.setAttribute("aria-hidden","true"),this.domNode.setAttribute("role","presentation")),this._disposables.add(this.editor.onDidLayoutChange(d=>{const u=this._getWidth(d);this.domNode.style.width=u+"px",this.domNode.style.left=this._getLeft(d)+"px",this._onWidth(u)}))}dispose(){this._overlayWidget&&(this.editor.removeOverlayWidget(this._overlayWidget),this._overlayWidget=null),this._viewZone&&this.editor.changeViewZones(o=>{this._viewZone&&o.removeZone(this._viewZone.id),this._viewZone=null}),this.editor.deltaDecorations(this._positionMarkerId,[]),this._positionMarkerId=[],this._disposables.dispose()}create(){this.domNode.classList.add("zone-widget"),this.options.className&&this.domNode.classList.add(this.options.className),this.container=document.createElement("div"),this.container.classList.add("zone-widget-container"),this.domNode.appendChild(this.container),this.options.showArrow&&(this._arrow=new c(this.editor),this._disposables.add(this._arrow)),this._fillContainer(this.container),this._initSash(),this._applyStyles()}style(o){o.frameColor&&(this.options.frameColor=o.frameColor),o.arrowColor&&(this.options.arrowColor=o.arrowColor),this._applyStyles()}_applyStyles(){if(this.container&&this.options.frameColor){let o=this.options.frameColor.toString();this.container.style.borderTopColor=o,this.container.style.borderBottomColor=o}if(this._arrow&&this.options.arrowColor){let o=this.options.arrowColor.toString();this._arrow.color=o}}_getWidth(o){return o.width-o.minimap.minimapWidth-o.verticalScrollbarWidth}_getLeft(o){return o.minimap.minimapWidth>0&&o.minimap.minimapLeft===0?o.minimap.minimapWidth:0}_onViewZoneTop(o){this.domNode.style.top=o+"px"}_onViewZoneHeight(o){if(this.domNode.style.height=`${o}px`,this.container){let a=o-this._decoratingElementsHeight();this.container.style.height=`${a}px`;const d=this.editor.getLayoutInfo();this._doLayout(a,this._getWidth(d))}this._resizeSash&&this._resizeSash.layout()}get position(){const[o]=this._positionMarkerId;if(!o)return;const a=this.editor.getModel();if(!a)return;const d=a.getDecorationRange(o);if(!!d)return d.getStartPosition()}show(o,a){const d=p.Range.isIRange(o)?p.Range.lift(o):p.Range.fromPositions(o);this._isShowing=!0,this._showImpl(d,a),this._isShowing=!1,this._positionMarkerId=this.editor.deltaDecorations(this._positionMarkerId,[{range:d,options:h.ModelDecorationOptions.EMPTY}])}hide(){this._viewZone&&(this.editor.changeViewZones(o=>{this._viewZone&&o.removeZone(this._viewZone.id)}),this._viewZone=null),this._overlayWidget&&(this.editor.removeOverlayWidget(this._overlayWidget),this._overlayWidget=null),this._arrow&&this._arrow.hide()}_decoratingElementsHeight(){let o=this.editor.getOption(59),a=0;if(this.options.showArrow){let d=Math.round(o/3);a+=2*d}if(this.options.showFrame){let d=Math.round(o/9);a+=2*d}return a}_showImpl(o,a){const d=o.getStartPosition(),u=this.editor.getLayoutInfo(),f=this._getWidth(u);this.domNode.style.width=`${f}px`,this.domNode.style.left=this._getLeft(u)+"px";const S=document.createElement("div");S.style.overflow="hidden";const v=this.editor.getOption(59),C=Math.max(12,this.editor.getLayoutInfo().height/v*.8);a=Math.min(a,C);let _=0,L=0;if(this._arrow&&this.options.showArrow&&(_=Math.round(v/3),this._arrow.height=_,this._arrow.show(d)),this.options.showFrame&&(L=Math.round(v/9)),this.editor.changeViewZones(k=>{this._viewZone&&k.removeZone(this._viewZone.id),this._overlayWidget&&(this.editor.removeOverlayWidget(this._overlayWidget),this._overlayWidget=null),this.domNode.style.top="-1000px",this._viewZone=new n(S,d.lineNumber,d.column,a,M=>this._onViewZoneTop(M),M=>this._onViewZoneHeight(M)),this._viewZone.id=k.addZone(this._viewZone),this._overlayWidget=new l(i+this._viewZone.id,this.domNode),this.editor.addOverlayWidget(this._overlayWidget)}),this.container&&this.options.showFrame){const k=this.options.frameWidth?this.options.frameWidth:L;this.container.style.borderTopWidth=k+"px",this.container.style.borderBottomWidth=k+"px"}let E=a*v-this._decoratingElementsHeight();this.container&&(this.container.style.top=_+"px",this.container.style.height=E+"px",this.container.style.overflow="hidden"),this._doLayout(E,f),this.options.keepEditorSelection||this.editor.setSelection(o);const N=this.editor.getModel();if(N){const k=o.endLineNumber+1;k<=N.getLineCount()?this.revealLine(k,!1):this.revealLine(N.getLineCount(),!0)}}revealLine(o,a){a?this.editor.revealLineInCenter(o,0):this.editor.revealLine(o,0)}setCssClass(o,a){!this.container||(a&&this.container.classList.remove(a),this.container.classList.add(o))}_onWidth(o){}_doLayout(o,a){}_relayout(o){this._viewZone&&this._viewZone.heightInLines!==o&&this.editor.changeViewZones(a=>{this._viewZone&&(this._viewZone.heightInLines=o,a.layoutZone(this._viewZone.id))})}_initSash(){if(this._resizeSash)return;this._resizeSash=this._disposables.add(new m.Sash(this.domNode,this,{orientation:1})),this.options.isResizeable||(this._resizeSash.state=0);let o;this._disposables.add(this._resizeSash.onDidStart(a=>{this._viewZone&&(o={startY:a.startY,heightInLines:this._viewZone.heightInLines})})),this._disposables.add(this._resizeSash.onDidEnd(()=>{o=void 0})),this._disposables.add(this._resizeSash.onDidChange(a=>{if(o){let d=(a.currentY-o.startY)/this.editor.getOption(59),u=d<0?Math.ceil(d):Math.floor(d),f=o.heightInLines+u;f>5&&f<35&&this._relayout(f)}}))}getHorizontalSashLeft(){return 0}getHorizontalSashTop(){return(this.domNode.style.height===null?0:parseInt(this.domNode.style.height))-this._decoratingElementsHeight()/2}getHorizontalSashWidth(){const o=this.editor.getLayoutInfo();return o.width-o.minimap.minimapWidth}}e.ZoneWidget=r}),define(te[108],ie([1,0,7,84,44,27,29,4,39,15,28,162,729,560,202,16,53,9,23,383]),function(j,e,y,m,D,I,w,b,p,h,g,t,i,n,l,c,r,s,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.peekViewEditorMatchHighlightBorder=e.peekViewEditorMatchHighlight=e.peekViewResultsMatchHighlight=e.peekViewEditorGutterBackground=e.peekViewEditorBackground=e.peekViewResultsSelectionForeground=e.peekViewResultsSelectionBackground=e.peekViewResultsFileForeground=e.peekViewResultsMatchForeground=e.peekViewResultsBackground=e.peekViewBorder=e.peekViewTitleInfoForeground=e.peekViewTitleForeground=e.peekViewTitleBackground=e.PeekViewWidget=e.getOuterEditor=e.PeekContext=e.IPeekViewService=void 0,e.IPeekViewService=(0,s.createDecorator)("IPeekViewService"),(0,r.registerSingleton)(e.IPeekViewService,class{constructor(){this._widgets=new Map}addExclusiveWidget(v,C){const _=this._widgets.get(v);_&&(_.listener.dispose(),_.widget.dispose());const L=()=>{const E=this._widgets.get(v);E&&E.widget===C&&(E.listener.dispose(),this._widgets.delete(v))};this._widgets.set(v,{widget:C,listener:C.onDidClose(L)})}});var a;(function(v){v.inPeekEditor=new c.RawContextKey("inReferenceSearchEditor",!0,n.localize(0,null)),v.notInPeekEditor=v.inPeekEditor.toNegated()})(a=e.PeekContext||(e.PeekContext={}));let d=class{constructor(C,_){C instanceof t.EmbeddedCodeEditorWidget&&a.inPeekEditor.bindTo(_)}dispose(){}};d.ID="editor.contrib.referenceController",d=Ie([Ce(1,c.IContextKeyService)],d),(0,h.registerEditorContribution)(d.ID,d);function u(v){let C=v.get(g.ICodeEditorService).getFocusedCodeEditor();return C instanceof t.EmbeddedCodeEditorWidget?C.getParentEditor():C}e.getOuterEditor=u;const f={headerBackgroundColor:w.Color.white,primaryHeadingColor:w.Color.fromHex("#333333"),secondaryHeadingColor:w.Color.fromHex("#6c6c6cb3")};let S=class extends i.ZoneWidget{constructor(C,_,L){super(C,_);this.instantiationService=L,this._onDidClose=new b.Emitter,this.onDidClose=this._onDidClose.event,p.mixin(this.options,f,!1)}dispose(){this.disposed||(this.disposed=!0,super.dispose(),this._onDidClose.fire(this))}style(C){let _=this.options;C.headerBackgroundColor&&(_.headerBackgroundColor=C.headerBackgroundColor),C.primaryHeadingColor&&(_.primaryHeadingColor=C.primaryHeadingColor),C.secondaryHeadingColor&&(_.secondaryHeadingColor=C.secondaryHeadingColor),super.style(C)}_applyStyles(){super._applyStyles();let C=this.options;this._headElement&&C.headerBackgroundColor&&(this._headElement.style.backgroundColor=C.headerBackgroundColor.toString()),this._primaryHeading&&C.primaryHeadingColor&&(this._primaryHeading.style.color=C.primaryHeadingColor.toString()),this._secondaryHeading&&C.secondaryHeadingColor&&(this._secondaryHeading.style.color=C.secondaryHeadingColor.toString()),this._bodyElement&&C.frameColor&&(this._bodyElement.style.borderColor=C.frameColor.toString())}_fillContainer(C){this.setCssClass("peekview-widget"),this._headElement=y.$(".head"),this._bodyElement=y.$(".body"),this._fillHead(this._headElement),this._fillBody(this._bodyElement),C.appendChild(this._headElement),C.appendChild(this._bodyElement)}_fillHead(C,_){const L=y.$(".peekview-title");this.options.supportOnTitleClick&&(L.classList.add("clickable"),y.addStandardDisposableListener(L,"click",k=>this._onTitleClick(k))),y.append(this._headElement,L),this._fillTitleIcon(L),this._primaryHeading=y.$("span.filename"),this._secondaryHeading=y.$("span.dirname"),this._metaHeading=y.$("span.meta"),y.append(L,this._primaryHeading,this._secondaryHeading,this._metaHeading);const E=y.$(".peekview-actions");y.append(this._headElement,E);const N=this._getActionBarOptions();this._actionbarWidget=new m.ActionBar(E,N),this._disposables.add(this._actionbarWidget),_||this._actionbarWidget.push(new D.Action("peekview.close",n.localize(1,null),I.Codicon.close.classNames,!0,()=>(this.dispose(),Promise.resolve())),{label:!1,icon:!0})}_fillTitleIcon(C){}_getActionBarOptions(){return{actionViewItemProvider:l.createActionViewItem.bind(void 0,this.instantiationService),orientation:0}}_onTitleClick(C){}setTitle(C,_){this._primaryHeading&&this._secondaryHeading&&(this._primaryHeading.innerText=C,this._primaryHeading.setAttribute("title",C),_?this._secondaryHeading.innerText=_:y.clearNode(this._secondaryHeading))}setMetaTitle(C){this._metaHeading&&(C?(this._metaHeading.innerText=C,y.show(this._metaHeading)):y.hide(this._metaHeading))}_doLayout(C,_){if(!this._isShowing&&C<0){this.dispose();return}const L=Math.ceil(this.editor.getOption(59)*1.2),E=Math.round(C-(L+2));this._doLayoutHead(L,_),this._doLayoutBody(E,_)}_doLayoutHead(C,_){this._headElement&&(this._headElement.style.height=`${C}px`,this._headElement.style.lineHeight=this._headElement.style.height)}_doLayoutBody(C,_){this._bodyElement&&(this._bodyElement.style.height=`${C}px`)}};S=Ie([Ce(2,s.IInstantiationService)],S),e.PeekViewWidget=S,e.peekViewTitleBackground=(0,o.registerColor)("peekViewTitle.background",{dark:(0,o.transparent)(o.editorInfoForeground,.1),light:(0,o.transparent)(o.editorInfoForeground,.1),hc:null},n.localize(2,null)),e.peekViewTitleForeground=(0,o.registerColor)("peekViewTitleLabel.foreground",{dark:w.Color.white,light:w.Color.black,hc:w.Color.white},n.localize(3,null)),e.peekViewTitleInfoForeground=(0,o.registerColor)("peekViewTitleDescription.foreground",{dark:"#ccccccb3",light:"#616161",hc:"#FFFFFF99"},n.localize(4,null)),e.peekViewBorder=(0,o.registerColor)("peekView.border",{dark:o.editorInfoForeground,light:o.editorInfoForeground,hc:o.contrastBorder},n.localize(5,null)),e.peekViewResultsBackground=(0,o.registerColor)("peekViewResult.background",{dark:"#252526",light:"#F3F3F3",hc:w.Color.black},n.localize(6,null)),e.peekViewResultsMatchForeground=(0,o.registerColor)("peekViewResult.lineForeground",{dark:"#bbbbbb",light:"#646465",hc:w.Color.white},n.localize(7,null)),e.peekViewResultsFileForeground=(0,o.registerColor)("peekViewResult.fileForeground",{dark:w.Color.white,light:"#1E1E1E",hc:w.Color.white},n.localize(8,null)),e.peekViewResultsSelectionBackground=(0,o.registerColor)("peekViewResult.selectionBackground",{dark:"#3399ff33",light:"#3399ff33",hc:null},n.localize(9,null)),e.peekViewResultsSelectionForeground=(0,o.registerColor)("peekViewResult.selectionForeground",{dark:w.Color.white,light:"#6C6C6C",hc:w.Color.white},n.localize(10,null)),e.peekViewEditorBackground=(0,o.registerColor)("peekViewEditor.background",{dark:"#001F33",light:"#F2F8FC",hc:w.Color.black},n.localize(11,null)),e.peekViewEditorGutterBackground=(0,o.registerColor)("peekViewEditorGutter.background",{dark:e.peekViewEditorBackground,light:e.peekViewEditorBackground,hc:e.peekViewEditorBackground},n.localize(12,null)),e.peekViewResultsMatchHighlight=(0,o.registerColor)("peekViewResult.matchHighlightBackground",{dark:"#ea5c004d",light:"#ea5c004d",hc:null},n.localize(13,null)),e.peekViewEditorMatchHighlight=(0,o.registerColor)("peekViewEditor.matchHighlightBackground",{dark:"#ff8f0099",light:"#f5d802de",hc:null},n.localize(14,null)),e.peekViewEditorMatchHighlightBorder=(0,o.registerColor)("peekViewEditor.matchHighlightBorder",{dark:null,light:null,hc:o.activeContrastBorder},n.localize(15,null))}),define(te[730],ie([1,0,7,67,19,29,4,171,2,41,8,3,108,537,202,37,16,9,128,77,51,691,23,14,376]),function(j,e,y,m,D,I,w,b,p,h,g,t,i,n,l,c,r,s,o,a,d,u,f,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.editorMarkerNavigationBackground=e.editorMarkerNavigationInfoHeader=e.editorMarkerNavigationInfo=e.editorMarkerNavigationWarningHeader=e.editorMarkerNavigationWarning=e.editorMarkerNavigationErrorHeader=e.editorMarkerNavigationError=e.MarkerNavigationWidget=void 0;class v{constructor(k,M,O,B,T){this._openerService=B,this._labelService=T,this._lines=0,this._longestLineLength=0,this._relatedDiagnostics=new WeakMap,this._disposables=new p.DisposableStore,this._editor=M;const R=document.createElement("div");R.className="descriptioncontainer",this._messageBlock=document.createElement("div"),this._messageBlock.classList.add("message"),this._messageBlock.setAttribute("aria-live","assertive"),this._messageBlock.setAttribute("role","alert"),R.appendChild(this._messageBlock),this._relatedBlock=document.createElement("div"),R.appendChild(this._relatedBlock),this._disposables.add(y.addStandardDisposableListener(this._relatedBlock,"click",P=>{P.preventDefault();const F=this._relatedDiagnostics.get(P.target);F&&O(F)})),this._scrollable=new m.ScrollableElement(R,{horizontal:1,vertical:1,useShadows:!1,horizontalScrollbarSize:6,verticalScrollbarSize:6}),k.appendChild(this._scrollable.getDomNode()),this._disposables.add(this._scrollable.onScroll(P=>{R.style.left=`-${P.scrollLeft}px`,R.style.top=`-${P.scrollTop}px`})),this._disposables.add(this._scrollable)}dispose(){(0,p.dispose)(this._disposables)}update(k){const{source:M,message:O,relatedInformation:B,code:T}=k;let R=((M==null?void 0:M.length)||0)+"()".length;T&&(typeof T=="string"?R+=T.length:R+=T.value.length);const P=(0,g.splitLines)(O);this._lines=P.length,this._longestLineLength=0;for(const q of P)this._longestLineLength=Math.max(q.length+R,this._longestLineLength);y.clearNode(this._messageBlock),this._messageBlock.setAttribute("aria-label",this.getAriaLabel(k)),this._editor.applyFontInfo(this._messageBlock);let F=this._messageBlock;for(const q of P)F=document.createElement("div"),F.innerText=q,q===""&&(F.style.height=this._messageBlock.style.lineHeight),this._messageBlock.appendChild(F);if(M||T){const q=document.createElement("span");if(q.classList.add("details"),F.appendChild(q),M){const X=document.createElement("span");X.innerText=M,X.classList.add("source"),q.appendChild(X)}if(T)if(typeof T=="string"){const X=document.createElement("span");X.innerText=`(${T})`,X.classList.add("code"),q.appendChild(X)}else{this._codeLink=y.$("a.code-link"),this._codeLink.setAttribute("href",`${T.target.toString()}`),this._codeLink.onclick=G=>{this._openerService.open(T.target,{allowCommands:!0}),G.preventDefault(),G.stopPropagation()};const X=y.append(this._codeLink,y.$("span"));X.innerText=T.value,q.appendChild(this._codeLink)}}if(y.clearNode(this._relatedBlock),this._editor.applyFontInfo(this._relatedBlock),(0,D.isNonEmptyArray)(B)){const q=this._relatedBlock.appendChild(document.createElement("div"));q.style.paddingTop=`${Math.floor(this._editor.getOption(59)*.66)}px`,this._lines+=1;for(const X of B){let G=document.createElement("div"),re=document.createElement("a");re.classList.add("filename"),re.innerText=`${(0,b.getBaseLabel)(X.resource)}(${X.startLineNumber}, ${X.startColumn}): `,re.title=this._labelService.getUriLabel(X.resource),this._relatedDiagnostics.set(re,X);let ae=document.createElement("span");ae.innerText=X.message,G.appendChild(re),G.appendChild(ae),this._lines+=1,q.appendChild(G)}}const W=this._editor.getOption(44),A=Math.ceil(W.typicalFullwidthCharacterWidth*this._longestLineLength*.75),H=W.lineHeight*this._lines;this._scrollable.setScrollDimensions({scrollWidth:A,scrollHeight:H})}layout(k,M){this._scrollable.getDomNode().style.height=`${k}px`,this._scrollable.getDomNode().style.width=`${M}px`,this._scrollable.setScrollDimensions({width:M,height:k})}getHeightInLines(){return Math.min(17,this._lines)}getAriaLabel(k){let M="";switch(k.severity){case a.MarkerSeverity.Error:M=n.localize(0,null);break;case a.MarkerSeverity.Warning:M=n.localize(1,null);break;case a.MarkerSeverity.Info:M=n.localize(2,null);break;case a.MarkerSeverity.Hint:M=n.localize(3,null);break}let O=n.localize(4,null,M,k.startLineNumber+":"+k.startColumn);const B=this._editor.getModel();return B&&k.startLineNumber<=B.getLineCount()&&k.startLineNumber>=1&&(O=`${B.getLineContent(k.startLineNumber)}, ${O}`),O}}let C=class Bi extends i.PeekViewWidget{constructor(k,M,O,B,T,R,P){super(k,{showArrow:!0,showFrame:!0,isAccessible:!0,frameWidth:1},T);this._themeService=M,this._openerService=O,this._menuService=B,this._contextKeyService=R,this._labelService=P,this._callOnDispose=new p.DisposableStore,this._onDidSelectRelatedInformation=new w.Emitter,this.onDidSelectRelatedInformation=this._onDidSelectRelatedInformation.event,this._severity=a.MarkerSeverity.Warning,this._backgroundColor=I.Color.white,this._applyTheme(M.getColorTheme()),this._callOnDispose.add(M.onDidColorThemeChange(this._applyTheme.bind(this))),this.create()}_applyTheme(k){this._backgroundColor=k.getColor(e.editorMarkerNavigationBackground);let M=e.editorMarkerNavigationError,O=e.editorMarkerNavigationErrorHeader;this._severity===a.MarkerSeverity.Warning?(M=e.editorMarkerNavigationWarning,O=e.editorMarkerNavigationWarningHeader):this._severity===a.MarkerSeverity.Info&&(M=e.editorMarkerNavigationInfo,O=e.editorMarkerNavigationInfoHeader);const B=k.getColor(M),T=k.getColor(O);this.style({arrowColor:B,frameColor:B,headerBackgroundColor:T,primaryHeadingColor:k.getColor(i.peekViewTitleForeground),secondaryHeadingColor:k.getColor(i.peekViewTitleInfoForeground)})}_applyStyles(){this._parentContainer&&(this._parentContainer.style.backgroundColor=this._backgroundColor?this._backgroundColor.toString():""),super._applyStyles()}dispose(){this._callOnDispose.dispose(),super.dispose()}_fillHead(k){super._fillHead(k),this._disposables.add(this._actionbarWidget.actionRunner.onBeforeRun(B=>this.editor.focus()));const M=[],O=this._menuService.createMenu(Bi.TitleMenu,this._contextKeyService);(0,l.createAndFillInActionBarActions)(O,void 0,M),this._actionbarWidget.push(M,{label:!1,icon:!0,index:0}),O.dispose()}_fillTitleIcon(k){this._icon=y.append(k,y.$(""))}_fillBody(k){this._parentContainer=k,k.classList.add("marker-widget"),this._parentContainer.tabIndex=0,this._parentContainer.setAttribute("role","tooltip"),this._container=document.createElement("div"),k.appendChild(this._container),this._message=new v(this._container,this.editor,M=>this._onDidSelectRelatedInformation.fire(M),this._openerService,this._labelService),this._disposables.add(this._message)}show(){throw new Error("call showAtMarker")}showAtMarker(k,M,O){this._container.classList.remove("stale"),this._message.update(k),this._severity=k.severity,this._applyTheme(this._themeService.getColorTheme());let B=t.Range.lift(k);const T=this.editor.getPosition();let R=T&&B.containsPosition(T)?T:B.getStartPosition();super.show(R,this.computeRequiredHeight());const P=this.editor.getModel();if(P){const F=O>1?n.localize(5,null,M,O):n.localize(6,null,M,O);this.setTitle((0,h.basename)(P.uri),F)}this._icon.className=`codicon ${u.SeverityIcon.className(a.MarkerSeverity.toSeverity(this._severity))}`,this.editor.revealPositionNearTop(R,0),this.editor.focus()}updateMarker(k){this._container.classList.remove("stale"),this._message.update(k)}showStale(){this._container.classList.add("stale"),this._relayout()}_doLayoutBody(k,M){super._doLayoutBody(k,M),this._heightInPixel=k,this._message.layout(k,M),this._container.style.height=`${k}px`}_onWidth(k){this._message.layout(this._heightInPixel,k)}_relayout(){super._relayout(this.computeRequiredHeight())}computeRequiredHeight(){return 3+this._message.getHeightInLines()}};C.TitleMenu=new c.MenuId("gotoErrorTitleMenu"),C=Ie([Ce(1,S.IThemeService),Ce(2,d.IOpenerService),Ce(3,c.IMenuService),Ce(4,s.IInstantiationService),Ce(5,r.IContextKeyService),Ce(6,o.ILabelService)],C),e.MarkerNavigationWidget=C;let _=(0,f.oneOf)(f.editorErrorForeground,f.editorErrorBorder),L=(0,f.oneOf)(f.editorWarningForeground,f.editorWarningBorder),E=(0,f.oneOf)(f.editorInfoForeground,f.editorInfoBorder);e.editorMarkerNavigationError=(0,f.registerColor)("editorMarkerNavigationError.background",{dark:_,light:_,hc:f.contrastBorder},n.localize(7,null)),e.editorMarkerNavigationErrorHeader=(0,f.registerColor)("editorMarkerNavigationError.headerBackground",{dark:(0,f.transparent)(e.editorMarkerNavigationError,.1),light:(0,f.transparent)(e.editorMarkerNavigationError,.1),hc:null},n.localize(8,null)),e.editorMarkerNavigationWarning=(0,f.registerColor)("editorMarkerNavigationWarning.background",{dark:L,light:L,hc:f.contrastBorder},n.localize(9,null)),e.editorMarkerNavigationWarningHeader=(0,f.registerColor)("editorMarkerNavigationWarning.headerBackground",{dark:(0,f.transparent)(e.editorMarkerNavigationWarning,.1),light:(0,f.transparent)(e.editorMarkerNavigationWarning,.1),hc:"#0C141F"},n.localize(10,null)),e.editorMarkerNavigationInfo=(0,f.registerColor)("editorMarkerNavigationInfo.background",{dark:E,light:E,hc:f.contrastBorder},n.localize(11,null)),e.editorMarkerNavigationInfoHeader=(0,f.registerColor)("editorMarkerNavigationInfo.headerBackground",{dark:(0,f.transparent)(e.editorMarkerNavigationInfo,.1),light:(0,f.transparent)(e.editorMarkerNavigationInfo,.1),hc:null},n.localize(12,null)),e.editorMarkerNavigationBackground=(0,f.registerColor)("editorMarkerNavigation.background",{dark:f.editorBackground,light:f.editorBackground,hc:f.editorBackground},n.localize(13,null))}),define(te[296],ie([1,0,27,2,15,28,11,3,24,616,536,37,16,9,72,730]),function(j,e,y,m,D,I,w,b,p,h,g,t,i,n,l,c){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.NextMarkerAction=e.MarkerController=void 0;let r=class Ht{constructor(C,_,L,E,N){this._markerNavigationService=_,this._contextKeyService=L,this._editorService=E,this._instantiationService=N,this._sessionDispoables=new m.DisposableStore,this._editor=C,this._widgetVisible=f.bindTo(this._contextKeyService)}static get(C){return C.getContribution(Ht.ID)}dispose(){this._cleanUp(),this._sessionDispoables.dispose()}_cleanUp(){this._widgetVisible.reset(),this._sessionDispoables.clear(),this._widget=void 0,this._model=void 0}_getOrCreateModel(C){if(this._model&&this._model.matches(C))return this._model;let _=!1;return this._model&&(_=!0,this._cleanUp()),this._model=this._markerNavigationService.getMarkerList(C),_&&this._model.move(!0,this._editor.getModel(),this._editor.getPosition()),this._widget=this._instantiationService.createInstance(c.MarkerNavigationWidget,this._editor),this._widget.onDidClose(()=>this.close(),this,this._sessionDispoables),this._widgetVisible.set(!0),this._sessionDispoables.add(this._model),this._sessionDispoables.add(this._widget),this._sessionDispoables.add(this._editor.onDidChangeCursorPosition(L=>{var E,N,k;(!((E=this._model)===null||E===void 0?void 0:E.selected)||!b.Range.containsPosition((N=this._model)===null||N===void 0?void 0:N.selected.marker,L.position))&&((k=this._model)===null||k===void 0||k.resetIndex())})),this._sessionDispoables.add(this._model.onDidChange(()=>{if(!this._widget||!this._widget.position||!this._model)return;const L=this._model.find(this._editor.getModel().uri,this._widget.position);L?this._widget.updateMarker(L.marker):this._widget.showStale()})),this._sessionDispoables.add(this._widget.onDidSelectRelatedInformation(L=>{this._editorService.openCodeEditor({resource:L.resource,options:{pinned:!0,revealIfOpened:!0,selection:b.Range.lift(L).collapseToStart()}},this._editor),this.close(!1)})),this._sessionDispoables.add(this._editor.onDidChangeModel(()=>this._cleanUp())),this._model}close(C=!0){this._cleanUp(),C&&this._editor.focus()}showAtMarker(C){if(this._editor.hasModel()){const _=this._getOrCreateModel(this._editor.getModel().uri);_.resetIndex(),_.move(!0,this._editor.getModel(),new w.Position(C.startLineNumber,C.startColumn)),_.selected&&this._widget.showAtMarker(_.selected.marker,_.selected.index,_.selected.total)}}nagivate(C,_){var L,E;return ye(this,void 0,void 0,function*(){if(this._editor.hasModel()){const N=this._getOrCreateModel(_?void 0:this._editor.getModel().uri);if(N.move(C,this._editor.getModel(),this._editor.getPosition()),!N.selected)return;if(N.selected.marker.resource.toString()!==this._editor.getModel().uri.toString()){this._cleanUp();const k=yield this._editorService.openCodeEditor({resource:N.selected.marker.resource,options:{pinned:!1,revealIfOpened:!0,selectionRevealType:2,selection:N.selected.marker}},this._editor);k&&((L=Ht.get(k))===null||L===void 0||L.close(),(E=Ht.get(k))===null||E===void 0||E.nagivate(C,_))}else this._widget.showAtMarker(N.selected.marker,N.selected.index,N.selected.total)}})}};r.ID="editor.contrib.markerController",r=Ie([Ce(1,h.IMarkerNavigationService),Ce(2,i.IContextKeyService),Ce(3,I.ICodeEditorService),Ce(4,n.IInstantiationService)],r),e.MarkerController=r;class s extends D.EditorAction{constructor(C,_,L){super(L);this._next=C,this._multiFile=_}run(C,_){var L;return ye(this,void 0,void 0,function*(){_.hasModel()&&((L=r.get(_))===null||L===void 0||L.nagivate(this._next,this._multiFile))})}}class o extends s{constructor(){super(!0,!1,{id:o.ID,label:o.LABEL,alias:"Go to Next Problem (Error, Warning, Info)",precondition:void 0,kbOpts:{kbExpr:p.EditorContextKeys.focus,primary:512|66,weight:100},menuOpts:{menuId:c.MarkerNavigationWidget.TitleMenu,title:o.LABEL,icon:(0,l.registerIcon)("marker-navigation-next",y.Codicon.arrowDown,g.localize(1,null)),group:"navigation",order:1}})}}e.NextMarkerAction=o,o.ID="editor.action.marker.next",o.LABEL=g.localize(0,null);class a extends s{constructor(){super(!1,!1,{id:a.ID,label:a.LABEL,alias:"Go to Previous Problem (Error, Warning, Info)",precondition:void 0,kbOpts:{kbExpr:p.EditorContextKeys.focus,primary:1024|512|66,weight:100},menuOpts:{menuId:c.MarkerNavigationWidget.TitleMenu,title:o.LABEL,icon:(0,l.registerIcon)("marker-navigation-previous",y.Codicon.arrowUp,g.localize(3,null)),group:"navigation",order:2}})}}a.ID="editor.action.marker.prev",a.LABEL=g.localize(2,null);class d extends s{constructor(){super(!0,!0,{id:"editor.action.marker.nextInFiles",label:g.localize(4,null),alias:"Go to Next Problem in Files (Error, Warning, Info)",precondition:void 0,kbOpts:{kbExpr:p.EditorContextKeys.focus,primary:66,weight:100},menuOpts:{menuId:t.MenuId.MenubarGoMenu,title:g.localize(5,null),group:"6_problem_nav",order:1}})}}class u extends s{constructor(){super(!1,!0,{id:"editor.action.marker.prevInFiles",label:g.localize(6,null),alias:"Go to Previous Problem in Files (Error, Warning, Info)",precondition:void 0,kbOpts:{kbExpr:p.EditorContextKeys.focus,primary:1024|66,weight:100},menuOpts:{menuId:t.MenuId.MenubarGoMenu,title:g.localize(7,null),group:"6_problem_nav",order:2}})}}(0,D.registerEditorContribution)(r.ID,r),(0,D.registerEditorAction)(o),(0,D.registerEditorAction)(a),(0,D.registerEditorAction)(d),(0,D.registerEditorAction)(u);const f=new i.RawContextKey("markersNavigationVisible",!1),S=D.EditorCommand.bindToContribution(r.get);(0,D.registerEditorCommand)(new S({id:"closeMarkersNavigation",precondition:f,handler:v=>v.close(),kbOpts:{weight:100+50,kbExpr:p.EditorContextKeys.focus,primary:9,secondary:[1024|9]}}))}),define(te[731],ie([1,0,7,228,29,4,2,48,41,162,3,33,32,79,35,58,653,108,542,9,42,128,157,14,158,126,378]),function(j,e,y,m,D,I,w,b,p,h,g,t,i,n,l,c,r,s,o,a,d,u,f,S,v,C){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ReferenceWidget=e.LayoutData=void 0;class _{constructor(M,O){this._editor=M,this._model=O,this._decorations=new Map,this._decorationIgnoreSet=new Set,this._callOnDispose=new w.DisposableStore,this._callOnModelChange=new w.DisposableStore,this._callOnDispose.add(this._editor.onDidChangeModel(()=>this._onModelChanged())),this._onModelChanged()}dispose(){this._callOnModelChange.dispose(),this._callOnDispose.dispose(),this.removeDecorations()}_onModelChanged(){this._callOnModelChange.clear();const M=this._editor.getModel();if(!!M){for(let O of this._model.references)if(O.uri.toString()===M.uri.toString()){this._addDecorations(O.parent);return}}}_addDecorations(M){if(!this._editor.hasModel())return;this._callOnModelChange.add(this._editor.getModel().onDidChangeDecorations(()=>this._onDecorationChanged()));const O=[],B=[];for(let R=0,P=M.children.length;R<P;R++){let F=M.children[R];this._decorationIgnoreSet.has(F.id)||F.uri.toString()===this._editor.getModel().uri.toString()&&(O.push({range:F.range,options:_.DecorationOptions}),B.push(R))}const T=this._editor.deltaDecorations([],O);for(let R=0;R<T.length;R++)this._decorations.set(T[R],M.children[B[R]])}_onDecorationChanged(){const M=[],O=this._editor.getModel();if(!!O){for(let[B,T]of this._decorations){const R=O.getDecorationRange(B);if(!R)continue;let P=!1;if(!g.Range.equalsRange(R,T.range)){if(g.Range.spansMultipleLines(R))P=!0;else{const F=T.range.endColumn-T.range.startColumn,W=R.endColumn-R.startColumn;F!==W&&(P=!0)}P?(this._decorationIgnoreSet.add(T.id),M.push(B)):T.range=R}}for(let B=0,T=M.length;B<T;B++)this._decorations.delete(M[B]);this._editor.deltaDecorations(M,[])}}removeDecorations(){this._editor.deltaDecorations([...this._decorations.keys()],[]),this._decorations.clear()}}_.DecorationOptions=t.ModelDecorationOptions.register({description:"reference-decoration",stickiness:1,className:"reference-decoration"});class L{constructor(){this.ratio=.7,this.heightInLines=18}static fromJSON(M){let O,B;try{const T=JSON.parse(M);O=T.ratio,B=T.heightInLines}catch{}return{ratio:O||.7,heightInLines:B||18}}}e.LayoutData=L;class E extends f.WorkbenchAsyncDataTree{}let N=class extends s.PeekViewWidget{constructor(M,O,B,T,R,P,F,W,A,H,q,X){super(M,{showFrame:!1,showArrow:!0,isResizeable:!0,isAccessible:!0,supportOnTitleClick:!0},P);this._defaultTreeKeyboardSupport=O,this.layoutData=B,this._textModelResolverService=R,this._instantiationService=P,this._peekViewService=F,this._uriLabel=W,this._undoRedoService=A,this._keybindingService=H,this._languageService=q,this._languageConfigurationService=X,this._disposeOnNewModel=new w.DisposableStore,this._callOnDispose=new w.DisposableStore,this._onDidSelectReference=new I.Emitter,this.onDidSelectReference=this._onDidSelectReference.event,this._dim=new y.Dimension(0,0),this._applyTheme(T.getColorTheme()),this._callOnDispose.add(T.onDidColorThemeChange(this._applyTheme.bind(this))),this._peekViewService.addExclusiveWidget(M,this),this.create()}dispose(){this.setModel(void 0),this._callOnDispose.dispose(),this._disposeOnNewModel.dispose(),(0,w.dispose)(this._preview),(0,w.dispose)(this._previewNotAvailableMessage),(0,w.dispose)(this._tree),(0,w.dispose)(this._previewModelReference),this._splitView.dispose(),super.dispose()}_applyTheme(M){const O=M.getColor(s.peekViewBorder)||D.Color.transparent;this.style({arrowColor:O,frameColor:O,headerBackgroundColor:M.getColor(s.peekViewTitleBackground)||D.Color.transparent,primaryHeadingColor:M.getColor(s.peekViewTitleForeground),secondaryHeadingColor:M.getColor(s.peekViewTitleInfoForeground)})}show(M){this.editor.revealRangeInCenterIfOutsideViewport(M,0),super.show(M,this.layoutData.heightInLines||18)}focusOnReferenceTree(){this._tree.domFocus()}focusOnPreviewEditor(){this._preview.focus()}isPreviewEditorFocused(){return this._preview.hasTextFocus()}_onTitleClick(M){this._preview&&this._preview.getModel()&&this._onDidSelectReference.fire({element:this._getFocusedReference(),kind:M.ctrlKey||M.metaKey||M.altKey?"side":"open",source:"title"})}_fillBody(M){this.setCssClass("reference-zone-widget"),this._messageContainer=y.append(M,y.$("div.messages")),y.hide(this._messageContainer),this._splitView=new m.SplitView(M,{orientation:1}),this._previewContainer=y.append(M,y.$("div.preview.inline"));let O={scrollBeyondLastLine:!1,scrollbar:{verticalScrollbarSize:14,horizontal:"auto",useShadows:!0,verticalHasArrows:!1,horizontalHasArrows:!1,alwaysConsumeMouseWheel:!1},overviewRulerLanes:2,fixedOverflowWidgets:!0,minimap:{enabled:!1}};this._preview=this._instantiationService.createInstance(h.EmbeddedCodeEditorWidget,this._previewContainer,O,this.editor),y.hide(this._previewContainer),this._previewNotAvailableMessage=new t.TextModel(o.localize(0,null),n.PLAINTEXT_LANGUAGE_ID,t.TextModel.DEFAULT_CREATION_OPTIONS,null,this._undoRedoService,this._languageService,this._languageConfigurationService),this._treeContainer=y.append(M,y.$("div.ref-tree.inline"));const B={keyboardSupport:this._defaultTreeKeyboardSupport,accessibilityProvider:new r.AccessibilityProvider,keyboardNavigationLabelProvider:this._instantiationService.createInstance(r.StringRepresentationProvider),identityProvider:new r.IdentityProvider,openOnSingleClick:!0,selectionNavigation:!0,overrideStyles:{listBackground:s.peekViewResultsBackground}};this._defaultTreeKeyboardSupport&&this._callOnDispose.add(y.addStandardDisposableListener(this._treeContainer,"keydown",R=>{R.equals(9)&&(this._keybindingService.dispatchEvent(R,R.target),R.stopPropagation())},!0)),this._tree=this._instantiationService.createInstance(E,"ReferencesWidget",this._treeContainer,new r.Delegate,[this._instantiationService.createInstance(r.FileReferencesRenderer),this._instantiationService.createInstance(r.OneReferenceRenderer)],this._instantiationService.createInstance(r.DataSource),B),this._splitView.addView({onDidChange:I.Event.None,element:this._previewContainer,minimumSize:200,maximumSize:Number.MAX_VALUE,layout:R=>{this._preview.layout({height:this._dim.height,width:R})}},m.Sizing.Distribute),this._splitView.addView({onDidChange:I.Event.None,element:this._treeContainer,minimumSize:100,maximumSize:Number.MAX_VALUE,layout:R=>{this._treeContainer.style.height=`${this._dim.height}px`,this._treeContainer.style.width=`${R}px`,this._tree.layout(this._dim.height,R)}},m.Sizing.Distribute),this._disposables.add(this._splitView.onDidSashChange(()=>{this._dim.width&&(this.layoutData.ratio=this._splitView.getViewSize(0)/this._dim.width)},void 0));let T=(R,P)=>{R instanceof C.OneReference&&(P==="show"&&this._revealReference(R,!1),this._onDidSelectReference.fire({element:R,kind:P,source:"tree"}))};this._tree.onDidOpen(R=>{R.sideBySide?T(R.element,"side"):R.editorOptions.pinned?T(R.element,"goto"):T(R.element,"show")}),y.hide(this._treeContainer)}_onWidth(M){this._dim&&this._doLayoutBody(this._dim.height,M)}_doLayoutBody(M,O){super._doLayoutBody(M,O),this._dim=new y.Dimension(O,M),this.layoutData.heightInLines=this._viewZone?this._viewZone.heightInLines:this.layoutData.heightInLines,this._splitView.layout(O),this._splitView.resizeView(0,O*this.layoutData.ratio)}setSelection(M){return this._revealReference(M,!0).then(()=>{!this._model||(this._tree.setSelection([M]),this._tree.setFocus([M]))})}setModel(M){return this._disposeOnNewModel.clear(),this._model=M,this._model?this._onNewModel():Promise.resolve()}_onNewModel(){return this._model?this._model.isEmpty?(this.setTitle(""),this._messageContainer.innerText=o.localize(1,null),y.show(this._messageContainer),Promise.resolve(void 0)):(y.hide(this._messageContainer),this._decorationsManager=new _(this._preview,this._model),this._disposeOnNewModel.add(this._decorationsManager),this._disposeOnNewModel.add(this._model.onDidChangeReferenceRange(M=>this._tree.rerender(M))),this._disposeOnNewModel.add(this._preview.onMouseDown(M=>{const{event:O,target:B}=M;if(O.detail!==2)return;const T=this._getFocusedReference();!T||this._onDidSelectReference.fire({element:{uri:T.uri,range:B.range},kind:O.ctrlKey||O.metaKey||O.altKey?"side":"open",source:"editor"})})),this.container.classList.add("results-loaded"),y.show(this._treeContainer),y.show(this._previewContainer),this._splitView.layout(this._dim.width),this.focusOnReferenceTree(),this._tree.setInput(this._model.groups.length===1?this._model.groups[0]:this._model)):Promise.resolve(void 0)}_getFocusedReference(){const[M]=this._tree.getFocus();if(M instanceof C.OneReference)return M;if(M instanceof C.FileReferences&&M.children.length>0)return M.children[0]}revealReference(M){return ye(this,void 0,void 0,function*(){yield this._revealReference(M,!1),this._onDidSelectReference.fire({element:M,kind:"goto",source:"tree"})})}_revealReference(M,O){return ye(this,void 0,void 0,function*(){if(this._revealedReference===M)return;this._revealedReference=M,M.uri.scheme!==b.Schemas.inMemory?this.setTitle((0,p.basenameOrAuthority)(M.uri),this._uriLabel.getUriLabel((0,p.dirname)(M.uri))):this.setTitle(o.localize(2,null));const B=this._textModelResolverService.createModelReference(M.uri);this._tree.getInput()===M.parent?this._tree.reveal(M):(O&&this._tree.reveal(M.parent),yield this._tree.expand(M.parent),this._tree.reveal(M));const T=yield B;if(!this._model){T.dispose();return}(0,w.dispose)(this._previewModelReference);const R=T.object;if(R){const P=this._preview.getModel()===R.textEditorModel?0:1,F=g.Range.lift(M.range).collapseToStart();this._previewModelReference=T,this._preview.setModel(R.textEditorModel),this._preview.setSelection(F),this._preview.revealRangeInCenter(F,P)}else this._preview.setModel(this._previewNotAvailableMessage),T.dispose()})}};N=Ie([Ce(3,S.IThemeService),Ce(4,c.ITextModelService),Ce(5,a.IInstantiationService),Ce(6,s.IPeekViewService),Ce(7,u.ILabelService),Ce(8,v.IUndoRedoService),Ce(9,d.IKeybindingService),Ce(10,l.ILanguageService),Ce(11,i.ILanguageConfigurationService)],N),e.ReferenceWidget=N}),define(te[297],ie([1,0,10,13,55,2,28,11,3,108,540,26,40,16,9,86,157,38,80,126,731]),function(j,e,y,m,D,I,w,b,p,h,g,t,i,n,l,c,r,s,o,a,d){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ReferencesController=e.ctxReferenceSearchVisible=void 0,e.ctxReferenceSearchVisible=new n.RawContextKey("referenceSearchVisible",!1,g.localize(0,null));let u=class ni{constructor(v,C,_,L,E,N,k,M){this._defaultTreeKeyboardSupport=v,this._editor=C,this._editorService=L,this._notificationService=E,this._instantiationService=N,this._storageService=k,this._configurationService=M,this._disposables=new I.DisposableStore,this._requestIdPool=0,this._ignoreModelChangeEvent=!1,this._referenceSearchVisible=e.ctxReferenceSearchVisible.bindTo(_)}static get(v){return v.getContribution(ni.ID)}dispose(){var v,C;this._referenceSearchVisible.reset(),this._disposables.dispose(),(v=this._widget)===null||v===void 0||v.dispose(),(C=this._model)===null||C===void 0||C.dispose(),this._widget=void 0,this._model=void 0}toggleWidget(v,C,_){let L;if(this._widget&&(L=this._widget.position),this.closeWidget(),!!L&&v.containsPosition(L))return;this._peekMode=_,this._referenceSearchVisible.set(!0),this._disposables.add(this._editor.onDidChangeModelLanguage(()=>{this.closeWidget()})),this._disposables.add(this._editor.onDidChangeModel(()=>{this._ignoreModelChangeEvent||this.closeWidget()}));const E="peekViewLayout",N=d.LayoutData.fromJSON(this._storageService.get(E,0,"{}"));this._widget=this._instantiationService.createInstance(d.ReferenceWidget,this._editor,this._defaultTreeKeyboardSupport,N),this._widget.setTitle(g.localize(1,null)),this._widget.show(v),this._disposables.add(this._widget.onDidClose(()=>{C.cancel(),this._widget&&(this._storageService.store(E,JSON.stringify(this._widget.layoutData),0,1),this._widget=void 0),this.closeWidget()})),this._disposables.add(this._widget.onDidSelectReference(M=>{let{element:O,kind:B}=M;if(!!O)switch(B){case"open":(M.source!=="editor"||!this._configurationService.getValue("editor.stablePeek"))&&this.openReference(O,!1,!1);break;case"side":this.openReference(O,!0,!1);break;case"goto":_?this._gotoReference(O):this.openReference(O,!1,!0);break}}));const k=++this._requestIdPool;C.then(M=>{var O;if(k!==this._requestIdPool||!this._widget){M.dispose();return}return(O=this._model)===null||O===void 0||O.dispose(),this._model=M,this._widget.setModel(this._model).then(()=>{if(this._widget&&this._model&&this._editor.hasModel()){this._model.isEmpty?this._widget.setMetaTitle(""):this._widget.setMetaTitle(g.localize(2,null,this._model.title,this._model.references.length));let B=this._editor.getModel().uri,T=new b.Position(v.startLineNumber,v.startColumn),R=this._model.nearestReference(B,T);if(R)return this._widget.setSelection(R).then(()=>{this._widget&&this._editor.getOption(77)==="editor"&&this._widget.focusOnPreviewEditor()})}})},M=>{this._notificationService.error(M)})}changeFocusBetweenPreviewAndReferences(){!this._widget||(this._widget.isPreviewEditorFocused()?this._widget.focusOnReferenceTree():this._widget.focusOnPreviewEditor())}goToNextOrPreviousReference(v){return ye(this,void 0,void 0,function*(){if(!this._editor.hasModel()||!this._model||!this._widget)return;const C=this._widget.position;if(!C)return;const _=this._model.nearestReference(this._editor.getModel().uri,C);if(!_)return;const L=this._model.nextOrPreviousReference(_,v),E=this._editor.hasTextFocus(),N=this._widget.isPreviewEditorFocused();yield this._widget.setSelection(L),yield this._gotoReference(L),E?this._editor.focus():this._widget&&N&&this._widget.focusOnPreviewEditor()})}revealReference(v){return ye(this,void 0,void 0,function*(){!this._editor.hasModel()||!this._model||!this._widget||(yield this._widget.revealReference(v))})}closeWidget(v=!0){var C,_;(C=this._widget)===null||C===void 0||C.dispose(),(_=this._model)===null||_===void 0||_.dispose(),this._referenceSearchVisible.reset(),this._disposables.clear(),this._widget=void 0,this._model=void 0,v&&this._editor.focus(),this._requestIdPool+=1}_gotoReference(v){this._widget&&this._widget.hide(),this._ignoreModelChangeEvent=!0;const C=p.Range.lift(v.range).collapseToStart();return this._editorService.openCodeEditor({resource:v.uri,options:{selection:C}},this._editor).then(_=>{var L;if(this._ignoreModelChangeEvent=!1,!_||!this._widget){this.closeWidget();return}if(this._editor===_)this._widget.show(C),this._widget.focusOnReferenceTree();else{const E=ni.get(_),N=this._model.clone();this.closeWidget(),_.focus(),E==null||E.toggleWidget(C,(0,y.createCancelablePromise)(k=>Promise.resolve(N)),(L=this._peekMode)!==null&&L!==void 0?L:!1)}},_=>{this._ignoreModelChangeEvent=!1,(0,m.onUnexpectedError)(_)})}openReference(v,C,_){C||this.closeWidget();const{uri:L,range:E}=v;this._editorService.openCodeEditor({resource:L,options:{selection:E,pinned:_}},this._editor,C)}};u.ID="editor.contrib.referencesController",u=Ie([Ce(2,n.IContextKeyService),Ce(3,w.ICodeEditorService),Ce(4,s.INotificationService),Ce(5,l.IInstantiationService),Ce(6,o.IStorageService),Ce(7,i.IConfigurationService)],u),e.ReferencesController=u;function f(S,v){const C=(0,h.getOuterEditor)(S);if(!C)return;const _=u.get(C);_&&v(_)}c.KeybindingsRegistry.registerCommandAndKeybindingRule({id:"togglePeekWidgetFocus",weight:100,primary:(0,D.KeyChord)(2048|41,60),when:n.ContextKeyExpr.or(e.ctxReferenceSearchVisible,h.PeekContext.inPeekEditor),handler(S){f(S,v=>{v.changeFocusBetweenPreviewAndReferences()})}}),c.KeybindingsRegistry.registerCommandAndKeybindingRule({id:"goToNextReference",weight:100-10,primary:62,secondary:[70],when:n.ContextKeyExpr.or(e.ctxReferenceSearchVisible,h.PeekContext.inPeekEditor),handler(S){f(S,v=>{v.goToNextOrPreviousReference(!0)})}}),c.KeybindingsRegistry.registerCommandAndKeybindingRule({id:"goToPreviousReference",weight:100-10,primary:1024|62,secondary:[1024|70],when:n.ContextKeyExpr.or(e.ctxReferenceSearchVisible,h.PeekContext.inPeekEditor),handler(S){f(S,v=>{v.goToNextOrPreviousReference(!1)})}}),t.CommandsRegistry.registerCommandAlias("goToNextReferenceFromEmbeddedEditor","goToNextReference"),t.CommandsRegistry.registerCommandAlias("goToPreviousReferenceFromEmbeddedEditor","goToPreviousReference"),t.CommandsRegistry.registerCommandAlias("closeReferenceSearchEditor","closeReferenceSearch"),t.CommandsRegistry.registerCommand("closeReferenceSearch",S=>f(S,v=>v.closeWidget())),c.KeybindingsRegistry.registerKeybindingRule({id:"closeReferenceSearch",weight:100-101,primary:9,secondary:[1024|9],when:n.ContextKeyExpr.and(h.PeekContext.inPeekEditor,n.ContextKeyExpr.not("config.editor.stablePeek"))}),c.KeybindingsRegistry.registerKeybindingRule({id:"closeReferenceSearch",weight:200+50,primary:9,secondary:[1024|9],when:n.ContextKeyExpr.and(e.ctxReferenceSearchVisible,n.ContextKeyExpr.not("config.editor.stablePeek"))}),c.KeybindingsRegistry.registerCommandAndKeybindingRule({id:"revealReference",weight:200,primary:3,mac:{primary:3,secondary:[2048|18]},when:n.ContextKeyExpr.and(e.ctxReferenceSearchVisible,r.WorkbenchListFocusContextKey,r.WorkbenchTreeElementCanCollapse.negate(),r.WorkbenchTreeElementCanExpand.negate()),handler(S){var v;const _=(v=S.get(r.IListService).lastFocusedList)===null||v===void 0?void 0:v.getFocus();Array.isArray(_)&&_[0]instanceof a.OneReference&&f(S,L=>L.revealReference(_[0]))}}),c.KeybindingsRegistry.registerCommandAndKeybindingRule({id:"openReferenceToSide",weight:100,primary:2048|3,mac:{primary:256|3},when:n.ContextKeyExpr.and(e.ctxReferenceSearchVisible,r.WorkbenchListFocusContextKey,r.WorkbenchTreeElementCanCollapse.negate(),r.WorkbenchTreeElementCanExpand.negate()),handler(S){var v;const _=(v=S.get(r.IListService).lastFocusedList)===null||v===void 0?void 0:v.getFocus();Array.isArray(_)&&_[0]instanceof a.OneReference&&f(S,L=>L.openReference(_[0],!0,!0))}}),t.CommandsRegistry.registerCommand("openReference",S=>{var v;const _=(v=S.get(r.IListService).lastFocusedList)===null||v===void 0?void 0:v.getFocus();Array.isArray(_)&&_[0]instanceof a.OneReference&&f(S,L=>L.openReference(_[0],!1,!0))})}),define(te[208],ie([1,0,34,43,10,55,17,20,25,106,148,15,28,162,11,3,24,18,297,126,671,156,108,538,37,26,16,9,38,71,286]),function(j,e,y,m,D,I,w,b,p,h,g,t,i,n,l,c,r,s,o,a,d,u,f,S,v,C,_,L,E,N,k){"use strict";var M,O,B,T,R,P,F,W;Object.defineProperty(e,"__esModule",{value:!0}),e.DefinitionAction=e.SymbolNavigationAction=e.SymbolNavigationAnchor=void 0,v.MenuRegistry.appendMenuItem(v.MenuId.EditorContext,{submenu:v.MenuId.EditorContextPeek,title:S.localize(0,null),group:"navigation",order:100});const A=new Set;function H(Q){const ne=new Q;return(0,t.registerInstantiatedEditorAction)(ne),A.add(ne.id),ne}class q{constructor(ne,ce){this.model=ne,this.position=ce}static is(ne){return!ne||typeof ne!="object"?!1:!!(ne instanceof q||l.Position.isIPosition(ne.position)&&ne.model)}}e.SymbolNavigationAnchor=q;class X extends t.EditorAction{constructor(ne,ce){super(ce);this.configuration=ne}run(ne,ce,ee){if(!ce.hasModel())return Promise.resolve(void 0);const ue=ne.get(E.INotificationService),z=ne.get(i.ICodeEditorService),V=ne.get(N.IEditorProgressService),$=ne.get(d.ISymbolNavigationService),K=ce.getModel(),J=ce.getPosition(),Y=q.is(ee)?ee:new q(K,J),se=new h.EditorStateCancellationTokenSource(ce,1|4),ge=(0,D.raceCancellation)(this._getLocationModel(Y.model,Y.position,se.token),se.token).then(me=>ye(this,void 0,void 0,function*(){var le;if(!me||se.token.isCancellationRequested)return;(0,m.alert)(me.ariaMessage);let he;if(me.referenceAt(K.uri,J)){const pe=this._getAlternativeCommand(ce);pe!==this.id&&A.has(pe)&&(he=ce.getAction(pe))}const ve=me.references.length;if(ve===0){if(!this.configuration.muteMessage){const pe=K.getWordAtPosition(J);(le=u.MessageController.get(ce))===null||le===void 0||le.showMessage(this._getNoResultFoundMessage(pe),J)}}else if(ve===1&&he)he.run();else return this._onResult(z,$,ce,me)}),me=>{ue.error(me)}).finally(()=>{se.dispose()});return V.showWhile(ge,250),ge}_onResult(ne,ce,ee,ue){return ye(this,void 0,void 0,function*(){const z=this._getGoToPreference(ee);if(!(ee instanceof n.EmbeddedCodeEditorWidget)&&(this.configuration.openInPeek||z==="peek"&&ue.references.length>1))this._openInPeek(ee,ue);else{const V=ue.firstReference(),$=ue.references.length>1&&z==="gotoAndPeek",K=yield this._openReference(ee,ne,V,this.configuration.openToSide,!$);$&&K?this._openInPeek(K,ue):ue.dispose(),z==="goto"&&ce.put(V)}})}_openReference(ne,ce,ee,ue,z){return ye(this,void 0,void 0,function*(){let V;if((0,s.isLocationLink)(ee)&&(V=ee.targetSelectionRange),V||(V=ee.range),!V)return;const $=yield ce.openCodeEditor({resource:ee.uri,options:{selection:c.Range.collapseToStart(V),selectionRevealType:3}},ne,ue);if(!!$){if(z){const K=$.getModel(),J=$.deltaDecorations([],[{range:V,options:{description:"symbol-navigate-action-highlight",className:"symbolHighlight"}}]);setTimeout(()=>{$.getModel()===K&&$.deltaDecorations(J,[])},350)}return $}})}_openInPeek(ne,ce){const ee=o.ReferencesController.get(ne);ee&&ne.hasModel()?ee.toggleWidget(ne.getSelection(),(0,D.createCancelablePromise)(ue=>Promise.resolve(ce)),this.configuration.openInPeek):ce.dispose()}}e.SymbolNavigationAction=X;class G extends X{_getLocationModel(ne,ce,ee){return ye(this,void 0,void 0,function*(){return new a.ReferencesModel(yield(0,k.getDefinitionsAtPosition)(ne,ce,ee),S.localize(1,null))})}_getNoResultFoundMessage(ne){return ne&&ne.word?S.localize(2,null,ne.word):S.localize(3,null)}_getAlternativeCommand(ne){return ne.getOption(51).alternativeDefinitionCommand}_getGoToPreference(ne){return ne.getOption(51).multipleDefinitions}}e.DefinitionAction=G;const re=w.isWeb&&!y.isStandalone?2048|70:70;H((M=class si extends G{constructor(){super({openToSide:!1,openInPeek:!1,muteMessage:!1},{id:si.id,label:S.localize(4,null),alias:"Go to Definition",precondition:_.ContextKeyExpr.and(r.EditorContextKeys.hasDefinitionProvider,r.EditorContextKeys.isInWalkThroughSnippet.toNegated()),kbOpts:{kbExpr:r.EditorContextKeys.editorTextFocus,primary:re,weight:100},contextMenuOpts:{group:"navigation",order:1.1}});C.CommandsRegistry.registerCommandAlias("editor.action.goToDeclaration",si.id)}},M.id="editor.action.revealDefinition",M)),H((O=class oi extends G{constructor(){super({openToSide:!0,openInPeek:!1,muteMessage:!1},{id:oi.id,label:S.localize(5,null),alias:"Open Definition to the Side",precondition:_.ContextKeyExpr.and(r.EditorContextKeys.hasDefinitionProvider,r.EditorContextKeys.isInWalkThroughSnippet.toNegated()),kbOpts:{kbExpr:r.EditorContextKeys.editorTextFocus,primary:(0,I.KeyChord)(2048|41,re),weight:100}});C.CommandsRegistry.registerCommandAlias("editor.action.openDeclarationToTheSide",oi.id)}},O.id="editor.action.revealDefinitionAside",O)),H((B=class ri extends G{constructor(){super({openToSide:!1,openInPeek:!0,muteMessage:!1},{id:ri.id,label:S.localize(6,null),alias:"Peek Definition",precondition:_.ContextKeyExpr.and(r.EditorContextKeys.hasDefinitionProvider,f.PeekContext.notInPeekEditor,r.EditorContextKeys.isInWalkThroughSnippet.toNegated()),kbOpts:{kbExpr:r.EditorContextKeys.editorTextFocus,primary:512|70,linux:{primary:2048|1024|68},weight:100},contextMenuOpts:{menuId:v.MenuId.EditorContextPeek,group:"peek",order:2}});C.CommandsRegistry.registerCommandAlias("editor.action.previewDeclaration",ri.id)}},B.id="editor.action.peekDefinition",B));class ae extends X{_getLocationModel(ne,ce,ee){return ye(this,void 0,void 0,function*(){return new a.ReferencesModel(yield(0,k.getDeclarationsAtPosition)(ne,ce,ee),S.localize(7,null))})}_getNoResultFoundMessage(ne){return ne&&ne.word?S.localize(8,null,ne.word):S.localize(9,null)}_getAlternativeCommand(ne){return ne.getOption(51).alternativeDeclarationCommand}_getGoToPreference(ne){return ne.getOption(51).multipleDeclarations}}H((T=class Wi extends ae{constructor(){super({openToSide:!1,openInPeek:!1,muteMessage:!1},{id:Wi.id,label:S.localize(10,null),alias:"Go to Declaration",precondition:_.ContextKeyExpr.and(r.EditorContextKeys.hasDeclarationProvider,r.EditorContextKeys.isInWalkThroughSnippet.toNegated()),contextMenuOpts:{group:"navigation",order:1.3}})}_getNoResultFoundMessage(ne){return ne&&ne.word?S.localize(11,null,ne.word):S.localize(12,null)}},T.id="editor.action.revealDeclaration",T)),H(class extends ae{constructor(){super({openToSide:!1,openInPeek:!0,muteMessage:!1},{id:"editor.action.peekDeclaration",label:S.localize(13,null),alias:"Peek Declaration",precondition:_.ContextKeyExpr.and(r.EditorContextKeys.hasDeclarationProvider,f.PeekContext.notInPeekEditor,r.EditorContextKeys.isInWalkThroughSnippet.toNegated()),contextMenuOpts:{menuId:v.MenuId.EditorContextPeek,group:"peek",order:3}})}});class oe extends X{_getLocationModel(ne,ce,ee){return ye(this,void 0,void 0,function*(){return new a.ReferencesModel(yield(0,k.getTypeDefinitionsAtPosition)(ne,ce,ee),S.localize(14,null))})}_getNoResultFoundMessage(ne){return ne&&ne.word?S.localize(15,null,ne.word):S.localize(16,null)}_getAlternativeCommand(ne){return ne.getOption(51).alternativeTypeDefinitionCommand}_getGoToPreference(ne){return ne.getOption(51).multipleTypeDefinitions}}H((R=class xi extends oe{constructor(){super({openToSide:!1,openInPeek:!1,muteMessage:!1},{id:xi.ID,label:S.localize(17,null),alias:"Go to Type Definition",precondition:_.ContextKeyExpr.and(r.EditorContextKeys.hasTypeDefinitionProvider,r.EditorContextKeys.isInWalkThroughSnippet.toNegated()),kbOpts:{kbExpr:r.EditorContextKeys.editorTextFocus,primary:0,weight:100},contextMenuOpts:{group:"navigation",order:1.4}})}},R.ID="editor.action.goToTypeDefinition",R)),H((P=class Vi extends oe{constructor(){super({openToSide:!1,openInPeek:!0,muteMessage:!1},{id:Vi.ID,label:S.localize(18,null),alias:"Peek Type Definition",precondition:_.ContextKeyExpr.and(r.EditorContextKeys.hasTypeDefinitionProvider,f.PeekContext.notInPeekEditor,r.EditorContextKeys.isInWalkThroughSnippet.toNegated()),contextMenuOpts:{menuId:v.MenuId.EditorContextPeek,group:"peek",order:4}})}},P.ID="editor.action.peekTypeDefinition",P));class Z extends X{_getLocationModel(ne,ce,ee){return ye(this,void 0,void 0,function*(){return new a.ReferencesModel(yield(0,k.getImplementationsAtPosition)(ne,ce,ee),S.localize(19,null))})}_getNoResultFoundMessage(ne){return ne&&ne.word?S.localize(20,null,ne.word):S.localize(21,null)}_getAlternativeCommand(ne){return ne.getOption(51).alternativeImplementationCommand}_getGoToPreference(ne){return ne.getOption(51).multipleImplementations}}H((F=class zi extends Z{constructor(){super({openToSide:!1,openInPeek:!1,muteMessage:!1},{id:zi.ID,label:S.localize(22,null),alias:"Go to Implementations",precondition:_.ContextKeyExpr.and(r.EditorContextKeys.hasImplementationProvider,r.EditorContextKeys.isInWalkThroughSnippet.toNegated()),kbOpts:{kbExpr:r.EditorContextKeys.editorTextFocus,primary:2048|70,weight:100},contextMenuOpts:{group:"navigation",order:1.45}})}},F.ID="editor.action.goToImplementation",F)),H((W=class Hi extends Z{constructor(){super({openToSide:!1,openInPeek:!0,muteMessage:!1},{id:Hi.ID,label:S.localize(23,null),alias:"Peek Implementations",precondition:_.ContextKeyExpr.and(r.EditorContextKeys.hasImplementationProvider,f.PeekContext.notInPeekEditor,r.EditorContextKeys.isInWalkThroughSnippet.toNegated()),kbOpts:{kbExpr:r.EditorContextKeys.editorTextFocus,primary:2048|1024|70,weight:100},contextMenuOpts:{menuId:v.MenuId.EditorContextPeek,group:"peek",order:5}})}},W.ID="editor.action.peekImplementation",W));class x extends X{_getNoResultFoundMessage(ne){return ne?S.localize(24,null,ne.word):S.localize(25,null)}_getAlternativeCommand(ne){return ne.getOption(51).alternativeReferenceCommand}_getGoToPreference(ne){return ne.getOption(51).multipleReferences}}H(class extends x{constructor(){super({openToSide:!1,openInPeek:!1,muteMessage:!1},{id:"editor.action.goToReferences",label:S.localize(26,null),alias:"Go to References",precondition:_.ContextKeyExpr.and(r.EditorContextKeys.hasReferenceProvider,f.PeekContext.notInPeekEditor,r.EditorContextKeys.isInWalkThroughSnippet.toNegated()),kbOpts:{kbExpr:r.EditorContextKeys.editorTextFocus,primary:1024|70,weight:100},contextMenuOpts:{group:"navigation",order:1.45}})}_getLocationModel(ne,ce,ee){return ye(this,void 0,void 0,function*(){return new a.ReferencesModel(yield(0,k.getReferencesAtPosition)(ne,ce,!0,ee),S.localize(27,null))})}}),H(class extends x{constructor(){super({openToSide:!1,openInPeek:!0,muteMessage:!1},{id:"editor.action.referenceSearch.trigger",label:S.localize(28,null),alias:"Peek References",precondition:_.ContextKeyExpr.and(r.EditorContextKeys.hasReferenceProvider,f.PeekContext.notInPeekEditor,r.EditorContextKeys.isInWalkThroughSnippet.toNegated()),contextMenuOpts:{menuId:v.MenuId.EditorContextPeek,group:"peek",order:6}})}_getLocationModel(ne,ce,ee){return ye(this,void 0,void 0,function*(){return new a.ReferencesModel(yield(0,k.getReferencesAtPosition)(ne,ce,!1,ee),S.localize(29,null))})}});class U extends X{constructor(ne,ce,ee){super(ne,{id:"editor.action.goToLocation",label:S.localize(30,null),alias:"Go to Any Symbol",precondition:_.ContextKeyExpr.and(f.PeekContext.notInPeekEditor,r.EditorContextKeys.isInWalkThroughSnippet.toNegated())});this._references=ce,this._gotoMultipleBehaviour=ee}_getLocationModel(ne,ce,ee){return ye(this,void 0,void 0,function*(){return new a.ReferencesModel(this._references,S.localize(31,null))})}_getNoResultFoundMessage(ne){return ne&&S.localize(32,null,ne.word)||""}_getGoToPreference(ne){var ce;return(ce=this._gotoMultipleBehaviour)!==null&&ce!==void 0?ce:ne.getOption(51).multipleReferences}_getAlternativeCommand(){return""}}C.CommandsRegistry.registerCommand({id:"editor.action.goToLocations",description:{description:"Go to locations from a position in a file",args:[{name:"uri",description:"The text document in which to start",constraint:p.URI},{name:"position",description:"The position at which to start",constraint:l.Position.isIPosition},{name:"locations",description:"An array of locations.",constraint:Array},{name:"multiple",description:"Define what to do when having multiple results, either `peek`, `gotoAndPeek`, or `goto"},{name:"noResultsMessage",description:"Human readable message that shows when locations is empty."}]},handler:(Q,ne,ce,ee,ue,z,V)=>ye(void 0,void 0,void 0,function*(){(0,b.assertType)(p.URI.isUri(ne)),(0,b.assertType)(l.Position.isIPosition(ce)),(0,b.assertType)(Array.isArray(ee)),(0,b.assertType)(typeof ue=="undefined"||typeof ue=="string"),(0,b.assertType)(typeof V=="undefined"||typeof V=="boolean");const $=Q.get(i.ICodeEditorService),K=yield $.openCodeEditor({resource:ne},$.getFocusedCodeEditor());if((0,g.isCodeEditor)(K))return K.setPosition(ce),K.revealPositionInCenterIfOutsideViewport(ce,0),K.invokeWithinContext(J=>{const Y=new class extends U{_getNoResultFoundMessage(se){return z||super._getNoResultFoundMessage(se)}}({muteMessage:!Boolean(z),openInPeek:Boolean(V),openToSide:!1},ee,ue);J.get(L.IInstantiationService).invokeFunction(Y.run.bind(Y),K)})})}),C.CommandsRegistry.registerCommand({id:"editor.action.peekLocations",description:{description:"Peek locations from a position in a file",args:[{name:"uri",description:"The text document in which to start",constraint:p.URI},{name:"position",description:"The position at which to start",constraint:l.Position.isIPosition},{name:"locations",description:"An array of locations.",constraint:Array},{name:"multiple",description:"Define what to do when having multiple results, either `peek`, `gotoAndPeek`, or `goto"}]},handler:(Q,ne,ce,ee,ue)=>ye(void 0,void 0,void 0,function*(){Q.get(C.ICommandService).executeCommand("editor.action.goToLocations",ne,ce,ee,ue,void 0,!0)})}),C.CommandsRegistry.registerCommand({id:"editor.action.findReferences",handler:(Q,ne,ce)=>{(0,b.assertType)(p.URI.isUri(ne)),(0,b.assertType)(l.Position.isIPosition(ce));const ee=Q.get(i.ICodeEditorService);return ee.openCodeEditor({resource:ne},ee.getFocusedCodeEditor()).then(ue=>{if(!(0,g.isCodeEditor)(ue)||!ue.hasModel())return;const z=o.ReferencesController.get(ue);if(!z)return;const V=(0,D.createCancelablePromise)(K=>(0,k.getReferencesAtPosition)(ue.getModel(),l.Position.lift(ce),!1,K).then(J=>new a.ReferencesModel(J,S.localize(33,null)))),$=new c.Range(ce.lineNumber,ce.column,ce.lineNumber,ce.column);return Promise.resolve(z.toggleWidget($,V,!1))})}}),C.CommandsRegistry.registerCommandAlias("editor.action.showReferences","editor.action.peekLocations"),v.MenuRegistry.appendMenuItems([{id:v.MenuId.MenubarGoMenu,item:{command:{id:"editor.action.revealDefinition",title:S.localize(34,null)},group:"4_symbol_nav",order:2}},{id:v.MenuId.MenubarGoMenu,item:{command:{id:"editor.action.revealDeclaration",title:S.localize(35,null)},group:"4_symbol_nav",order:3}},{id:v.MenuId.MenubarGoMenu,item:{command:{id:"editor.action.goToTypeDefinition",title:S.localize(36,null)},group:"4_symbol_nav",order:3}},{id:v.MenuId.MenubarGoMenu,item:{command:{id:"editor.action.goToImplementation",title:S.localize(37,null)},group:"4_symbol_nav",order:4}},{id:v.MenuId.MenubarGoMenu,item:{command:{id:"editor.action.goToReferences",title:S.localize(38,null)},group:"4_symbol_nav",order:5}}])}),define(te[298],ie([1,0,10,13,66,2,20,106,15,11,3,18,35,58,186,108,539,16,23,14,208,286,377]),function(j,e,y,m,D,I,w,b,p,h,g,t,i,n,l,c,r,s,o,a,d,u){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.GotoDefinitionAtPositionEditorContribution=void 0;let f=class Tt{constructor(v,C,_){this.textModelResolverService=C,this.languageService=_,this.toUnhook=new I.DisposableStore,this.toUnhookForKeyboard=new I.DisposableStore,this.linkDecorations=[],this.currentWordAtPosition=null,this.previousPromise=null,this.editor=v;let L=new l.ClickLinkGesture(v);this.toUnhook.add(L),this.toUnhook.add(L.onMouseMoveOrRelevantKeyDown(([E,N])=>{this.startFindDefinitionFromMouse(E,(0,w.withNullAsUndefined)(N))})),this.toUnhook.add(L.onExecute(E=>{this.isEnabled(E)&&this.gotoDefinition(E.target.position,E.hasSideBySideModifier).then(()=>{this.removeLinkDecorations()},N=>{this.removeLinkDecorations(),(0,m.onUnexpectedError)(N)})})),this.toUnhook.add(L.onCancel(()=>{this.removeLinkDecorations(),this.currentWordAtPosition=null}))}static get(v){return v.getContribution(Tt.ID)}startFindDefinitionFromCursor(v){return this.startFindDefinition(v).then(()=>{this.toUnhookForKeyboard.add(this.editor.onDidChangeCursorPosition(()=>{this.currentWordAtPosition=null,this.removeLinkDecorations(),this.toUnhookForKeyboard.clear()})),this.toUnhookForKeyboard.add(this.editor.onKeyDown(C=>{C&&(this.currentWordAtPosition=null,this.removeLinkDecorations(),this.toUnhookForKeyboard.clear())}))})}startFindDefinitionFromMouse(v,C){if(v.target.type===9&&this.linkDecorations.length>0)return;if(!this.editor.hasModel()||!this.isEnabled(v,C)){this.currentWordAtPosition=null,this.removeLinkDecorations();return}const _=v.target.position;this.startFindDefinition(_)}startFindDefinition(v){var C;this.toUnhookForKeyboard.clear();const _=v?(C=this.editor.getModel())===null||C===void 0?void 0:C.getWordAtPosition(v):null;if(!_)return this.currentWordAtPosition=null,this.removeLinkDecorations(),Promise.resolve(0);if(this.currentWordAtPosition&&this.currentWordAtPosition.startColumn===_.startColumn&&this.currentWordAtPosition.endColumn===_.endColumn&&this.currentWordAtPosition.word===_.word)return Promise.resolve(0);this.currentWordAtPosition=_;let L=new b.EditorState(this.editor,4|1|2|8);return this.previousPromise&&(this.previousPromise.cancel(),this.previousPromise=null),this.previousPromise=(0,y.createCancelablePromise)(E=>this.findDefinition(v,E)),this.previousPromise.then(E=>{if(!E||!E.length||!L.validate(this.editor)){this.removeLinkDecorations();return}if(E.length>1)this.addDecoration(new g.Range(v.lineNumber,_.startColumn,v.lineNumber,_.endColumn),new D.MarkdownString().appendText(r.localize(0,null,E.length)));else{let N=E[0];if(!N.uri)return;this.textModelResolverService.createModelReference(N.uri).then(k=>{if(!k.object||!k.object.textEditorModel){k.dispose();return}const{object:{textEditorModel:M}}=k,{startLineNumber:O}=N.range;if(O<1||O>M.getLineCount()){k.dispose();return}const B=this.getPreviewValue(M,O,N);let T;N.originSelectionRange?T=g.Range.lift(N.originSelectionRange):T=new g.Range(v.lineNumber,_.startColumn,v.lineNumber,_.endColumn);const R=this.languageService.guessLanguageIdByFilepathOrFirstLine(M.uri);this.addDecoration(T,new D.MarkdownString().appendCodeblock(R||"",B)),k.dispose()})}}).then(void 0,m.onUnexpectedError)}getPreviewValue(v,C,_){let L=_.targetSelectionRange?_.range:this.getPreviewRangeBasedOnBrackets(v,C);return L.endLineNumber-L.startLineNumber>=Tt.MAX_SOURCE_PREVIEW_LINES&&(L=this.getPreviewRangeBasedOnIndentation(v,C)),this.stripIndentationFromPreviewRange(v,C,L)}stripIndentationFromPreviewRange(v,C,_){let E=v.getLineFirstNonWhitespaceColumn(C);for(let k=C+1;k<_.endLineNumber;k++){const M=v.getLineFirstNonWhitespaceColumn(k);E=Math.min(E,M)}return v.getValueInRange(_).replace(new RegExp(`^\\s{${E-1}}`,"gm"),"").trim()}getPreviewRangeBasedOnIndentation(v,C){const _=v.getLineFirstNonWhitespaceColumn(C),L=Math.min(v.getLineCount(),C+Tt.MAX_SOURCE_PREVIEW_LINES);let E=C+1;for(;E<L;E++){let N=v.getLineFirstNonWhitespaceColumn(E);if(_===N)break}return new g.Range(C,1,E+1,1)}getPreviewRangeBasedOnBrackets(v,C){const _=Math.min(v.getLineCount(),C+Tt.MAX_SOURCE_PREVIEW_LINES),L=[];let E=!0,N=v.bracketPairs.findNextBracket(new h.Position(C,1));for(;N!==null;){if(L.length===0)L.push(N);else{const B=L[L.length-1];if(B.open[0]===N.open[0]&&B.isOpen&&!N.isOpen?L.pop():L.push(N),L.length===0)if(E)E=!1;else return new g.Range(C,1,N.range.endLineNumber+1,1)}const k=v.getLineMaxColumn(C);let M=N.range.endLineNumber,O=N.range.endColumn;if(k===N.range.endColumn&&(M++,O=1),M>_)return new g.Range(C,1,_+1,1);N=v.bracketPairs.findNextBracket(new h.Position(M,O))}return new g.Range(C,1,_+1,1)}addDecoration(v,C){const _={range:v,options:{description:"goto-definition-link",inlineClassName:"goto-definition-link",hoverMessage:C}};this.linkDecorations=this.editor.deltaDecorations(this.linkDecorations,[_])}removeLinkDecorations(){this.linkDecorations.length>0&&(this.linkDecorations=this.editor.deltaDecorations(this.linkDecorations,[]))}isEnabled(v,C){return this.editor.hasModel()&&v.isNoneOrSingleMouseDown&&v.target.type===6&&(v.hasTriggerModifier||(C?C.keyCodeIsTriggerKey:!1))&&t.DefinitionProviderRegistry.has(this.editor.getModel())}findDefinition(v,C){const _=this.editor.getModel();return _?(0,u.getDefinitionsAtPosition)(_,v,C):Promise.resolve(null)}gotoDefinition(v,C){return this.editor.setPosition(v),this.editor.invokeWithinContext(_=>{const L=!C&&this.editor.getOption(78)&&!this.isInPeekEditor(_);return new d.DefinitionAction({openToSide:C,openInPeek:L,muteMessage:!0},{alias:"",label:"",id:"",precondition:void 0}).run(_,this.editor)})}isInPeekEditor(v){const C=v.get(s.IContextKeyService);return c.PeekContext.inPeekEditor.getValue(C)}dispose(){this.toUnhook.dispose()}};f.ID="editor.contrib.gotodefinitionatposition",f.MAX_SOURCE_PREVIEW_LINES=8,f=Ie([Ce(1,n.ITextModelService),Ce(2,i.ILanguageService)],f),e.GotoDefinitionAtPositionEditorContribution=f,(0,p.registerEditorContribution)(f.ID,f),(0,a.registerThemingParticipant)((S,v)=>{const C=S.getColor(o.editorActiveLinkForeground);C&&v.addRule(`.monaco-editor .goto-definition-link { color: ${C} !important; }`)})}),define(te[732],ie([1,0,7,19,10,13,2,41,3,196,155,288,152,296,547,77,51,71,23,14]),function(j,e,y,m,D,I,w,b,p,h,g,t,i,n,l,c,r,s,o,a){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MarkerHoverParticipant=e.MarkerHover=void 0;const d=y.$;class u{constructor(C,_,L){this.owner=C,this.range=_,this.marker=L}isValidForHoverAnchor(C){return C.type===1&&this.range.startColumn<=C.range.startColumn&&this.range.endColumn>=C.range.endColumn}}e.MarkerHover=u;const f={type:1,filter:{include:i.CodeActionKind.QuickFix}};let S=class{constructor(C,_,L){this._editor=C,this._markerDecorationsService=_,this._openerService=L,this.recentMarkerCodeActionsInfo=void 0}computeSync(C,_){if(!this._editor.hasModel()||C.type!==1)return[];const L=this._editor.getModel(),E=C.range.startLineNumber,N=L.getLineMaxColumn(E),k=[];for(const M of _){const O=M.range.startLineNumber===E?M.range.startColumn:1,B=M.range.endLineNumber===E?M.range.endColumn:N,T=this._markerDecorationsService.getMarker(L.uri,M);if(!T)continue;const R=new p.Range(C.range.startLineNumber,O,C.range.startLineNumber,B);k.push(new u(this,R,T))}return k}renderHoverParts(C,_){if(!_.length)return w.Disposable.None;const L=new w.DisposableStore;_.forEach(N=>C.fragment.appendChild(this.renderMarkerHover(N,L)));const E=_.length===1?_[0]:_.sort((N,k)=>c.MarkerSeverity.compare(N.marker.severity,k.marker.severity))[0];return this.renderMarkerStatusbar(C,E,L),L}renderMarkerHover(C,_){const L=d("div.hover-row"),E=y.append(L,d("div.marker.hover-contents")),{source:N,message:k,code:M,relatedInformation:O}=C.marker;this._editor.applyFontInfo(E);const B=y.append(E,d("span"));if(B.style.whiteSpace="pre-wrap",B.innerText=k,N||M)if(M&&typeof M!="string"){const T=d("span");if(N){const W=y.append(T,d("span"));W.innerText=N}const R=y.append(T,d("a.code-link"));R.setAttribute("href",M.target.toString()),_.add(y.addDisposableListener(R,"click",W=>{this._openerService.open(M.target,{allowCommands:!0}),W.preventDefault(),W.stopPropagation()}));const P=y.append(R,d("span"));P.innerText=M.value;const F=y.append(E,T);F.style.opacity="0.6",F.style.paddingLeft="6px"}else{const T=y.append(E,d("span"));T.style.opacity="0.6",T.style.paddingLeft="6px",T.innerText=N&&M?`${N}(${M})`:N||`(${M})`}if((0,m.isNonEmptyArray)(O))for(const{message:T,resource:R,startLineNumber:P,startColumn:F}of O){const W=y.append(E,d("div"));W.style.marginTop="8px";const A=y.append(W,d("a"));A.innerText=`${(0,b.basename)(R)}(${P}, ${F}): `,A.style.cursor="pointer",_.add(y.addDisposableListener(A,"click",q=>{q.stopPropagation(),q.preventDefault(),this._openerService&&this._openerService.open(R,{fromUserGesture:!0,editorOptions:{selection:{startLineNumber:P,startColumn:F}}}).catch(I.onUnexpectedError)}));const H=y.append(W,d("span"));H.innerText=T,this._editor.applyFontInfo(H)}return L}renderMarkerStatusbar(C,_,L){if((_.marker.severity===c.MarkerSeverity.Error||_.marker.severity===c.MarkerSeverity.Warning||_.marker.severity===c.MarkerSeverity.Info)&&C.statusBar.addAction({label:l.localize(0,null),commandId:n.NextMarkerAction.ID,run:()=>{var E;C.hide(),(E=n.MarkerController.get(this._editor))===null||E===void 0||E.showAtMarker(_.marker),this._editor.focus()}}),!this._editor.getOption(81)){const E=C.statusBar.append(d("div"));this.recentMarkerCodeActionsInfo&&(c.IMarkerData.makeKey(this.recentMarkerCodeActionsInfo.marker)===c.IMarkerData.makeKey(_.marker)?this.recentMarkerCodeActionsInfo.hasCodeActions||(E.textContent=l.localize(1,null)):this.recentMarkerCodeActionsInfo=void 0);const N=this.recentMarkerCodeActionsInfo&&!this.recentMarkerCodeActionsInfo.hasCodeActions?w.Disposable.None:L.add((0,D.disposableTimeout)(()=>E.textContent=l.localize(2,null),200));E.textContent||(E.textContent=String.fromCharCode(160));const k=this.getCodeActions(_.marker);L.add((0,w.toDisposable)(()=>k.cancel())),k.then(M=>{if(N.dispose(),this.recentMarkerCodeActionsInfo={marker:_.marker,hasCodeActions:M.validActions.length>0},!this.recentMarkerCodeActionsInfo.hasCodeActions){M.dispose(),E.textContent=l.localize(3,null);return}E.style.display="none";let O=!1;L.add((0,w.toDisposable)(()=>{O||M.dispose()})),C.statusBar.addAction({label:l.localize(4,null),commandId:t.QuickFixAction.Id,run:B=>{O=!0;const T=t.QuickFixController.get(this._editor),R=y.getDomNodePagePosition(B);C.hide(),T==null||T.showCodeActions(f,M,{x:R.left+6,y:R.top+R.height+6})}})},I.onUnexpectedError)}}getCodeActions(C){return(0,D.createCancelablePromise)(_=>(0,g.getCodeActions)(this._editor.getModel(),new p.Range(C.startLineNumber,C.startColumn,C.endLineNumber,C.endColumn),f,s.Progress.None,_))}};S=Ie([Ce(1,h.IMarkerDecorationsService),Ce(2,r.IOpenerService)],S),e.MarkerHoverParticipant=S,(0,a.registerThemingParticipant)((v,C)=>{const _=v.getColor(o.textLinkForeground);_&&C.addRule(`.monaco-hover .hover-contents a.code-link span { color: ${_}; }`);const L=v.getColor(o.textLinkActiveForeground);L&&C.addRule(`.monaco-hover .hover-contents a.code-link span:hover { color: ${L}; }`)})}),define(te[733],ie([1,0,7,44,21,15,3,58,208,108,37,26,16,76,9,38]),function(j,e,y,m,D,I,w,b,p,h,g,t,i,n,l,c){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.goToDefinitionWithLocation=e.showGoToContextMenu=void 0;function r(o,a,d,u){var f;return ye(this,void 0,void 0,function*(){const S=o.get(b.ITextModelService),v=o.get(n.IContextMenuService),C=o.get(t.ICommandService),_=o.get(l.IInstantiationService),L=o.get(c.INotificationService);if(yield u.item.resolve(D.CancellationToken.None),!u.part.location)return;const E=u.part.location,N=[],k=new Set(g.MenuRegistry.getMenuItems(g.MenuId.EditorContext).map(O=>(0,g.isIMenuItem)(O)?O.command.id:""));for(const O of I.EditorExtensionsRegistry.getEditorActions())O instanceof p.SymbolNavigationAction&&k.has(O.id)&&N.push(new m.Action(O.id,O.label,void 0,!0,()=>ye(this,void 0,void 0,function*(){const B=yield S.createModelReference(E.uri);try{yield _.invokeFunction(O.run.bind(O),a,new p.SymbolNavigationAnchor(B.object.textEditorModel,w.Range.getStartPosition(E.range)))}finally{B.dispose()}})));if(u.part.command){const{command:O}=u.part;N.push(new m.Separator),N.push(new m.Action(O.id,O.title,void 0,!0,()=>ye(this,void 0,void 0,function*(){var B;try{yield C.executeCommand(O.id,...(B=O.arguments)!==null&&B!==void 0?B:[])}catch(T){L.notify({severity:c.Severity.Error,source:u.item.provider.displayName,message:T})}})))}const M=a.getOption(115);v.showContextMenu({domForShadowRoot:M&&(f=a.getDomNode())!==null&&f!==void 0?f:void 0,getAnchor:()=>{const O=y.getDomNodePagePosition(d);return{x:O.left,y:O.top+O.height+8}},getActions:()=>N,onHide:()=>{a.focus()},autoSelectFirstItem:!0})})}e.showGoToContextMenu=r;function s(o,a,d,u){return ye(this,void 0,void 0,function*(){const S=yield o.get(b.ITextModelService).createModelReference(u.uri);yield d.invokeWithinContext(v=>ye(this,void 0,void 0,function*(){const C=a.hasSideBySideModifier,_=v.get(i.IContextKeyService),L=h.PeekContext.inPeekEditor.getValue(_),E=!C&&d.getOption(78)&&!L;return new p.DefinitionAction({openToSide:C,openInPeek:E,muteMessage:!0},{alias:"",label:"",id:"",precondition:void 0}).run(v,d,{model:S.object.textEditorModel,position:w.Range.getStartPosition(u.range)})})),S.dispose()})}e.goToDefinitionWithLocation=s}),define(te[299],ie([1,0,10,21,13,2,47,20,25,130,15,31,3,18,49,33,92,58,186,460,733,26,53,9,38,23,14]),function(j,e,y,m,D,I,w,b,p,h,g,t,i,n,l,c,r,s,o,a,d,u,f,S,v,C,_){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.InlayHintsController=e.RenderedInlayHintLabelPart=void 0;class L{constructor(){this._entries=new w.LRUCache(50)}get(B){const T=L._key(B);return this._entries.get(T)}set(B,T){const R=L._key(B);this._entries.set(R,T)}static _key(B){return`${B.uri.toString()}/${B.getVersionId()}`}}const E=(0,S.createDecorator)("IInlayHintsCache");(0,f.registerSingleton)(E,L,!0);class N{constructor(B,T){this.item=B,this.index=T}get part(){const B=this.item.hint.label;return typeof B=="string"?{label:B}:B[this.index]}}e.RenderedInlayHintLabelPart=N;let k=class ai{constructor(B,T,R,P,F,W){this._editor=B,this._inlayHintsCache=R,this._commandService=P,this._notificationService=F,this._instaService=W,this._disposables=new I.DisposableStore,this._sessionDisposables=new I.DisposableStore,this._decorationsMetadata=new Map,this._ruleFactory=new h.DynamicCssRules(this._editor),this._debounceInfo=T.for(n.InlayHintsProviderRegistry,"InlayHint",{min:25}),this._disposables.add(n.InlayHintsProviderRegistry.onDidChange(()=>this._update())),this._disposables.add(B.onDidChangeModel(()=>this._update())),this._disposables.add(B.onDidChangeModelLanguage(()=>this._update())),this._disposables.add(B.onDidChangeConfiguration(A=>{A.hasChanged(127)&&this._update()})),this._update()}static get(B){var T;return(T=B.getContribution(ai.ID))!==null&&T!==void 0?T:void 0}dispose(){this._sessionDisposables.dispose(),this._removeAllDecorations(),this._disposables.dispose()}_update(){if(this._sessionDisposables.clear(),this._removeAllDecorations(),!this._editor.getOption(127).enabled)return;const B=this._editor.getModel();if(!B||!n.InlayHintsProviderRegistry.has(B))return;const T=this._inlayHintsCache.get(B);T&&this._updateHintsDecorators([B.getFullModelRange()],T),this._sessionDisposables.add((0,I.toDisposable)(()=>{B.isDisposed()||this._cacheHintsForFastRestore(B)}));let R,P=new Set;const F=new y.RunOnceScheduler(()=>ye(this,void 0,void 0,function*(){const W=Date.now();R==null||R.dispose(!0),R=new m.CancellationTokenSource;const A=B.onWillDispose(()=>R==null?void 0:R.cancel());try{const H=R.token,q=yield a.InlayHintsFragments.create(B,this._getHintsRanges(),H);if(F.delay=this._debounceInfo.update(B,Date.now()-W),H.isCancellationRequested){q.dispose();return}for(const X of q.provider)typeof X.onDidChangeInlayHints=="function"&&!P.has(X)&&(P.add(X),this._sessionDisposables.add(X.onDidChangeInlayHints(()=>{F.isScheduled()||F.schedule()})));this._sessionDisposables.add(q),this._updateHintsDecorators(q.ranges,q.items),this._cacheHintsForFastRestore(B)}catch(H){(0,D.onUnexpectedError)(H)}finally{R.dispose(),A.dispose()}}),this._debounceInfo.get(B));this._sessionDisposables.add(F),this._sessionDisposables.add((0,I.toDisposable)(()=>R==null?void 0:R.dispose(!0))),F.schedule(0),this._sessionDisposables.add(this._editor.onDidScrollChange(W=>{(W.scrollTopChanged||!F.isScheduled())&&F.schedule()})),this._sessionDisposables.add(this._editor.onDidChangeModelContent(W=>{const A=Math.max(F.delay,1250);F.schedule(A)})),this._sessionDisposables.add(this._installLinkGesture()),this._sessionDisposables.add(this._installContextMenu())}_installLinkGesture(){let B=()=>{};const T=new o.ClickLinkGesture(this._editor);return T.onMouseMoveOrRelevantKeyDown(R=>{const[P]=R,F=this._getInlayHintLabelPart(P),W=this._editor.getModel();if(!F||!P.hasTriggerModifier||!W){B();return}if(P.hasTriggerModifier&&(F.part.command||F.part.location)){const A=new m.CancellationTokenSource;F.item.resolve(A.token),this._activeInlayHintPart=F;const H=this._activeInlayHintPart.item.hint.position.lineNumber,q=new i.Range(H,1,H,W.getLineMaxColumn(H)),X=new Set;for(const G of this._decorationsMetadata.values())q.containsRange(G.item.anchor.range)&&X.add(G.item);this._updateHintsDecorators([q],Array.from(X)),B=()=>{A.dispose(!0),this._activeInlayHintPart=void 0,this._updateHintsDecorators([q],Array.from(X))}}}),T.onCancel(B),T.onExecute(R=>ye(this,void 0,void 0,function*(){var P;const F=this._getInlayHintLabelPart(R);if(F){const W=F.part;if(W.location)this._instaService.invokeFunction(d.goToDefinitionWithLocation,R,this._editor,W.location);else if(n.Command.is(W.command))try{yield this._commandService.executeCommand(W.command.id,...(P=W.command.arguments)!==null&&P!==void 0?P:[])}catch(A){this._notificationService.notify({severity:v.Severity.Error,source:F.item.provider.displayName,message:A})}}})),T}_installContextMenu(){return this._editor.onContextMenu(B=>ye(this,void 0,void 0,function*(){if(!(B.event.target instanceof HTMLElement))return;const T=this._getInlayHintLabelPart(B);T&&(yield this._instaService.invokeFunction(d.showGoToContextMenu,this._editor,B.event.target,T))}))}_getInlayHintLabelPart(B){var T;if(B.target.type!==6)return;const R=(T=B.target.detail.injectedText)===null||T===void 0?void 0:T.options;if(R instanceof c.ModelDecorationInjectedTextOptions&&(R==null?void 0:R.attachedData)instanceof N)return R.attachedData}_cacheHintsForFastRestore(B){const T=new Map;for(const[R,P]of this._decorationsMetadata){if(T.has(P.item))continue;let F=P.item;const W=B.getDecorationRange(R);if(W){const A=new a.InlayHintAnchor(W,P.item.anchor.direction);F=P.item.with({anchor:A})}T.set(P.item,F)}this._inlayHintsCache.set(B,Array.from(T.values()))}_getHintsRanges(){const B=30,T=this._editor.getModel(),R=this._editor.getVisibleRangesPlusViewportAboveBelow(),P=[];for(const F of R.sort(i.Range.compareRangesUsingStarts)){const W=T.validateRange(new i.Range(F.startLineNumber-B,F.startColumn,F.endLineNumber+B,F.endColumn));P.length===0||!i.Range.areIntersectingOrTouching(P[P.length-1],W)?P.push(W):P[P.length-1]=i.Range.plusRange(P[P.length-1],W)}return P}_updateHintsDecorators(B,T){var R,P;const F=[],W=(ae,oe,Z,x,U)=>{F.push({item:ae,classNameRef:oe,decoration:{range:ae.anchor.range,options:{description:"InlayHint",showIfCollapsed:ae.anchor.range.isEmpty(),collapseOnReplaceEdit:!ae.anchor.range.isEmpty(),stickiness:0,[ae.anchor.direction]:{content:Z,inlineClassNameAffectsLetterSpacing:!0,inlineClassName:oe.className,cursorStops:x,attachedData:U}}}})},A=(ae,oe)=>{const Z=this._ruleFactory.createClassNameRef({width:`${H/3|0}px`,display:"inline-block"});W(ae,Z,"\u200A",oe?l.InjectedTextCursorStops.Right:l.InjectedTextCursorStops.None)},{fontSize:H,fontFamily:q}=this._getLayoutInfo(),X="--code-editorInlayHintsFontFamily";this._editor.getContainerDomNode().style.setProperty(X,q);for(const ae of T){ae.hint.paddingLeft&&A(ae,!1);const oe=typeof ae.hint.label=="string"?[{label:ae.hint.label}]:ae.hint.label;for(let Z=0;Z<oe.length;Z++){const x=oe[Z],U=Z===0,Q=Z===oe.length-1,ne={fontSize:`${H}px`,fontFamily:`var(${X}), ${t.EDITOR_FONT_DEFAULTS.fontFamily}`,verticalAlign:"middle"};this._fillInColors(ne,ae.hint),(x.command||x.location)&&((R=this._activeInlayHintPart)===null||R===void 0?void 0:R.item)===ae&&this._activeInlayHintPart.index===Z&&(ne.textDecoration="underline",ne.cursor="pointer",ne.color=(0,_.themeColorFromId)(C.editorActiveLinkForeground)),U&&Q?(ne.padding=`1px ${Math.max(1,H/4)|0}px`,ne.borderRadius=`${H/4|0}px`):U?(ne.padding=`1px 0 1px ${Math.max(1,H/4)|0}px`,ne.borderRadius=`${H/4|0}px 0 0 ${H/4|0}px`):Q?(ne.padding=`1px ${Math.max(1,H/4)|0}px 1px 0`,ne.borderRadius=`0 ${H/4|0}px ${H/4|0}px 0`):ne.padding="1px 0 1px 0",W(ae,this._ruleFactory.createClassNameRef(ne),M(x.label),Q&&!ae.hint.paddingRight?l.InjectedTextCursorStops.Right:l.InjectedTextCursorStops.None,new N(ae,Z))}if(ae.hint.paddingRight&&A(ae,!0),F.length>ai._MAX_DECORATORS)break}const G=[];for(const ae of B)for(const{id:oe}of(P=this._editor.getDecorationsInRange(ae))!==null&&P!==void 0?P:[]){const Z=this._decorationsMetadata.get(oe);Z&&(G.push(oe),Z.classNameRef.dispose(),this._decorationsMetadata.delete(oe))}const re=this._editor.deltaDecorations(G,F.map(ae=>ae.decoration));for(let ae=0;ae<re.length;ae++){const oe=F[ae];this._decorationsMetadata.set(re[ae],{item:oe.item,classNameRef:oe.classNameRef})}}_fillInColors(B,T){T.kind===n.InlayHintKind.Parameter?(B.backgroundColor=(0,_.themeColorFromId)(C.editorInlayHintParameterBackground),B.color=(0,_.themeColorFromId)(C.editorInlayHintParameterForeground)):T.kind===n.InlayHintKind.Type?(B.backgroundColor=(0,_.themeColorFromId)(C.editorInlayHintTypeBackground),B.color=(0,_.themeColorFromId)(C.editorInlayHintTypeForeground)):(B.backgroundColor=(0,_.themeColorFromId)(C.editorInlayHintBackground),B.color=(0,_.themeColorFromId)(C.editorInlayHintForeground))}_getLayoutInfo(){const B=this._editor.getOption(127),T=this._editor.getOption(46);let R=B.fontSize;(!R||R<5||R>T)&&(R=T*.9|0);const P=B.fontFamily||this._editor.getOption(43);return{fontSize:R,fontFamily:P}}_removeAllDecorations(){this._editor.deltaDecorations(Array.from(this._decorationsMetadata.keys()),[]);for(let B of this._decorationsMetadata.values())B.classNameRef.dispose();this._decorationsMetadata.clear()}};k.ID="editor.contrib.InlayHints",k._MAX_DECORATORS=1500,k=Ie([Ce(1,r.ILanguageFeatureDebounceService),Ce(2,E),Ce(3,u.ICommandService),Ce(4,v.INotificationService),Ce(5,S.IInstantiationService)],k),e.InlayHintsController=k;function M(O){const B="\xA0";return O.replace(/[ \t]/g,B)}(0,g.registerEditorContribution)(k.ID,k),u.CommandsRegistry.registerCommand("_executeInlayHintProvider",(O,...B)=>ye(void 0,void 0,void 0,function*(){const[T,R]=B;(0,b.assertType)(p.URI.isUri(T)),(0,b.assertType)(i.Range.isIRange(R));const P=yield O.get(s.ITextModelService).createModelReference(T);try{const F=yield a.InlayHintsFragments.create(P.object.textEditorModel,[i.Range.lift(R)],m.CancellationToken.None),W=F.items.map(A=>A.hint);return setTimeout(()=>F.dispose(),0),W}finally{P.dispose()}}))});var pt=this&&this.__asyncValues||function(j){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var e=j[Symbol.asyncIterator],y;return e?e.call(j):(j=typeof __values=="function"?__values(j):j[Symbol.iterator](),y={},m("next"),m("throw"),m("return"),y[Symbol.asyncIterator]=function(){return this},y);function m(I){y[I]=j[I]&&function(w){return new Promise(function(b,p){w=j[I](w),D(b,p,w.done,w.value)})}}function D(I,w,b,p){Promise.resolve(p).then(function(h){I({value:h,done:b})},w)}};define(te[734],ie([1,0,10,66,11,18,33,187,35,58,287,201,299,40,51]),function(j,e,y,m,D,I,w,b,p,h,g,t,i,n,l){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.InlayHintsHover=void 0;class c extends b.HoverForeignElementAnchor{constructor(o,a){super(10,a,o.item.anchor.range);this.part=o}}let r=class extends t.MarkdownHoverParticipant{constructor(o,a,d,u,f){super(o,a,d,u);this._resolverService=f}suggestHoverAnchor(o){var a;if(!i.InlayHintsController.get(this._editor)||o.target.type!==6)return null;const u=(a=o.target.detail.injectedText)===null||a===void 0?void 0:a.options;return u instanceof w.ModelDecorationInjectedTextOptions&&u.attachedData instanceof i.RenderedInlayHintLabelPart?new c(u.attachedData,this):null}computeSync(){return[]}computeAsync(o,a,d){return o instanceof c?new y.AsyncIterableObject(u=>ye(this,void 0,void 0,function*(){var f,S;const{part:v}=o;if(yield v.item.resolve(d),d.isCancellationRequested)return;let C;typeof v.item.hint.tooltip=="string"?C=new m.MarkdownString().appendText(v.item.hint.tooltip):v.item.hint.tooltip&&(C=v.item.hint.tooltip),C&&u.emitOne(new t.MarkdownHover(this,o.range,[C],0));let _;typeof v.part.tooltip=="string"?_=new m.MarkdownString().appendText(v.part.tooltip):v.part.tooltip&&(_=v.part.tooltip),_&&u.emitOne(new t.MarkdownHover(this,o.range,[_],1));const L=yield this._resolveInlayHintLabelPartHover(v,d);try{for(var E=pt(L),N;N=yield E.next(),!N.done;){let k=N.value;u.emitOne(k)}}catch(k){f={error:k}}finally{try{N&&!N.done&&(S=E.return)&&(yield S.call(E))}finally{if(f)throw f.error}}})):y.AsyncIterableObject.EMPTY}_resolveInlayHintLabelPartHover(o,a){return ye(this,void 0,void 0,function*(){if(!o.part.location)return y.AsyncIterableObject.EMPTY;const{uri:d,range:u}=o.part.location,f=yield this._resolverService.createModelReference(d);try{const S=f.object.textEditorModel;return I.HoverProviderRegistry.has(S)?(0,g.getHover)(S,new D.Position(u.startLineNumber,u.startColumn),a).filter(v=>!(0,m.isEmptyMarkdownString)(v.hover.contents)).map(v=>new t.MarkdownHover(this,o.item.anchor.range,v.hover.contents,2+v.ordinal)):y.AsyncIterableObject.EMPTY}finally{f.dispose()}})}};r=Ie([Ce(1,p.ILanguageService),Ce(2,l.IOpenerService),Ce(3,n.IConfigurationService),Ce(4,h.ITextModelService)],r),e.InlayHintsHover=r}),define(te[735],ie([1,0,15,28,297,40,16,9,38,80]),function(j,e,y,m,D,I,w,b,p,h){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.StandaloneReferencesController=void 0;let g=class extends D.ReferencesController{constructor(i,n,l,c,r,s,o){super(!0,i,n,l,c,r,s,o)}};g=Ie([Ce(1,w.IContextKeyService),Ce(2,m.ICodeEditorService),Ce(3,p.INotificationService),Ce(4,b.IInstantiationService),Ce(5,h.IStorageService),Ce(6,I.IConfigurationService)],g),e.StandaloneReferencesController=g,(0,y.registerEditorContribution)(D.ReferencesController.ID,g)}),define(te[736],ie([1,0,13,2,48,74,592,127,53,38,158]),function(j,e,y,m,D,I,w,b,p,h,g){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.UndoRedoService=void 0;const t=!1;function i(S){return S.scheme===D.Schemas.file?S.fsPath:S.path}let n=0;class l{constructor(v,C,_,L,E,N,k){this.id=++n,this.type=0,this.actual=v,this.label=v.label,this.confirmBeforeUndo=v.confirmBeforeUndo||!1,this.resourceLabel=C,this.strResource=_,this.resourceLabels=[this.resourceLabel],this.strResources=[this.strResource],this.groupId=L,this.groupOrder=E,this.sourceId=N,this.sourceOrder=k,this.isValid=!0}setValid(v){this.isValid=v}toString(){return`[id:${this.id}] [group:${this.groupId}] [${this.isValid?" VALID":"INVALID"}] ${this.actual.constructor.name} - ${this.actual}`}}class c{constructor(v,C){this.resourceLabel=v,this.reason=C}}class r{constructor(){this.elements=new Map}createMessage(){const v=[],C=[];for(const[,L]of this.elements)(L.reason===0?v:C).push(L.resourceLabel);let _=[];return v.length>0&&_.push(w.localize(0,null,v.join(", "))),C.length>0&&_.push(w.localize(1,null,C.join(", "))),_.join(`
|
||
`)}get size(){return this.elements.size}has(v){return this.elements.has(v)}set(v,C){this.elements.set(v,C)}delete(v){return this.elements.delete(v)}}class s{constructor(v,C,_,L,E,N,k){this.id=++n,this.type=1,this.actual=v,this.label=v.label,this.confirmBeforeUndo=v.confirmBeforeUndo||!1,this.resourceLabels=C,this.strResources=_,this.groupId=L,this.groupOrder=E,this.sourceId=N,this.sourceOrder=k,this.removedResources=null,this.invalidatedResources=null}canSplit(){return typeof this.actual.split=="function"}removeResource(v,C,_){this.removedResources||(this.removedResources=new r),this.removedResources.has(C)||this.removedResources.set(C,new c(v,_))}setValid(v,C,_){_?this.invalidatedResources&&(this.invalidatedResources.delete(C),this.invalidatedResources.size===0&&(this.invalidatedResources=null)):(this.invalidatedResources||(this.invalidatedResources=new r),this.invalidatedResources.has(C)||this.invalidatedResources.set(C,new c(v,0)))}toString(){return`[id:${this.id}] [group:${this.groupId}] [${this.invalidatedResources?"INVALID":" VALID"}] ${this.actual.constructor.name} - ${this.actual}`}}class o{constructor(v,C){this.resourceLabel=v,this.strResource=C,this._past=[],this._future=[],this.locked=!1,this.versionId=1}dispose(){for(const v of this._past)v.type===1&&v.removeResource(this.resourceLabel,this.strResource,0);for(const v of this._future)v.type===1&&v.removeResource(this.resourceLabel,this.strResource,0);this.versionId++}toString(){let v=[];v.push(`* ${this.strResource}:`);for(let C=0;C<this._past.length;C++)v.push(` * [UNDO] ${this._past[C]}`);for(let C=this._future.length-1;C>=0;C--)v.push(` * [REDO] ${this._future[C]}`);return v.join(`
|
||
`)}flushAllElements(){this._past=[],this._future=[],this.versionId++}_setElementValidFlag(v,C){v.type===1?v.setValid(this.resourceLabel,this.strResource,C):v.setValid(C)}setElementsValidFlag(v,C){for(const _ of this._past)C(_.actual)&&this._setElementValidFlag(_,v);for(const _ of this._future)C(_.actual)&&this._setElementValidFlag(_,v)}pushElement(v){for(const C of this._future)C.type===1&&C.removeResource(this.resourceLabel,this.strResource,1);this._future=[],this._past.push(v),this.versionId++}createSnapshot(v){const C=[];for(let _=0,L=this._past.length;_<L;_++)C.push(this._past[_].id);for(let _=this._future.length-1;_>=0;_--)C.push(this._future[_].id);return new g.ResourceEditStackSnapshot(v,C)}restoreSnapshot(v){const C=v.elements.length;let _=!0,L=0,E=-1;for(let k=0,M=this._past.length;k<M;k++,L++){const O=this._past[k];_&&(L>=C||O.id!==v.elements[L])&&(_=!1,E=0),!_&&O.type===1&&O.removeResource(this.resourceLabel,this.strResource,0)}let N=-1;for(let k=this._future.length-1;k>=0;k--,L++){const M=this._future[k];_&&(L>=C||M.id!==v.elements[L])&&(_=!1,N=k),!_&&M.type===1&&M.removeResource(this.resourceLabel,this.strResource,0)}E!==-1&&(this._past=this._past.slice(0,E)),N!==-1&&(this._future=this._future.slice(N+1)),this.versionId++}getElements(){const v=[],C=[];for(const _ of this._past)v.push(_.actual);for(const _ of this._future)C.push(_.actual);return{past:v,future:C}}getClosestPastElement(){return this._past.length===0?null:this._past[this._past.length-1]}getSecondClosestPastElement(){return this._past.length<2?null:this._past[this._past.length-2]}getClosestFutureElement(){return this._future.length===0?null:this._future[this._future.length-1]}hasPastElements(){return this._past.length>0}hasFutureElements(){return this._future.length>0}splitPastWorkspaceElement(v,C){for(let _=this._past.length-1;_>=0;_--)if(this._past[_]===v){C.has(this.strResource)?this._past[_]=C.get(this.strResource):this._past.splice(_,1);break}this.versionId++}splitFutureWorkspaceElement(v,C){for(let _=this._future.length-1;_>=0;_--)if(this._future[_]===v){C.has(this.strResource)?this._future[_]=C.get(this.strResource):this._future.splice(_,1);break}this.versionId++}moveBackward(v){this._past.pop(),this._future.push(v),this.versionId++}moveForward(v){this._future.pop(),this._past.push(v),this.versionId++}}class a{constructor(v){this.editStacks=v,this._versionIds=[];for(let C=0,_=this.editStacks.length;C<_;C++)this._versionIds[C]=this.editStacks[C].versionId}isValid(){for(let v=0,C=this.editStacks.length;v<C;v++)if(this._versionIds[v]!==this.editStacks[v].versionId)return!1;return!0}}const d=new o("","");d.locked=!0;let u=class{constructor(v,C){this._dialogService=v,this._notificationService=C,this._editStacks=new Map,this._uriComparisonKeyComputers=[]}getUriComparisonKey(v){for(const C of this._uriComparisonKeyComputers)if(C[0]===v.scheme)return C[1].getComparisonKey(v);return v.toString()}_print(v){console.log("------------------------------------"),console.log(`AFTER ${v}: `);let C=[];for(const _ of this._editStacks)C.push(_[1].toString());console.log(C.join(`
|
||
`))}pushElement(v,C=g.UndoRedoGroup.None,_=g.UndoRedoSource.None){if(v.type===0){const L=i(v.resource),E=this.getUriComparisonKey(v.resource);this._pushElement(new l(v,L,E,C.id,C.nextOrder(),_.id,_.nextOrder()))}else{const L=new Set,E=[],N=[];for(const k of v.resources){const M=i(k),O=this.getUriComparisonKey(k);L.has(O)||(L.add(O),E.push(M),N.push(O))}E.length===1?this._pushElement(new l(v,E[0],N[0],C.id,C.nextOrder(),_.id,_.nextOrder())):this._pushElement(new s(v,E,N,C.id,C.nextOrder(),_.id,_.nextOrder()))}t&&this._print("pushElement")}_pushElement(v){for(let C=0,_=v.strResources.length;C<_;C++){const L=v.resourceLabels[C],E=v.strResources[C];let N;this._editStacks.has(E)?N=this._editStacks.get(E):(N=new o(L,E),this._editStacks.set(E,N)),N.pushElement(v)}}getLastElement(v){const C=this.getUriComparisonKey(v);if(this._editStacks.has(C)){const _=this._editStacks.get(C);if(_.hasFutureElements())return null;const L=_.getClosestPastElement();return L?L.actual:null}return null}_splitPastWorkspaceElement(v,C){const _=v.actual.split(),L=new Map;for(const E of _){const N=i(E.resource),k=this.getUriComparisonKey(E.resource),M=new l(E,N,k,0,0,0,0);L.set(M.strResource,M)}for(const E of v.strResources){if(C&&C.has(E))continue;this._editStacks.get(E).splitPastWorkspaceElement(v,L)}}_splitFutureWorkspaceElement(v,C){const _=v.actual.split(),L=new Map;for(const E of _){const N=i(E.resource),k=this.getUriComparisonKey(E.resource),M=new l(E,N,k,0,0,0,0);L.set(M.strResource,M)}for(const E of v.strResources){if(C&&C.has(E))continue;this._editStacks.get(E).splitFutureWorkspaceElement(v,L)}}removeElements(v){const C=typeof v=="string"?v:this.getUriComparisonKey(v);this._editStacks.has(C)&&(this._editStacks.get(C).dispose(),this._editStacks.delete(C)),t&&this._print("removeElements")}setElementsValidFlag(v,C,_){const L=this.getUriComparisonKey(v);this._editStacks.has(L)&&this._editStacks.get(L).setElementsValidFlag(C,_),t&&this._print("setElementsValidFlag")}createSnapshot(v){const C=this.getUriComparisonKey(v);return this._editStacks.has(C)?this._editStacks.get(C).createSnapshot(v):new g.ResourceEditStackSnapshot(v,[])}restoreSnapshot(v){const C=this.getUriComparisonKey(v.resource);if(this._editStacks.has(C)){const _=this._editStacks.get(C);_.restoreSnapshot(v),!_.hasPastElements()&&!_.hasFutureElements()&&(_.dispose(),this._editStacks.delete(C))}t&&this._print("restoreSnapshot")}getElements(v){const C=this.getUriComparisonKey(v);return this._editStacks.has(C)?this._editStacks.get(C).getElements():{past:[],future:[]}}_findClosestUndoElementWithSource(v){if(!v)return[null,null];let C=null,_=null;for(const[L,E]of this._editStacks){const N=E.getClosestPastElement();!N||N.sourceId===v&&(!C||N.sourceOrder>C.sourceOrder)&&(C=N,_=L)}return[C,_]}canUndo(v){if(v instanceof g.UndoRedoSource){const[,_]=this._findClosestUndoElementWithSource(v.id);return!!_}const C=this.getUriComparisonKey(v);return this._editStacks.has(C)?this._editStacks.get(C).hasPastElements():!1}_onError(v,C){(0,y.onUnexpectedError)(v);for(const _ of C.strResources)this.removeElements(_);this._notificationService.error(v)}_acquireLocks(v){for(const C of v.editStacks)if(C.locked)throw new Error("Cannot acquire edit stack lock");for(const C of v.editStacks)C.locked=!0;return()=>{for(const C of v.editStacks)C.locked=!1}}_safeInvokeWithLocks(v,C,_,L,E){const N=this._acquireLocks(_);let k;try{k=C()}catch(M){return N(),L.dispose(),this._onError(M,v)}return k?k.then(()=>(N(),L.dispose(),E()),M=>(N(),L.dispose(),this._onError(M,v))):(N(),L.dispose(),E())}_invokeWorkspacePrepare(v){return ye(this,void 0,void 0,function*(){if(typeof v.actual.prepareUndoRedo=="undefined")return m.Disposable.None;const C=v.actual.prepareUndoRedo();return typeof C=="undefined"?m.Disposable.None:C})}_invokeResourcePrepare(v,C){if(v.actual.type!==1||typeof v.actual.prepareUndoRedo=="undefined")return C(m.Disposable.None);const _=v.actual.prepareUndoRedo();return _?(0,m.isDisposable)(_)?C(_):_.then(L=>C(L)):C(m.Disposable.None)}_getAffectedEditStacks(v){const C=[];for(const _ of v.strResources)C.push(this._editStacks.get(_)||d);return new a(C)}_tryToSplitAndUndo(v,C,_,L){if(C.canSplit())return this._splitPastWorkspaceElement(C,_),this._notificationService.warn(L),new f(this._undo(v,0,!0));for(const E of C.strResources)this.removeElements(E);return this._notificationService.warn(L),new f}_checkWorkspaceUndo(v,C,_,L){if(C.removedResources)return this._tryToSplitAndUndo(v,C,C.removedResources,w.localize(2,null,C.label,C.removedResources.createMessage()));if(L&&C.invalidatedResources)return this._tryToSplitAndUndo(v,C,C.invalidatedResources,w.localize(3,null,C.label,C.invalidatedResources.createMessage()));const E=[];for(const k of _.editStacks)k.getClosestPastElement()!==C&&E.push(k.resourceLabel);if(E.length>0)return this._tryToSplitAndUndo(v,C,null,w.localize(4,null,C.label,E.join(", ")));const N=[];for(const k of _.editStacks)k.locked&&N.push(k.resourceLabel);return N.length>0?this._tryToSplitAndUndo(v,C,null,w.localize(5,null,C.label,N.join(", "))):_.isValid()?null:this._tryToSplitAndUndo(v,C,null,w.localize(6,null,C.label))}_workspaceUndo(v,C,_){const L=this._getAffectedEditStacks(C),E=this._checkWorkspaceUndo(v,C,L,!1);return E?E.returnValue:this._confirmAndExecuteWorkspaceUndo(v,C,L,_)}_isPartOfUndoGroup(v){if(!v.groupId)return!1;for(const[,C]of this._editStacks){const _=C.getClosestPastElement();if(!!_){if(_===v){const L=C.getSecondClosestPastElement();if(L&&L.groupId===v.groupId)return!0}if(_.groupId===v.groupId)return!0}}return!1}_confirmAndExecuteWorkspaceUndo(v,C,_,L){return ye(this,void 0,void 0,function*(){if(C.canSplit()&&!this._isPartOfUndoGroup(C)){const k=yield this._dialogService.show(I.default.Info,w.localize(7,null,C.label),[w.localize(8,null,_.editStacks.length),w.localize(9,null),w.localize(10,null)],{cancelId:2});if(k.choice===2)return;if(k.choice===1)return this._splitPastWorkspaceElement(C,null),this._undo(v,0,!0);const M=this._checkWorkspaceUndo(v,C,_,!1);if(M)return M.returnValue;L=!0}let E;try{E=yield this._invokeWorkspacePrepare(C)}catch(k){return this._onError(k,C)}const N=this._checkWorkspaceUndo(v,C,_,!0);if(N)return E.dispose(),N.returnValue;for(const k of _.editStacks)k.moveBackward(C);return this._safeInvokeWithLocks(C,()=>C.actual.undo(),_,E,()=>this._continueUndoInGroup(C.groupId,L))})}_resourceUndo(v,C,_){if(!C.isValid){v.flushAllElements();return}if(v.locked){const L=w.localize(11,null,C.label);this._notificationService.warn(L);return}return this._invokeResourcePrepare(C,L=>(v.moveBackward(C),this._safeInvokeWithLocks(C,()=>C.actual.undo(),new a([v]),L,()=>this._continueUndoInGroup(C.groupId,_))))}_findClosestUndoElementInGroup(v){if(!v)return[null,null];let C=null,_=null;for(const[L,E]of this._editStacks){const N=E.getClosestPastElement();!N||N.groupId===v&&(!C||N.groupOrder>C.groupOrder)&&(C=N,_=L)}return[C,_]}_continueUndoInGroup(v,C){if(!v)return;const[,_]=this._findClosestUndoElementInGroup(v);if(_)return this._undo(_,0,C)}undo(v){if(v instanceof g.UndoRedoSource){const[,C]=this._findClosestUndoElementWithSource(v.id);return C?this._undo(C,v.id,!1):void 0}return typeof v=="string"?this._undo(v,0,!1):this._undo(this.getUriComparisonKey(v),0,!1)}_undo(v,C=0,_){if(!this._editStacks.has(v))return;const L=this._editStacks.get(v),E=L.getClosestPastElement();if(!E)return;if(E.groupId){const[k,M]=this._findClosestUndoElementInGroup(E.groupId);if(E!==k&&M)return this._undo(M,C,_)}if((E.sourceId!==C||E.confirmBeforeUndo)&&!_)return this._confirmAndContinueUndo(v,C,E);try{return E.type===1?this._workspaceUndo(v,E,_):this._resourceUndo(L,E,_)}finally{t&&this._print("undo")}}_confirmAndContinueUndo(v,C,_){return ye(this,void 0,void 0,function*(){if((yield this._dialogService.show(I.default.Info,w.localize(12,null,_.label),[w.localize(13,null),w.localize(14,null)],{cancelId:1})).choice!==1)return this._undo(v,C,!0)})}_findClosestRedoElementWithSource(v){if(!v)return[null,null];let C=null,_=null;for(const[L,E]of this._editStacks){const N=E.getClosestFutureElement();!N||N.sourceId===v&&(!C||N.sourceOrder<C.sourceOrder)&&(C=N,_=L)}return[C,_]}canRedo(v){if(v instanceof g.UndoRedoSource){const[,_]=this._findClosestRedoElementWithSource(v.id);return!!_}const C=this.getUriComparisonKey(v);return this._editStacks.has(C)?this._editStacks.get(C).hasFutureElements():!1}_tryToSplitAndRedo(v,C,_,L){if(C.canSplit())return this._splitFutureWorkspaceElement(C,_),this._notificationService.warn(L),new f(this._redo(v));for(const E of C.strResources)this.removeElements(E);return this._notificationService.warn(L),new f}_checkWorkspaceRedo(v,C,_,L){if(C.removedResources)return this._tryToSplitAndRedo(v,C,C.removedResources,w.localize(15,null,C.label,C.removedResources.createMessage()));if(L&&C.invalidatedResources)return this._tryToSplitAndRedo(v,C,C.invalidatedResources,w.localize(16,null,C.label,C.invalidatedResources.createMessage()));const E=[];for(const k of _.editStacks)k.getClosestFutureElement()!==C&&E.push(k.resourceLabel);if(E.length>0)return this._tryToSplitAndRedo(v,C,null,w.localize(17,null,C.label,E.join(", ")));const N=[];for(const k of _.editStacks)k.locked&&N.push(k.resourceLabel);return N.length>0?this._tryToSplitAndRedo(v,C,null,w.localize(18,null,C.label,N.join(", "))):_.isValid()?null:this._tryToSplitAndRedo(v,C,null,w.localize(19,null,C.label))}_workspaceRedo(v,C){const _=this._getAffectedEditStacks(C),L=this._checkWorkspaceRedo(v,C,_,!1);return L?L.returnValue:this._executeWorkspaceRedo(v,C,_)}_executeWorkspaceRedo(v,C,_){return ye(this,void 0,void 0,function*(){let L;try{L=yield this._invokeWorkspacePrepare(C)}catch(N){return this._onError(N,C)}const E=this._checkWorkspaceRedo(v,C,_,!0);if(E)return L.dispose(),E.returnValue;for(const N of _.editStacks)N.moveForward(C);return this._safeInvokeWithLocks(C,()=>C.actual.redo(),_,L,()=>this._continueRedoInGroup(C.groupId))})}_resourceRedo(v,C){if(!C.isValid){v.flushAllElements();return}if(v.locked){const _=w.localize(20,null,C.label);this._notificationService.warn(_);return}return this._invokeResourcePrepare(C,_=>(v.moveForward(C),this._safeInvokeWithLocks(C,()=>C.actual.redo(),new a([v]),_,()=>this._continueRedoInGroup(C.groupId))))}_findClosestRedoElementInGroup(v){if(!v)return[null,null];let C=null,_=null;for(const[L,E]of this._editStacks){const N=E.getClosestFutureElement();!N||N.groupId===v&&(!C||N.groupOrder<C.groupOrder)&&(C=N,_=L)}return[C,_]}_continueRedoInGroup(v){if(!v)return;const[,C]=this._findClosestRedoElementInGroup(v);if(C)return this._redo(C)}redo(v){if(v instanceof g.UndoRedoSource){const[,C]=this._findClosestRedoElementWithSource(v.id);return C?this._redo(C):void 0}return typeof v=="string"?this._redo(v):this._redo(this.getUriComparisonKey(v))}_redo(v){if(!this._editStacks.has(v))return;const C=this._editStacks.get(v),_=C.getClosestFutureElement();if(!!_){if(_.groupId){const[L,E]=this._findClosestRedoElementInGroup(_.groupId);if(_!==L&&E)return this._redo(E)}try{return _.type===1?this._workspaceRedo(v,_):this._resourceRedo(C,_)}finally{t&&this._print("redo")}}}};u=Ie([Ce(0,b.IDialogService),Ce(1,h.INotificationService)],u),e.UndoRedoService=u;class f{constructor(v){this.returnValue=v}}(0,p.registerSingleton)(g.IUndoRedoService,u)}),define(te[300],ie([1,0,47,9]),function(j,e,y,m){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.WorkspaceFolder=e.Workspace=e.IWorkspaceContextService=void 0,e.IWorkspaceContextService=(0,m.createDecorator)("contextService");class D{constructor(b,p,h,g,t){this._id=b,this._transient=h,this._configuration=g,this._ignorePathCasing=t,this._foldersMap=y.TernarySearchTree.forUris(this._ignorePathCasing),this.folders=p}get folders(){return this._folders}set folders(b){this._folders=b,this.updateFoldersMap()}get id(){return this._id}get transient(){return this._transient}get configuration(){return this._configuration}set configuration(b){this._configuration=b}getFolder(b){return b&&this._foldersMap.findSubstr(b.with({scheme:b.scheme,authority:b.authority,path:b.path}))||null}updateFoldersMap(){this._foldersMap=y.TernarySearchTree.forUris(this._ignorePathCasing);for(const b of this.folders)this._foldersMap.set(b.uri,b)}toJSON(){return{id:this.id,folders:this.folders,transient:this.transient,configuration:this.configuration}}}e.Workspace=D;class I{constructor(b,p){this.raw=p,this.uri=b.uri,this.index=b.index,this.name=b.name}toJSON(){return{uri:this.uri,name:this.name,index:this.index}}}e.WorkspaceFolder=I}),define(te[301],ie([1,0,9]),function(j,e,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IWorkspaceTrustManagementService=void 0,e.IWorkspaceTrustManagementService=(0,y.createDecorator)("workspaceTrustManagementService")}),define(te[302],ie([1,0,10,27,2,17,8,15,31,33,243,85,35,267,201,696,577,40,9,51,78,72,301,388]),function(j,e,y,m,D,I,w,b,p,h,g,t,i,n,l,c,r,s,o,a,d,u,f){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ShowExcludeOptions=e.DisableHighlightingOfNonBasicAsciiCharactersAction=e.DisableHighlightingOfInvisibleCharactersAction=e.DisableHighlightingOfAmbiguousCharactersAction=e.DisableHighlightingInStringsAction=e.DisableHighlightingInCommentsAction=e.UnicodeHighlighterHoverParticipant=e.UnicodeHighlighter=e.warningIcon=void 0,e.warningIcon=(0,u.registerIcon)("extensions-warning-message",m.Codicon.warning,r.localize(0,null));let S=class extends D.Disposable{constructor(G,re,ae,oe){super();this._editor=G,this._editorWorkerService=re,this._workspaceTrustService=ae,this._highlighter=null,this._bannerClosed=!1,this._updateState=Z=>{if(Z&&Z.hasMore){if(this._bannerClosed)return;const x=Math.max(Z.ambiguousCharacterCount,Z.nonBasicAsciiCharacterCount,Z.invisibleCharacterCount);let U;if(Z.nonBasicAsciiCharacterCount>=x)U={message:r.localize(1,null),command:new F};else if(Z.ambiguousCharacterCount>=x)U={message:r.localize(2,null),command:new R};else if(Z.invisibleCharacterCount>=x)U={message:r.localize(3,null),command:new P};else throw new Error("Unreachable");this._bannerController.show({id:"unicodeHighlightBanner",message:U.message,icon:e.warningIcon,actions:[{label:U.command.shortLabel,href:`command:${U.command.id}`}],onClose:()=>{this._bannerClosed=!0}})}else this._bannerController.hide()},this._bannerController=this._register(oe.createInstance(c.BannerController,G)),this._register(this._editor.onDidChangeModel(()=>{this._bannerClosed=!1,this._updateHighlighter()})),this._options=G.getOption(113),this._register(ae.onDidChangeTrust(Z=>{this._updateHighlighter()})),this._register(G.onDidChangeConfiguration(Z=>{Z.hasChanged(113)&&(this._options=G.getOption(113),this._updateHighlighter())})),this._updateHighlighter()}dispose(){this._highlighter&&(this._highlighter.dispose(),this._highlighter=null),super.dispose()}_updateHighlighter(){if(this._updateState(null),this._highlighter&&(this._highlighter.dispose(),this._highlighter=null),!this._editor.hasModel())return;const G=v(this._workspaceTrustService.isWorkspaceTrusted(),this._options);if([G.nonBasicASCII,G.ambiguousCharacters,G.invisibleCharacters].every(ae=>ae===!1))return;const re={nonBasicASCII:G.nonBasicASCII,ambiguousCharacters:G.ambiguousCharacters,invisibleCharacters:G.invisibleCharacters,includeComments:G.includeComments,includeStrings:G.includeStrings,allowedCodePoints:Object.keys(G.allowedCharacters).map(ae=>ae.codePointAt(0)),allowedLocales:Object.keys(G.allowedLocales).map(ae=>ae==="_os"?new Intl.NumberFormat().resolvedOptions().locale:ae==="_vscode"?I.language:ae)};this._editorWorkerService.canComputeUnicodeHighlights(this._editor.getModel().uri)?this._highlighter=new C(this._editor,re,this._updateState,this._editorWorkerService):this._highlighter=new _(this._editor,re,this._updateState)}getDecorationInfo(G){return this._highlighter?this._highlighter.getDecorationInfo(G):null}};S.ID="editor.contrib.unicodeHighlighter",S=Ie([Ce(1,t.IEditorWorkerService),Ce(2,f.IWorkspaceTrustManagementService),Ce(3,o.IInstantiationService)],S),e.UnicodeHighlighter=S;function v(X,G){return{nonBasicASCII:G.nonBasicASCII===p.inUntrustedWorkspace?!X:G.nonBasicASCII,ambiguousCharacters:G.ambiguousCharacters,invisibleCharacters:G.invisibleCharacters,includeComments:G.includeComments===p.inUntrustedWorkspace?!X:G.includeComments,includeStrings:G.includeStrings===p.inUntrustedWorkspace?!X:G.includeStrings,allowedCharacters:G.allowedCharacters,allowedLocales:G.allowedLocales}}let C=class extends D.Disposable{constructor(G,re,ae,oe){super();this._editor=G,this._options=re,this._updateState=ae,this._editorWorkerService=oe,this._model=this._editor.getModel(),this._decorationIds=new Set,this._updateSoon=this._register(new y.RunOnceScheduler(()=>this._update(),250)),this._register(this._editor.onDidChangeModelContent(()=>{this._updateSoon.schedule()})),this._updateSoon.schedule()}dispose(){this._decorationIds=new Set(this._model.deltaDecorations(Array.from(this._decorationIds),[])),super.dispose()}_update(){if(this._model.isDisposed())return;if(!this._model.mightContainNonBasicASCII()){this._decorationIds=new Set(this._editor.deltaDecorations(Array.from(this._decorationIds),[]));return}const G=this._model.getVersionId();this._editorWorkerService.computedUnicodeHighlights(this._model.uri,this._options).then(re=>{if(this._model.isDisposed()||this._model.getVersionId()!==G)return;this._updateState(re);const ae=[];if(!re.hasMore)for(const oe of re.ranges)ae.push({range:oe,options:O.instance.getDecorationFromOptions(this._options)});this._decorationIds=new Set(this._editor.deltaDecorations(Array.from(this._decorationIds),ae))})}getDecorationInfo(G){if(!this._decorationIds.has(G))return null;const re=this._editor.getModel(),ae=re.getDecorationRange(G),oe={range:ae,options:O.instance.getDecorationFromOptions(this._options),id:G,ownerId:0};if(!(0,n.isModelDecorationVisible)(re,oe))return null;const Z=re.getValueInRange(ae);return{reason:M(Z,this._options),inComment:(0,n.isModelDecorationInComment)(re,oe),inString:(0,n.isModelDecorationInString)(re,oe)}}};C=Ie([Ce(3,t.IEditorWorkerService)],C);class _ extends D.Disposable{constructor(G,re,ae){super();this._editor=G,this._options=re,this._updateState=ae,this._model=this._editor.getModel(),this._decorationIds=new Set,this._updateSoon=this._register(new y.RunOnceScheduler(()=>this._update(),250)),this._register(this._editor.onDidLayoutChange(()=>{this._updateSoon.schedule()})),this._register(this._editor.onDidScrollChange(()=>{this._updateSoon.schedule()})),this._register(this._editor.onDidChangeHiddenAreas(()=>{this._updateSoon.schedule()})),this._register(this._editor.onDidChangeModelContent(()=>{this._updateSoon.schedule()})),this._updateSoon.schedule()}dispose(){this._decorationIds=new Set(this._model.deltaDecorations(Array.from(this._decorationIds),[])),super.dispose()}_update(){if(this._model.isDisposed())return;if(!this._model.mightContainNonBasicASCII()){this._decorationIds=new Set(this._editor.deltaDecorations(Array.from(this._decorationIds),[]));return}const G=this._editor.getVisibleRanges(),re=[],ae={ranges:[],ambiguousCharacterCount:0,invisibleCharacterCount:0,nonBasicAsciiCharacterCount:0,hasMore:!1};for(const oe of G){const Z=g.UnicodeTextModelHighlighter.computeUnicodeHighlights(this._model,this._options,oe);for(const x of Z.ranges)ae.ranges.push(x);ae.ambiguousCharacterCount+=ae.ambiguousCharacterCount,ae.invisibleCharacterCount+=ae.invisibleCharacterCount,ae.nonBasicAsciiCharacterCount+=ae.nonBasicAsciiCharacterCount,ae.hasMore=ae.hasMore||Z.hasMore}if(!ae.hasMore)for(const oe of ae.ranges)re.push({range:oe,options:O.instance.getDecorationFromOptions(this._options)});this._updateState(ae),this._decorationIds=new Set(this._editor.deltaDecorations(Array.from(this._decorationIds),re))}getDecorationInfo(G){if(!this._decorationIds.has(G))return null;const re=this._editor.getModel(),ae=re.getDecorationRange(G),oe=re.getValueInRange(ae),Z={range:ae,options:O.instance.getDecorationFromOptions(this._options),id:G,ownerId:0};return(0,n.isModelDecorationVisible)(re,Z)?{reason:M(oe,this._options),inComment:(0,n.isModelDecorationInComment)(re,Z),inString:(0,n.isModelDecorationInString)(re,Z)}:null}}let L=class{constructor(G,re,ae){this._editor=G,this._languageService=re,this._openerService=ae}computeSync(G,re){if(!this._editor.hasModel()||G.type!==1)return[];const ae=this._editor.getModel(),oe=this._editor.getContribution(S.ID);if(!oe)return[];const Z=[];let x=300;for(const U of re){const Q=oe.getDecorationInfo(U.id);if(!Q)continue;const ce=ae.getValueInRange(U.range).codePointAt(0),ee=N(ce);let ue;switch(Q.reason.kind){case 0:ue=r.localize(4,null,ee,N(Q.reason.confusableWith.codePointAt(0)));break;case 1:ue=r.localize(5,null,ee);break;case 2:ue=r.localize(6,null,ee);break}const z={codePoint:ce,reason:Q.reason,inComment:Q.inComment,inString:Q.inString},V=r.localize(7,null),$=[{value:`${ue} [${V}](command:${W.ID}?${encodeURIComponent(JSON.stringify(z))})`,isTrusted:!0}];Z.push(new l.MarkdownHover(this,U.range,$,x++))}return Z}renderHoverParts(G,re){return(0,l.renderMarkdownHovers)(G,re,this._editor,this._languageService,this._openerService)}};L=Ie([Ce(1,i.ILanguageService),Ce(2,a.IOpenerService)],L),e.UnicodeHighlighterHoverParticipant=L;function E(X){return`U+${X.toString(16).padStart(4,"0")}`}function N(X){let G=`\`${E(X)}\``;return w.InvisibleCharacters.isInvisibleCharacter(X)||(G+=` "${`${k(X)}`}"`),G}function k(X){return X===96?"`` ` ``":"`"+String.fromCodePoint(X)+"`"}function M(X,G){return g.UnicodeTextModelHighlighter.computeUnicodeHighlightReason(X,G)}class O{constructor(){this.map=new Map}getDecorationFromOptions(G){return this.getDecoration(!G.includeComments,!G.includeStrings)}getDecoration(G,re){const ae=`${G}${re}`;let oe=this.map.get(ae);return oe||(oe=h.ModelDecorationOptions.createDynamic({description:"unicode-highlight",stickiness:1,className:"unicode-highlight",showIfCollapsed:!0,overviewRuler:null,minimap:null,hideInCommentTokens:G,hideInStringTokens:re}),this.map.set(ae,oe)),oe}}O.instance=new O;class B extends b.EditorAction{constructor(){super({id:R.ID,label:r.localize(9,null),alias:"Disable highlighting of characters in comments",precondition:void 0});this.shortLabel=r.localize(8,null)}run(G,re,ae){return ye(this,void 0,void 0,function*(){let oe=G==null?void 0:G.get(s.IConfigurationService);oe&&this.runAction(oe)})}runAction(G){return ye(this,void 0,void 0,function*(){yield G.updateValue(p.unicodeHighlightConfigKeys.includeComments,!1,1)})}}e.DisableHighlightingInCommentsAction=B;class T extends b.EditorAction{constructor(){super({id:R.ID,label:r.localize(11,null),alias:"Disable highlighting of characters in strings",precondition:void 0});this.shortLabel=r.localize(10,null)}run(G,re,ae){return ye(this,void 0,void 0,function*(){let oe=G==null?void 0:G.get(s.IConfigurationService);oe&&this.runAction(oe)})}runAction(G){return ye(this,void 0,void 0,function*(){yield G.updateValue(p.unicodeHighlightConfigKeys.includeStrings,!1,1)})}}e.DisableHighlightingInStringsAction=T;class R extends b.EditorAction{constructor(){super({id:R.ID,label:r.localize(13,null),alias:"Disable highlighting of ambiguous characters",precondition:void 0});this.shortLabel=r.localize(12,null)}run(G,re,ae){return ye(this,void 0,void 0,function*(){let oe=G==null?void 0:G.get(s.IConfigurationService);oe&&this.runAction(oe)})}runAction(G){return ye(this,void 0,void 0,function*(){yield G.updateValue(p.unicodeHighlightConfigKeys.ambiguousCharacters,!1,1)})}}e.DisableHighlightingOfAmbiguousCharactersAction=R,R.ID="editor.action.unicodeHighlight.disableHighlightingOfAmbiguousCharacters";class P extends b.EditorAction{constructor(){super({id:P.ID,label:r.localize(15,null),alias:"Disable highlighting of invisible characters",precondition:void 0});this.shortLabel=r.localize(14,null)}run(G,re,ae){return ye(this,void 0,void 0,function*(){let oe=G==null?void 0:G.get(s.IConfigurationService);oe&&this.runAction(oe)})}runAction(G){return ye(this,void 0,void 0,function*(){yield G.updateValue(p.unicodeHighlightConfigKeys.invisibleCharacters,!1,1)})}}e.DisableHighlightingOfInvisibleCharactersAction=P,P.ID="editor.action.unicodeHighlight.disableHighlightingOfInvisibleCharacters";class F extends b.EditorAction{constructor(){super({id:F.ID,label:r.localize(17,null),alias:"Disable highlighting of non basic ASCII characters",precondition:void 0});this.shortLabel=r.localize(16,null)}run(G,re,ae){return ye(this,void 0,void 0,function*(){let oe=G==null?void 0:G.get(s.IConfigurationService);oe&&this.runAction(oe)})}runAction(G){return ye(this,void 0,void 0,function*(){yield G.updateValue(p.unicodeHighlightConfigKeys.nonBasicASCII,!1,1)})}}e.DisableHighlightingOfNonBasicAsciiCharactersAction=F,F.ID="editor.action.unicodeHighlight.disableHighlightingOfNonBasicAsciiCharacters";class W extends b.EditorAction{constructor(){super({id:W.ID,label:r.localize(18,null),alias:"Show Exclude Options",precondition:void 0})}run(G,re,ae){return ye(this,void 0,void 0,function*(){const{codePoint:oe,reason:Z,inString:x,inComment:U}=ae,Q=String.fromCodePoint(oe),ne=G.get(d.IQuickInputService),ce=G.get(s.IConfigurationService);function ee(V){return w.InvisibleCharacters.isInvisibleCharacter(V)?r.localize(19,null,E(V)):r.localize(20,null,`${E(V)} "${Q}"`)}const ue=[];if(Z.kind===0)for(const V of Z.notAmbiguousInLocales)ue.push({label:r.localize(21,null,V),run:()=>ye(this,void 0,void 0,function*(){H(ce,[V])})});if(ue.push({label:ee(oe),run:()=>A(ce,[oe])}),U){const V=new B;ue.push({label:V.label,run:()=>ye(this,void 0,void 0,function*(){return V.runAction(ce)})})}else if(x){const V=new T;ue.push({label:V.label,run:()=>ye(this,void 0,void 0,function*(){return V.runAction(ce)})})}if(Z.kind===0){const V=new R;ue.push({label:V.label,run:()=>ye(this,void 0,void 0,function*(){return V.runAction(ce)})})}else if(Z.kind===1){const V=new P;ue.push({label:V.label,run:()=>ye(this,void 0,void 0,function*(){return V.runAction(ce)})})}else if(Z.kind===2){const V=new F;ue.push({label:V.label,run:()=>ye(this,void 0,void 0,function*(){return V.runAction(ce)})})}else q(Z);const z=yield ne.pick(ue,{title:r.localize(22,null)});z&&(yield z.run())})}}e.ShowExcludeOptions=W,W.ID="editor.action.unicodeHighlight.showExcludeOptions";function A(X,G){return ye(this,void 0,void 0,function*(){const re=X.getValue(p.unicodeHighlightConfigKeys.allowedCharacters);let ae;typeof re=="object"&&re?ae=re:ae={};for(const oe of G)ae[String.fromCodePoint(oe)]=!0;yield X.updateValue(p.unicodeHighlightConfigKeys.allowedCharacters,ae,1)})}function H(X,G){var re;return ye(this,void 0,void 0,function*(){const ae=(re=X.inspect(p.unicodeHighlightConfigKeys.allowedLocales).user)===null||re===void 0?void 0:re.value;let oe;typeof ae=="object"&&ae?oe=Object.assign({},ae):oe={};for(const Z of G)oe[Z]=!0;yield X.updateValue(p.unicodeHighlightConfigKeys.allowedLocales,oe,1)})}function q(X){throw new Error(`Unexpected value: ${X}`)}(0,b.registerEditorAction)(R),(0,b.registerEditorAction)(P),(0,b.registerEditorAction)(F),(0,b.registerEditorAction)(W),(0,b.registerEditorContribution)(S.ID,S)}),define(te[209],ie([1,0,8,7,46,4,94,2,17,74,25,195,620,61,11,3,45,58,153,26,40,625,16,127,9,608,42,610,86,274,611,128,38,71,87,300,129,70,28,64,301,76,612,623,687,14,53,618,85,276,35,650,196,291,690,698,101,605,63,37,686,615,102,606,194,607,154,157,77,617,51,78,80,32,284,275,736,92]),function(j,e,y,m,D,I,w,b,p,h,g,t,i,n,l,c,r,s,o,a,d,u,f,S,v,C,_,L,E,N,k,M,O,B,T,R,P,F,W,A,H,q,X,G,re,ae,oe,Z,x,U,Q,ne,ce,ee,ue,z,V,$,K,J,Y,se,ge,me,le,he,ve,pe,be,de,fe,_e,Le){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.StandaloneServices=e.updateConfigurationService=e.StandaloneConfigurationService=e.StandaloneKeybindingService=e.StandaloneCommandService=e.StandaloneNotificationService=void 0;class Te{constructor(Ne){this.disposed=!1,this.model=Ne,this._onWillDispose=new I.Emitter}get textEditorModel(){return this.model}dispose(){this.disposed=!0,this._onWillDispose.fire()}}let ke=class{constructor(Ne){this.modelService=Ne}createModelReference(Ne){const Oe=this.modelService.getModel(Ne);return Oe?Promise.resolve(new b.ImmortalReference(new Te(Oe))):Promise.reject(new Error("Model not found"))}};ke=Ie([Ce(0,r.IModelService)],ke);class Me{show(){return Me.NULL_PROGRESS_RUNNER}showWhile(Ne,Oe){return ye(this,void 0,void 0,function*(){yield Ne})}}Me.NULL_PROGRESS_RUNNER={done:()=>{},total:()=>{},worked:()=>{}};class $e{confirm(Ne){return this.doConfirm(Ne).then(Oe=>({confirmed:Oe,checkboxChecked:!1}))}doConfirm(Ne){let Oe=Ne.message;return Ne.detail&&(Oe=Oe+`
|
||
|
||
`+Ne.detail),Promise.resolve(window.confirm(Oe))}show(Ne,Oe,ze,je){return Promise.resolve({choice:0})}}class He{info(Ne){return this.notify({severity:h.default.Info,message:Ne})}warn(Ne){return this.notify({severity:h.default.Warning,message:Ne})}error(Ne){return this.notify({severity:h.default.Error,message:Ne})}notify(Ne){switch(Ne.severity){case h.default.Error:console.error(Ne.message);break;case h.default.Warning:console.warn(Ne.message);break;default:console.log(Ne.message);break}return He.NO_OP}status(Ne,Oe){return b.Disposable.None}}e.StandaloneNotificationService=He,He.NO_OP=new O.NoOpNotification;let Ge=class{constructor(Ne){this._onWillExecuteCommand=new I.Emitter,this._onDidExecuteCommand=new I.Emitter,this.onWillExecuteCommand=this._onWillExecuteCommand.event,this.onDidExecuteCommand=this._onDidExecuteCommand.event,this._instantiationService=Ne}executeCommand(Ne,...Oe){const ze=a.CommandsRegistry.getCommand(Ne);if(!ze)return Promise.reject(new Error(`command '${Ne}' not found`));try{this._onWillExecuteCommand.fire({commandId:Ne,args:Oe});const je=this._instantiationService.invokeFunction.apply(this._instantiationService,[ze.handler,...Oe]);return this._onDidExecuteCommand.fire({commandId:Ne,args:Oe}),Promise.resolve(je)}catch(je){return Promise.reject(je)}}};Ge=Ie([Ce(0,v.IInstantiationService)],Ge),e.StandaloneCommandService=Ge;let we=class extends C.AbstractKeybindingService{constructor(Ne,Oe,ze,je,Je,Ye){super(Ne,Oe,ze,je,Je);this._cachedResolver=null,this._dynamicKeybindings=[],this._domNodeListeners=[];const Xe=nt=>{const ht=new b.DisposableStore;ht.add(m.addDisposableListener(nt,m.EventType.KEY_DOWN,Ct=>{const ct=new D.StandardKeyboardEvent(Ct);this._dispatch(ct,ct.target)&&(ct.preventDefault(),ct.stopPropagation())})),ht.add(m.addDisposableListener(nt,m.EventType.KEY_UP,Ct=>{const ct=new D.StandardKeyboardEvent(Ct);this._singleModifierDispatch(ct,ct.target)&&ct.preventDefault()})),this._domNodeListeners.push(new Se(nt,ht))},it=nt=>{for(let ht=0;ht<this._domNodeListeners.length;ht++){const Ct=this._domNodeListeners[ht];Ct.domNode===nt&&(this._domNodeListeners.splice(ht,1),Ct.dispose())}},lt=nt=>{nt.getOption(54)||Xe(nt.getContainerDomNode())},_t=nt=>{nt.getOption(54)||it(nt.getContainerDomNode())};this._register(Ye.onCodeEditorAdd(lt)),this._register(Ye.onCodeEditorRemove(_t)),Ye.listCodeEditors().forEach(lt);const dt=nt=>{Xe(nt.getContainerDomNode())},at=nt=>{it(nt.getContainerDomNode())};this._register(Ye.onDiffEditorAdd(dt)),this._register(Ye.onDiffEditorRemove(at)),Ye.listDiffEditors().forEach(dt)}addDynamicKeybinding(Ne,Oe,ze,je){const Je=(0,w.createKeybinding)(Oe,p.OS),Ye=new b.DisposableStore;return Je&&(this._dynamicKeybindings.push({keybinding:Je.parts,command:Ne,when:je,weight1:1e3,weight2:0,extensionId:null,isBuiltinExtension:!1}),Ye.add((0,b.toDisposable)(()=>{for(let Xe=0;Xe<this._dynamicKeybindings.length;Xe++)if(this._dynamicKeybindings[Xe].command===Ne){this._dynamicKeybindings.splice(Xe,1),this.updateResolver({source:1});return}}))),Ye.add(a.CommandsRegistry.registerCommand(Ne,ze)),this.updateResolver({source:1}),Ye}updateResolver(Ne){this._cachedResolver=null,this._onDidUpdateKeybindings.fire(Ne)}_getResolver(){if(!this._cachedResolver){const Ne=this._toNormalizedKeybindingItems(E.KeybindingsRegistry.getDefaultKeybindings(),!0),Oe=this._toNormalizedKeybindingItems(this._dynamicKeybindings,!1);this._cachedResolver=new L.KeybindingResolver(Ne,Oe,ze=>this._log(ze))}return this._cachedResolver}_documentHasFocus(){return document.hasFocus()}_toNormalizedKeybindingItems(Ne,Oe){const ze=[];let je=0;for(const Je of Ne){const Ye=Je.when||void 0,Xe=Je.keybinding;if(!Xe)ze[je++]=new N.ResolvedKeybindingItem(void 0,Je.command,Je.commandArgs,Ye,Oe,null,!1);else{const it=k.USLayoutResolvedKeybinding.resolveUserBinding(Xe,p.OS);for(const lt of it)ze[je++]=new N.ResolvedKeybindingItem(lt,Je.command,Je.commandArgs,Ye,Oe,null,!1)}}return ze}resolveKeyboardEvent(Ne){const Oe=new w.SimpleKeybinding(Ne.ctrlKey,Ne.shiftKey,Ne.altKey,Ne.metaKey,Ne.keyCode).toChord();return new k.USLayoutResolvedKeybinding(Oe,p.OS)}};we=Ie([Ce(0,f.IContextKeyService),Ce(1,a.ICommandService),Ce(2,T.ITelemetryService),Ce(3,O.INotificationService),Ce(4,A.ILogService),Ce(5,W.ICodeEditorService)],we),e.StandaloneKeybindingService=we;class Se extends b.Disposable{constructor(Ne,Oe){super();this.domNode=Ne,this._register(Oe)}}function De(Ke){return Ke&&typeof Ke=="object"&&(!Ke.overrideIdentifier||typeof Ke.overrideIdentifier=="string")&&(!Ke.resource||Ke.resource instanceof g.URI)}class Pe{constructor(){this._onDidChangeConfiguration=new I.Emitter,this.onDidChangeConfiguration=this._onDidChangeConfiguration.event,this._configuration=new u.Configuration(new u.DefaultConfigurationModel,new u.ConfigurationModel)}getValue(Ne,Oe){const ze=typeof Ne=="string"?Ne:void 0,je=De(Ne)?Ne:De(Oe)?Oe:{};return this._configuration.getValue(ze,je,void 0)}updateValues(Ne){const Oe={data:this._configuration.toData()},ze=[];for(const je of Ne){const[Je,Ye]=je;this.getValue(Je)!==Ye&&(this._configuration.updateValue(Je,Ye),ze.push(Je))}if(ze.length>0){const je=new u.ConfigurationChangeEvent({keys:ze,overrides:[]},Oe,this._configuration);je.source=7,je.sourceConfig=null,this._onDidChangeConfiguration.fire(je)}return Promise.resolve()}updateValue(Ne,Oe,ze,je){return this.updateValues([[Ne,Oe]])}inspect(Ne,Oe={}){return this._configuration.inspect(Ne,Oe,void 0)}}e.StandaloneConfigurationService=Pe;let Fe=class{constructor(Ne){this.configurationService=Ne,this._onDidChangeConfiguration=new I.Emitter,this.configurationService.onDidChangeConfiguration(Oe=>{this._onDidChangeConfiguration.fire({affectedKeys:Oe.affectedKeys,affectsConfiguration:(ze,je)=>Oe.affectsConfiguration(je)})})}getValue(Ne,Oe,ze){const Je=(l.Position.isIPosition(Oe)?Oe:null)?typeof ze=="string"?ze:void 0:typeof Oe=="string"?Oe:void 0;return typeof Je=="undefined"?this.configurationService.getValue():this.configurationService.getValue(Je)}};Fe=Ie([Ce(0,d.IConfigurationService)],Fe);let xe=class{constructor(Ne){this.configurationService=Ne}getEOL(Ne,Oe){const ze=this.configurationService.getValue("files.eol",{overrideIdentifier:Oe,resource:Ne});return ze&&typeof ze=="string"&&ze!=="auto"?ze:p.isLinux||p.isMacintosh?`
|
||
`:`\r
|
||
`}};xe=Ie([Ce(0,d.IConfigurationService)],xe);class Ve{publicLog(Ne,Oe){return Promise.resolve(void 0)}publicLog2(Ne,Oe){return this.publicLog(Ne,Oe)}}class qe{constructor(){const Ne=g.URI.from({scheme:qe.SCHEME,authority:"model",path:"/"});this.workspace={id:"4064f6ec-cb38-4ad0-af64-ee6467e63c82",folders:[new R.WorkspaceFolder({uri:Ne,name:"",index:0})]}}getWorkspace(){return this.workspace}}qe.SCHEME="inmemory";function We(Ke,Ne,Oe){if(!Ne||!(Ke instanceof Pe))return;const ze=[];Object.keys(Ne).forEach(je=>{(0,i.isEditorConfigurationKey)(je)&&ze.push([`editor.${je}`,Ne[je]]),Oe&&(0,i.isDiffEditorConfigurationKey)(je)&&ze.push([`diffEditor.${je}`,Ne[je]])}),ze.length>0&&Ke.updateValues(ze)}e.updateConfigurationService=We;let tt=class{constructor(Ne){this._modelService=Ne}hasPreviewHandler(){return!1}apply(Ne,Oe){return ye(this,void 0,void 0,function*(){const ze=new Map;for(let Ye of Ne){if(!(Ye instanceof t.ResourceTextEdit))throw new Error("bad edit - only text edits are supported");const Xe=this._modelService.getModel(Ye.resource);if(!Xe)throw new Error("bad edit - model not found");if(typeof Ye.versionId=="number"&&Xe.getVersionId()!==Ye.versionId)throw new Error("bad state - model changed in the meantime");let it=ze.get(Xe);it||(it=[],ze.set(Xe,it)),it.push(n.EditOperation.replaceMove(c.Range.lift(Ye.textEdit.range),Ye.textEdit.text))}let je=0,Je=0;for(const[Ye,Xe]of ze)Ye.pushStackElement(),Ye.pushEditOperations([],Xe,()=>[]),Ye.pushStackElement(),Je+=1,je+=Xe.length;return{ariaSummary:y.format(F.StandaloneServicesNLS.bulkEditServiceSummary,je,Je)}})}};tt=Ie([Ce(0,r.IModelService)],tt);class Be{getUriLabel(Ne,Oe){return Ne.scheme==="file"?Ne.fsPath:Ne.path}}let Ee=class extends X.ContextViewService{constructor(Ne,Oe){super(Ne);this._codeEditorService=Oe}showContextView(Ne,Oe,ze){if(!Oe){const je=this._codeEditorService.getFocusedCodeEditor()||this._codeEditorService.getActiveCodeEditor();je&&(Oe=je.getContainerDomNode())}return super.showContextView(Ne,Oe,ze)}};Ee=Ie([Ce(0,P.ILayoutService),Ce(1,W.ICodeEditorService)],Ee);class Re{constructor(){this._neverEmitter=new I.Emitter,this.onDidChangeTrust=this._neverEmitter.event}isWorkspaceTrusted(){return!0}}class Ae extends G.LanguageService{constructor(){super()}}class Ue extends A.LogService{constructor(){super(new A.ConsoleLogger)}}let et=class extends re.ContextMenuService{constructor(Ne,Oe,ze,je,Je){super(Ne,Oe,ze,je,Je);this.configure({blockMouse:!1})}};et=Ie([Ce(0,T.ITelemetryService),Ce(1,O.INotificationService),Ce(2,q.IContextViewService),Ce(3,_.IKeybindingService),Ce(4,ae.IThemeService)],et),(0,oe.registerSingleton)(d.IConfigurationService,Pe),(0,oe.registerSingleton)(o.ITextResourceConfigurationService,Fe),(0,oe.registerSingleton)(o.ITextResourcePropertiesService,xe),(0,oe.registerSingleton)(R.IWorkspaceContextService,qe),(0,oe.registerSingleton)(M.ILabelService,Be),(0,oe.registerSingleton)(T.ITelemetryService,Ve),(0,oe.registerSingleton)(S.IDialogService,$e),(0,oe.registerSingleton)(O.INotificationService,He),(0,oe.registerSingleton)(be.IMarkerService,de.MarkerService),(0,oe.registerSingleton)(Q.ILanguageService,Ae),(0,oe.registerSingleton)(V.IStandaloneThemeService,z.StandaloneThemeService),(0,oe.registerSingleton)(A.ILogService,Ue),(0,oe.registerSingleton)(r.IModelService,ee.ModelService),(0,oe.registerSingleton)(ce.IMarkerDecorationsService,ne.MarkerDecorationsService),(0,oe.registerSingleton)(f.IContextKeyService,me.ContextKeyService),(0,oe.registerSingleton)(B.IEditorProgressService,Me),(0,oe.registerSingleton)(Le.IStorageService,Le.InMemoryStorageService),(0,oe.registerSingleton)(x.IEditorWorkerService,U.EditorWorkerService),(0,oe.registerSingleton)(t.IBulkEditService,tt),(0,oe.registerSingleton)(H.IWorkspaceTrustManagementService,Re),(0,oe.registerSingleton)(s.ITextModelService,ke),(0,oe.registerSingleton)(K.IAccessibilityService,$.AccessibilityService),(0,oe.registerSingleton)(pe.IListService,pe.ListService),(0,oe.registerSingleton)(a.ICommandService,Ge),(0,oe.registerSingleton)(_.IKeybindingService,we),(0,oe.registerSingleton)(_e.IQuickInputService,ue.StandaloneQuickInputService),(0,oe.registerSingleton)(q.IContextViewService,Ee),(0,oe.registerSingleton)(fe.IOpenerService,Z.OpenerService),(0,oe.registerSingleton)(ge.IClipboardService,se.BrowserClipboardService),(0,oe.registerSingleton)(q.IContextMenuService,et),(0,oe.registerSingleton)(J.IMenuService,Y.MenuService);var Ze;(function(Ke){const Ne=new ve.ServiceCollection;for(const[Ye,Xe]of(0,oe.getSingletonServiceDescriptors)())Ne.set(Ye,Xe);const Oe=new he.InstantiationService(Ne,!0);Ne.set(v.IInstantiationService,Oe);function ze(Ye){const Xe=Ne.get(Ye);if(!Xe)throw new Error("Missing service "+Ye);return Xe instanceof le.SyncDescriptor?Oe.invokeFunction(it=>it.get(Ye)):Xe}Ke.get=ze;let je=!1;function Je(Ye){if(je)return Oe;je=!0;for(const[Xe,it]of(0,oe.getSingletonServiceDescriptors)())Ne.get(Xe)||Ne.set(Xe,it);for(const Xe in Ye)if(Ye.hasOwnProperty(Xe)){const it=(0,v.createDecorator)(Xe);Ne.get(it)instanceof le.SyncDescriptor&&Ne.set(it,Ye[Xe])}return Oe}Ke.initialize=Je})(Ze=e.StandaloneServices||(e.StandaloneServices={}))}),define(te[737],ie([1,0,43,2,28,161,292,239,85,209,101,37,26,40,16,76,9,42,38,14,63,70,102,71,45,35,284,79,32]),function(j,e,y,m,D,I,w,b,p,h,g,t,i,n,l,c,r,s,o,a,d,u,f,S,v,C,_,L,E){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.createTextModel=e.StandaloneDiffEditor=e.StandaloneEditor=e.StandaloneCodeEditor=void 0;let N=0,k=!1;function M(F){if(!F){if(k)return;k=!0}y.setARIAContainer(F||document.body)}let O=class extends I.CodeEditorWidget{constructor(W,A,H,q,X,G,re,ae,oe,Z,x){const U=Object.assign({},A);U.ariaLabel=U.ariaLabel||u.StandaloneCodeEditorNLS.editorViewAccessibleLabel,U.ariaLabel=U.ariaLabel+";"+u.StandaloneCodeEditorNLS.accessibilityHelpMessage;super(W,U,{},H,q,X,G,ae,oe,Z,x);re instanceof h.StandaloneKeybindingService?this._standaloneKeybindingService=re:this._standaloneKeybindingService=null,M(U.ariaContainerElement)}addCommand(W,A,H){if(!this._standaloneKeybindingService)return console.warn("Cannot add command because the editor is configured with an unrecognized KeybindingService"),null;const q="DYNAMIC_"+ ++N,X=l.ContextKeyExpr.deserialize(H);return this._standaloneKeybindingService.addDynamicKeybinding(q,W,A,X),q}createContextKey(W,A){return this._contextKeyService.createKey(W,A)}addAction(W){if(typeof W.id!="string"||typeof W.label!="string"||typeof W.run!="function")throw new Error("Invalid action descriptor, `id`, `label` and `run` are required properties!");if(!this._standaloneKeybindingService)return console.warn("Cannot add keybinding because the editor is configured with an unrecognized KeybindingService"),m.Disposable.None;const A=W.id,H=W.label,q=l.ContextKeyExpr.and(l.ContextKeyExpr.equals("editorId",this.getId()),l.ContextKeyExpr.deserialize(W.precondition)),X=W.keybindings,G=l.ContextKeyExpr.and(q,l.ContextKeyExpr.deserialize(W.keybindingContext)),re=W.contextMenuGroupId||null,ae=W.contextMenuOrder||0,oe=(Q,...ne)=>Promise.resolve(W.run(this,...ne)),Z=new m.DisposableStore,x=this.getId()+":"+A;if(Z.add(i.CommandsRegistry.registerCommand(x,oe)),re){const Q={command:{id:x,title:H},when:q,group:re,order:ae};Z.add(t.MenuRegistry.appendMenuItem(t.MenuId.EditorContext,Q))}if(Array.isArray(X))for(const Q of X)Z.add(this._standaloneKeybindingService.addDynamicKeybinding(x,Q,oe,G));const U=new b.InternalEditorAction(x,H,H,q,oe,this._contextKeyService);return this._actions[A]=U,Z.add((0,m.toDisposable)(()=>{delete this._actions[A]})),Z}_triggerCommand(W,A){if(this._codeEditorService instanceof _.StandaloneCodeEditorService)try{this._codeEditorService.setActiveCodeEditor(this),super._triggerCommand(W,A)}finally{this._codeEditorService.setActiveCodeEditor(null)}else super._triggerCommand(W,A)}};O=Ie([Ce(2,r.IInstantiationService),Ce(3,D.ICodeEditorService),Ce(4,i.ICommandService),Ce(5,l.IContextKeyService),Ce(6,s.IKeybindingService),Ce(7,a.IThemeService),Ce(8,o.INotificationService),Ce(9,d.IAccessibilityService),Ce(10,E.ILanguageConfigurationService)],O),e.StandaloneCodeEditor=O;let B=class extends O{constructor(W,A,H,q,X,G,re,ae,oe,Z,x,U,Q,ne){const ce=Object.assign({},A);(0,h.updateConfigurationService)(Z,ce,!1);const ee=ae.registerEditorContainer(W);typeof ce.theme=="string"&&ae.setTheme(ce.theme),typeof ce.autoDetectHighContrast!="undefined"&&ae.setAutoDetectHighContrast(Boolean(ce.autoDetectHighContrast));const ue=ce.model;delete ce.model;super(W,ce,H,q,X,G,re,ae,oe,x,ne);this._configurationService=Z,this._standaloneThemeService=ae,this._register(ee);let z;if(typeof ue=="undefined"){const V=Q.getLanguageIdByMimeType(ce.language)||ce.language||L.PLAINTEXT_LANGUAGE_ID;z=R(U,Q,ce.value||"",V,void 0),this._ownsModel=!0}else z=ue,this._ownsModel=!1;if(this._attachModel(z),z){const V={oldModelUrl:null,newModelUrl:z.uri};this._onDidChangeModel.fire(V)}}dispose(){super.dispose()}updateOptions(W){(0,h.updateConfigurationService)(this._configurationService,W,!1),typeof W.theme=="string"&&this._standaloneThemeService.setTheme(W.theme),typeof W.autoDetectHighContrast!="undefined"&&this._standaloneThemeService.setAutoDetectHighContrast(Boolean(W.autoDetectHighContrast)),super.updateOptions(W)}_postDetachModelCleanup(W){super._postDetachModelCleanup(W),W&&this._ownsModel&&(W.dispose(),this._ownsModel=!1)}};B=Ie([Ce(2,r.IInstantiationService),Ce(3,D.ICodeEditorService),Ce(4,i.ICommandService),Ce(5,l.IContextKeyService),Ce(6,s.IKeybindingService),Ce(7,g.IStandaloneThemeService),Ce(8,o.INotificationService),Ce(9,n.IConfigurationService),Ce(10,d.IAccessibilityService),Ce(11,v.IModelService),Ce(12,C.ILanguageService),Ce(13,E.ILanguageConfigurationService)],B),e.StandaloneEditor=B;let T=class extends w.DiffEditorWidget{constructor(W,A,H,q,X,G,re,ae,oe,Z,x,U){const Q=Object.assign({},A);(0,h.updateConfigurationService)(oe,Q,!0);const ne=re.registerEditorContainer(W);typeof Q.theme=="string"&&re.setTheme(Q.theme),typeof Q.autoDetectHighContrast!="undefined"&&re.setAutoDetectHighContrast(Boolean(Q.autoDetectHighContrast));super(W,Q,{},U,X,q,H,G,re,ae,Z,x);this._configurationService=oe,this._standaloneThemeService=re,this._register(ne)}dispose(){super.dispose()}updateOptions(W){(0,h.updateConfigurationService)(this._configurationService,W,!0),typeof W.theme=="string"&&this._standaloneThemeService.setTheme(W.theme),typeof W.autoDetectHighContrast!="undefined"&&this._standaloneThemeService.setAutoDetectHighContrast(Boolean(W.autoDetectHighContrast)),super.updateOptions(W)}_createInnerEditor(W,A,H){return W.createInstance(O,A,H)}getOriginalEditor(){return super.getOriginalEditor()}getModifiedEditor(){return super.getModifiedEditor()}addCommand(W,A,H){return this.getModifiedEditor().addCommand(W,A,H)}createContextKey(W,A){return this.getModifiedEditor().createContextKey(W,A)}addAction(W){return this.getModifiedEditor().addAction(W)}};T=Ie([Ce(2,r.IInstantiationService),Ce(3,l.IContextKeyService),Ce(4,p.IEditorWorkerService),Ce(5,D.ICodeEditorService),Ce(6,g.IStandaloneThemeService),Ce(7,o.INotificationService),Ce(8,n.IConfigurationService),Ce(9,c.IContextMenuService),Ce(10,S.IEditorProgressService),Ce(11,f.IClipboardService)],T),e.StandaloneDiffEditor=T;function R(F,W,A,H,q){if(A=A||"",!H){const X=A.indexOf(`
|
||
`);let G=A;return X!==-1&&(G=A.substring(0,X)),P(F,A,W.createByFilepathOrFirstLine(q||null,G),q)}return P(F,A,W.createById(H),q)}e.createTextModel=R;function P(F,W,A,H){return F.createModel(W,A,H)}}),define(te[738],ie([1,0,8,266,28,235,31,174,147,49,18,32,121,35,45,613,179,470,737,209,101,26,77,394]),function(j,e,y,m,D,I,w,b,p,h,g,t,i,n,l,c,r,s,o,a,d,u,f){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.createMonacoEditorAPI=e.registerCommand=e.remeasureFonts=e.setTheme=e.defineTheme=e.tokenize=e.colorizeModelLine=e.colorize=e.colorizeElement=e.createWebWorker=e.onDidChangeModelLanguage=e.onWillDisposeModel=e.onDidCreateModel=e.getModels=e.getModel=e.onDidChangeMarkers=e.getModelMarkers=e.setModelMarkers=e.setModelLanguage=e.createModel=e.createDiffNavigator=e.createDiffEditor=e.onDidCreateEditor=e.create=void 0;function S(x,U,Q){return a.StandaloneServices.initialize(Q||{}).createInstance(o.StandaloneEditor,x,U)}e.create=S;function v(x){return a.StandaloneServices.get(D.ICodeEditorService).onCodeEditorAdd(Q=>{x(Q)})}e.onDidCreateEditor=v;function C(x,U,Q){return a.StandaloneServices.initialize(Q||{}).createInstance(o.StandaloneDiffEditor,x,U)}e.createDiffEditor=C;function _(x,U){return new I.DiffNavigator(x,U)}e.createDiffNavigator=_;function L(x,U,Q){const ne=a.StandaloneServices.get(n.ILanguageService),ce=ne.getLanguageIdByMimeType(U)||U;return(0,o.createTextModel)(a.StandaloneServices.get(l.IModelService),ne,x,ce,Q)}e.createModel=L;function E(x,U){const Q=a.StandaloneServices.get(n.ILanguageService);a.StandaloneServices.get(l.IModelService).setMode(x,Q.createById(U))}e.setModelLanguage=E;function N(x,U,Q){x&&a.StandaloneServices.get(f.IMarkerService).changeOne(U,x.uri,Q)}e.setModelMarkers=N;function k(x){return a.StandaloneServices.get(f.IMarkerService).read(x)}e.getModelMarkers=k;function M(x){return a.StandaloneServices.get(f.IMarkerService).onMarkerChanged(x)}e.onDidChangeMarkers=M;function O(x){return a.StandaloneServices.get(l.IModelService).getModel(x)}e.getModel=O;function B(){return a.StandaloneServices.get(l.IModelService).getModels()}e.getModels=B;function T(x){return a.StandaloneServices.get(l.IModelService).onModelAdded(x)}e.onDidCreateModel=T;function R(x){return a.StandaloneServices.get(l.IModelService).onModelRemoved(x)}e.onWillDisposeModel=R;function P(x){return a.StandaloneServices.get(l.IModelService).onModelLanguageChanged(Q=>{x({model:Q.model,oldLanguage:Q.oldLanguageId})})}e.onDidChangeModelLanguage=P;function F(x){return(0,c.createWebWorker)(a.StandaloneServices.get(l.IModelService),a.StandaloneServices.get(t.ILanguageConfigurationService),x)}e.createWebWorker=F;function W(x,U){const Q=a.StandaloneServices.get(n.ILanguageService),ne=a.StandaloneServices.get(d.IStandaloneThemeService);return ne.registerEditorContainer(x),s.Colorizer.colorizeElement(ne,Q,x,U)}e.colorizeElement=W;function A(x,U,Q){const ne=a.StandaloneServices.get(n.ILanguageService);return a.StandaloneServices.get(d.IStandaloneThemeService).registerEditorContainer(document.body),s.Colorizer.colorize(ne,x,U,Q)}e.colorize=A;function H(x,U,Q=4){return a.StandaloneServices.get(d.IStandaloneThemeService).registerEditorContainer(document.body),s.Colorizer.colorizeModelLine(x,U,Q)}e.colorizeModelLine=H;function q(x){const U=g.TokenizationRegistry.get(x);return U||{getInitialState:()=>i.NullState,tokenize:(Q,ne,ce)=>(0,i.nullTokenize)(x,ce)}}function X(x,U){g.TokenizationRegistry.getOrCreate(U);const Q=q(U),ne=(0,y.splitLines)(x),ce=[];let ee=Q.getInitialState();for(let ue=0,z=ne.length;ue<z;ue++){const V=ne[ue],$=Q.tokenize(V,!0,ee);ce[ue]=$.tokens,ee=$.endState}return ce}e.tokenize=X;function G(x,U){a.StandaloneServices.get(d.IStandaloneThemeService).defineTheme(x,U)}e.defineTheme=G;function re(x){a.StandaloneServices.get(d.IStandaloneThemeService).setTheme(x)}e.setTheme=re;function ae(){m.FontMeasurements.clearAllFontInfos()}e.remeasureFonts=ae;function oe(x,U){return u.CommandsRegistry.registerCommand({id:x,handler:U})}e.registerCommand=oe;function Z(){return{create:S,onDidCreateEditor:v,createDiffEditor:C,createDiffNavigator:_,createModel:L,setModelLanguage:E,setModelMarkers:N,getModelMarkers:k,onDidChangeMarkers:M,getModels:B,getModel:O,onDidCreateModel:T,onWillDisposeModel:R,onDidChangeModelLanguage:P,createWebWorker:F,colorizeElement:W,colorize:A,colorizeModelLine:H,tokenize:X,defineTheme:G,setTheme:re,remeasureFonts:ae,registerCommand:oe,AccessibilitySupport:r.AccessibilitySupport,ContentWidgetPositionPreference:r.ContentWidgetPositionPreference,CursorChangeReason:r.CursorChangeReason,DefaultEndOfLine:r.DefaultEndOfLine,EditorAutoIndentStrategy:r.EditorAutoIndentStrategy,EditorOption:r.EditorOption,EndOfLinePreference:r.EndOfLinePreference,EndOfLineSequence:r.EndOfLineSequence,MinimapPosition:r.MinimapPosition,MouseTargetType:r.MouseTargetType,OverlayWidgetPositionPreference:r.OverlayWidgetPositionPreference,OverviewRulerLane:r.OverviewRulerLane,RenderLineNumbersType:r.RenderLineNumbersType,RenderMinimap:r.RenderMinimap,ScrollbarVisibility:r.ScrollbarVisibility,ScrollType:r.ScrollType,TextEditorCursorBlinkingStyle:r.TextEditorCursorBlinkingStyle,TextEditorCursorStyle:r.TextEditorCursorStyle,TrackedRangeStickiness:r.TrackedRangeStickiness,WrappingIndent:r.WrappingIndent,InjectedTextCursorStops:r.InjectedTextCursorStops,PositionAffinity:r.PositionAffinity,ConfigurationChangedEvent:w.ConfigurationChangedEvent,BareFontInfo:b.BareFontInfo,FontInfo:b.FontInfo,TextModelResolvedOptions:h.TextModelResolvedOptions,FindMatch:h.FindMatch,ApplyUpdateResult:w.ApplyUpdateResult,EditorType:p.EditorType,EditorOptions:w.EditorOptions}}e.createMonacoEditorAPI=Z}),define(te[739],ie([1,0,29,3,18,32,79,35,179,209,469,263,101,77]),function(j,e,y,m,D,I,w,b,p,h,g,t,i,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.createMonacoLanguagesAPI=e.registerInlayHintsProvider=e.registerInlineCompletionsProvider=e.registerDocumentRangeSemanticTokensProvider=e.registerDocumentSemanticTokensProvider=e.registerSelectionRangeProvider=e.registerDeclarationProvider=e.registerFoldingRangeProvider=e.registerColorProvider=e.registerCompletionItemProvider=e.registerLinkProvider=e.registerOnTypeFormattingEditProvider=e.registerDocumentRangeFormattingEditProvider=e.registerDocumentFormattingEditProvider=e.registerCodeActionProvider=e.registerCodeLensProvider=e.registerTypeDefinitionProvider=e.registerImplementationProvider=e.registerDefinitionProvider=e.registerLinkedEditingRangeProvider=e.registerDocumentHighlightProvider=e.registerDocumentSymbolProvider=e.registerHoverProvider=e.registerSignatureHelpProvider=e.registerRenameProvider=e.registerReferenceProvider=e.setMonarchTokensProvider=e.setTokensProvider=e.registerTokensProviderFactory=e.setColorMap=e.TokenizationSupportAdapter=e.EncodedTokenizationSupportAdapter=e.setLanguageConfiguration=e.onLanguage=e.getEncodedLanguageId=e.getLanguages=e.register=void 0;function l(z){w.ModesRegistry.registerLanguage(z)}e.register=l;function c(){let z=[];return z=z.concat(w.ModesRegistry.getLanguages()),z}e.getLanguages=c;function r(z){return h.StandaloneServices.get(b.ILanguageService).languageIdCodec.encodeLanguageId(z)}e.getEncodedLanguageId=r;function s(z,V){const K=h.StandaloneServices.get(b.ILanguageService).onDidEncounterLanguage(J=>{J===z&&(K.dispose(),V())});return K}e.onLanguage=s;function o(z,V){if(!h.StandaloneServices.get(b.ILanguageService).isRegisteredLanguageId(z))throw new Error(`Cannot set configuration for unknown language ${z}`);return I.LanguageConfigurationRegistry.register(z,V,100)}e.setLanguageConfiguration=o;class a{constructor(V,$){this._languageId=V,this._actual=$}getInitialState(){return this._actual.getInitialState()}tokenize(V,$,K){if(typeof this._actual.tokenize=="function")return d.adaptTokenize(this._languageId,this._actual,V,K);throw new Error("Not supported!")}tokenizeEncoded(V,$,K){const J=this._actual.tokenizeEncoded(V,K);return new D.EncodedTokenizationResult(J.tokens,J.endState)}}e.EncodedTokenizationSupportAdapter=a;class d{constructor(V,$,K,J){this._languageId=V,this._actual=$,this._languageService=K,this._standaloneThemeService=J}getInitialState(){return this._actual.getInitialState()}static _toClassicTokens(V,$){const K=[];let J=0;for(let Y=0,se=V.length;Y<se;Y++){const ge=V[Y];let me=ge.startIndex;Y===0?me=0:me<J&&(me=J),K[Y]=new D.Token(me,ge.scopes,$),J=me}return K}static adaptTokenize(V,$,K,J){const Y=$.tokenize(K,J),se=d._toClassicTokens(Y.tokens,V);let ge;return Y.endState.equals(J)?ge=J:ge=Y.endState,new D.TokenizationResult(se,ge)}tokenize(V,$,K){return d.adaptTokenize(this._languageId,this._actual,V,K)}_toBinaryTokens(V,$){const K=V.encodeLanguageId(this._languageId),J=this._standaloneThemeService.getColorTheme().tokenTheme,Y=[];let se=0,ge=0;for(let le=0,he=$.length;le<he;le++){const ve=$[le],pe=J.match(K,ve.scopes);if(se>0&&Y[se-1]===pe)continue;let be=ve.startIndex;le===0?be=0:be<ge&&(be=ge),Y[se++]=be,Y[se++]=pe,ge=be}const me=new Uint32Array(se);for(let le=0;le<se;le++)me[le]=Y[le];return me}tokenizeEncoded(V,$,K){const J=this._actual.tokenize(V,K),Y=this._toBinaryTokens(this._languageService.languageIdCodec,J.tokens);let se;return J.endState.equals(K)?se=K:se=J.endState,new D.EncodedTokenizationResult(Y,se)}}e.TokenizationSupportAdapter=d;function u(z){return typeof z.getInitialState=="function"}function f(z){return"tokenizeEncoded"in z}function S(z){return z&&typeof z.then=="function"}function v(z){const V=h.StandaloneServices.get(i.IStandaloneThemeService);if(z){const $=[null];for(let K=1,J=z.length;K<J;K++)$[K]=y.Color.fromHex(z[K]);V.setColorMapOverride($)}else V.setColorMapOverride(null)}e.setColorMap=v;function C(z,V){return f(V)?new a(z,V):new d(z,V,h.StandaloneServices.get(b.ILanguageService),h.StandaloneServices.get(i.IStandaloneThemeService))}function _(z,V){const $={createTokenizationSupport:()=>ye(this,void 0,void 0,function*(){const K=yield Promise.resolve(V.create());return K?u(K)?C(z,K):new t.MonarchTokenizer(h.StandaloneServices.get(b.ILanguageService),h.StandaloneServices.get(i.IStandaloneThemeService),z,(0,g.compile)(z,K)):null})};return D.TokenizationRegistry.registerFactory(z,$)}e.registerTokensProviderFactory=_;function L(z,V){if(!h.StandaloneServices.get(b.ILanguageService).isRegisteredLanguageId(z))throw new Error(`Cannot set tokens provider for unknown language ${z}`);return S(V)?_(z,{create:()=>V}):D.TokenizationRegistry.register(z,C(z,V))}e.setTokensProvider=L;function E(z,V){const $=K=>new t.MonarchTokenizer(h.StandaloneServices.get(b.ILanguageService),h.StandaloneServices.get(i.IStandaloneThemeService),z,(0,g.compile)(z,K));return S(V)?_(z,{create:()=>V}):D.TokenizationRegistry.register(z,$(V))}e.setMonarchTokensProvider=E;function N(z,V){return D.ReferenceProviderRegistry.register(z,V)}e.registerReferenceProvider=N;function k(z,V){return D.RenameProviderRegistry.register(z,V)}e.registerRenameProvider=k;function M(z,V){return D.SignatureHelpProviderRegistry.register(z,V)}e.registerSignatureHelpProvider=M;function O(z,V){return D.HoverProviderRegistry.register(z,{provideHover:($,K,J)=>{const Y=$.getWordAtPosition(K);return Promise.resolve(V.provideHover($,K,J)).then(se=>{if(!!se)return!se.range&&Y&&(se.range=new m.Range(K.lineNumber,Y.startColumn,K.lineNumber,Y.endColumn)),se.range||(se.range=new m.Range(K.lineNumber,K.column,K.lineNumber,K.column)),se})}})}e.registerHoverProvider=O;function B(z,V){return D.DocumentSymbolProviderRegistry.register(z,V)}e.registerDocumentSymbolProvider=B;function T(z,V){return D.DocumentHighlightProviderRegistry.register(z,V)}e.registerDocumentHighlightProvider=T;function R(z,V){return D.LinkedEditingRangeProviderRegistry.register(z,V)}e.registerLinkedEditingRangeProvider=R;function P(z,V){return D.DefinitionProviderRegistry.register(z,V)}e.registerDefinitionProvider=P;function F(z,V){return D.ImplementationProviderRegistry.register(z,V)}e.registerImplementationProvider=F;function W(z,V){return D.TypeDefinitionProviderRegistry.register(z,V)}e.registerTypeDefinitionProvider=W;function A(z,V){return D.CodeLensProviderRegistry.register(z,V)}e.registerCodeLensProvider=A;function H(z,V,$){return D.CodeActionProviderRegistry.register(z,{providedCodeActionKinds:$==null?void 0:$.providedCodeActionKinds,provideCodeActions:(K,J,Y,se)=>{const me=h.StandaloneServices.get(n.IMarkerService).read({resource:K.uri}).filter(le=>m.Range.areIntersectingOrTouching(le,J));return V.provideCodeActions(K,J,{markers:me,only:Y.only},se)},resolveCodeAction:V.resolveCodeAction})}e.registerCodeActionProvider=H;function q(z,V){return D.DocumentFormattingEditProviderRegistry.register(z,V)}e.registerDocumentFormattingEditProvider=q;function X(z,V){return D.DocumentRangeFormattingEditProviderRegistry.register(z,V)}e.registerDocumentRangeFormattingEditProvider=X;function G(z,V){return D.OnTypeFormattingEditProviderRegistry.register(z,V)}e.registerOnTypeFormattingEditProvider=G;function re(z,V){return D.LinkProviderRegistry.register(z,V)}e.registerLinkProvider=re;function ae(z,V){return D.CompletionProviderRegistry.register(z,V)}e.registerCompletionItemProvider=ae;function oe(z,V){return D.ColorProviderRegistry.register(z,V)}e.registerColorProvider=oe;function Z(z,V){return D.FoldingRangeProviderRegistry.register(z,V)}e.registerFoldingRangeProvider=Z;function x(z,V){return D.DeclarationProviderRegistry.register(z,V)}e.registerDeclarationProvider=x;function U(z,V){return D.SelectionRangeRegistry.register(z,V)}e.registerSelectionRangeProvider=U;function Q(z,V){return D.DocumentSemanticTokensProviderRegistry.register(z,V)}e.registerDocumentSemanticTokensProvider=Q;function ne(z,V){return D.DocumentRangeSemanticTokensProviderRegistry.register(z,V)}e.registerDocumentRangeSemanticTokensProvider=ne;function ce(z,V){return D.InlineCompletionsProviderRegistry.register(z,V)}e.registerInlineCompletionsProvider=ce;function ee(z,V){return D.InlayHintsProviderRegistry.register(z,V)}e.registerInlayHintsProvider=ee;function ue(){return{register:l,getLanguages:c,onLanguage:s,getEncodedLanguageId:r,setLanguageConfiguration:o,setColorMap:v,registerTokensProviderFactory:_,setTokensProvider:L,setMonarchTokensProvider:E,registerReferenceProvider:N,registerRenameProvider:k,registerCompletionItemProvider:ae,registerSignatureHelpProvider:M,registerHoverProvider:O,registerDocumentSymbolProvider:B,registerDocumentHighlightProvider:T,registerLinkedEditingRangeProvider:R,registerDefinitionProvider:P,registerImplementationProvider:F,registerTypeDefinitionProvider:W,registerCodeLensProvider:A,registerCodeActionProvider:H,registerDocumentFormattingEditProvider:q,registerDocumentRangeFormattingEditProvider:X,registerOnTypeFormattingEditProvider:G,registerLinkProvider:re,registerColorProvider:oe,registerFoldingRangeProvider:Z,registerDeclarationProvider:x,registerSelectionRangeProvider:U,registerDocumentSemanticTokensProvider:Q,registerDocumentRangeSemanticTokensProvider:ne,registerInlineCompletionsProvider:ce,registerInlayHintsProvider:ee,DocumentHighlightKind:p.DocumentHighlightKind,CompletionItemKind:p.CompletionItemKind,CompletionItemTag:p.CompletionItemTag,CompletionItemInsertTextRule:p.CompletionItemInsertTextRule,SymbolKind:p.SymbolKind,SymbolTag:p.SymbolTag,IndentAction:p.IndentAction,CompletionTriggerKind:p.CompletionTriggerKind,SignatureHelpTriggerKind:p.SignatureHelpTriggerKind,InlayHintKind:p.InlayHintKind,InlineCompletionTriggerKind:p.InlineCompletionTriggerKind,FoldingRangeKind:D.FoldingRangeKind}}e.createMonacoLanguagesAPI=ue}),define(te[740],ie([1,0,31,248,738,739,17,285]),function(j,e,y,m,D,I,w,b){"use strict";var p;Object.defineProperty(e,"__esModule",{value:!0}),e.languages=e.editor=e.Token=e.Uri=e.MarkerTag=e.MarkerSeverity=e.SelectionDirection=e.Selection=e.Range=e.Position=e.KeyMod=e.KeyCode=e.Emitter=e.CancellationTokenSource=void 0,y.EditorOptions.wrappingIndent.defaultValue=0,y.EditorOptions.glyphMargin.defaultValue=!1,y.EditorOptions.autoIndent.defaultValue=3,y.EditorOptions.overviewRulerLanes.defaultValue=2,b.FormattingConflicts.setFormatterSelector((g,t,i)=>Promise.resolve(g[0]));const h=(0,m.createMonacoBaseAPI)();h.editor=(0,D.createMonacoEditorAPI)(),h.languages=(0,I.createMonacoLanguagesAPI)(),e.CancellationTokenSource=h.CancellationTokenSource,e.Emitter=h.Emitter,e.KeyCode=h.KeyCode,e.KeyMod=h.KeyMod,e.Position=h.Position,e.Range=h.Range,e.Selection=h.Selection,e.SelectionDirection=h.SelectionDirection,e.MarkerSeverity=h.MarkerSeverity,e.MarkerTag=h.MarkerTag,e.Uri=h.Uri,e.Token=h.Token,e.editor=h.editor,e.languages=h.languages,(((p=w.globals.MonacoEnvironment)===null||p===void 0?void 0:p.globalAPI)||typeof define=="function"&&define.amd)&&(self.monaco=h),typeof self.require!="undefined"&&typeof self.require.config=="function"&&self.require.config({ignoreDuplicateModules:["vscode-languageserver-types","vscode-languageserver-types/main","vscode-languageserver-textdocument","vscode-languageserver-textdocument/main","vscode-nls","vscode-nls/vscode-nls","jsonc-parser","jsonc-parser/main","vscode-uri","vscode-uri/index","vs/basic-languages/typescript/typescript"]})}),define(te[741],ie([1,0,25,593]),function(j,e,y,m){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.toWorkspaceIdentifier=e.isSingleFolderWorkspaceIdentifier=e.WORKSPACE_FILTER=e.WORKSPACE_EXTENSION=void 0,e.WORKSPACE_EXTENSION="code-workspace",e.WORKSPACE_FILTER=[{name:(0,m.localize)(0,null),extensions:[e.WORKSPACE_EXTENSION]}];function D(w){const b=w;return typeof(b==null?void 0:b.id)=="string"&&y.URI.isUri(b.uri)}e.isSingleFolderWorkspaceIdentifier=D;function I(w){if(w.configuration)return{id:w.id,configPath:w.configuration};if(w.folders.length===1)return{id:w.id,uri:w.folders[0].uri}}e.toWorkspaceIdentifier=I}),define(te[742],ie([1,0,171,82,41,8,325,32,124,567,741]),function(j,e,y,m,D,I,w,b,p,h,g){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.RandomBasedVariableResolver=e.WorkspaceBasedVariableResolver=e.TimeBasedVariableResolver=e.CommentBasedVariableResolver=e.ClipboardBasedVariableResolver=e.ModelBasedVariableResolver=e.SelectionBasedVariableResolver=e.CompositeSnippetVariableResolver=e.KnownSnippetVariableNames=void 0,e.KnownSnippetVariableNames=Object.freeze({CURRENT_YEAR:!0,CURRENT_YEAR_SHORT:!0,CURRENT_MONTH:!0,CURRENT_DATE:!0,CURRENT_HOUR:!0,CURRENT_MINUTE:!0,CURRENT_SECOND:!0,CURRENT_DAY_NAME:!0,CURRENT_DAY_NAME_SHORT:!0,CURRENT_MONTH_NAME:!0,CURRENT_MONTH_NAME_SHORT:!0,CURRENT_SECONDS_UNIX:!0,SELECTION:!0,CLIPBOARD:!0,TM_SELECTED_TEXT:!0,TM_CURRENT_LINE:!0,TM_CURRENT_WORD:!0,TM_LINE_INDEX:!0,TM_LINE_NUMBER:!0,TM_FILENAME:!0,TM_FILENAME_BASE:!0,TM_DIRECTORY:!0,TM_FILEPATH:!0,RELATIVE_FILEPATH:!0,BLOCK_COMMENT_START:!0,BLOCK_COMMENT_END:!0,LINE_COMMENT:!0,WORKSPACE_NAME:!0,WORKSPACE_FOLDER:!0,RANDOM:!0,RANDOM_HEX:!0,UUID:!0});class t{constructor(d){this._delegates=d}resolve(d){for(const u of this._delegates){let f=u.resolve(d);if(f!==void 0)return f}}}e.CompositeSnippetVariableResolver=t;class i{constructor(d,u,f,S){this._model=d,this._selection=u,this._selectionIdx=f,this._overtypingCapturer=S}resolve(d){const{name:u}=d;if(u==="SELECTION"||u==="TM_SELECTED_TEXT"){let f=this._model.getValueInRange(this._selection)||void 0,S=this._selection.startLineNumber!==this._selection.endLineNumber;if(!f&&this._overtypingCapturer){const v=this._overtypingCapturer.getLastOvertypedInfo(this._selectionIdx);v&&(f=v.value,S=v.multiline)}if(f&&S&&d.snippet){const v=this._model.getLineContent(this._selection.startLineNumber),C=(0,I.getLeadingWhitespace)(v,0,this._selection.startColumn-1);let _=C;d.snippet.walk(E=>E===d?!1:(E instanceof p.Text&&(_=(0,I.getLeadingWhitespace)((0,I.splitLines)(E.value).pop())),!0));const L=(0,I.commonPrefixLength)(_,C);f=f.replace(/(\r\n|\r|\n)(.*)/g,(E,N,k)=>`${N}${_.substr(L)}${k}`)}return f}else{if(u==="TM_CURRENT_LINE")return this._model.getLineContent(this._selection.positionLineNumber);if(u==="TM_CURRENT_WORD"){const f=this._model.getWordAtPosition({lineNumber:this._selection.positionLineNumber,column:this._selection.positionColumn});return f&&f.word||void 0}else{if(u==="TM_LINE_INDEX")return String(this._selection.positionLineNumber-1);if(u==="TM_LINE_NUMBER")return String(this._selection.positionLineNumber)}}}}e.SelectionBasedVariableResolver=i;class n{constructor(d,u){this._labelService=d,this._model=u}resolve(d){const{name:u}=d;if(u==="TM_FILENAME")return m.basename(this._model.uri.fsPath);if(u==="TM_FILENAME_BASE"){const f=m.basename(this._model.uri.fsPath),S=f.lastIndexOf(".");return S<=0?f:f.slice(0,S)}else{if(u==="TM_DIRECTORY")return m.dirname(this._model.uri.fsPath)==="."?"":this._labelService.getUriLabel((0,D.dirname)(this._model.uri));if(u==="TM_FILEPATH")return this._labelService.getUriLabel(this._model.uri);if(u==="RELATIVE_FILEPATH")return this._labelService.getUriLabel(this._model.uri,{relative:!0,noPrefix:!0})}}}e.ModelBasedVariableResolver=n;class l{constructor(d,u,f,S){this._readClipboardText=d,this._selectionIdx=u,this._selectionCount=f,this._spread=S}resolve(d){if(d.name!=="CLIPBOARD")return;const u=this._readClipboardText();if(!!u){if(this._spread){const f=u.split(/\r\n|\n|\r/).filter(S=>!(0,I.isFalsyOrWhitespace)(S));if(f.length===this._selectionCount)return f[this._selectionIdx]}return u}}}e.ClipboardBasedVariableResolver=l;class c{constructor(d,u){this._model=d,this._selection=u}resolve(d){const{name:u}=d,f=this._model.getLanguageIdAtPosition(this._selection.selectionStartLineNumber,this._selection.selectionStartColumn),S=b.LanguageConfigurationRegistry.getComments(f);if(!!S){if(u==="LINE_COMMENT")return S.lineCommentToken||void 0;if(u==="BLOCK_COMMENT_START")return S.blockCommentStartToken||void 0;if(u==="BLOCK_COMMENT_END")return S.blockCommentEndToken||void 0}}}e.CommentBasedVariableResolver=c;class r{constructor(){this._date=new Date}resolve(d){const{name:u}=d;if(u==="CURRENT_YEAR")return String(this._date.getFullYear());if(u==="CURRENT_YEAR_SHORT")return String(this._date.getFullYear()).slice(-2);if(u==="CURRENT_MONTH")return String(this._date.getMonth().valueOf()+1).padStart(2,"0");if(u==="CURRENT_DATE")return String(this._date.getDate().valueOf()).padStart(2,"0");if(u==="CURRENT_HOUR")return String(this._date.getHours().valueOf()).padStart(2,"0");if(u==="CURRENT_MINUTE")return String(this._date.getMinutes().valueOf()).padStart(2,"0");if(u==="CURRENT_SECOND")return String(this._date.getSeconds().valueOf()).padStart(2,"0");if(u==="CURRENT_DAY_NAME")return r.dayNames[this._date.getDay()];if(u==="CURRENT_DAY_NAME_SHORT")return r.dayNamesShort[this._date.getDay()];if(u==="CURRENT_MONTH_NAME")return r.monthNames[this._date.getMonth()];if(u==="CURRENT_MONTH_NAME_SHORT")return r.monthNamesShort[this._date.getMonth()];if(u==="CURRENT_SECONDS_UNIX")return String(Math.floor(this._date.getTime()/1e3))}}e.TimeBasedVariableResolver=r,r.dayNames=[h.localize(0,null),h.localize(1,null),h.localize(2,null),h.localize(3,null),h.localize(4,null),h.localize(5,null),h.localize(6,null)],r.dayNamesShort=[h.localize(7,null),h.localize(8,null),h.localize(9,null),h.localize(10,null),h.localize(11,null),h.localize(12,null),h.localize(13,null)],r.monthNames=[h.localize(14,null),h.localize(15,null),h.localize(16,null),h.localize(17,null),h.localize(18,null),h.localize(19,null),h.localize(20,null),h.localize(21,null),h.localize(22,null),h.localize(23,null),h.localize(24,null),h.localize(25,null)],r.monthNamesShort=[h.localize(26,null),h.localize(27,null),h.localize(28,null),h.localize(29,null),h.localize(30,null),h.localize(31,null),h.localize(32,null),h.localize(33,null),h.localize(34,null),h.localize(35,null),h.localize(36,null),h.localize(37,null)];class s{constructor(d){this._workspaceService=d}resolve(d){if(!this._workspaceService)return;const u=(0,g.toWorkspaceIdentifier)(this._workspaceService.getWorkspace());if(!!u){if(d.name==="WORKSPACE_NAME")return this._resolveWorkspaceName(u);if(d.name==="WORKSPACE_FOLDER")return this._resoveWorkspacePath(u)}}_resolveWorkspaceName(d){if((0,g.isSingleFolderWorkspaceIdentifier)(d))return m.basename(d.uri.path);let u=m.basename(d.configPath.path);return u.endsWith(g.WORKSPACE_EXTENSION)&&(u=u.substr(0,u.length-g.WORKSPACE_EXTENSION.length-1)),u}_resoveWorkspacePath(d){if((0,g.isSingleFolderWorkspaceIdentifier)(d))return(0,y.normalizeDriveLetter)(d.uri.fsPath);let u=m.basename(d.configPath.path),f=d.configPath.fsPath;return f.endsWith(u)&&(f=f.substr(0,f.length-u.length-1)),f?(0,y.normalizeDriveLetter)(f):"/"}}e.WorkspaceBasedVariableResolver=s;class o{resolve(d){const{name:u}=d;if(u==="RANDOM")return Math.random().toString().slice(-6);if(u==="RANDOM_HEX")return Math.random().toString(16).slice(-6);if(u==="UUID")return(0,w.generateUuid)()}}e.RandomBasedVariableResolver=o}),define(te[303],ie([1,0,19,2,8,61,3,22,33,128,300,124,742,385]),function(j,e,y,m,D,I,w,b,p,h,g,t,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SnippetSession=e.OneSnippet=void 0;class n{constructor(s,o,a,d){this._editor=s,this._snippet=o,this._offset=a,this._snippetLineLeadingWhitespace=d,this._nestingLevel=1,this._placeholderGroups=(0,y.groupBy)(o.placeholders,t.Placeholder.compareByIndex),this._placeholderGroupsIdx=-1}dispose(){this._placeholderDecorations&&this._editor.deltaDecorations([...this._placeholderDecorations.values()],[]),this._placeholderGroups.length=0}_initDecorations(){if(this._placeholderDecorations)return;this._placeholderDecorations=new Map;const s=this._editor.getModel();this._editor.changeDecorations(o=>{for(const a of this._snippet.placeholders){const d=this._snippet.offset(a),u=this._snippet.fullLen(a),f=w.Range.fromPositions(s.getPositionAt(this._offset+d),s.getPositionAt(this._offset+d+u)),S=a.isFinalTabstop?n._decor.inactiveFinal:n._decor.inactive,v=o.addDecoration(f,S);this._placeholderDecorations.set(a,v)}})}move(s){if(!this._editor.hasModel())return[];if(this._initDecorations(),this._placeholderGroupsIdx>=0){let d=[];for(const u of this._placeholderGroups[this._placeholderGroupsIdx])if(u.transform){const f=this._placeholderDecorations.get(u),S=this._editor.getModel().getDecorationRange(f),v=this._editor.getModel().getValueInRange(S),C=u.transform.resolve(v).split(/\r\n|\r|\n/);for(let _=1;_<C.length;_++)C[_]=this._editor.getModel().normalizeIndentation(this._snippetLineLeadingWhitespace+C[_]);d.push(I.EditOperation.replace(S,C.join(this._editor.getModel().getEOL())))}d.length>0&&this._editor.executeEdits("snippet.placeholderTransform",d)}let o=!1;s===!0&&this._placeholderGroupsIdx<this._placeholderGroups.length-1?(this._placeholderGroupsIdx+=1,o=!0):s===!1&&this._placeholderGroupsIdx>0&&(this._placeholderGroupsIdx-=1,o=!0);const a=this._editor.getModel().changeDecorations(d=>{const u=new Set,f=[];for(const S of this._placeholderGroups[this._placeholderGroupsIdx]){const v=this._placeholderDecorations.get(S),C=this._editor.getModel().getDecorationRange(v);f.push(new b.Selection(C.startLineNumber,C.startColumn,C.endLineNumber,C.endColumn)),o=o&&this._hasPlaceholderBeenCollapsed(S),d.changeDecorationOptions(v,S.isFinalTabstop?n._decor.activeFinal:n._decor.active),u.add(S);for(const _ of this._snippet.enclosingPlaceholders(S)){const L=this._placeholderDecorations.get(_);d.changeDecorationOptions(L,_.isFinalTabstop?n._decor.activeFinal:n._decor.active),u.add(_)}}for(const[S,v]of this._placeholderDecorations)u.has(S)||d.changeDecorationOptions(v,S.isFinalTabstop?n._decor.inactiveFinal:n._decor.inactive);return f});return o?this.move(s):a??[]}_hasPlaceholderBeenCollapsed(s){let o=s;for(;o;){if(o instanceof t.Placeholder){const a=this._placeholderDecorations.get(o);if(this._editor.getModel().getDecorationRange(a).isEmpty()&&o.toString().length>0)return!0}o=o.parent}return!1}get isAtFirstPlaceholder(){return this._placeholderGroupsIdx<=0||this._placeholderGroups.length===0}get isAtLastPlaceholder(){return this._placeholderGroupsIdx===this._placeholderGroups.length-1}get hasPlaceholder(){return this._snippet.placeholders.length>0}computePossibleSelections(){const s=new Map;for(const o of this._placeholderGroups){let a;for(const d of o){if(d.isFinalTabstop)break;a||(a=[],s.set(d.index,a));const u=this._placeholderDecorations.get(d),f=this._editor.getModel().getDecorationRange(u);if(!f){s.delete(d.index);break}a.push(f)}}return s}get choice(){return this._placeholderGroups[this._placeholderGroupsIdx][0].choice}merge(s){const o=this._editor.getModel();this._nestingLevel*=10,this._editor.changeDecorations(a=>{for(const d of this._placeholderGroups[this._placeholderGroupsIdx]){const u=s.shift();console.assert(!u._placeholderDecorations);const f=u._snippet.placeholderInfo.last.index;for(const v of u._snippet.placeholderInfo.all)v.isFinalTabstop?v.index=d.index+(f+1)/this._nestingLevel:v.index=d.index+v.index/this._nestingLevel;this._snippet.replace(d,u._snippet.children);const S=this._placeholderDecorations.get(d);a.removeDecoration(S),this._placeholderDecorations.delete(d);for(const v of u._snippet.placeholders){const C=u._snippet.offset(v),_=u._snippet.fullLen(v),L=w.Range.fromPositions(o.getPositionAt(u._offset+C),o.getPositionAt(u._offset+C+_)),E=a.addDecoration(L,n._decor.inactive);this._placeholderDecorations.set(v,E)}}this._placeholderGroups=(0,y.groupBy)(this._snippet.placeholders,t.Placeholder.compareByIndex)})}}e.OneSnippet=n,n._decor={active:p.ModelDecorationOptions.register({description:"snippet-placeholder-1",stickiness:0,className:"snippet-placeholder"}),inactive:p.ModelDecorationOptions.register({description:"snippet-placeholder-2",stickiness:1,className:"snippet-placeholder"}),activeFinal:p.ModelDecorationOptions.register({description:"snippet-placeholder-3",stickiness:1,className:"finish-snippet-placeholder"}),inactiveFinal:p.ModelDecorationOptions.register({description:"snippet-placeholder-4",stickiness:1,className:"finish-snippet-placeholder"})};const l={overwriteBefore:0,overwriteAfter:0,adjustWhitespace:!0,clipboardText:void 0,overtypingCapturer:void 0};class c{constructor(s,o,a=l){this._templateMerges=[],this._snippets=[],this._editor=s,this._template=o,this._options=a}static adjustWhitespace(s,o,a,d,u){const f=s.getLineContent(o.lineNumber),S=(0,D.getLeadingWhitespace)(f,0,o.column-1);let v;return a.walk(C=>{if(!(C instanceof t.Text)||C.parent instanceof t.Choice)return!0;const _=C.value.split(/\r\n|\r|\n/);if(d){const E=a.offset(C);if(E===0)_[0]=s.normalizeIndentation(_[0]);else{v=v??a.toString();let N=v.charCodeAt(E-1);(N===10||N===13)&&(_[0]=s.normalizeIndentation(S+_[0]))}for(let N=1;N<_.length;N++)_[N]=s.normalizeIndentation(S+_[N])}const L=_.join(s.getEOL());return L!==C.value&&(C.parent.replace(C,[new t.Text(L)]),v=void 0),!0}),S}static adjustSelection(s,o,a,d){if(a!==0||d!==0){const{positionLineNumber:u,positionColumn:f}=o,S=f-a,v=f+d,C=s.validateRange({startLineNumber:u,startColumn:S,endLineNumber:u,endColumn:v});o=b.Selection.createWithDirection(C.startLineNumber,C.startColumn,C.endLineNumber,C.endColumn,o.getDirection())}return o}static createEditsAndSnippets(s,o,a,d,u,f,S,v){const C=[],_=[];if(!s.hasModel())return{edits:C,snippets:_};const L=s.getModel(),E=s.invokeWithinContext(P=>P.get(g.IWorkspaceContextService)),N=s.invokeWithinContext(P=>new i.ModelBasedVariableResolver(P.get(h.ILabelService),L)),k=()=>S;let M=0,O=L.getValueInRange(c.adjustSelection(L,s.getSelection(),a,0)),B=L.getValueInRange(c.adjustSelection(L,s.getSelection(),0,d)),T=L.getLineFirstNonWhitespaceColumn(s.getSelection().positionLineNumber);const R=s.getSelections().map((P,F)=>({selection:P,idx:F})).sort((P,F)=>w.Range.compareRangesUsingStarts(P.selection,F.selection));for(const{selection:P,idx:F}of R){let W=c.adjustSelection(L,P,a,0),A=c.adjustSelection(L,P,0,d);O!==L.getValueInRange(W)&&(W=P),B!==L.getValueInRange(A)&&(A=P);const H=P.setStartPosition(W.startLineNumber,W.startColumn).setEndPosition(A.endLineNumber,A.endColumn),q=new t.SnippetParser().parse(o,!0,u),X=H.getStartPosition(),G=c.adjustWhitespace(L,X,q,f||F>0&&T!==L.getLineFirstNonWhitespaceColumn(P.positionLineNumber),!0);q.resolveVariables(new i.CompositeSnippetVariableResolver([N,new i.ClipboardBasedVariableResolver(k,F,R.length,s.getOption(71)==="spread"),new i.SelectionBasedVariableResolver(L,P,F,v),new i.CommentBasedVariableResolver(L,P),new i.TimeBasedVariableResolver,new i.WorkspaceBasedVariableResolver(E),new i.RandomBasedVariableResolver]));const re=L.getOffsetAt(X)+M;M+=q.toString().length-L.getValueLengthInRange(H),C[F]=I.EditOperation.replace(H,q.toString()),C[F].identifier={major:F,minor:0},_[F]=new n(s,q,re,G)}return{edits:C,snippets:_}}dispose(){(0,m.dispose)(this._snippets)}_logInfo(){return`template="${this._template}", merged_templates="${this._templateMerges.join(" -> ")}"`}insert(){if(!this._editor.hasModel())return;const{edits:s,snippets:o}=c.createEditsAndSnippets(this._editor,this._template,this._options.overwriteBefore,this._options.overwriteAfter,!1,this._options.adjustWhitespace,this._options.clipboardText,this._options.overtypingCapturer);this._snippets=o,this._editor.executeEdits("snippet",s,a=>this._snippets[0].hasPlaceholder?this._move(!0):a.filter(d=>!!d.identifier).map(d=>b.Selection.fromPositions(d.range.getEndPosition()))),this._editor.revealRange(this._editor.getSelections()[0])}merge(s,o=l){if(!this._editor.hasModel())return;this._templateMerges.push([this._snippets[0]._nestingLevel,this._snippets[0]._placeholderGroupsIdx,s]);const{edits:a,snippets:d}=c.createEditsAndSnippets(this._editor,s,o.overwriteBefore,o.overwriteAfter,!0,o.adjustWhitespace,o.clipboardText,o.overtypingCapturer);this._editor.executeEdits("snippet",a,u=>{for(const f of this._snippets)f.merge(d);return console.assert(d.length===0),this._snippets[0].hasPlaceholder?this._move(void 0):u.filter(f=>!!f.identifier).map(f=>b.Selection.fromPositions(f.range.getEndPosition()))})}next(){const s=this._move(!0);this._editor.setSelections(s),this._editor.revealPositionInCenterIfOutsideViewport(s[0].getPosition())}prev(){const s=this._move(!1);this._editor.setSelections(s),this._editor.revealPositionInCenterIfOutsideViewport(s[0].getPosition())}_move(s){const o=[];for(const a of this._snippets){const d=a.move(s);o.push(...d)}return o}get isAtFirstPlaceholder(){return this._snippets[0].isAtFirstPlaceholder}get isAtLastPlaceholder(){return this._snippets[0].isAtLastPlaceholder}get hasPlaceholder(){return this._snippets[0].hasPlaceholder}get choice(){return this._snippets[0].choice}isSelectionWithinPlaceholders(){if(!this.hasPlaceholder)return!1;const s=this._editor.getSelections();if(s.length<this._snippets.length)return!1;let o=new Map;for(const a of this._snippets){const d=a.computePossibleSelections();if(o.size===0)for(const[u,f]of d){f.sort(w.Range.compareRangesUsingStarts);for(const S of s)if(f[0].containsRange(S)){o.set(u,[]);break}}if(o.size===0)return!1;o.forEach((u,f)=>{u.push(...d.get(f))})}s.sort(w.Range.compareRangesUsingStarts);for(let[a,d]of o){if(d.length!==s.length){o.delete(a);continue}d.sort(w.Range.compareRangesUsingStarts);for(let u=0;u<d.length;u++)if(!d[u].containsRange(s[u])){o.delete(a);continue}}return o.size>0}}e.SnippetSession=c}),define(te[210],ie([1,0,2,15,3,22,24,107,566,16,64,303]),function(j,e,y,m,D,I,w,b,p,h,g,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SnippetController2=void 0;const i={overwriteBefore:0,overwriteAfter:0,undoStopBefore:!0,undoStopAfter:!0,adjustWhitespace:!0,clipboardText:void 0,overtypingCapturer:void 0};let n=class Mt{constructor(r,s,o){this._editor=r,this._logService=s,this._snippetListener=new y.DisposableStore,this._modelVersionId=-1,this._inSnippet=Mt.InSnippetMode.bindTo(o),this._hasNextTabstop=Mt.HasNextTabstop.bindTo(o),this._hasPrevTabstop=Mt.HasPrevTabstop.bindTo(o)}static get(r){return r.getContribution(Mt.ID)}dispose(){var r;this._inSnippet.reset(),this._hasPrevTabstop.reset(),this._hasNextTabstop.reset(),(r=this._session)===null||r===void 0||r.dispose(),this._snippetListener.dispose()}insert(r,s){try{this._doInsert(r,typeof s=="undefined"?i:Object.assign(Object.assign({},i),s))}catch(o){this.cancel(),this._logService.error(o),this._logService.error("snippet_error"),this._logService.error("insert_template=",r),this._logService.error("existing_template=",this._session?this._session._logInfo():"<no_session>")}}_doInsert(r,s){!this._editor.hasModel()||(this._snippetListener.clear(),s.undoStopBefore&&this._editor.getModel().pushStackElement(),this._session?this._session.merge(r,s):(this._modelVersionId=this._editor.getModel().getAlternativeVersionId(),this._session=new t.SnippetSession(this._editor,r,s),this._session.insert()),s.undoStopAfter&&this._editor.getModel().pushStackElement(),this._updateState(),this._snippetListener.add(this._editor.onDidChangeModelContent(o=>o.isFlush&&this.cancel())),this._snippetListener.add(this._editor.onDidChangeModel(()=>this.cancel())),this._snippetListener.add(this._editor.onDidChangeCursorSelection(()=>this._updateState())))}_updateState(){if(!(!this._session||!this._editor.hasModel())){if(this._modelVersionId===this._editor.getModel().getAlternativeVersionId())return this.cancel();if(!this._session.hasPlaceholder)return this.cancel();if(this._session.isAtLastPlaceholder||!this._session.isSelectionWithinPlaceholders())return this._editor.getModel().pushStackElement(),this.cancel();this._inSnippet.set(!0),this._hasPrevTabstop.set(!this._session.isAtFirstPlaceholder),this._hasNextTabstop.set(!this._session.isAtLastPlaceholder),this._handleChoice()}}_handleChoice(){if(!this._session||!this._editor.hasModel()){this._currentChoice=void 0;return}const{choice:r}=this._session;if(!r){this._currentChoice=void 0;return}if(this._currentChoice!==r){this._currentChoice=r,this._editor.setSelections(this._editor.getSelections().map(o=>I.Selection.fromPositions(o.getStartPosition())));const[s]=r.options;(0,b.showSimpleSuggestions)(this._editor,r.options.map((o,a)=>({kind:13,label:o.value,insertText:o.value,sortText:"a".repeat(a+1),range:D.Range.fromPositions(this._editor.getPosition(),this._editor.getPosition().delta(0,s.value.length))})))}}finish(){for(;this._inSnippet.get();)this.next()}cancel(r=!1){var s;this._inSnippet.reset(),this._hasPrevTabstop.reset(),this._hasNextTabstop.reset(),this._snippetListener.clear(),(s=this._session)===null||s===void 0||s.dispose(),this._session=void 0,this._modelVersionId=-1,r&&this._editor.setSelections([this._editor.getSelection()])}prev(){this._session&&this._session.prev(),this._updateState()}next(){this._session&&this._session.next(),this._updateState()}isInSnippet(){return Boolean(this._inSnippet.get())}};n.ID="snippetController2",n.InSnippetMode=new h.RawContextKey("inSnippetMode",!1,(0,p.localize)(0,null)),n.HasNextTabstop=new h.RawContextKey("hasNextTabstop",!1,(0,p.localize)(1,null)),n.HasPrevTabstop=new h.RawContextKey("hasPrevTabstop",!1,(0,p.localize)(2,null)),n=Ie([Ce(1,g.ILogService),Ce(2,h.IContextKeyService)],n),e.SnippetController2=n,(0,m.registerEditorContribution)(n.ID,n);const l=m.EditorCommand.bindToContribution(n.get);(0,m.registerEditorCommand)(new l({id:"jumpToNextSnippetPlaceholder",precondition:h.ContextKeyExpr.and(n.InSnippetMode,n.HasNextTabstop),handler:c=>c.next(),kbOpts:{weight:100+30,kbExpr:w.EditorContextKeys.editorTextFocus,primary:2}})),(0,m.registerEditorCommand)(new l({id:"jumpToPrevSnippetPlaceholder",precondition:h.ContextKeyExpr.and(n.InSnippetMode,n.HasPrevTabstop),handler:c=>c.prev(),kbOpts:{weight:100+30,kbExpr:w.EditorContextKeys.editorTextFocus,primary:1024|2}})),(0,m.registerEditorCommand)(new l({id:"leaveSnippet",precondition:n.InSnippetMode,handler:c=>c.cancel(!0),kbOpts:{weight:100+30,kbExpr:w.EditorContextKeys.editorTextFocus,primary:9,secondary:[1024|9]}})),(0,m.registerEditorCommand)(new l({id:"acceptSnippet",precondition:n.InSnippetMode,handler:c=>c.finish()}))}),define(te[743],ie([1,0,10,21,13,4,2,8,22,18,85,210,468,102,40,16,64,87,465,107]),function(j,e,y,m,D,I,w,b,p,h,g,t,i,n,l,c,r,s,o,a){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SuggestModel=e.LineContext=void 0;class d{constructor(_,L,E,N){this.leadingLineContent=_.getLineContent(L.lineNumber).substr(0,L.column-1),this.leadingWord=_.getWordUntilPosition(L),this.lineNumber=L.lineNumber,this.column=L.column,this.auto=E,this.shy=N}static shouldAutoTrigger(_){if(!_.hasModel())return!1;const L=_.getModel(),E=_.getPosition();L.tokenizeIfCheap(E.lineNumber);const N=L.getWordAtPosition(E);return!(!N||N.endColumn!==E.column||!isNaN(Number(N.word)))}}e.LineContext=d;function u(C){return C.getOption(106).preview}function f(C,_,L){if(!Boolean(_.getContextKeyValue("inlineSuggestionVisible")))return!0;const E=L.getValue("editor.inlineSuggest.allowQuickSuggestions");return E!==void 0?Boolean(E):!1}function S(C,_,L){if(!Boolean(_.getContextKeyValue("inlineSuggestionVisible")))return!0;const E=L.getValue("editor.inlineSuggest.allowSuggestOnTriggerCharacters");return E!==void 0?Boolean(E):!1}let v=class Ui{constructor(_,L,E,N,k,M,O){this._editor=_,this._editorWorkerService=L,this._clipboardService=E,this._telemetryService=N,this._logService=k,this._contextKeyService=M,this._configurationService=O,this._toDispose=new w.DisposableStore,this._quickSuggestDelay=10,this._triggerCharacterListener=new w.DisposableStore,this._triggerQuickSuggest=new y.TimeoutTimer,this._state=0,this._completionDisposables=new w.DisposableStore,this._onDidCancel=new I.Emitter,this._onDidTrigger=new I.Emitter,this._onDidSuggest=new I.Emitter,this.onDidCancel=this._onDidCancel.event,this.onDidTrigger=this._onDidTrigger.event,this.onDidSuggest=this._onDidSuggest.event,this._telemetryGate=0,this._currentSelection=this._editor.getSelection()||new p.Selection(1,1,1,1),this._toDispose.add(this._editor.onDidChangeModel(()=>{this._updateTriggerCharacters(),this.cancel()})),this._toDispose.add(this._editor.onDidChangeModelLanguage(()=>{this._updateTriggerCharacters(),this.cancel()})),this._toDispose.add(this._editor.onDidChangeConfiguration(()=>{this._updateTriggerCharacters(),this._updateQuickSuggest()})),this._toDispose.add(h.CompletionProviderRegistry.onDidChange(()=>{this._updateTriggerCharacters(),this._updateActiveSuggestSession()}));let B=!1;this._toDispose.add(this._editor.onDidCompositionStart(()=>{B=!0})),this._toDispose.add(this._editor.onDidCompositionEnd(()=>{B=!1,this._onCompositionEnd()})),this._toDispose.add(this._editor.onDidChangeCursorSelection(T=>{B||this._onCursorChange(T)})),this._toDispose.add(this._editor.onDidChangeModelContent(()=>{B||this._refilterCompletionItems()})),this._updateTriggerCharacters(),this._updateQuickSuggest()}dispose(){(0,w.dispose)(this._triggerCharacterListener),(0,w.dispose)([this._onDidCancel,this._onDidSuggest,this._onDidTrigger,this._triggerQuickSuggest]),this._toDispose.dispose(),this._completionDisposables.dispose(),this.cancel()}_updateQuickSuggest(){this._quickSuggestDelay=this._editor.getOption(80),(isNaN(this._quickSuggestDelay)||!this._quickSuggestDelay&&this._quickSuggestDelay!==0||this._quickSuggestDelay<0)&&(this._quickSuggestDelay=10)}_updateTriggerCharacters(){if(this._triggerCharacterListener.clear(),this._editor.getOption(81)||!this._editor.hasModel()||!this._editor.getOption(109))return;const _=new Map;for(const E of h.CompletionProviderRegistry.all(this._editor.getModel()))for(const N of E.triggerCharacters||[]){let k=_.get(N);k||(k=new Set,k.add((0,a.getSnippetSuggestSupport)()),_.set(N,k)),k.add(E)}const L=E=>{if(!S(this._editor,this._contextKeyService,this._configurationService)||d.shouldAutoTrigger(this._editor))return;if(!E){const M=this._editor.getPosition();E=this._editor.getModel().getLineContent(M.lineNumber).substr(0,M.column-1)}let N="";(0,b.isLowSurrogate)(E.charCodeAt(E.length-1))?(0,b.isHighSurrogate)(E.charCodeAt(E.length-2))&&(N=E.substr(E.length-2)):N=E.charAt(E.length-1);const k=_.get(N);if(k){const M=this._completionModel?{items:this._completionModel.adopt(k),clipboardText:this._completionModel.clipboardText}:void 0;this.trigger({auto:!0,shy:!1,triggerCharacter:N},Boolean(this._completionModel),k,M)}};this._triggerCharacterListener.add(this._editor.onDidType(L)),this._triggerCharacterListener.add(this._editor.onDidCompositionEnd(()=>L()))}get state(){return this._state}cancel(_=!1){var L;this._state!==0&&(this._triggerQuickSuggest.cancel(),(L=this._requestToken)===null||L===void 0||L.cancel(),this._requestToken=void 0,this._state=0,this._completionModel=void 0,this._context=void 0,this._onDidCancel.fire({retrigger:_}))}clear(){this._completionDisposables.clear()}_updateActiveSuggestSession(){this._state!==0&&(!this._editor.hasModel()||!h.CompletionProviderRegistry.has(this._editor.getModel())?this.cancel():this.trigger({auto:this._state===2,shy:!1},!0))}_onCursorChange(_){if(!this._editor.hasModel())return;const L=this._currentSelection;if(this._currentSelection=this._editor.getSelection(),!_.selection.isEmpty()||_.reason!==0&&_.reason!==3||_.source!=="keyboard"&&_.source!=="deleteLeft"){this.cancel();return}this._state===0&&_.reason===0?(L.containsRange(this._currentSelection)||L.getEndPosition().isBeforeOrEqual(this._currentSelection.getPosition()))&&this._doTriggerQuickSuggest():this._state!==0&&_.reason===3&&this._refilterCompletionItems()}_onCompositionEnd(){this._state===0?this._doTriggerQuickSuggest():this._refilterCompletionItems()}_doTriggerQuickSuggest(){var _;this._editor.getOption(79)!==!1&&(this._editor.getOption(106).snippetsPreventQuickSuggestions&&((_=t.SnippetController2.get(this._editor))===null||_===void 0?void 0:_.isInSnippet())||(this.cancel(),this._triggerQuickSuggest.cancelAndSet(()=>{if(this._state!==0||!d.shouldAutoTrigger(this._editor)||!this._editor.hasModel())return;const L=this._editor.getModel(),E=this._editor.getPosition(),N=this._editor.getOption(79);if(N!==!1){if(N!==!0){L.tokenizeIfCheap(E.lineNumber);const k=L.getLineTokens(E.lineNumber),M=k.getStandardTokenType(k.findTokenIndexAtOffset(Math.max(E.column-1-1,0)));if(!(N.other&&M===0||N.comments&&M===1||N.strings&&M===2))return}!f(this._editor,this._contextKeyService,this._configurationService)||!h.CompletionProviderRegistry.has(L)||this.trigger({auto:!0,shy:!1})}},this._quickSuggestDelay)))}_refilterCompletionItems(){Promise.resolve().then(()=>{if(this._state===0||!this._editor.hasModel())return;const _=this._editor.getModel(),L=this._editor.getPosition(),E=new d(_,L,this._state===2,!1);this._onNewContext(E)})}trigger(_,L=!1,E,N){var k;if(!this._editor.hasModel())return;const M=this._editor.getModel(),O=_.auto,B=new d(M,this._editor.getPosition(),O,_.shy);this.cancel(L),this._state=O?2:1,this._onDidTrigger.fire({auto:O,shy:_.shy,position:this._editor.getPosition()}),this._context=B;let T={triggerKind:(k=_.triggerKind)!==null&&k!==void 0?k:0};_.triggerCharacter&&(T={triggerKind:1,triggerCharacter:_.triggerCharacter}),this._requestToken=new m.CancellationTokenSource;const R=this._editor.getOption(101);let P=1;switch(R){case"top":P=0;break;case"bottom":P=2;break}const{itemKind:F,showDeprecated:W}=Ui._createSuggestFilter(this._editor),A=i.WordDistance.create(this._editorWorkerService,this._editor),H=(0,a.provideSuggestionItems)(M,this._editor.getPosition(),new a.CompletionOptions(P,F,E,W),T,this._requestToken.token);Promise.all([H,A]).then(([q,X])=>ye(this,void 0,void 0,function*(){var G;if((G=this._requestToken)===null||G===void 0||G.dispose(),!this._editor.hasModel())return;let re=N==null?void 0:N.clipboardText;if(!re&&q.needsClipboard&&(re=yield this._clipboardService.readText()),this._state===0)return;const ae=this._editor.getModel();let oe=q.items;if(N){const x=(0,a.getSuggestionComparator)(P);oe=oe.concat(N.items).sort(x)}const Z=new d(ae,this._editor.getPosition(),O,_.shy);this._completionModel=new o.CompletionModel(oe,this._context.column,{leadingLineContent:Z.leadingLineContent,characterCountDelta:Z.column-this._context.column},X,this._editor.getOption(106),this._editor.getOption(101),re),this._completionDisposables.add(q.disposable),this._onNewContext(Z),this._reportDurationsTelemetry(q.durations)})).catch(D.onUnexpectedError)}_reportDurationsTelemetry(_){this._telemetryGate++%230==0&&setTimeout(()=>{this._telemetryService.publicLog2("suggest.durations.json",{data:JSON.stringify(_)}),this._logService.debug("suggest.durations.json",_)})}static _createSuggestFilter(_){const L=new Set;_.getOption(101)==="none"&&L.add(27);const N=_.getOption(106);return N.showMethods||L.add(0),N.showFunctions||L.add(1),N.showConstructors||L.add(2),N.showFields||L.add(3),N.showVariables||L.add(4),N.showClasses||L.add(5),N.showStructs||L.add(6),N.showInterfaces||L.add(7),N.showModules||L.add(8),N.showProperties||L.add(9),N.showEvents||L.add(10),N.showOperators||L.add(11),N.showUnits||L.add(12),N.showValues||L.add(13),N.showConstants||L.add(14),N.showEnums||L.add(15),N.showEnumMembers||L.add(16),N.showKeywords||L.add(17),N.showWords||L.add(18),N.showColors||L.add(19),N.showFiles||L.add(20),N.showReferences||L.add(21),N.showColors||L.add(22),N.showFolders||L.add(23),N.showTypeParameters||L.add(24),N.showSnippets||L.add(27),N.showUsers||L.add(25),N.showIssues||L.add(26),{itemKind:L,showDeprecated:N.showDeprecated}}_onNewContext(_){if(!!this._context){if(_.lineNumber!==this._context.lineNumber){this.cancel();return}if((0,b.getLeadingWhitespace)(_.leadingLineContent)!==(0,b.getLeadingWhitespace)(this._context.leadingLineContent)){this.cancel();return}if(_.column<this._context.column){_.leadingWord.word?this.trigger({auto:this._context.auto,shy:!1},!0):this.cancel();return}if(!!this._completionModel){if(_.leadingWord.word.length!==0&&_.leadingWord.startColumn>this._context.leadingWord.startColumn){const L=new Set(h.CompletionProviderRegistry.all(this._editor.getModel()));for(let N of this._completionModel.allProvider)L.delete(N);const E=this._completionModel.adopt(new Set);this.trigger({auto:this._context.auto,shy:!1},!0,L,{items:E,clipboardText:this._completionModel.clipboardText});return}if(_.column>this._context.column&&this._completionModel.incomplete.size>0&&_.leadingWord.word.length!==0){const{incomplete:L}=this._completionModel,E=this._completionModel.adopt(L);this.trigger({auto:this._state===2,shy:!1,triggerKind:2},!0,L,{items:E,clipboardText:this._completionModel.clipboardText})}else{let L=this._completionModel.lineContext,E=!1;if(this._completionModel.lineContext={leadingLineContent:_.leadingLineContent,characterCountDelta:_.column-this._context.column},this._completionModel.items.length===0){if(d.shouldAutoTrigger(this._editor)&&this._context.leadingWord.endColumn<_.leadingWord.startColumn){this.trigger({auto:this._context.auto,shy:!1},!0);return}if(this._context.auto){this.cancel();return}else if(this._completionModel.lineContext=L,E=this._completionModel.items.length>0,E&&_.leadingWord.word.length===0){this.cancel();return}}this._onDidSuggest.fire({completionModel:this._completionModel,auto:this._context.auto,shy:this._context.shy,isFrozen:E})}}}}};v=Ie([Ce(1,g.IEditorWorkerService),Ce(2,n.IClipboardService),Ce(3,s.ITelemetryService),Ce(4,r.ILogService),Ce(5,c.IContextKeyService),Ce(6,l.IConfigurationService)],v),e.SuggestModel=v}),define(te[304],ie([1,0,43,19,10,21,13,4,94,2,17,65,20,143,15,61,11,3,24,210,124,631,603,569,37,26,16,9,86,64,107,602,466,743,467,725,87,41,112]),function(j,e,y,m,D,I,w,b,p,h,g,t,i,n,l,c,r,s,o,a,d,u,f,S,v,C,_,L,E,N,k,M,O,B,T,R,P,F,W){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TriggerSuggestAction=e.SuggestController=void 0;let A=!1;class H{constructor(Z,x){if(this._model=Z,this._position=x,Z.getLineMaxColumn(x.lineNumber)!==x.column){const Q=Z.getOffsetAt(x),ne=Z.getPositionAt(Q+1);this._marker=Z.deltaDecorations([],[{range:s.Range.fromPositions(x,ne),options:{description:"suggest-line-suffix",stickiness:1}}])}}dispose(){this._marker&&!this._model.isDisposed()&&this._model.deltaDecorations(this._marker,[])}delta(Z){if(this._model.isDisposed()||this._position.lineNumber!==Z.lineNumber)return 0;if(this._marker){const x=this._model.getDecorationRange(this._marker[0]);return this._model.getOffsetAt(x.getStartPosition())-this._model.getOffsetAt(Z)}else return this._model.getLineMaxColumn(Z.lineNumber)-Z.column}}let q=class Ki{constructor(Z,x,U,Q,ne,ce,ee){this._memoryService=x,this._commandService=U,this._contextKeyService=Q,this._instantiationService=ne,this._logService=ce,this._telemetryService=ee,this._lineSuffix=new h.MutableDisposable,this._toDispose=new h.DisposableStore,this._selectors=new X($=>$.priority),this._telemetryGate=0,this.editor=Z,this.model=ne.createInstance(B.SuggestModel,this.editor);const ue=k.Context.InsertMode.bindTo(Q);ue.set(Z.getOption(106).insertMode),this.model.onDidTrigger(()=>ue.set(Z.getOption(106).insertMode)),this.widget=this._toDispose.add(new D.IdleValue(()=>{const $=this._instantiationService.createInstance(R.SuggestWidget,this.editor);this._toDispose.add($),this._toDispose.add($.onDidSelect(ge=>this._insertSuggestion(ge,0),this));const K=new O.CommitCharacterController(this.editor,$,ge=>this._insertSuggestion(ge,2));this._toDispose.add(K),this._toDispose.add(this.model.onDidSuggest(ge=>{ge.completionModel.items.length===0&&K.reset()}));const J=k.Context.MakesTextEdit.bindTo(this._contextKeyService),Y=k.Context.HasInsertAndReplaceRange.bindTo(this._contextKeyService),se=k.Context.CanResolve.bindTo(this._contextKeyService);return this._toDispose.add((0,h.toDisposable)(()=>{J.reset(),Y.reset(),se.reset()})),this._toDispose.add($.onDidFocus(({item:ge})=>{const me=this.editor.getPosition(),le=ge.editStart.column,he=me.column;let ve=!0;this.editor.getOption(1)==="smart"&&this.model.state===2&&!ge.completion.additionalTextEdits&&!(ge.completion.insertTextRules&4)&&he-le===ge.completion.insertText.length&&(ve=this.editor.getModel().getValueInRange({startLineNumber:me.lineNumber,startColumn:le,endLineNumber:me.lineNumber,endColumn:he})!==ge.completion.insertText),J.set(ve),Y.set(!r.Position.equals(ge.editInsertEnd,ge.editReplaceEnd)),se.set(Boolean(ge.provider.resolveCompletionItem)||Boolean(ge.completion.documentation)||ge.completion.detail!==ge.completion.label)})),this._toDispose.add($.onDetailsKeyDown(ge=>{if(ge.toKeybinding().equals(new p.SimpleKeybinding(!0,!1,!1,!1,33))||g.isMacintosh&&ge.toKeybinding().equals(new p.SimpleKeybinding(!1,!1,!1,!0,33))){ge.stopPropagation();return}ge.toKeybinding().isModifierKey()||this.editor.focus()})),$})),this._overtypingCapturer=this._toDispose.add(new D.IdleValue(()=>this._toDispose.add(new T.OvertypingCapturer(this.editor,this.model)))),this._alternatives=this._toDispose.add(new D.IdleValue(()=>this._toDispose.add(new M.SuggestAlternatives(this.editor,this._contextKeyService)))),this._toDispose.add(ne.createInstance(f.WordContextKey,Z)),this._toDispose.add(this.model.onDidTrigger($=>{this.widget.value.showTriggered($.auto,$.shy?250:50),this._lineSuffix.value=new H(this.editor.getModel(),$.position)})),this._toDispose.add(this.model.onDidSuggest($=>{if(!$.shy){let K=-1;for(const J of this._selectors.itemsOrderedByPriorityDesc)if(K=J.select(this.editor.getModel(),this.editor.getPosition(),$.completionModel.items),K!==-1)break;K===-1&&(K=this._memoryService.select(this.editor.getModel(),this.editor.getPosition(),$.completionModel.items)),this.widget.value.showSuggestions($.completionModel,K,$.isFrozen,$.auto)}})),this._toDispose.add(this.model.onDidCancel($=>{$.retrigger||this.widget.value.hideWidget()})),this._toDispose.add(this.editor.onDidBlurEditorWidget(()=>{A||(this.model.cancel(),this.model.clear())}));let z=k.Context.AcceptSuggestionsOnEnter.bindTo(Q),V=()=>{const $=this.editor.getOption(1);z.set($==="on"||$==="smart")};this._toDispose.add(this.editor.onDidChangeConfiguration(()=>V())),V()}static get(Z){return Z.getContribution(Ki.ID)}dispose(){this._alternatives.dispose(),this._toDispose.dispose(),this.widget.dispose(),this.model.dispose(),this._lineSuffix.dispose()}_insertSuggestion(Z,x){if(!Z||!Z.item){this._alternatives.value.reset(),this.model.cancel(),this.model.clear();return}if(!this.editor.hasModel())return;const U=a.SnippetController2.get(this.editor);if(!U)return;const Q=this.editor.getModel(),ne=Q.getAlternativeVersionId(),{item:ce}=Z,ee=[],ue=new I.CancellationTokenSource;x&1||this.editor.pushUndoStop();const z=this.getOverwriteInfo(ce,Boolean(x&8));if(this._memoryService.memorize(Q,this.editor.getPosition(),ce),Array.isArray(ce.completion.additionalTextEdits)){const $=n.StableEditorScrollState.capture(this.editor);this.editor.executeEdits("suggestController.additionalTextEdits.sync",ce.completion.additionalTextEdits.map(K=>c.EditOperation.replace(s.Range.lift(K.range),K.text))),$.restoreRelativeVerticalPositionOfCursor(this.editor)}else if(!ce.isResolved){const $=new t.StopWatch(!0);let K;const J=Q.onDidChangeContent(me=>{if(me.isFlush){ue.cancel(),J.dispose();return}for(let le of me.changes){const he=s.Range.getEndPosition(le.range);(!K||r.Position.isBefore(he,K))&&(K=he)}});let Y=x;x|=2;let se=!1,ge=this.editor.onWillType(()=>{ge.dispose(),se=!0,Y&2||this.editor.pushUndoStop()});ee.push(ce.resolve(ue.token).then(()=>{if(!ce.completion.additionalTextEdits||ue.token.isCancellationRequested||K&&ce.completion.additionalTextEdits.some(le=>r.Position.isBefore(K,s.Range.getStartPosition(le.range))))return!1;se&&this.editor.pushUndoStop();const me=n.StableEditorScrollState.capture(this.editor);return this.editor.executeEdits("suggestController.additionalTextEdits.async",ce.completion.additionalTextEdits.map(le=>c.EditOperation.replace(s.Range.lift(le.range),le.text))),me.restoreRelativeVerticalPositionOfCursor(this.editor),(se||!(Y&2))&&this.editor.pushUndoStop(),!0}).then(me=>{this._logService.trace("[suggest] async resolving of edits DONE (ms, applied?)",$.elapsed(),me),J.dispose(),ge.dispose()}))}let{insertText:V}=ce.completion;ce.completion.insertTextRules&4||(V=d.SnippetParser.escape(V)),U.insert(V,{overwriteBefore:z.overwriteBefore,overwriteAfter:z.overwriteAfter,undoStopBefore:!1,undoStopAfter:!1,adjustWhitespace:!(ce.completion.insertTextRules&1),clipboardText:Z.model.clipboardText,overtypingCapturer:this._overtypingCapturer.value}),x&2||this.editor.pushUndoStop(),ce.completion.command?ce.completion.command.id===G.id?this.model.trigger({auto:!0,shy:!1},!0):(ee.push(this._commandService.executeCommand(ce.completion.command.id,...ce.completion.command.arguments?[...ce.completion.command.arguments]:[]).catch(w.onUnexpectedError)),this.model.cancel()):this.model.cancel(),x&4&&this._alternatives.value.set(Z,$=>{for(ue.cancel();Q.canUndo();){ne!==Q.getAlternativeVersionId()&&Q.undo(),this._insertSuggestion($,1|2|(x&8?8:0));break}}),this._alertCompletionItem(ce),Promise.all(ee).finally(()=>{this._reportSuggestionAcceptedTelemetry(Q,Z),this.model.clear(),ue.dispose()})}_reportSuggestionAcceptedTelemetry(Z,x){var U;if(this._telemetryGate++%100!=0)return;const Q=((U=x.item.provider._debugDisplayName)!==null&&U!==void 0?U:"unknown").split("(",1)[0].toLowerCase();this._telemetryService.publicLog2("suggest.acceptedSuggestion",{providerId:Q,basenameHash:(0,W.hash)((0,F.basename)(Z.uri)).toString(16),languageId:Z.getLanguageId(),fileExtension:(0,F.extname)(Z.uri)})}getOverwriteInfo(Z,x){(0,i.assertType)(this.editor.hasModel());let U=this.editor.getOption(106).insertMode==="replace";x&&(U=!U);const Q=Z.position.column-Z.editStart.column,ne=(U?Z.editReplaceEnd.column:Z.editInsertEnd.column)-Z.position.column,ce=this.editor.getPosition().column-Z.position.column,ee=this._lineSuffix.value?this._lineSuffix.value.delta(this.editor.getPosition()):0;return{overwriteBefore:Q+ce,overwriteAfter:ne+ee}}_alertCompletionItem(Z){if((0,m.isNonEmptyArray)(Z.completion.additionalTextEdits)){let x=S.localize(0,null,Z.textLabel,Z.completion.additionalTextEdits.length);(0,y.alert)(x)}}triggerSuggest(Z,x){this.editor.hasModel()&&(this.model.trigger({auto:x??!1,shy:!1},!1,Z),this.editor.revealPosition(this.editor.getPosition(),0),this.editor.focus())}triggerSuggestAndAcceptBest(Z){if(!this.editor.hasModel())return;const x=this.editor.getPosition(),U=()=>{x.equals(this.editor.getPosition())&&this._commandService.executeCommand(Z.fallback)},Q=ne=>{if(ne.completion.insertTextRules&4||ne.completion.additionalTextEdits)return!0;const ce=this.editor.getPosition(),ee=ne.editStart.column,ue=ce.column;return ue-ee!==ne.completion.insertText.length?!0:this.editor.getModel().getValueInRange({startLineNumber:ce.lineNumber,startColumn:ee,endLineNumber:ce.lineNumber,endColumn:ue})!==ne.completion.insertText};b.Event.once(this.model.onDidTrigger)(ne=>{let ce=[];b.Event.any(this.model.onDidTrigger,this.model.onDidCancel)(()=>{(0,h.dispose)(ce),U()},void 0,ce),this.model.onDidSuggest(({completionModel:ee})=>{if((0,h.dispose)(ce),ee.items.length===0){U();return}const ue=this._memoryService.select(this.editor.getModel(),this.editor.getPosition(),ee.items),z=ee.items[ue];if(!Q(z)){U();return}this.editor.pushUndoStop(),this._insertSuggestion({index:ue,item:z,model:ee},4|1|2)},void 0,ce)}),this.model.trigger({auto:!1,shy:!0}),this.editor.revealPosition(x,0),this.editor.focus()}acceptSelectedSuggestion(Z,x){const U=this.widget.value.getFocusedItem();let Q=0;Z&&(Q|=4),x&&(Q|=8),this._insertSuggestion(U,Q)}acceptNextSuggestion(){this._alternatives.value.next()}acceptPrevSuggestion(){this._alternatives.value.prev()}cancelSuggestWidget(){this.model.cancel(),this.model.clear(),this.widget.value.hideWidget()}selectNextSuggestion(){this.widget.value.selectNext()}selectNextPageSuggestion(){this.widget.value.selectNextPage()}selectLastSuggestion(){this.widget.value.selectLast()}selectPrevSuggestion(){this.widget.value.selectPrevious()}selectPrevPageSuggestion(){this.widget.value.selectPreviousPage()}selectFirstSuggestion(){this.widget.value.selectFirst()}toggleSuggestionDetails(){this.widget.value.toggleDetails()}toggleExplainMode(){this.widget.value.toggleExplainMode()}toggleSuggestionFocus(){this.widget.value.toggleDetailsFocus()}resetWidgetSize(){this.widget.value.resetPersistedSize()}forceRenderingAbove(){this.widget.value.forceRenderingAbove()}stopForceRenderingAbove(){!this.widget.isInitialized||this.widget.value.stopForceRenderingAbove()}registerSelector(Z){return this._selectors.register(Z)}};q.ID="editor.contrib.suggestController",q=Ie([Ce(1,u.ISuggestMemoryService),Ce(2,C.ICommandService),Ce(3,_.IContextKeyService),Ce(4,L.IInstantiationService),Ce(5,N.ILogService),Ce(6,P.ITelemetryService)],q),e.SuggestController=q;class X{constructor(Z){this.prioritySelector=Z,this._items=new Array}register(Z){if(this._items.indexOf(Z)!==-1)throw new Error("Value is already registered");return this._items.push(Z),this._items.sort((x,U)=>this.prioritySelector(U)-this.prioritySelector(x)),{dispose:()=>{const x=this._items.indexOf(Z);x>=0&&this._items.splice(x,1)}}}get itemsOrderedByPriorityDesc(){return this._items}}class G extends l.EditorAction{constructor(){super({id:G.id,label:S.localize(1,null),alias:"Trigger Suggest",precondition:_.ContextKeyExpr.and(o.EditorContextKeys.writable,o.EditorContextKeys.hasCompletionItemProvider),kbOpts:{kbExpr:o.EditorContextKeys.textInputFocus,primary:2048|10,secondary:[2048|39],mac:{primary:256|10,secondary:[512|9,2048|39]},weight:100}})}run(Z,x,U){const Q=q.get(x);if(!Q)return;let ne;U&&typeof U=="object"&&U.auto===!0&&(ne=!0),Q.triggerSuggest(void 0,ne)}}e.TriggerSuggestAction=G,G.id="editor.action.triggerSuggest",(0,l.registerEditorContribution)(q.ID,q),(0,l.registerEditorAction)(G);const re=100+90,ae=l.EditorCommand.bindToContribution(q.get);(0,l.registerEditorCommand)(new ae({id:"acceptSelectedSuggestion",precondition:k.Context.Visible,handler(oe){oe.acceptSelectedSuggestion(!0,!1)}})),E.KeybindingsRegistry.registerKeybindingRule({id:"acceptSelectedSuggestion",when:_.ContextKeyExpr.and(k.Context.Visible,o.EditorContextKeys.textInputFocus),primary:2,weight:re}),E.KeybindingsRegistry.registerKeybindingRule({id:"acceptSelectedSuggestion",when:_.ContextKeyExpr.and(k.Context.Visible,o.EditorContextKeys.textInputFocus,k.Context.AcceptSuggestionsOnEnter,k.Context.MakesTextEdit),primary:3,weight:re}),v.MenuRegistry.appendMenuItem(k.suggestWidgetStatusbarMenu,{command:{id:"acceptSelectedSuggestion",title:S.localize(2,null)},group:"left",order:1,when:k.Context.HasInsertAndReplaceRange.toNegated()}),v.MenuRegistry.appendMenuItem(k.suggestWidgetStatusbarMenu,{command:{id:"acceptSelectedSuggestion",title:S.localize(3,null)},group:"left",order:1,when:_.ContextKeyExpr.and(k.Context.HasInsertAndReplaceRange,k.Context.InsertMode.isEqualTo("insert"))}),v.MenuRegistry.appendMenuItem(k.suggestWidgetStatusbarMenu,{command:{id:"acceptSelectedSuggestion",title:S.localize(4,null)},group:"left",order:1,when:_.ContextKeyExpr.and(k.Context.HasInsertAndReplaceRange,k.Context.InsertMode.isEqualTo("replace"))}),(0,l.registerEditorCommand)(new ae({id:"acceptAlternativeSelectedSuggestion",precondition:_.ContextKeyExpr.and(k.Context.Visible,o.EditorContextKeys.textInputFocus),kbOpts:{weight:re,kbExpr:o.EditorContextKeys.textInputFocus,primary:1024|3,secondary:[1024|2]},handler(oe){oe.acceptSelectedSuggestion(!1,!0)},menuOpts:[{menuId:k.suggestWidgetStatusbarMenu,group:"left",order:2,when:_.ContextKeyExpr.and(k.Context.HasInsertAndReplaceRange,k.Context.InsertMode.isEqualTo("insert")),title:S.localize(5,null)},{menuId:k.suggestWidgetStatusbarMenu,group:"left",order:2,when:_.ContextKeyExpr.and(k.Context.HasInsertAndReplaceRange,k.Context.InsertMode.isEqualTo("replace")),title:S.localize(6,null)}]})),C.CommandsRegistry.registerCommandAlias("acceptSelectedSuggestionOnEnter","acceptSelectedSuggestion"),(0,l.registerEditorCommand)(new ae({id:"hideSuggestWidget",precondition:k.Context.Visible,handler:oe=>oe.cancelSuggestWidget(),kbOpts:{weight:re,kbExpr:o.EditorContextKeys.textInputFocus,primary:9,secondary:[1024|9]}})),(0,l.registerEditorCommand)(new ae({id:"selectNextSuggestion",precondition:_.ContextKeyExpr.and(k.Context.Visible,k.Context.MultipleSuggestions),handler:oe=>oe.selectNextSuggestion(),kbOpts:{weight:re,kbExpr:o.EditorContextKeys.textInputFocus,primary:18,secondary:[2048|18],mac:{primary:18,secondary:[2048|18,256|44]}}})),(0,l.registerEditorCommand)(new ae({id:"selectNextPageSuggestion",precondition:_.ContextKeyExpr.and(k.Context.Visible,k.Context.MultipleSuggestions),handler:oe=>oe.selectNextPageSuggestion(),kbOpts:{weight:re,kbExpr:o.EditorContextKeys.textInputFocus,primary:12,secondary:[2048|12]}})),(0,l.registerEditorCommand)(new ae({id:"selectLastSuggestion",precondition:_.ContextKeyExpr.and(k.Context.Visible,k.Context.MultipleSuggestions),handler:oe=>oe.selectLastSuggestion()})),(0,l.registerEditorCommand)(new ae({id:"selectPrevSuggestion",precondition:_.ContextKeyExpr.and(k.Context.Visible,k.Context.MultipleSuggestions),handler:oe=>oe.selectPrevSuggestion(),kbOpts:{weight:re,kbExpr:o.EditorContextKeys.textInputFocus,primary:16,secondary:[2048|16],mac:{primary:16,secondary:[2048|16,256|46]}}})),(0,l.registerEditorCommand)(new ae({id:"selectPrevPageSuggestion",precondition:_.ContextKeyExpr.and(k.Context.Visible,k.Context.MultipleSuggestions),handler:oe=>oe.selectPrevPageSuggestion(),kbOpts:{weight:re,kbExpr:o.EditorContextKeys.textInputFocus,primary:11,secondary:[2048|11]}})),(0,l.registerEditorCommand)(new ae({id:"selectFirstSuggestion",precondition:_.ContextKeyExpr.and(k.Context.Visible,k.Context.MultipleSuggestions),handler:oe=>oe.selectFirstSuggestion()})),(0,l.registerEditorCommand)(new ae({id:"toggleSuggestionDetails",precondition:k.Context.Visible,handler:oe=>oe.toggleSuggestionDetails(),kbOpts:{weight:re,kbExpr:o.EditorContextKeys.textInputFocus,primary:2048|10,secondary:[2048|39],mac:{primary:256|10,secondary:[2048|39]}},menuOpts:[{menuId:k.suggestWidgetStatusbarMenu,group:"right",order:1,when:_.ContextKeyExpr.and(k.Context.DetailsVisible,k.Context.CanResolve),title:S.localize(7,null)},{menuId:k.suggestWidgetStatusbarMenu,group:"right",order:1,when:_.ContextKeyExpr.and(k.Context.DetailsVisible.toNegated(),k.Context.CanResolve),title:S.localize(8,null)}]})),(0,l.registerEditorCommand)(new ae({id:"toggleExplainMode",precondition:k.Context.Visible,handler:oe=>oe.toggleExplainMode(),kbOpts:{weight:100,primary:2048|85}})),(0,l.registerEditorCommand)(new ae({id:"toggleSuggestionFocus",precondition:k.Context.Visible,handler:oe=>oe.toggleSuggestionFocus(),kbOpts:{weight:re,kbExpr:o.EditorContextKeys.textInputFocus,primary:2048|512|10,mac:{primary:256|512|10}}})),(0,l.registerEditorCommand)(new ae({id:"insertBestCompletion",precondition:_.ContextKeyExpr.and(o.EditorContextKeys.textInputFocus,_.ContextKeyExpr.equals("config.editor.tabCompletion","on"),f.WordContextKey.AtEnd,k.Context.Visible.toNegated(),M.SuggestAlternatives.OtherSuggestions.toNegated(),a.SnippetController2.InSnippetMode.toNegated()),handler:(oe,Z)=>{oe.triggerSuggestAndAcceptBest((0,i.isObject)(Z)?Object.assign({fallback:"tab"},Z):{fallback:"tab"})},kbOpts:{weight:re,primary:2}})),(0,l.registerEditorCommand)(new ae({id:"insertNextSuggestion",precondition:_.ContextKeyExpr.and(o.EditorContextKeys.textInputFocus,_.ContextKeyExpr.equals("config.editor.tabCompletion","on"),M.SuggestAlternatives.OtherSuggestions,k.Context.Visible.toNegated(),a.SnippetController2.InSnippetMode.toNegated()),handler:oe=>oe.acceptNextSuggestion(),kbOpts:{weight:re,kbExpr:o.EditorContextKeys.textInputFocus,primary:2}})),(0,l.registerEditorCommand)(new ae({id:"insertPrevSuggestion",precondition:_.ContextKeyExpr.and(o.EditorContextKeys.textInputFocus,_.ContextKeyExpr.equals("config.editor.tabCompletion","on"),M.SuggestAlternatives.OtherSuggestions,k.Context.Visible.toNegated(),a.SnippetController2.InSnippetMode.toNegated()),handler:oe=>oe.acceptPrevSuggestion(),kbOpts:{weight:re,kbExpr:o.EditorContextKeys.textInputFocus,primary:1024|2}})),(0,l.registerEditorAction)(class extends l.EditorAction{constructor(){super({id:"editor.action.resetSuggestSize",label:S.localize(9,null),alias:"Reset Suggest Widget Size",precondition:void 0})}run(oe,Z){var x;(x=q.get(Z))===null||x===void 0||x.resetWidgetSize()}})}),define(te[744],ie([1,0,19,10,4,2,11,3,124,303,304,207,189]),function(j,e,y,m,D,I,w,b,p,h,g,t,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.rangeStartsWith=e.SuggestWidgetInlineCompletionProvider=void 0;class n extends I.Disposable{constructor(o,a){super();this.editor=o,this.suggestControllerPreselector=a,this.isSuggestWidgetVisible=!1,this.isShiftKeyPressed=!1,this._isActive=!1,this._currentSuggestItemInfo=void 0,this.onDidChangeEmitter=new D.Emitter,this.onDidChange=this.onDidChangeEmitter.event,this.setInactiveDelayed=this._register(new m.RunOnceScheduler(()=>{this.isSuggestWidgetVisible||this._isActive&&(this._isActive=!1,this.onDidChangeEmitter.fire())},100)),this._register(o.onKeyDown(u=>{u.shiftKey&&!this.isShiftKeyPressed&&(this.isShiftKeyPressed=!0,this.update(this._isActive))})),this._register(o.onKeyUp(u=>{u.shiftKey&&this.isShiftKeyPressed&&(this.isShiftKeyPressed=!1,this.update(this._isActive))}));const d=g.SuggestController.get(this.editor);if(d){this._register(d.registerSelector({priority:100,select:(S,v,C)=>{const _=this.editor.getModel(),L=(0,t.minimizeInlineCompletion)(_,this.suggestControllerPreselector());if(!L)return-1;const E=w.Position.lift(v),N=C.map((M,O)=>{const B=r(d,E,M,this.isShiftKeyPressed),T=(0,t.minimizeInlineCompletion)(_,B==null?void 0:B.normalizedInlineCompletion);if(!T)return;const R=l(L.range,T.range)&&L.text.startsWith(T.text);return{index:O,valid:R,prefixLength:T.text.length,suggestItem:M}}).filter(M=>M&&M.valid),k=(0,y.findMaxBy)(N,(0,y.compareBy)(M=>M.prefixLength,y.numberComparator));return k?k.index:-1}}));let u=!1;const f=()=>{u||(u=!0,this._register(d.widget.value.onDidShow(()=>{this.isSuggestWidgetVisible=!0,this.update(!0)})),this._register(d.widget.value.onDidHide(()=>{this.isSuggestWidgetVisible=!1,this.setInactiveDelayed.schedule(),this.update(this._isActive)})),this._register(d.widget.value.onDidFocus(()=>{this.isSuggestWidgetVisible=!0,this.update(!0)})))};this._register(D.Event.once(d.model.onDidTrigger)(S=>{f()}))}this.update(this._isActive)}get state(){if(!!this._isActive)return{selectedItem:this._currentSuggestItemInfo}}update(o){const a=this.getSuggestItemInfo();let d=!1;c(this._currentSuggestItemInfo,a)||(this._currentSuggestItemInfo=a,d=!0),this._isActive!==o&&(this._isActive=o,d=!0),d&&this.onDidChangeEmitter.fire()}getSuggestItemInfo(){const o=g.SuggestController.get(this.editor);if(!o||!this.isSuggestWidgetVisible)return;const a=o.widget.value.getFocusedItem();if(!!a)return r(o,this.editor.getPosition(),a.item,this.isShiftKeyPressed)}stopForceRenderingAbove(){const o=g.SuggestController.get(this.editor);o&&o.stopForceRenderingAbove()}forceRenderingAbove(){const o=g.SuggestController.get(this.editor);o&&o.forceRenderingAbove()}}e.SuggestWidgetInlineCompletionProvider=n;function l(s,o){return o.startLineNumber===s.startLineNumber&&o.startColumn===s.startColumn&&(o.endLineNumber<s.endLineNumber||o.endLineNumber===s.endLineNumber&&o.endColumn<=s.endColumn)}e.rangeStartsWith=l;function c(s,o){return s===o?!0:!s||!o?!1:s.completionItemKind===o.completionItemKind&&s.isSnippetText===o.isSnippetText&&(0,i.normalizedInlineCompletionsEquals)(s.normalizedInlineCompletion,o.normalizedInlineCompletion)}function r(s,o,a,d){if(Array.isArray(a.completion.additionalTextEdits)&&a.completion.additionalTextEdits.length>0)return{completionItemKind:a.completion.kind,isSnippetText:!1,normalizedInlineCompletion:{range:b.Range.fromPositions(o,o),text:""}};let{insertText:u}=a.completion,f=!1;if(a.completion.insertTextRules&4){const v=new p.SnippetParser().parse(u),C=s.editor.getModel();if(v.children.length>100)return;h.SnippetSession.adjustWhitespace(C,o,v,!0,!0),u=v.toString(),f=!0}const S=s.getOverwriteInfo(a,d);return{isSnippetText:f,completionItemKind:a.completion.kind,normalizedInlineCompletion:{text:u,range:b.Range.fromPositions(o.delta(0,-S.overwriteBefore),o.delta(0,Math.max(S.overwriteAfter,0)))}}}}),define(te[745],ie([1,0,10,13,2,18,188,207,189,744]),function(j,e,y,m,D,I,w,b,p,h){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SuggestWidgetPreviewModel=void 0;class g extends w.BaseGhostTextWidgetModel{constructor(n,l){super(n);this.cache=l,this.suggestionInlineCompletionSource=this._register(new h.SuggestWidgetInlineCompletionProvider(this.editor,()=>{var c,r;return(r=(c=this.cache.value)===null||c===void 0?void 0:c.completions[0])===null||r===void 0?void 0:r.toLiveInlineCompletion()})),this.updateOperation=this._register(new D.MutableDisposable),this.updateCacheSoon=this._register(new y.RunOnceScheduler(()=>this.updateCache(),50)),this.minReservedLineCount=0,this._register(this.suggestionInlineCompletionSource.onDidChange(()=>{this.updateCacheSoon.schedule(),this.suggestionInlineCompletionSource.state||(this.minReservedLineCount=0);const r=this.ghostText;r&&(this.minReservedLineCount=Math.max(this.minReservedLineCount,t(r.parts.map(s=>s.lines.length-1)))),this.minReservedLineCount>=1?this.suggestionInlineCompletionSource.forceRenderingAbove():this.suggestionInlineCompletionSource.stopForceRenderingAbove(),this.onDidChangeEmitter.fire()})),this._register(this.cache.onDidChange(()=>{this.onDidChangeEmitter.fire()})),this._register(this.editor.onDidChangeCursorPosition(c=>{this.minReservedLineCount=0,this.updateCacheSoon.schedule(),this.onDidChangeEmitter.fire()})),this._register((0,D.toDisposable)(()=>this.suggestionInlineCompletionSource.stopForceRenderingAbove()))}get isActive(){return this.suggestionInlineCompletionSource.state!==void 0}isSuggestionPreviewEnabled(){return this.editor.getOption(106).preview}updateCache(){return ye(this,void 0,void 0,function*(){const n=this.suggestionInlineCompletionSource.state;if(!n||!n.selectedItem)return;const l={text:n.selectedItem.normalizedInlineCompletion.text,range:n.selectedItem.normalizedInlineCompletion.range,isSnippetText:n.selectedItem.isSnippetText,completionKind:n.selectedItem.completionItemKind},c=this.editor.getPosition(),r=(0,y.createCancelablePromise)(o=>ye(this,void 0,void 0,function*(){let a;try{a=yield(0,b.provideInlineCompletions)(c,this.editor.getModel(),{triggerKind:I.InlineCompletionTriggerKind.Automatic,selectedSuggestionInfo:l},o)}catch(d){(0,m.onUnexpectedError)(d);return}o.isCancellationRequested||(this.cache.setValue(this.editor,a,I.InlineCompletionTriggerKind.Automatic),this.onDidChangeEmitter.fire())})),s=new b.UpdateOperation(r,I.InlineCompletionTriggerKind.Automatic);this.updateOperation.value=s,yield r,this.updateOperation.value===s&&this.updateOperation.clear()})}get ghostText(){var n,l,c;const r=this.isSuggestionPreviewEnabled(),s=(0,b.minimizeInlineCompletion)(this.editor.getModel(),(l=(n=this.cache.value)===null||n===void 0?void 0:n.completions[0])===null||l===void 0?void 0:l.toLiveInlineCompletion()),o=this.suggestionInlineCompletionSource.state,a=(0,b.minimizeInlineCompletion)(this.editor.getModel(),(c=o==null?void 0:o.selectedItem)===null||c===void 0?void 0:c.normalizedInlineCompletion),d=s&&a&&s.text.startsWith(a.text)&&s.range.equalsRange(a.range);if(!r&&!d)return;const u=d?s:a||s,f=d?u.text.length-a.text.length:0;return this.toGhostText(u,f)}toGhostText(n,l){const c=this.editor.getOptions().get(106).previewMode;return n?(0,p.inlineCompletionToGhostText)(n,this.editor.getModel(),c,this.editor.getPosition(),l)||new w.GhostText(n.range.endLineNumber,[],this.minReservedLineCount):void 0}}e.SuggestWidgetPreviewModel=g;function t(i){return i.reduce((n,l)=>n+l,0)}}),define(te[746],ie([1,0,4,2,11,18,32,207,745,461,26]),function(j,e,y,m,D,I,w,b,p,h,g){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SharedInlineCompletionCache=e.GhostTextModel=e.DelegatingModel=void 0;class t extends m.Disposable{constructor(){super(...arguments);this.onDidChangeEmitter=new y.Emitter,this.onDidChange=this.onDidChangeEmitter.event,this.hasCachedGhostText=!1,this.currentModelRef=this._register(new m.MutableDisposable)}get targetModel(){var c;return(c=this.currentModelRef.value)===null||c===void 0?void 0:c.object}setTargetModel(c){var r;((r=this.currentModelRef.value)===null||r===void 0?void 0:r.object)!==c&&(this.currentModelRef.clear(),this.currentModelRef.value=c?(0,h.createDisposableRef)(c,c.onDidChange(()=>{this.hasCachedGhostText=!1,this.onDidChangeEmitter.fire()})):void 0,this.hasCachedGhostText=!1,this.onDidChangeEmitter.fire())}get ghostText(){var c,r;return this.hasCachedGhostText||(this.cachedGhostText=(r=(c=this.currentModelRef.value)===null||c===void 0?void 0:c.object)===null||r===void 0?void 0:r.ghostText,this.hasCachedGhostText=!0),this.cachedGhostText}setExpanded(c){var r;(r=this.targetModel)===null||r===void 0||r.setExpanded(c)}get minReservedLineCount(){return this.targetModel?this.targetModel.minReservedLineCount:0}}e.DelegatingModel=t;let i=class extends t{constructor(c,r,s){super();this.editor=c,this.commandService=r,this.languageConfigurationService=s,this.sharedCache=this._register(new n),this.suggestWidgetAdapterModel=this._register(new p.SuggestWidgetPreviewModel(this.editor,this.sharedCache)),this.inlineCompletionsModel=this._register(new b.InlineCompletionsModel(this.editor,this.sharedCache,this.commandService,this.languageConfigurationService)),this._register(this.suggestWidgetAdapterModel.onDidChange(()=>{this.updateModel()})),this.updateModel()}get activeInlineCompletionsModel(){if(this.targetModel===this.inlineCompletionsModel)return this.inlineCompletionsModel}updateModel(){this.setTargetModel(this.suggestWidgetAdapterModel.isActive?this.suggestWidgetAdapterModel:this.inlineCompletionsModel),this.inlineCompletionsModel.setActive(this.targetModel===this.inlineCompletionsModel)}shouldShowHoverAt(c){var r;const s=(r=this.activeInlineCompletionsModel)===null||r===void 0?void 0:r.ghostText;return s?s.parts.some(o=>c.containsPosition(new D.Position(s.lineNumber,o.column))):!1}triggerInlineCompletion(){var c;(c=this.activeInlineCompletionsModel)===null||c===void 0||c.trigger(I.InlineCompletionTriggerKind.Explicit)}commitInlineCompletion(){var c;(c=this.activeInlineCompletionsModel)===null||c===void 0||c.commitCurrentSuggestion()}hideInlineCompletion(){var c;(c=this.activeInlineCompletionsModel)===null||c===void 0||c.hide()}showNextInlineCompletion(){var c;(c=this.activeInlineCompletionsModel)===null||c===void 0||c.showNext()}showPreviousInlineCompletion(){var c;(c=this.activeInlineCompletionsModel)===null||c===void 0||c.showPrevious()}hasMultipleInlineCompletions(){var c;return ye(this,void 0,void 0,function*(){const r=yield(c=this.activeInlineCompletionsModel)===null||c===void 0?void 0:c.hasMultipleInlineCompletions();return r!==void 0?r:!1})}};i=Ie([Ce(1,g.ICommandService),Ce(2,w.ILanguageConfigurationService)],i),e.GhostTextModel=i;class n extends m.Disposable{constructor(){super(...arguments);this.onDidChangeEmitter=new y.Emitter,this.onDidChange=this.onDidChangeEmitter.event,this.cache=this._register(new m.MutableDisposable)}get value(){return this.cache.value}setValue(c,r,s){this.cache.value=new b.SynchronizedInlineCompletionsCache(c,r,()=>this.onDidChangeEmitter.fire(),s)}clearAndLeak(){return this.cache.clearAndLeak()}clear(){this.cache.clear()}}e.SharedInlineCompletionCache=n}),define(te[305],ie([1,0,2,8,15,68,24,259,746,654,550,16,9,86]),function(j,e,y,m,D,I,w,b,p,h,g,t,i,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TriggerInlineSuggestionAction=e.ShowPreviousInlineSuggestionAction=e.ShowNextInlineSuggestionAction=e.commitInlineSuggestionAction=e.ActiveGhostTextController=e.GhostTextController=void 0;let l=class ji extends y.Disposable{constructor(f,S){super();this.editor=f,this.instantiationService=S,this.triggeredExplicitly=!1,this.activeController=this._register(new y.MutableDisposable),this._register(this.editor.onDidChangeModel(()=>{this.updateModelController()})),this._register(this.editor.onDidChangeConfiguration(v=>{v.hasChanged(106)&&this.updateModelController(),v.hasChanged(55)&&this.updateModelController()})),this.updateModelController()}static get(f){return f.getContribution(ji.ID)}get activeModel(){var f;return(f=this.activeController.value)===null||f===void 0?void 0:f.model}updateModelController(){const f=this.editor.getOption(106),S=this.editor.getOption(55);this.activeController.value=void 0,this.activeController.value=this.editor.hasModel()&&(f.preview||S.enabled||this.triggeredExplicitly)?this.instantiationService.createInstance(r,this.editor):void 0}shouldShowHoverAt(f){var S;return((S=this.activeModel)===null||S===void 0?void 0:S.shouldShowHoverAt(f))||!1}shouldShowHoverAtViewZone(f){var S,v;return((v=(S=this.activeController.value)===null||S===void 0?void 0:S.widget)===null||v===void 0?void 0:v.shouldShowHoverAtViewZone(f))||!1}trigger(){var f;this.triggeredExplicitly=!0,this.activeController.value||this.updateModelController(),(f=this.activeModel)===null||f===void 0||f.triggerInlineCompletion()}commit(){var f;(f=this.activeModel)===null||f===void 0||f.commitInlineCompletion()}hide(){var f;(f=this.activeModel)===null||f===void 0||f.hideInlineCompletion()}showNextInlineCompletion(){var f;(f=this.activeModel)===null||f===void 0||f.showNextInlineCompletion()}showPreviousInlineCompletion(){var f;(f=this.activeModel)===null||f===void 0||f.showPreviousInlineCompletion()}hasMultipleInlineCompletions(){var f;return ye(this,void 0,void 0,function*(){const S=yield(f=this.activeModel)===null||f===void 0?void 0:f.hasMultipleInlineCompletions();return S!==void 0?S:!1})}};l.inlineSuggestionVisible=new t.RawContextKey("inlineSuggestionVisible",!1,g.localize(0,null)),l.inlineSuggestionHasIndentation=new t.RawContextKey("inlineSuggestionHasIndentation",!1,g.localize(1,null)),l.inlineSuggestionHasIndentationLessThanTabSize=new t.RawContextKey("inlineSuggestionHasIndentationLessThanTabSize",!0,g.localize(2,null)),l.ID="editor.contrib.ghostTextController",l=Ie([Ce(1,i.IInstantiationService)],l),e.GhostTextController=l;class c{constructor(f){this.contextKeyService=f,this.inlineCompletionVisible=l.inlineSuggestionVisible.bindTo(this.contextKeyService),this.inlineCompletionSuggestsIndentation=l.inlineSuggestionHasIndentation.bindTo(this.contextKeyService),this.inlineCompletionSuggestsIndentationLessThanTabSize=l.inlineSuggestionHasIndentationLessThanTabSize.bindTo(this.contextKeyService)}}let r=class extends y.Disposable{constructor(f,S,v){super();this.editor=f,this.instantiationService=S,this.contextKeyService=v,this.contextKeys=new c(this.contextKeyService),this.model=this._register(this.instantiationService.createInstance(p.GhostTextModel,this.editor)),this.widget=this._register(this.instantiationService.createInstance(h.GhostTextWidget,this.editor,this.model)),this._register((0,y.toDisposable)(()=>{this.contextKeys.inlineCompletionVisible.set(!1),this.contextKeys.inlineCompletionSuggestsIndentation.set(!1),this.contextKeys.inlineCompletionSuggestsIndentationLessThanTabSize.set(!0)})),this._register(this.model.onDidChange(()=>{this.updateContextKeys()})),this.updateContextKeys()}updateContextKeys(){var f;this.contextKeys.inlineCompletionVisible.set(((f=this.model.activeInlineCompletionsModel)===null||f===void 0?void 0:f.ghostText)!==void 0);let S=!1,v=!0;const C=this.model.inlineCompletionsModel.ghostText;if(!!this.model.activeInlineCompletionsModel&&C&&C.parts.length>0){const{column:_,lines:L}=C.parts[0],E=L[0],N=this.editor.getModel().getLineIndentColumn(C.lineNumber);if(_<=N){let M=(0,m.firstNonWhitespaceIndex)(E);M===-1&&(M=E.length-1),S=M>0;const O=this.editor.getModel().getOptions().tabSize;v=I.CursorColumns.visibleColumnFromColumn(E,M+1,O)<O}}this.contextKeys.inlineCompletionSuggestsIndentation.set(S),this.contextKeys.inlineCompletionSuggestsIndentationLessThanTabSize.set(v)}};r=Ie([Ce(1,i.IInstantiationService),Ce(2,t.IContextKeyService)],r),e.ActiveGhostTextController=r;const s=D.EditorCommand.bindToContribution(l.get);e.commitInlineSuggestionAction=new s({id:b.inlineSuggestCommitId,precondition:l.inlineSuggestionVisible,handler(u){u.commit(),u.editor.focus()}}),(0,D.registerEditorCommand)(e.commitInlineSuggestionAction),n.KeybindingsRegistry.registerKeybindingRule({primary:2,weight:200,id:e.commitInlineSuggestionAction.id,when:t.ContextKeyExpr.and(e.commitInlineSuggestionAction.precondition,w.EditorContextKeys.tabMovesFocus.toNegated(),l.inlineSuggestionHasIndentationLessThanTabSize)}),(0,D.registerEditorCommand)(new s({id:"editor.action.inlineSuggest.hide",precondition:l.inlineSuggestionVisible,kbOpts:{weight:100,primary:9},handler(u){u.hide()}}));class o extends D.EditorAction{constructor(){super({id:o.ID,label:g.localize(3,null),alias:"Show Next Inline Suggestion",precondition:t.ContextKeyExpr.and(w.EditorContextKeys.writable,l.inlineSuggestionVisible),kbOpts:{weight:100,primary:512|89}})}run(f,S){return ye(this,void 0,void 0,function*(){const v=l.get(S);v&&(v.showNextInlineCompletion(),S.focus())})}}e.ShowNextInlineSuggestionAction=o,o.ID="editor.action.inlineSuggest.showNext";class a extends D.EditorAction{constructor(){super({id:a.ID,label:g.localize(4,null),alias:"Show Previous Inline Suggestion",precondition:t.ContextKeyExpr.and(w.EditorContextKeys.writable,l.inlineSuggestionVisible),kbOpts:{weight:100,primary:512|87}})}run(f,S){return ye(this,void 0,void 0,function*(){const v=l.get(S);v&&(v.showPreviousInlineCompletion(),S.focus())})}}e.ShowPreviousInlineSuggestionAction=a,a.ID="editor.action.inlineSuggest.showPrevious";class d extends D.EditorAction{constructor(){super({id:"editor.action.inlineSuggest.trigger",label:g.localize(5,null),alias:"Trigger Inline Suggestion",precondition:w.EditorContextKeys.writable})}run(f,S){return ye(this,void 0,void 0,function*(){const v=l.get(S);v&&v.trigger()})}}e.TriggerInlineSuggestionAction=d,(0,D.registerEditorContribution)(l.ID,l),(0,D.registerEditorAction)(d),(0,D.registerEditorAction)(o),(0,D.registerEditorAction)(a)}),define(te[747],ie([1,0,7,66,2,104,3,35,187,305,551,63,37,26,16,51]),function(j,e,y,m,D,I,w,b,p,h,g,t,i,n,l,c){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.InlineCompletionsHoverParticipant=e.InlineCompletionsHover=void 0;class r{constructor(a,d,u){this.owner=a,this.range=d,this.controller=u}isValidForHoverAnchor(a){return a.type===1&&this.range.startColumn<=a.range.startColumn&&this.range.endColumn>=a.range.endColumn}hasMultipleSuggestions(){return this.controller.hasMultipleInlineCompletions()}}e.InlineCompletionsHover=r;let s=class{constructor(a,d,u,f,S,v,C){this._editor=a,this._commandService=d,this._menuService=u,this._contextKeyService=f,this._languageService=S,this._openerService=v,this.accessibilityService=C}suggestHoverAnchor(a){const d=h.GhostTextController.get(this._editor);if(!d)return null;const u=a.target;if(u.type===8){const f=u.detail;if(d.shouldShowHoverAtViewZone(f.viewZoneId))return new p.HoverForeignElementAnchor(1e3,this,w.Range.fromPositions(f.positionBefore||f.position,f.positionBefore||f.position))}return u.type===7&&d.shouldShowHoverAt(u.range)?new p.HoverForeignElementAnchor(1e3,this,u.range):u.type===6&&u.detail.mightBeForeignElement&&d.shouldShowHoverAt(u.range)?new p.HoverForeignElementAnchor(1e3,this,u.range):null}computeSync(a,d){const u=h.GhostTextController.get(this._editor);return u&&u.shouldShowHoverAt(a.range)?[new r(this,a.range,u)]:[]}renderHoverParts(a,d){const u=new D.DisposableStore,f=d[0];this.accessibilityService.isScreenReaderOptimized()&&this.renderScreenReaderText(a,f,u);const S=u.add(this._menuService.createMenu(i.MenuId.InlineCompletionsActions,this._contextKeyService)),v=a.statusBar.addAction({label:g.localize(0,null),commandId:h.ShowNextInlineSuggestionAction.ID,run:()=>this._commandService.executeCommand(h.ShowNextInlineSuggestionAction.ID)}),C=a.statusBar.addAction({label:g.localize(1,null),commandId:h.ShowPreviousInlineSuggestionAction.ID,run:()=>this._commandService.executeCommand(h.ShowPreviousInlineSuggestionAction.ID)});a.statusBar.addAction({label:g.localize(2,null),commandId:h.commitInlineSuggestionAction.id,run:()=>this._commandService.executeCommand(h.commitInlineSuggestionAction.id)});const _=[v,C];for(const L of _)L.setEnabled(!1);f.hasMultipleSuggestions().then(L=>{for(const E of _)E.setEnabled(L)});for(const[L,E]of S.getActions())for(const N of E)N instanceof i.MenuItemAction&&a.statusBar.addAction({label:N.label,commandId:N.item.id,run:()=>this._commandService.executeCommand(N.item.id)});return u}renderScreenReaderText(a,d,u){var f,S;const v=y.$,C=v("div.hover-row.markdown-hover"),_=y.append(C,v("div.hover-contents")),L=u.add(new I.MarkdownRenderer({editor:this._editor},this._languageService,this._openerService)),E=k=>{u.add(L.onDidRenderAsync(()=>{_.className="hover-contents code-hover-contents",a.onContentsChanged()}));const M=g.localize(3,null),O=u.add(L.render(new m.MarkdownString().appendText(M).appendCodeblock("text",k)));_.replaceChildren(O.element)},N=(S=(f=d.controller.activeModel)===null||f===void 0?void 0:f.inlineCompletionsModel)===null||S===void 0?void 0:S.ghostText;if(N){const k=this._editor.getModel().getLineContent(N.lineNumber);E(N.renderForScreenReader(k))}a.fragment.appendChild(C)}};s=Ie([Ce(1,n.ICommandService),Ce(2,i.IMenuService),Ce(3,l.IContextKeyService),Ce(4,b.ILanguageService),Ce(5,c.IOpenerService),Ce(6,t.IAccessibilityService)],s),e.InlineCompletionsHoverParticipant=s}),define(te[748],ie([1,0,7,227,19,2,11,3,33,18,717,257,187,201,732,747,16,9,42,107,302,10,734,24,4]),function(j,e,y,m,D,I,w,b,p,h,g,t,i,n,l,c,r,s,o,a,d,u,f,S,v){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ContentHoverWidget=e.ContentHoverController=void 0;const C=y.$;let _=class qi extends I.Disposable{constructor(B,T,R){super();this._editor=B,this._instantiationService=T,this._keybindingService=R,this._participants=[this._instantiationService.createInstance(g.ColorHoverParticipant,this._editor),this._instantiationService.createInstance(n.MarkdownHoverParticipant,this._editor),this._instantiationService.createInstance(c.InlineCompletionsHoverParticipant,this._editor),this._instantiationService.createInstance(d.UnicodeHighlighterHoverParticipant,this._editor),this._instantiationService.createInstance(l.MarkerHoverParticipant,this._editor),this._instantiationService.createInstance(f.InlayHintsHover,this._editor)],this._widget=this._register(this._instantiationService.createInstance(N,this._editor)),this._decorationsChangerListener=this._register(new L(this._editor)),this._computer=new M(this._editor,this._participants),this._hoverOperation=this._register(new t.HoverOperation(this._editor,this._computer)),this._messages=[],this._messagesAreComplete=!1,this._register(this._hoverOperation.onResult(P=>{this._withResult(P.value,P.isComplete,P.hasLoadingMessage)})),this._register(this._decorationsChangerListener.onDidChangeModelDecorations(()=>this._onModelDecorationsChanged())),this._register(y.addStandardDisposableListener(this._widget.getDomNode(),"keydown",P=>{P.equals(9)&&this.hide()})),this._register(h.TokenizationRegistry.onDidChange(()=>{this._widget.position&&this._computer.anchor&&this._messages.length>0&&(this._widget.clear(),this._renderMessages(this._computer.anchor,this._messages))}))}_onModelDecorationsChanged(){this._widget.position&&(this._hoverOperation.cancel(),this._widget.colorPicker||this._hoverOperation.start(0))}maybeShowAt(B){const T=[];for(const P of this._participants)if(P.suggestHoverAnchor){const F=P.suggestHoverAnchor(B);F&&T.push(F)}const R=B.target;if(R.type===6&&T.push(new i.HoverRangeAnchor(0,R.range)),R.type===7){const P=this._editor.getOption(44).typicalHalfwidthCharacterWidth/2;!R.detail.isAfterLines&&typeof R.detail.horizontalDistanceToText=="number"&&R.detail.horizontalDistanceToText<P&&T.push(new i.HoverRangeAnchor(0,R.range))}return T.length===0?!1:(T.sort((P,F)=>F.priority-P.priority),this._startShowingAt(T[0],0,!1),!0)}startShowingAtRange(B,T,R){this._startShowingAt(new i.HoverRangeAnchor(0,B),T,R)}_startShowingAt(B,T,R){if(!(this._computer.anchor&&this._computer.anchor.equals(B))){if(this._hoverOperation.cancel(),this._widget.position)if(!this._computer.anchor||!B.canAdoptVisibleHover(this._computer.anchor,this._widget.position))this.hide();else{const P=this._messages.filter(F=>F.isValidForHoverAnchor(B));if(P.length===0)this.hide();else{if(P.length===this._messages.length&&this._messagesAreComplete)return;this._renderMessages(B,P)}}this._computer.anchor=B,this._computer.shouldFocus=R,this._hoverOperation.start(T)}}hide(){this._computer.anchor=null,this._hoverOperation.cancel(),this._widget.hide()}isColorPickerVisible(){return!!this._widget.colorPicker}_addLoadingMessage(B){if(this._computer.anchor){for(const T of this._participants)if(T.createLoadingMessage){const R=T.createLoadingMessage(this._computer.anchor);if(R)return B.slice(0).concat([R])}}return B}_withResult(B,T,R){this._messages=R?this._addLoadingMessage(B):B,this._messagesAreComplete=T,this._computer.anchor&&this._messages.length>0?this._renderMessages(this._computer.anchor,this._messages):T&&this.hide()}_renderMessages(B,T){let R=1073741824,P=T[0].range,F=null;for(const G of T)R=Math.min(R,G.range.startColumn),P=b.Range.plusRange(P,G.range),G.forceShowAtRange&&(F=G.range);const W=new I.DisposableStore,A=W.add(new k(this._keybindingService)),H=document.createDocumentFragment();let q=null;const X={fragment:H,statusBar:A,setColorPicker:G=>q=G,onContentsChanged:()=>this._widget.onContentsChanged(),hide:()=>this.hide()};for(const G of this._participants){const re=T.filter(ae=>ae.owner===G);re.length>0&&W.add(G.renderHoverParts(X,re))}if(A.hasContent&&H.appendChild(A.hoverElement),H.hasChildNodes()){if(P){const G=this._decorationsChangerListener.deltaDecorations([],[{range:P,options:qi._DECORATION_OPTIONS}]);W.add((0,I.toDisposable)(()=>{this._decorationsChangerListener.deltaDecorations(G,[])}))}this._widget.showAt(H,new E(q,F?F.getStartPosition():new w.Position(B.range.startLineNumber,R),F||P,this._editor.getOption(53).above,this._computer.shouldFocus,W))}else W.dispose()}};_._DECORATION_OPTIONS=p.ModelDecorationOptions.register({description:"content-hover-highlight",className:"hoverHighlight"}),_=Ie([Ce(1,s.IInstantiationService),Ce(2,o.IKeybindingService)],_),e.ContentHoverController=_;class L extends I.Disposable{constructor(B){super();this._editor=B,this._onDidChangeModelDecorations=this._register(new v.Emitter),this.onDidChangeModelDecorations=this._onDidChangeModelDecorations.event,this._isChangingDecorations=!1,this._register(this._editor.onDidChangeModelDecorations(T=>{this._isChangingDecorations||this._onDidChangeModelDecorations.fire(T)}))}deltaDecorations(B,T){try{return this._isChangingDecorations=!0,this._editor.deltaDecorations(B,T)}finally{this._isChangingDecorations=!1}}}class E{constructor(B,T,R,P,F,W){this.colorPicker=B,this.showAtPosition=T,this.showAtRange=R,this.preferAbove=P,this.stoleFocus=F,this.disposables=W}}let N=class $i extends I.Disposable{constructor(B,T){super();this._editor=B,this._contextKeyService=T,this.allowEditorOverflow=!0,this._hoverVisibleKey=S.EditorContextKeys.hoverVisible.bindTo(this._contextKeyService),this._hover=this._register(new m.HoverWidget),this._visibleData=null,this._register(this._editor.onDidLayoutChange(()=>this._layout())),this._register(this._editor.onDidChangeConfiguration(R=>{R.hasChanged(44)&&this._updateFont()})),this._setVisibleData(null),this._layout(),this._editor.addContentWidget(this)}get position(){var B,T;return(T=(B=this._visibleData)===null||B===void 0?void 0:B.showAtPosition)!==null&&T!==void 0?T:null}get colorPicker(){var B,T;return(T=(B=this._visibleData)===null||B===void 0?void 0:B.colorPicker)!==null&&T!==void 0?T:null}dispose(){this._editor.removeContentWidget(this),this._visibleData&&this._visibleData.disposables.dispose(),super.dispose()}getId(){return $i.ID}getDomNode(){return this._hover.containerDomNode}getPosition(){if(!this._visibleData)return null;let B=this._visibleData.preferAbove;return!B&&this._contextKeyService.getContextKeyValue(a.Context.Visible.key)&&(B=!0),{position:this._visibleData.showAtPosition,range:this._visibleData.showAtRange,preference:B?[1,2]:[2,1]}}_setVisibleData(B){this._visibleData&&this._visibleData.disposables.dispose(),this._visibleData=B,this._hoverVisibleKey.set(!!this._visibleData),this._hover.containerDomNode.classList.toggle("hidden",!this._visibleData)}_layout(){const B=Math.max(this._editor.getLayoutInfo().height/4,250),{fontSize:T,lineHeight:R}=this._editor.getOption(44);this._hover.contentsDomNode.style.fontSize=`${T}px`,this._hover.contentsDomNode.style.lineHeight=`${R/T}`,this._hover.contentsDomNode.style.maxHeight=`${B}px`,this._hover.contentsDomNode.style.maxWidth=`${Math.max(this._editor.getLayoutInfo().width*.66,500)}px`}_updateFont(){Array.prototype.slice.call(this._hover.contentsDomNode.getElementsByClassName("code")).forEach(T=>this._editor.applyFontInfo(T))}showAt(B,T){this._setVisibleData(T),this._hover.contentsDomNode.textContent="",this._hover.contentsDomNode.appendChild(B),this._hover.contentsDomNode.style.paddingBottom="",this._updateFont(),this._editor.layoutContentWidget(this),this.onContentsChanged(),this._editor.render(),this._editor.layoutContentWidget(this),this.onContentsChanged(),T.stoleFocus&&this._hover.containerDomNode.focus(),T.colorPicker&&T.colorPicker.layout()}hide(){if(this._visibleData){const B=this._visibleData.stoleFocus;this._setVisibleData(null),this._editor.layoutContentWidget(this),B&&this._editor.focus()}}onContentsChanged(){this._hover.onContentsChanged();const B=this._hover.scrollbar.getScrollDimensions();if(B.scrollWidth>B.width){const R=`${this._hover.scrollbar.options.horizontalScrollbarSize}px`;this._hover.contentsDomNode.style.paddingBottom!==R&&(this._hover.contentsDomNode.style.paddingBottom=R,this._editor.layoutContentWidget(this),this._hover.onContentsChanged())}}clear(){this._hover.contentsDomNode.textContent=""}};N.ID="editor.contrib.contentHoverWidget",N=Ie([Ce(1,r.IContextKeyService)],N),e.ContentHoverWidget=N;let k=class extends I.Disposable{constructor(B){super();this._keybindingService=B,this._hasContent=!1,this.hoverElement=C("div.hover-row.status-bar"),this.actionsElement=y.append(this.hoverElement,C("div.actions"))}get hasContent(){return this._hasContent}addAction(B){const T=this._keybindingService.lookupKeybinding(B.commandId),R=T?T.getLabel():null;return this._hasContent=!0,this._register(m.HoverAction.render(this.actionsElement,B,R))}append(B){const T=y.append(this.actionsElement,B);return this._hasContent=!0,T}};k=Ie([Ce(0,o.IKeybindingService)],k);class M{constructor(B,T){this._editor=B,this._participants=T,this._anchor=null,this._shouldFocus=!1}get anchor(){return this._anchor}set anchor(B){this._anchor=B}get shouldFocus(){return this._shouldFocus}set shouldFocus(B){this._shouldFocus=B}static _getLineDecorations(B,T){if(T.type!==1)return[];const R=B.getModel(),P=T.range.startLineNumber,F=R.getLineMaxColumn(P);return B.getLineDecorations(P).filter(W=>{if(W.options.isWholeLine)return!0;const A=W.range.startLineNumber===P?W.range.startColumn:1,H=W.range.endLineNumber===P?W.range.endColumn:F;if(W.options.showIfCollapsed){if(A>T.range.startColumn+1||T.range.endColumn-1>H)return!1}else if(A>T.range.startColumn||T.range.endColumn>H)return!1;return!0})}computeAsync(B){const T=this._anchor;if(!this._editor.hasModel()||!T)return u.AsyncIterableObject.EMPTY;const R=M._getLineDecorations(this._editor,T);return u.AsyncIterableObject.merge(this._participants.map(P=>P.computeAsync?P.computeAsync(T,R,B):u.AsyncIterableObject.EMPTY))}computeSync(){if(!this._editor.hasModel()||!this._anchor)return[];const B=M._getLineDecorations(this._editor,this._anchor);let T=[];for(const R of this._participants)T=T.concat(R.computeSync(this._anchor,B));return(0,D.coalesce)(T)}}}),define(te[306],ie([1,0,55,2,15,3,24,35,298,748,624,545,16,9,51,23,14]),function(j,e,y,m,D,I,w,b,p,h,g,t,i,n,l,c,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ModesHoverController=void 0;let s=class Gi{constructor(u,f,S,v,C){this._editor=u,this._instantiationService=f,this._openerService=S,this._languageService=v,this._toUnhook=new m.DisposableStore,this._isMouseDown=!1,this._hoverClicked=!1,this._contentWidget=null,this._glyphWidget=null,this._hookEvents(),this._didChangeConfigurationHandler=this._editor.onDidChangeConfiguration(_=>{_.hasChanged(53)&&(this._unhookEvents(),this._hookEvents())})}static get(u){return u.getContribution(Gi.ID)}_hookEvents(){const u=()=>this._hideWidgets(),f=this._editor.getOption(53);this._isHoverEnabled=f.enabled,this._isHoverSticky=f.sticky,this._isHoverEnabled?(this._toUnhook.add(this._editor.onMouseDown(S=>this._onEditorMouseDown(S))),this._toUnhook.add(this._editor.onMouseUp(S=>this._onEditorMouseUp(S))),this._toUnhook.add(this._editor.onMouseMove(S=>this._onEditorMouseMove(S))),this._toUnhook.add(this._editor.onKeyDown(S=>this._onKeyDown(S)))):(this._toUnhook.add(this._editor.onMouseMove(S=>this._onEditorMouseMove(S))),this._toUnhook.add(this._editor.onKeyDown(S=>this._onKeyDown(S)))),this._toUnhook.add(this._editor.onMouseLeave(u)),this._toUnhook.add(this._editor.onDidChangeModel(u)),this._toUnhook.add(this._editor.onDidScrollChange(S=>this._onEditorScrollChanged(S)))}_unhookEvents(){this._toUnhook.clear()}_onEditorScrollChanged(u){(u.scrollTopChanged||u.scrollLeftChanged)&&this._hideWidgets()}_onEditorMouseDown(u){this._isMouseDown=!0;const f=u.target;if(f.type===9&&f.detail===h.ContentHoverWidget.ID){this._hoverClicked=!0;return}f.type===12&&f.detail===g.MarginHoverWidget.ID||(f.type!==12&&(this._hoverClicked=!1),this._hideWidgets())}_onEditorMouseUp(u){this._isMouseDown=!1}_onEditorMouseMove(u){var f,S,v,C,_;const L=u.target;if(this._isMouseDown&&this._hoverClicked||this._isHoverSticky&&L.type===9&&L.detail===h.ContentHoverWidget.ID||this._isHoverSticky&&!((S=(f=u.event.browserEvent.view)===null||f===void 0?void 0:f.getSelection())===null||S===void 0?void 0:S.isCollapsed)||!this._isHoverSticky&&L.type===9&&L.detail===h.ContentHoverWidget.ID&&((v=this._contentWidget)===null||v===void 0?void 0:v.isColorPickerVisible())||this._isHoverSticky&&L.type===12&&L.detail===g.MarginHoverWidget.ID)return;if(!this._isHoverEnabled){this._hideWidgets();return}if(this._getOrCreateContentWidget().maybeShowAt(u)){(C=this._glyphWidget)===null||C===void 0||C.hide();return}if(L.type===2&&L.position){(_=this._contentWidget)===null||_===void 0||_.hide(),this._glyphWidget||(this._glyphWidget=new g.MarginHoverWidget(this._editor,this._languageService,this._openerService)),this._glyphWidget.startShowingAt(L.position.lineNumber);return}this._hideWidgets()}_onKeyDown(u){u.keyCode!==5&&u.keyCode!==6&&u.keyCode!==57&&u.keyCode!==4&&this._hideWidgets()}_hideWidgets(){var u,f,S;this._isMouseDown&&this._hoverClicked&&((u=this._contentWidget)===null||u===void 0?void 0:u.isColorPickerVisible())||(this._hoverClicked=!1,(f=this._glyphWidget)===null||f===void 0||f.hide(),(S=this._contentWidget)===null||S===void 0||S.hide())}_getOrCreateContentWidget(){return this._contentWidget||(this._contentWidget=this._instantiationService.createInstance(h.ContentHoverController,this._editor)),this._contentWidget}isColorPickerVisible(){var u;return((u=this._contentWidget)===null||u===void 0?void 0:u.isColorPickerVisible())||!1}showContentHover(u,f,S){this._getOrCreateContentWidget().startShowingAtRange(u,f,S)}dispose(){var u,f;this._unhookEvents(),this._toUnhook.dispose(),this._didChangeConfigurationHandler.dispose(),(u=this._glyphWidget)===null||u===void 0||u.dispose(),(f=this._contentWidget)===null||f===void 0||f.dispose()}};s.ID="editor.contrib.hover",s=Ie([Ce(1,n.IInstantiationService),Ce(2,l.IOpenerService),Ce(3,b.ILanguageService),Ce(4,i.IContextKeyService)],s),e.ModesHoverController=s;class o extends D.EditorAction{constructor(){super({id:"editor.action.showHover",label:t.localize(0,null),alias:"Show Hover",precondition:void 0,kbOpts:{kbExpr:w.EditorContextKeys.editorTextFocus,primary:(0,y.KeyChord)(2048|41,2048|39),weight:100}})}run(u,f){if(!f.hasModel())return;let S=s.get(f);if(!S)return;const v=f.getPosition(),C=new I.Range(v.lineNumber,v.column,v.lineNumber,v.column),_=f.getOption(2)===2;S.showContentHover(C,1,_)}}class a extends D.EditorAction{constructor(){super({id:"editor.action.showDefinitionPreviewHover",label:t.localize(1,null),alias:"Show Definition Preview Hover",precondition:void 0})}run(u,f){const S=s.get(f);if(!S)return;const v=f.getPosition();if(!v)return;const C=new I.Range(v.lineNumber,v.column,v.lineNumber,v.column),_=p.GotoDefinitionAtPositionEditorContribution.get(f);if(!_)return;_.startFindDefinitionFromCursor(v).then(()=>{S.showContentHover(C,1,!0)})}}(0,D.registerEditorContribution)(s.ID,s),(0,D.registerEditorAction)(o),(0,D.registerEditorAction)(a),(0,r.registerThemingParticipant)((d,u)=>{const f=d.getColor(c.editorHoverHighlight);f&&u.addRule(`.monaco-editor .hoverHighlight { background-color: ${f}; }`);const S=d.getColor(c.editorHoverBackground);S&&u.addRule(`.monaco-editor .monaco-hover { background-color: ${S}; }`);const v=d.getColor(c.editorHoverBorder);v&&(u.addRule(`.monaco-editor .monaco-hover { border: 1px solid ${v}; }`),u.addRule(`.monaco-editor .monaco-hover .hover-row:not(:first-child):not(:empty) { border-top: 1px solid ${v.transparent(.5)}; }`),u.addRule(`.monaco-editor .monaco-hover hr { border-top: 1px solid ${v.transparent(.5)}; }`),u.addRule(`.monaco-editor .monaco-hover hr { border-bottom: 0px solid ${v.transparent(.5)}; }`));const C=d.getColor(c.textLinkForeground);C&&u.addRule(`.monaco-editor .monaco-hover a { color: ${C}; }`);const _=d.getColor(c.textLinkActiveForeground);_&&u.addRule(`.monaco-editor .monaco-hover a:hover { color: ${_}; }`);const L=d.getColor(c.editorHoverForeground);L&&u.addRule(`.monaco-editor .monaco-hover { color: ${L}; }`);const E=d.getColor(c.editorHoverStatusBarBackground);E&&u.addRule(`.monaco-editor .monaco-hover .hover-row .actions { background-color: ${E}; }`);const N=d.getColor(c.textCodeBlockBackground);N&&u.addRule(`.monaco-editor .monaco-hover code { background-color: ${N}; }`)})}),define(te[749],ie([1,0,2,15,3,293,306]),function(j,e,y,m,D,I,w){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ColorContribution=void 0;class b extends y.Disposable{constructor(h){super();this._editor=h,this._register(h.onMouseDown(g=>this.onMouseDown(g)))}dispose(){super.dispose()}onMouseDown(h){const g=h.target;if(g.type!==6||!g.detail.injectedText||g.detail.injectedText.options.attachedData!==I.ColorDecorationInjectedTextMarker||!g.range)return;const t=this._editor.getContribution(w.ModesHoverController.ID);if(!!t&&!t.isColorPickerVisible()){const i=new D.Range(g.range.startLineNumber,g.range.startColumn+1,g.range.endLineNumber,g.range.endColumn+1);t.showContentHover(i,1,!1)}}}e.ColorContribution=b,b.ID="editor.contrib.colorContribution",(0,m.registerEditorContribution)(b.ID,b)}),define(te[750],ie([1,0,160,161,292,235,660,706,661,707,662,673,709,749,663,664,665,710,294,716,669,670,614,305,208,298,296,306,719,299,718,720,721,722,723,724,694,674,675,210,304,676,289,302,677,726,727,295,728,70,140]),function(j,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0})});var Gt=this&&this.__createBinding||(Object.create?function(j,e,y,m){m===void 0&&(m=y),Object.defineProperty(j,m,{enumerable:!0,get:function(){return e[y]}})}:function(j,e,y,m){m===void 0&&(m=y),j[m]=e[y]}),Zt=this&&this.__exportStar||function(j,e){for(var y in j)y!=="default"&&!Object.prototype.hasOwnProperty.call(e,y)&&Gt(e,j,y)};define(te[752],ie([1,0,740,750,678,679,680,628,682,683,681,735,684]),function(j,e,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),Zt(y,e)})}).call(this);
|
||
|
||
|
||
/*!-----------------------------------------------------------------------------
|
||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||
* Version: 0.32.1(29a273516805a852aa8edc5e05059f119b13eff0)
|
||
* Released under the MIT license
|
||
* https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt
|
||
*-----------------------------------------------------------------------------*/
|
||
define("vs/basic-languages/monaco.contribution", ["require","require","vs/editor/editor.api"],(require)=>{
|
||
var moduleExports=(()=>{var v=Object.create;var m=Object.defineProperty;var y=Object.getOwnPropertyDescriptor;var x=Object.getOwnPropertyNames;var q=Object.getPrototypeOf,A=Object.prototype.hasOwnProperty;var M=e=>m(e,"__esModule",{value:!0});var a=(e=>typeof require!="undefined"?require:typeof Proxy!="undefined"?new Proxy(e,{get:(r,t)=>(typeof require!="undefined"?require:r)[t]}):e)(function(e){if(typeof require!="undefined")return require.apply(this,arguments);throw new Error('Dynamic require of "'+e+'" is not supported')});var D=(e,r)=>()=>(r||e((r={exports:{}}).exports,r),r.exports);var u=(e,r,t,n)=>{if(r&&typeof r=="object"||typeof r=="function")for(let o of x(r))!A.call(e,o)&&(t||o!=="default")&&m(e,o,{get:()=>r[o],enumerable:!(n=y(r,o))||n.enumerable});return e},p=(e,r)=>u(M(m(e!=null?v(q(e)):{},"default",!r&&e&&e.__esModule?{get:()=>e.default,enumerable:!0}:{value:e,enumerable:!0})),e);var d=D((w,c)=>{var b=p(a("vs/editor/editor.api"));c.exports=b});var s={};u(s,p(d()));var f={},g={},l=class{static getOrCreate(r){return g[r]||(g[r]=new l(r)),g[r]}_languageId;_loadingTriggered;_lazyLoadPromise;_lazyLoadPromiseResolve;_lazyLoadPromiseReject;constructor(r){this._languageId=r,this._loadingTriggered=!1,this._lazyLoadPromise=new Promise((t,n)=>{this._lazyLoadPromiseResolve=t,this._lazyLoadPromiseReject=n})}load(){return this._loadingTriggered||(this._loadingTriggered=!0,f[this._languageId].loader().then(r=>this._lazyLoadPromiseResolve(r),r=>this._lazyLoadPromiseReject(r))),this._lazyLoadPromise}};function i(e){let r=e.id;f[r]=e,s.languages.register(e);let t=l.getOrCreate(r);s.languages.registerTokensProviderFactory(r,{create:async()=>(await t.load()).language}),s.languages.onLanguage(r,async()=>{let n=await t.load();s.languages.setLanguageConfiguration(r,n.conf)})}i({id:"abap",extensions:[".abap"],aliases:["abap","ABAP"],loader:()=>new Promise((e,r)=>{a(["vs/basic-languages/abap/abap"],e,r)})});i({id:"apex",extensions:[".cls"],aliases:["Apex","apex"],mimetypes:["text/x-apex-source","text/x-apex"],loader:()=>new Promise((e,r)=>{a(["vs/basic-languages/apex/apex"],e,r)})});i({id:"azcli",extensions:[".azcli"],aliases:["Azure CLI","azcli"],loader:()=>new Promise((e,r)=>{a(["vs/basic-languages/azcli/azcli"],e,r)})});i({id:"bat",extensions:[".bat",".cmd"],aliases:["Batch","bat"],loader:()=>new Promise((e,r)=>{a(["vs/basic-languages/bat/bat"],e,r)})});i({id:"bicep",extensions:[".bicep"],aliases:["Bicep"],loader:()=>new Promise((e,r)=>{a(["vs/basic-languages/bicep/bicep"],e,r)})});i({id:"cameligo",extensions:[".mligo"],aliases:["Cameligo"],loader:()=>new Promise((e,r)=>{a(["vs/basic-languages/cameligo/cameligo"],e,r)})});i({id:"clojure",extensions:[".clj",".cljs",".cljc",".edn"],aliases:["clojure","Clojure"],loader:()=>new Promise((e,r)=>{a(["vs/basic-languages/clojure/clojure"],e,r)})});i({id:"coffeescript",extensions:[".coffee"],aliases:["CoffeeScript","coffeescript","coffee"],mimetypes:["text/x-coffeescript","text/coffeescript"],loader:()=>new Promise((e,r)=>{a(["vs/basic-languages/coffee/coffee"],e,r)})});i({id:"c",extensions:[".c",".h"],aliases:["C","c"],loader:()=>new Promise((e,r)=>{a(["vs/basic-languages/cpp/cpp"],e,r)})});i({id:"cpp",extensions:[".cpp",".cc",".cxx",".hpp",".hh",".hxx"],aliases:["C++","Cpp","cpp"],loader:()=>new Promise((e,r)=>{a(["vs/basic-languages/cpp/cpp"],e,r)})});i({id:"csharp",extensions:[".cs",".csx",".cake"],aliases:["C#","csharp"],loader:()=>new Promise((e,r)=>{a(["vs/basic-languages/csharp/csharp"],e,r)})});i({id:"csp",extensions:[],aliases:["CSP","csp"],loader:()=>new Promise((e,r)=>{a(["vs/basic-languages/csp/csp"],e,r)})});i({id:"css",extensions:[".css"],aliases:["CSS","css"],mimetypes:["text/css"],loader:()=>new Promise((e,r)=>{a(["vs/basic-languages/css/css"],e,r)})});i({id:"dart",extensions:[".dart"],aliases:["Dart","dart"],mimetypes:["text/x-dart-source","text/x-dart"],loader:()=>new Promise((e,r)=>{a(["vs/basic-languages/dart/dart"],e,r)})});i({id:"dockerfile",extensions:[".dockerfile"],filenames:["Dockerfile"],aliases:["Dockerfile"],loader:()=>new Promise((e,r)=>{a(["vs/basic-languages/dockerfile/dockerfile"],e,r)})});i({id:"ecl",extensions:[".ecl"],aliases:["ECL","Ecl","ecl"],loader:()=>new Promise((e,r)=>{a(["vs/basic-languages/ecl/ecl"],e,r)})});i({id:"elixir",extensions:[".ex",".exs"],aliases:["Elixir","elixir","ex"],loader:()=>new Promise((e,r)=>{a(["vs/basic-languages/elixir/elixir"],e,r)})});i({id:"flow9",extensions:[".flow"],aliases:["Flow9","Flow","flow9","flow"],loader:()=>new Promise((e,r)=>{a(["vs/basic-languages/flow9/flow9"],e,r)})});i({id:"fsharp",extensions:[".fs",".fsi",".ml",".mli",".fsx",".fsscript"],aliases:["F#","FSharp","fsharp"],loader:()=>new Promise((e,r)=>{a(["vs/basic-languages/fsharp/fsharp"],e,r)})});i({id:"freemarker2",extensions:[".ftl",".ftlh",".ftlx"],aliases:["FreeMarker2","Apache FreeMarker2"],loader:()=>new Promise((e,r)=>{a(["vs/basic-languages/freemarker2/freemarker2"],e,r)}).then(e=>e.TagAngleInterpolationDollar)});i({id:"freemarker2.tag-angle.interpolation-dollar",aliases:["FreeMarker2 (Angle/Dollar)","Apache FreeMarker2 (Angle/Dollar)"],loader:()=>new Promise((e,r)=>{a(["vs/basic-languages/freemarker2/freemarker2"],e,r)}).then(e=>e.TagAngleInterpolationDollar)});i({id:"freemarker2.tag-bracket.interpolation-dollar",aliases:["FreeMarker2 (Bracket/Dollar)","Apache FreeMarker2 (Bracket/Dollar)"],loader:()=>new Promise((e,r)=>{a(["vs/basic-languages/freemarker2/freemarker2"],e,r)}).then(e=>e.TagBracketInterpolationDollar)});i({id:"freemarker2.tag-angle.interpolation-bracket",aliases:["FreeMarker2 (Angle/Bracket)","Apache FreeMarker2 (Angle/Bracket)"],loader:()=>new Promise((e,r)=>{a(["vs/basic-languages/freemarker2/freemarker2"],e,r)}).then(e=>e.TagAngleInterpolationBracket)});i({id:"freemarker2.tag-bracket.interpolation-bracket",aliases:["FreeMarker2 (Bracket/Bracket)","Apache FreeMarker2 (Bracket/Bracket)"],loader:()=>new Promise((e,r)=>{a(["vs/basic-languages/freemarker2/freemarker2"],e,r)}).then(e=>e.TagBracketInterpolationBracket)});i({id:"freemarker2.tag-auto.interpolation-dollar",aliases:["FreeMarker2 (Auto/Dollar)","Apache FreeMarker2 (Auto/Dollar)"],loader:()=>new Promise((e,r)=>{a(["vs/basic-languages/freemarker2/freemarker2"],e,r)}).then(e=>e.TagAutoInterpolationDollar)});i({id:"freemarker2.tag-auto.interpolation-bracket",aliases:["FreeMarker2 (Auto/Bracket)","Apache FreeMarker2 (Auto/Bracket)"],loader:()=>new Promise((e,r)=>{a(["vs/basic-languages/freemarker2/freemarker2"],e,r)}).then(e=>e.TagAutoInterpolationBracket)});i({id:"go",extensions:[".go"],aliases:["Go"],loader:()=>new Promise((e,r)=>{a(["vs/basic-languages/go/go"],e,r)})});i({id:"graphql",extensions:[".graphql",".gql"],aliases:["GraphQL","graphql","gql"],mimetypes:["application/graphql"],loader:()=>new Promise((e,r)=>{a(["vs/basic-languages/graphql/graphql"],e,r)})});i({id:"handlebars",extensions:[".handlebars",".hbs"],aliases:["Handlebars","handlebars","hbs"],mimetypes:["text/x-handlebars-template"],loader:()=>new Promise((e,r)=>{a(["vs/basic-languages/handlebars/handlebars"],e,r)})});i({id:"hcl",extensions:[".tf",".tfvars",".hcl"],aliases:["Terraform","tf","HCL","hcl"],loader:()=>new Promise((e,r)=>{a(["vs/basic-languages/hcl/hcl"],e,r)})});i({id:"html",extensions:[".html",".htm",".shtml",".xhtml",".mdoc",".jsp",".asp",".aspx",".jshtm"],aliases:["HTML","htm","html","xhtml"],mimetypes:["text/html","text/x-jshtm","text/template","text/ng-template"],loader:()=>new Promise((e,r)=>{a(["vs/basic-languages/html/html"],e,r)})});i({id:"ini",extensions:[".ini",".properties",".gitconfig"],filenames:["config",".gitattributes",".gitconfig",".editorconfig"],aliases:["Ini","ini"],loader:()=>new Promise((e,r)=>{a(["vs/basic-languages/ini/ini"],e,r)})});i({id:"java",extensions:[".java",".jav"],aliases:["Java","java"],mimetypes:["text/x-java-source","text/x-java"],loader:()=>new Promise((e,r)=>{a(["vs/basic-languages/java/java"],e,r)})});i({id:"javascript",extensions:[".js",".es6",".jsx",".mjs",".cjs"],firstLine:"^#!.*\\bnode",filenames:["jakefile"],aliases:["JavaScript","javascript","js"],mimetypes:["text/javascript"],loader:()=>new Promise((e,r)=>{a(["vs/basic-languages/javascript/javascript"],e,r)})});i({id:"julia",extensions:[".jl"],aliases:["julia","Julia"],loader:()=>new Promise((e,r)=>{a(["vs/basic-languages/julia/julia"],e,r)})});i({id:"kotlin",extensions:[".kt"],aliases:["Kotlin","kotlin"],mimetypes:["text/x-kotlin-source","text/x-kotlin"],loader:()=>new Promise((e,r)=>{a(["vs/basic-languages/kotlin/kotlin"],e,r)})});i({id:"less",extensions:[".less"],aliases:["Less","less"],mimetypes:["text/x-less","text/less"],loader:()=>new Promise((e,r)=>{a(["vs/basic-languages/less/less"],e,r)})});i({id:"lexon",extensions:[".lex"],aliases:["Lexon"],loader:()=>new Promise((e,r)=>{a(["vs/basic-languages/lexon/lexon"],e,r)})});i({id:"lua",extensions:[".lua"],aliases:["Lua","lua"],loader:()=>new Promise((e,r)=>{a(["vs/basic-languages/lua/lua"],e,r)})});i({id:"liquid",extensions:[".liquid",".html.liquid"],aliases:["Liquid","liquid"],mimetypes:["application/liquid"],loader:()=>new Promise((e,r)=>{a(["vs/basic-languages/liquid/liquid"],e,r)})});i({id:"m3",extensions:[".m3",".i3",".mg",".ig"],aliases:["Modula-3","Modula3","modula3","m3"],loader:()=>new Promise((e,r)=>{a(["vs/basic-languages/m3/m3"],e,r)})});i({id:"markdown",extensions:[".md",".markdown",".mdown",".mkdn",".mkd",".mdwn",".mdtxt",".mdtext"],aliases:["Markdown","markdown"],loader:()=>new Promise((e,r)=>{a(["vs/basic-languages/markdown/markdown"],e,r)})});i({id:"mips",extensions:[".s"],aliases:["MIPS","MIPS-V"],mimetypes:["text/x-mips","text/mips","text/plaintext"],loader:()=>new Promise((e,r)=>{a(["vs/basic-languages/mips/mips"],e,r)})});i({id:"msdax",extensions:[".dax",".msdax"],aliases:["DAX","MSDAX"],loader:()=>new Promise((e,r)=>{a(["vs/basic-languages/msdax/msdax"],e,r)})});i({id:"mysql",extensions:[],aliases:["MySQL","mysql"],loader:()=>new Promise((e,r)=>{a(["vs/basic-languages/mysql/mysql"],e,r)})});i({id:"objective-c",extensions:[".m"],aliases:["Objective-C"],loader:()=>new Promise((e,r)=>{a(["vs/basic-languages/objective-c/objective-c"],e,r)})});i({id:"pascal",extensions:[".pas",".p",".pp"],aliases:["Pascal","pas"],mimetypes:["text/x-pascal-source","text/x-pascal"],loader:()=>new Promise((e,r)=>{a(["vs/basic-languages/pascal/pascal"],e,r)})});i({id:"pascaligo",extensions:[".ligo"],aliases:["Pascaligo","ligo"],loader:()=>new Promise((e,r)=>{a(["vs/basic-languages/pascaligo/pascaligo"],e,r)})});i({id:"perl",extensions:[".pl"],aliases:["Perl","pl"],loader:()=>new Promise((e,r)=>{a(["vs/basic-languages/perl/perl"],e,r)})});i({id:"pgsql",extensions:[],aliases:["PostgreSQL","postgres","pg","postgre"],loader:()=>new Promise((e,r)=>{a(["vs/basic-languages/pgsql/pgsql"],e,r)})});i({id:"php",extensions:[".php",".php4",".php5",".phtml",".ctp"],aliases:["PHP","php"],mimetypes:["application/x-php"],loader:()=>new Promise((e,r)=>{a(["vs/basic-languages/php/php"],e,r)})});i({id:"pla",extensions:[".pla"],loader:()=>new Promise((e,r)=>{a(["vs/basic-languages/pla/pla"],e,r)})});i({id:"postiats",extensions:[".dats",".sats",".hats"],aliases:["ATS","ATS/Postiats"],loader:()=>new Promise((e,r)=>{a(["vs/basic-languages/postiats/postiats"],e,r)})});i({id:"powerquery",extensions:[".pq",".pqm"],aliases:["PQ","M","Power Query","Power Query M"],loader:()=>new Promise((e,r)=>{a(["vs/basic-languages/powerquery/powerquery"],e,r)})});i({id:"powershell",extensions:[".ps1",".psm1",".psd1"],aliases:["PowerShell","powershell","ps","ps1"],loader:()=>new Promise((e,r)=>{a(["vs/basic-languages/powershell/powershell"],e,r)})});i({id:"proto",extensions:[".proto"],aliases:["protobuf","Protocol Buffers"],loader:()=>new Promise((e,r)=>{a(["vs/basic-languages/protobuf/protobuf"],e,r)})});i({id:"pug",extensions:[".jade",".pug"],aliases:["Pug","Jade","jade"],loader:()=>new Promise((e,r)=>{a(["vs/basic-languages/pug/pug"],e,r)})});i({id:"python",extensions:[".py",".rpy",".pyw",".cpy",".gyp",".gypi"],aliases:["Python","py"],firstLine:"^#!/.*\\bpython[0-9.-]*\\b",loader:()=>new Promise((e,r)=>{a(["vs/basic-languages/python/python"],e,r)})});i({id:"qsharp",extensions:[".qs"],aliases:["Q#","qsharp"],loader:()=>new Promise((e,r)=>{a(["vs/basic-languages/qsharp/qsharp"],e,r)})});i({id:"r",extensions:[".r",".rhistory",".rmd",".rprofile",".rt"],aliases:["R","r"],loader:()=>new Promise((e,r)=>{a(["vs/basic-languages/r/r"],e,r)})});i({id:"razor",extensions:[".cshtml"],aliases:["Razor","razor"],mimetypes:["text/x-cshtml"],loader:()=>new Promise((e,r)=>{a(["vs/basic-languages/razor/razor"],e,r)})});i({id:"redis",extensions:[".redis"],aliases:["redis"],loader:()=>new Promise((e,r)=>{a(["vs/basic-languages/redis/redis"],e,r)})});i({id:"redshift",extensions:[],aliases:["Redshift","redshift"],loader:()=>new Promise((e,r)=>{a(["vs/basic-languages/redshift/redshift"],e,r)})});i({id:"restructuredtext",extensions:[".rst"],aliases:["reStructuredText","restructuredtext"],loader:()=>new Promise((e,r)=>{a(["vs/basic-languages/restructuredtext/restructuredtext"],e,r)})});i({id:"ruby",extensions:[".rb",".rbx",".rjs",".gemspec",".pp"],filenames:["rakefile","Gemfile"],aliases:["Ruby","rb"],loader:()=>new Promise((e,r)=>{a(["vs/basic-languages/ruby/ruby"],e,r)})});i({id:"rust",extensions:[".rs",".rlib"],aliases:["Rust","rust"],loader:()=>new Promise((e,r)=>{a(["vs/basic-languages/rust/rust"],e,r)})});i({id:"sb",extensions:[".sb"],aliases:["Small Basic","sb"],loader:()=>new Promise((e,r)=>{a(["vs/basic-languages/sb/sb"],e,r)})});i({id:"scala",extensions:[".scala",".sc",".sbt"],aliases:["Scala","scala","SBT","Sbt","sbt","Dotty","dotty"],mimetypes:["text/x-scala-source","text/x-scala","text/x-sbt","text/x-dotty"],loader:()=>new Promise((e,r)=>{a(["vs/basic-languages/scala/scala"],e,r)})});i({id:"scheme",extensions:[".scm",".ss",".sch",".rkt"],aliases:["scheme","Scheme"],loader:()=>new Promise((e,r)=>{a(["vs/basic-languages/scheme/scheme"],e,r)})});i({id:"scss",extensions:[".scss"],aliases:["Sass","sass","scss"],mimetypes:["text/x-scss","text/scss"],loader:()=>new Promise((e,r)=>{a(["vs/basic-languages/scss/scss"],e,r)})});i({id:"shell",extensions:[".sh",".bash"],aliases:["Shell","sh"],loader:()=>new Promise((e,r)=>{a(["vs/basic-languages/shell/shell"],e,r)})});i({id:"sol",extensions:[".sol"],aliases:["sol","solidity","Solidity"],loader:()=>new Promise((e,r)=>{a(["vs/basic-languages/solidity/solidity"],e,r)})});i({id:"aes",extensions:[".aes"],aliases:["aes","sophia","Sophia"],loader:()=>new Promise((e,r)=>{a(["vs/basic-languages/sophia/sophia"],e,r)})});i({id:"sparql",extensions:[".rq"],aliases:["sparql","SPARQL"],loader:()=>new Promise((e,r)=>{a(["vs/basic-languages/sparql/sparql"],e,r)})});i({id:"sql",extensions:[".sql"],aliases:["SQL"],loader:()=>new Promise((e,r)=>{a(["vs/basic-languages/sql/sql"],e,r)})});i({id:"st",extensions:[".st",".iecst",".iecplc",".lc3lib"],aliases:["StructuredText","scl","stl"],loader:()=>new Promise((e,r)=>{a(["vs/basic-languages/st/st"],e,r)})});i({id:"swift",aliases:["Swift","swift"],extensions:[".swift"],mimetypes:["text/swift"],loader:()=>new Promise((e,r)=>{a(["vs/basic-languages/swift/swift"],e,r)})});i({id:"systemverilog",extensions:[".sv",".svh"],aliases:["SV","sv","SystemVerilog","systemverilog"],loader:()=>new Promise((e,r)=>{a(["vs/basic-languages/systemverilog/systemverilog"],e,r)})});i({id:"verilog",extensions:[".v",".vh"],aliases:["V","v","Verilog","verilog"],loader:()=>new Promise((e,r)=>{a(["vs/basic-languages/systemverilog/systemverilog"],e,r)})});i({id:"tcl",extensions:[".tcl"],aliases:["tcl","Tcl","tcltk","TclTk","tcl/tk","Tcl/Tk"],loader:()=>new Promise((e,r)=>{a(["vs/basic-languages/tcl/tcl"],e,r)})});i({id:"twig",extensions:[".twig"],aliases:["Twig","twig"],mimetypes:["text/x-twig"],loader:()=>new Promise((e,r)=>{a(["vs/basic-languages/twig/twig"],e,r)})});i({id:"typescript",extensions:[".ts",".tsx"],aliases:["TypeScript","ts","typescript"],mimetypes:["text/typescript"],loader:()=>new Promise((e,r)=>{a(["vs/basic-languages/typescript/typescript"],e,r)})});i({id:"vb",extensions:[".vb"],aliases:["Visual Basic","vb"],loader:()=>new Promise((e,r)=>{a(["vs/basic-languages/vb/vb"],e,r)})});i({id:"xml",extensions:[".xml",".dtd",".ascx",".csproj",".config",".wxi",".wxl",".wxs",".xaml",".svg",".svgz",".opf",".xsl"],firstLine:"(\\<\\?xml.*)|(\\<svg)|(\\<\\!doctype\\s+svg)",aliases:["XML","xml"],mimetypes:["text/xml","application/xml","application/xaml+xml","application/xml-dtd"],loader:()=>new Promise((e,r)=>{a(["vs/basic-languages/xml/xml"],e,r)})});i({id:"yaml",extensions:[".yaml",".yml"],aliases:["YAML","yaml","YML","yml"],mimetypes:["application/x-yaml","text/x-yaml"],loader:()=>new Promise((e,r)=>{a(["vs/basic-languages/yaml/yaml"],e,r)})});})();
|
||
return moduleExports;
|
||
});
|
||
|
||
/*!-----------------------------------------------------------------------------
|
||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||
* Version: 0.32.1(29a273516805a852aa8edc5e05059f119b13eff0)
|
||
* Released under the MIT license
|
||
* https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt
|
||
*-----------------------------------------------------------------------------*/
|
||
define("vs/language/css/monaco.contribution", ["require","require","vs/editor/editor.api"],(require)=>{
|
||
var moduleExports=(()=>{var w=Object.create;var a=Object.defineProperty;var h=Object.getOwnPropertyDescriptor;var S=Object.getOwnPropertyNames;var x=Object.getPrototypeOf,I=Object.prototype.hasOwnProperty;var m=e=>a(e,"__esModule",{value:!0});var d=(e=>typeof require!="undefined"?require:typeof Proxy!="undefined"?new Proxy(e,{get:(n,r)=>(typeof require!="undefined"?require:n)[r]}):e)(function(e){if(typeof require!="undefined")return require.apply(this,arguments);throw new Error('Dynamic require of "'+e+'" is not supported')});var M=(e,n)=>()=>(n||e((n={exports:{}}).exports,n),n.exports),b=(e,n)=>{for(var r in n)a(e,r,{get:n[r],enumerable:!0})},s=(e,n,r,i)=>{if(n&&typeof n=="object"||typeof n=="function")for(let t of S(n))!I.call(e,t)&&(r||t!=="default")&&a(e,t,{get:()=>n[t],enumerable:!(i=h(n,t))||i.enumerable});return e},D=(e,n)=>s(m(a(e!=null?w(x(e)):{},"default",!n&&e&&e.__esModule?{get:()=>e.default,enumerable:!0}:{value:e,enumerable:!0})),e),O=(e=>(n,r)=>e&&e.get(n)||(r=s(m({}),n,1),e&&e.set(n,r),r))(typeof WeakMap!="undefined"?new WeakMap:0);var C=M((E,v)=>{var P=D(d("vs/editor/editor.api"));v.exports=P});var k={};b(k,{cssDefaults:()=>p,lessDefaults:()=>f,scssDefaults:()=>c});var o={};s(o,D(C()));var g=class{_onDidChange=new o.Emitter;_options;_modeConfiguration;_languageId;constructor(n,r,i){this._languageId=n,this.setOptions(r),this.setModeConfiguration(i)}get onDidChange(){return this._onDidChange.event}get languageId(){return this._languageId}get modeConfiguration(){return this._modeConfiguration}get diagnosticsOptions(){return this.options}get options(){return this._options}setOptions(n){this._options=n||Object.create(null),this._onDidChange.fire(this)}setDiagnosticsOptions(n){this.setOptions(n)}setModeConfiguration(n){this._modeConfiguration=n||Object.create(null),this._onDidChange.fire(this)}},l={validate:!0,lint:{compatibleVendorPrefixes:"ignore",vendorPrefix:"warning",duplicateProperties:"warning",emptyRules:"warning",importStatement:"ignore",boxModel:"ignore",universalSelector:"ignore",zeroUnits:"ignore",fontFaceProperties:"warning",hexColorLength:"error",argumentsInColorFunction:"error",unknownProperties:"warning",ieHack:"ignore",unknownVendorSpecificProperties:"ignore",propertyIgnoredDueToDisplay:"warning",important:"ignore",float:"ignore",idSelector:"ignore"},data:{useDefaultDataProvider:!0}},u={completionItems:!0,hovers:!0,documentSymbols:!0,definitions:!0,references:!0,documentHighlights:!0,rename:!0,colors:!0,foldingRanges:!0,diagnostics:!0,selectionRanges:!0},p=new g("css",l,u),c=new g("scss",l,u),f=new g("less",l,u);o.languages.css={cssDefaults:p,lessDefaults:f,scssDefaults:c};function y(){return new Promise((e,n)=>{d(["vs/language/css/cssMode"],e,n)})}o.languages.onLanguage("less",()=>{y().then(e=>e.setupMode(f))});o.languages.onLanguage("scss",()=>{y().then(e=>e.setupMode(c))});o.languages.onLanguage("css",()=>{y().then(e=>e.setupMode(p))});return O(k);})();
|
||
return moduleExports;
|
||
});
|
||
|
||
/*!-----------------------------------------------------------------------------
|
||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||
* Version: 0.32.1(29a273516805a852aa8edc5e05059f119b13eff0)
|
||
* Released under the MIT license
|
||
* https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt
|
||
*-----------------------------------------------------------------------------*/
|
||
define("vs/language/html/monaco.contribution", ["require","require","vs/editor/editor.api"],(require)=>{
|
||
var moduleExports=(()=>{var w=Object.create;var d=Object.defineProperty;var R=Object.getOwnPropertyDescriptor;var H=Object.getOwnPropertyNames;var O=Object.getPrototypeOf,_=Object.prototype.hasOwnProperty;var y=e=>d(e,"__esModule",{value:!0});var f=(e=>typeof require!="undefined"?require:typeof Proxy!="undefined"?new Proxy(e,{get:(n,t)=>(typeof require!="undefined"?require:n)[t]}):e)(function(e){if(typeof require!="undefined")return require.apply(this,arguments);throw new Error('Dynamic require of "'+e+'" is not supported')});var k=(e,n)=>()=>(n||e((n={exports:{}}).exports,n),n.exports),T=(e,n)=>{for(var t in n)d(e,t,{get:n[t],enumerable:!0})},l=(e,n,t,r)=>{if(n&&typeof n=="object"||typeof n=="function")for(let o of H(n))!_.call(e,o)&&(t||o!=="default")&&d(e,o,{get:()=>n[o],enumerable:!(r=R(n,o))||r.enumerable});return e},b=(e,n)=>l(y(d(e!=null?w(O(e)):{},"default",!n&&e&&e.__esModule?{get:()=>e.default,enumerable:!0}:{value:e,enumerable:!0})),e),A=(e=>(n,t)=>e&&e.get(n)||(t=l(y({}),n,1),e&&e.set(n,t),t))(typeof WeakMap!="undefined"?new WeakMap:0);var h=k((z,v)=>{var E=b(f("vs/editor/editor.api"));v.exports=E});var V={};T(V,{handlebarDefaults:()=>M,handlebarLanguageService:()=>c,htmlDefaults:()=>x,htmlLanguageService:()=>p,razorDefaults:()=>I,razorLanguageService:()=>m,registerHTMLLanguageService:()=>s});var a={};l(a,b(h()));var L=class{_onDidChange=new a.Emitter;_options;_modeConfiguration;_languageId;constructor(n,t,r){this._languageId=n,this.setOptions(t),this.setModeConfiguration(r)}get onDidChange(){return this._onDidChange.event}get languageId(){return this._languageId}get options(){return this._options}get modeConfiguration(){return this._modeConfiguration}setOptions(n){this._options=n||Object.create(null),this._onDidChange.fire(this)}setModeConfiguration(n){this._modeConfiguration=n||Object.create(null),this._onDidChange.fire(this)}},F={tabSize:4,insertSpaces:!1,wrapLineLength:120,unformatted:'default": "a, abbr, acronym, b, bdo, big, br, button, cite, code, dfn, em, i, img, input, kbd, label, map, object, q, samp, select, small, span, strong, sub, sup, textarea, tt, var',contentUnformatted:"pre",indentInnerHtml:!1,preserveNewLines:!0,maxPreserveNewLines:void 0,indentHandlebars:!1,endWithNewline:!1,extraLiners:"head, body, /html",wrapAttributes:"auto"},u={format:F,suggest:{},data:{useDefaultDataProvider:!0}};function g(e){return{completionItems:!0,hovers:!0,documentSymbols:!0,links:!0,documentHighlights:!0,rename:!0,colors:!0,foldingRanges:!0,selectionRanges:!0,diagnostics:e===i,documentFormattingEdits:e===i,documentRangeFormattingEdits:e===i}}var i="html",D="handlebars",C="razor",p=s(i,u,g(i)),x=p.defaults,c=s(D,u,g(D)),M=c.defaults,m=s(C,u,g(C)),I=m.defaults;a.languages.html={htmlDefaults:x,razorDefaults:I,handlebarDefaults:M,htmlLanguageService:p,handlebarLanguageService:c,razorLanguageService:m,registerHTMLLanguageService:s};function P(){return new Promise((e,n)=>{f(["vs/language/html/htmlMode"],e,n)})}function s(e,n=u,t=g(e)){let r=new L(e,n,t),o,S=a.languages.onLanguage(e,async()=>{o=(await P()).setupMode(r)});return{defaults:r,dispose(){S.dispose(),o?.dispose(),o=void 0}}}return A(V);})();
|
||
return moduleExports;
|
||
});
|
||
|
||
/*!-----------------------------------------------------------------------------
|
||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||
* Version: 0.32.1(29a273516805a852aa8edc5e05059f119b13eff0)
|
||
* Released under the MIT license
|
||
* https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt
|
||
*-----------------------------------------------------------------------------*/
|
||
define("vs/language/json/monaco.contribution", ["require","require","vs/editor/editor.api"],(require)=>{
|
||
var moduleExports=(()=>{var p=Object.create;var s=Object.defineProperty;var y=Object.getOwnPropertyDescriptor;var v=Object.getOwnPropertyNames;var h=Object.getPrototypeOf,C=Object.prototype.hasOwnProperty;var d=e=>s(e,"__esModule",{value:!0});var g=(e=>typeof require!="undefined"?require:typeof Proxy!="undefined"?new Proxy(e,{get:(o,n)=>(typeof require!="undefined"?require:o)[n]}):e)(function(e){if(typeof require!="undefined")return require.apply(this,arguments);throw new Error('Dynamic require of "'+e+'" is not supported')});var D=(e,o)=>()=>(o||e((o={exports:{}}).exports,o),o.exports),b=(e,o)=>{for(var n in o)s(e,n,{get:o[n],enumerable:!0})},r=(e,o,n,a)=>{if(o&&typeof o=="object"||typeof o=="function")for(let i of v(o))!C.call(e,i)&&(n||i!=="default")&&s(e,i,{get:()=>o[i],enumerable:!(a=y(o,i))||a.enumerable});return e},u=(e,o)=>r(d(s(e!=null?p(h(e)):{},"default",!o&&e&&e.__esModule?{get:()=>e.default,enumerable:!0}:{value:e,enumerable:!0})),e),O=(e=>(o,n)=>e&&e.get(o)||(n=r(d({}),o,1),e&&e.set(o,n),n))(typeof WeakMap!="undefined"?new WeakMap:0);var m=D((I,c)=>{var M=u(g("vs/editor/editor.api"));c.exports=M});var L={};b(L,{jsonDefaults:()=>l});var t={};r(t,u(m()));var f=class{_onDidChange=new t.Emitter;_diagnosticsOptions;_modeConfiguration;_languageId;constructor(o,n,a){this._languageId=o,this.setDiagnosticsOptions(n),this.setModeConfiguration(a)}get onDidChange(){return this._onDidChange.event}get languageId(){return this._languageId}get modeConfiguration(){return this._modeConfiguration}get diagnosticsOptions(){return this._diagnosticsOptions}setDiagnosticsOptions(o){this._diagnosticsOptions=o||Object.create(null),this._onDidChange.fire(this)}setModeConfiguration(o){this._modeConfiguration=o||Object.create(null),this._onDidChange.fire(this)}},S={validate:!0,allowComments:!0,schemas:[],enableSchemaRequest:!1,schemaRequest:"warning",schemaValidation:"warning",comments:"error",trailingCommas:"error"},j={documentFormattingEdits:!0,documentRangeFormattingEdits:!0,completionItems:!0,hovers:!0,documentSymbols:!0,tokens:!0,colors:!0,foldingRanges:!0,diagnostics:!0,selectionRanges:!0},l=new f("json",S,j);t.languages.json={jsonDefaults:l};function _(){return new Promise((e,o)=>{g(["vs/language/json/jsonMode"],e,o)})}t.languages.register({id:"json",extensions:[".json",".bowerrc",".jshintrc",".jscsrc",".eslintrc",".babelrc",".har"],aliases:["JSON","json"],mimetypes:["application/json"]});t.languages.onLanguage("json",()=>{_().then(e=>e.setupMode(l))});return O(L);})();
|
||
return moduleExports;
|
||
});
|
||
|
||
/*!-----------------------------------------------------------------------------
|
||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||
* Version: 0.32.1(29a273516805a852aa8edc5e05059f119b13eff0)
|
||
* Released under the MIT license
|
||
* https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt
|
||
*-----------------------------------------------------------------------------*/
|
||
define("vs/language/typescript/monaco.contribution", ["require","require","vs/editor/editor.api"],(require)=>{
|
||
var moduleExports=(()=>{var k=Object.create;var m=Object.defineProperty;var N=Object.getOwnPropertyDescriptor;var H=Object.getOwnPropertyNames;var R=Object.getPrototypeOf,w=Object.prototype.hasOwnProperty;var D=n=>m(n,"__esModule",{value:!0});var b=(n=>typeof require!="undefined"?require:typeof Proxy!="undefined"?new Proxy(n,{get:(e,t)=>(typeof require!="undefined"?require:e)[t]}):n)(function(n){if(typeof require!="undefined")return require.apply(this,arguments);throw new Error('Dynamic require of "'+n+'" is not supported')});var M=(n,e)=>()=>(e||n((e={exports:{}}).exports,e),e.exports),F=(n,e)=>{for(var t in e)m(n,t,{get:e[t],enumerable:!0})},g=(n,e,t,o)=>{if(e&&typeof e=="object"||typeof e=="function")for(let s of H(e))!w.call(n,s)&&(t||s!=="default")&&m(n,s,{get:()=>e[s],enumerable:!(o=N(e,s))||o.enumerable});return n},L=(n,e)=>g(D(m(n!=null?k(R(n)):{},"default",!e&&n&&n.__esModule?{get:()=>n.default,enumerable:!0}:{value:n,enumerable:!0})),n),W=(n=>(e,t)=>n&&n.get(e)||(t=g(D({}),e,1),n&&n.set(e,t),t))(typeof WeakMap!="undefined"?new WeakMap:0);var I=M((B,C)=>{var A=L(b("vs/editor/editor.api"));C.exports=A});var V={};F(V,{JsxEmit:()=>u,ModuleKind:()=>d,ModuleResolutionKind:()=>h,NewLineKind:()=>y,ScriptTarget:()=>f,getJavaScriptWorker:()=>S,getTypeScriptWorker:()=>P,javascriptDefaults:()=>v,typescriptDefaults:()=>x,typescriptVersion:()=>_});var E="4.5.5";var l={};g(l,L(I()));var d=(r=>(r[r.None=0]="None",r[r.CommonJS=1]="CommonJS",r[r.AMD=2]="AMD",r[r.UMD=3]="UMD",r[r.System=4]="System",r[r.ES2015=5]="ES2015",r[r.ESNext=99]="ESNext",r))(d||{}),u=(a=>(a[a.None=0]="None",a[a.Preserve=1]="Preserve",a[a.React=2]="React",a[a.ReactNative=3]="ReactNative",a[a.ReactJSX=4]="ReactJSX",a[a.ReactJSXDev=5]="ReactJSXDev",a))(u||{}),y=(t=>(t[t.CarriageReturnLineFeed=0]="CarriageReturnLineFeed",t[t.LineFeed=1]="LineFeed",t))(y||{}),f=(i=>(i[i.ES3=0]="ES3",i[i.ES5=1]="ES5",i[i.ES2015=2]="ES2015",i[i.ES2016=3]="ES2016",i[i.ES2017=4]="ES2017",i[i.ES2018=5]="ES2018",i[i.ES2019=6]="ES2019",i[i.ES2020=7]="ES2020",i[i.ESNext=99]="ESNext",i[i.JSON=100]="JSON",i[i.Latest=99]="Latest",i))(f||{}),h=(t=>(t[t.Classic=1]="Classic",t[t.NodeJs=2]="NodeJs",t))(h||{}),O=class{_onDidChange=new l.Emitter;_onDidExtraLibsChange=new l.Emitter;_extraLibs;_removedExtraLibs;_eagerModelSync;_compilerOptions;_diagnosticsOptions;_workerOptions;_onDidExtraLibsChangeTimeout;_inlayHintsOptions;constructor(e,t,o,s){this._extraLibs=Object.create(null),this._removedExtraLibs=Object.create(null),this._eagerModelSync=!1,this.setCompilerOptions(e),this.setDiagnosticsOptions(t),this.setWorkerOptions(o),this.setInlayHintsOptions(s),this._onDidExtraLibsChangeTimeout=-1}get onDidChange(){return this._onDidChange.event}get onDidExtraLibsChange(){return this._onDidExtraLibsChange.event}get workerOptions(){return this._workerOptions}get inlayHintsOptions(){return this._inlayHintsOptions}getExtraLibs(){return this._extraLibs}addExtraLib(e,t){let o;if(typeof t>"u"?o=`ts:extralib-${Math.random().toString(36).substring(2,15)}`:o=t,this._extraLibs[o]&&this._extraLibs[o].content===e)return{dispose:()=>{}};let s=1;return this._removedExtraLibs[o]&&(s=this._removedExtraLibs[o]+1),this._extraLibs[o]&&(s=this._extraLibs[o].version+1),this._extraLibs[o]={content:e,version:s},this._fireOnDidExtraLibsChangeSoon(),{dispose:()=>{let p=this._extraLibs[o];!p||p.version===s&&(delete this._extraLibs[o],this._removedExtraLibs[o]=s,this._fireOnDidExtraLibsChangeSoon())}}}setExtraLibs(e){for(let t in this._extraLibs)this._removedExtraLibs[t]=this._extraLibs[t].version;if(this._extraLibs=Object.create(null),e&&e.length>0)for(let t of e){let o=t.filePath||`ts:extralib-${Math.random().toString(36).substring(2,15)}`,s=t.content,p=1;this._removedExtraLibs[o]&&(p=this._removedExtraLibs[o]+1),this._extraLibs[o]={content:s,version:p}}this._fireOnDidExtraLibsChangeSoon()}_fireOnDidExtraLibsChangeSoon(){this._onDidExtraLibsChangeTimeout===-1&&(this._onDidExtraLibsChangeTimeout=window.setTimeout(()=>{this._onDidExtraLibsChangeTimeout=-1,this._onDidExtraLibsChange.fire(void 0)},0))}getCompilerOptions(){return this._compilerOptions}setCompilerOptions(e){this._compilerOptions=e||Object.create(null),this._onDidChange.fire(void 0)}getDiagnosticsOptions(){return this._diagnosticsOptions}setDiagnosticsOptions(e){this._diagnosticsOptions=e||Object.create(null),this._onDidChange.fire(void 0)}setWorkerOptions(e){this._workerOptions=e||Object.create(null),this._onDidChange.fire(void 0)}setInlayHintsOptions(e){this._inlayHintsOptions=e||Object.create(null),this._onDidChange.fire(void 0)}setMaximumWorkerIdleTime(e){}setEagerModelSync(e){this._eagerModelSync=e}getEagerModelSync(){return this._eagerModelSync}},_=E,x=new O({allowNonTsExtensions:!0,target:99},{noSemanticValidation:!1,noSyntaxValidation:!1,onlyVisible:!1},{},{}),v=new O({allowNonTsExtensions:!0,allowJs:!0,target:99},{noSemanticValidation:!0,noSyntaxValidation:!1,onlyVisible:!1},{},{}),P=()=>c().then(n=>n.getTypeScriptWorker()),S=()=>c().then(n=>n.getJavaScriptWorker());l.languages.typescript={ModuleKind:d,JsxEmit:u,NewLineKind:y,ScriptTarget:f,ModuleResolutionKind:h,typescriptVersion:_,typescriptDefaults:x,javascriptDefaults:v,getTypeScriptWorker:P,getJavaScriptWorker:S};function c(){return new Promise((n,e)=>{b(["vs/language/typescript/tsMode"],n,e)})}l.languages.onLanguage("typescript",()=>c().then(n=>n.setupTypeScript(x)));l.languages.onLanguage("javascript",()=>c().then(n=>n.setupJavaScript(v)));return W(V);})();
|
||
return moduleExports;
|
||
});
|
||
|
||
define("vs/editor/editor.main", ["vs/editor/edcore.main","vs/basic-languages/monaco.contribution","vs/language/css/monaco.contribution","vs/language/html/monaco.contribution","vs/language/json/monaco.contribution","vs/language/typescript/monaco.contribution"], function(api) { return api; }); |